Disable algorithm numbers for only certain algorithms in a document











up vote
2
down vote

favorite












I have the following MWE



documentclass[runningheads]{llncs}

usepackage{algorithm}
usepackage{algorithmic}

begin{document}

begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
ENSURE $A$.
STATE Set $A$
end{algorithmic}
end{algorithm}

begin{algorithm}[H]
renewcommand{thealgorithm}{}
floatname{algorithm}{Not an algorithm but want the layout}
caption{BLEH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}

begin{algorithm}[H]
caption{BLAH}
begin{algorithmic}[1]
REQUIRE $Input$
STATE Compute $B$
end{algorithmic}
end{algorithm}

end{document}


which produces this this where the third entity is titled Algorithm 3 but I want it to be titled Algorithm 2. How do I achieve this?



EDIT I don't want to use any other algorithm environment.










share|improve this question




























    up vote
    2
    down vote

    favorite












    I have the following MWE



    documentclass[runningheads]{llncs}

    usepackage{algorithm}
    usepackage{algorithmic}

    begin{document}

    begin{algorithm}[H]
    caption{BLAH}
    begin{algorithmic}[1]
    REQUIRE $Input$
    ENSURE $A$.
    STATE Set $A$
    end{algorithmic}
    end{algorithm}

    begin{algorithm}[H]
    renewcommand{thealgorithm}{}
    floatname{algorithm}{Not an algorithm but want the layout}
    caption{BLEH}
    begin{algorithmic}[1]
    REQUIRE $Input$
    STATE Compute $B$
    end{algorithmic}
    end{algorithm}

    begin{algorithm}[H]
    caption{BLAH}
    begin{algorithmic}[1]
    REQUIRE $Input$
    STATE Compute $B$
    end{algorithmic}
    end{algorithm}

    end{document}


    which produces this this where the third entity is titled Algorithm 3 but I want it to be titled Algorithm 2. How do I achieve this?



    EDIT I don't want to use any other algorithm environment.










    share|improve this question


























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I have the following MWE



      documentclass[runningheads]{llncs}

      usepackage{algorithm}
      usepackage{algorithmic}

      begin{document}

      begin{algorithm}[H]
      caption{BLAH}
      begin{algorithmic}[1]
      REQUIRE $Input$
      ENSURE $A$.
      STATE Set $A$
      end{algorithmic}
      end{algorithm}

      begin{algorithm}[H]
      renewcommand{thealgorithm}{}
      floatname{algorithm}{Not an algorithm but want the layout}
      caption{BLEH}
      begin{algorithmic}[1]
      REQUIRE $Input$
      STATE Compute $B$
      end{algorithmic}
      end{algorithm}

      begin{algorithm}[H]
      caption{BLAH}
      begin{algorithmic}[1]
      REQUIRE $Input$
      STATE Compute $B$
      end{algorithmic}
      end{algorithm}

      end{document}


      which produces this this where the third entity is titled Algorithm 3 but I want it to be titled Algorithm 2. How do I achieve this?



      EDIT I don't want to use any other algorithm environment.










      share|improve this question















      I have the following MWE



      documentclass[runningheads]{llncs}

      usepackage{algorithm}
      usepackage{algorithmic}

      begin{document}

      begin{algorithm}[H]
      caption{BLAH}
      begin{algorithmic}[1]
      REQUIRE $Input$
      ENSURE $A$.
      STATE Set $A$
      end{algorithmic}
      end{algorithm}

      begin{algorithm}[H]
      renewcommand{thealgorithm}{}
      floatname{algorithm}{Not an algorithm but want the layout}
      caption{BLEH}
      begin{algorithmic}[1]
      REQUIRE $Input$
      STATE Compute $B$
      end{algorithmic}
      end{algorithm}

      begin{algorithm}[H]
      caption{BLAH}
      begin{algorithmic}[1]
      REQUIRE $Input$
      STATE Compute $B$
      end{algorithmic}
      end{algorithm}

      end{document}


      which produces this this where the third entity is titled Algorithm 3 but I want it to be titled Algorithm 2. How do I achieve this?



      EDIT I don't want to use any other algorithm environment.







      numbering algorithms algorithmic






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 9 hours ago

























      asked 9 hours ago









      User525412790

      16410




      16410






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          Step down the counter:



          documentclass{article}

          usepackage{algorithm}
          usepackage{algorithmic}

          newcommand{altcaption}[1]{%
          addtocounter{algorithm}{-1}%
          renewcommandthealgorithm{unskip}%
          floatname{algorithm}{#1}%
          caption
          }

          begin{document}

          begin{algorithm}[H]
          caption{BLAH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          ENSURE $A$.
          STATE Set $A$
          end{algorithmic}
          end{algorithm}

          begin{algorithm}[H]
          altcaption{Not an algorithm but want the layout}{BLEH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          STATE Compute $B$
          end{algorithmic}
          end{algorithm}

          begin{algorithm}[H]
          caption{BLAH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          STATE Compute $B$
          end{algorithmic}
          end{algorithm}

          end{document}


          enter image description here






          share|improve this answer























          • Neat-O! Thanks!
            – User525412790
            9 hours ago






          • 1




            @User525412790 I made a small change to remove the added space.
            – egreg
            9 hours ago










          • What's the change? I don't see anything different.
            – User525412790
            9 hours ago










          • @User525412790 renewcommandthealgorithm{unskip}
            – egreg
            9 hours ago










          • Oh I guess I saw the modified version directly.
            – User525412790
            9 hours ago













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462037%2fdisable-algorithm-numbers-for-only-certain-algorithms-in-a-document%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          Step down the counter:



          documentclass{article}

          usepackage{algorithm}
          usepackage{algorithmic}

          newcommand{altcaption}[1]{%
          addtocounter{algorithm}{-1}%
          renewcommandthealgorithm{unskip}%
          floatname{algorithm}{#1}%
          caption
          }

          begin{document}

          begin{algorithm}[H]
          caption{BLAH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          ENSURE $A$.
          STATE Set $A$
          end{algorithmic}
          end{algorithm}

          begin{algorithm}[H]
          altcaption{Not an algorithm but want the layout}{BLEH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          STATE Compute $B$
          end{algorithmic}
          end{algorithm}

          begin{algorithm}[H]
          caption{BLAH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          STATE Compute $B$
          end{algorithmic}
          end{algorithm}

          end{document}


          enter image description here






          share|improve this answer























          • Neat-O! Thanks!
            – User525412790
            9 hours ago






          • 1




            @User525412790 I made a small change to remove the added space.
            – egreg
            9 hours ago










          • What's the change? I don't see anything different.
            – User525412790
            9 hours ago










          • @User525412790 renewcommandthealgorithm{unskip}
            – egreg
            9 hours ago










          • Oh I guess I saw the modified version directly.
            – User525412790
            9 hours ago

















          up vote
          2
          down vote



          accepted










          Step down the counter:



          documentclass{article}

          usepackage{algorithm}
          usepackage{algorithmic}

          newcommand{altcaption}[1]{%
          addtocounter{algorithm}{-1}%
          renewcommandthealgorithm{unskip}%
          floatname{algorithm}{#1}%
          caption
          }

          begin{document}

          begin{algorithm}[H]
          caption{BLAH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          ENSURE $A$.
          STATE Set $A$
          end{algorithmic}
          end{algorithm}

          begin{algorithm}[H]
          altcaption{Not an algorithm but want the layout}{BLEH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          STATE Compute $B$
          end{algorithmic}
          end{algorithm}

          begin{algorithm}[H]
          caption{BLAH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          STATE Compute $B$
          end{algorithmic}
          end{algorithm}

          end{document}


          enter image description here






          share|improve this answer























          • Neat-O! Thanks!
            – User525412790
            9 hours ago






          • 1




            @User525412790 I made a small change to remove the added space.
            – egreg
            9 hours ago










          • What's the change? I don't see anything different.
            – User525412790
            9 hours ago










          • @User525412790 renewcommandthealgorithm{unskip}
            – egreg
            9 hours ago










          • Oh I guess I saw the modified version directly.
            – User525412790
            9 hours ago















          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          Step down the counter:



          documentclass{article}

          usepackage{algorithm}
          usepackage{algorithmic}

          newcommand{altcaption}[1]{%
          addtocounter{algorithm}{-1}%
          renewcommandthealgorithm{unskip}%
          floatname{algorithm}{#1}%
          caption
          }

          begin{document}

          begin{algorithm}[H]
          caption{BLAH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          ENSURE $A$.
          STATE Set $A$
          end{algorithmic}
          end{algorithm}

          begin{algorithm}[H]
          altcaption{Not an algorithm but want the layout}{BLEH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          STATE Compute $B$
          end{algorithmic}
          end{algorithm}

          begin{algorithm}[H]
          caption{BLAH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          STATE Compute $B$
          end{algorithmic}
          end{algorithm}

          end{document}


          enter image description here






          share|improve this answer














          Step down the counter:



          documentclass{article}

          usepackage{algorithm}
          usepackage{algorithmic}

          newcommand{altcaption}[1]{%
          addtocounter{algorithm}{-1}%
          renewcommandthealgorithm{unskip}%
          floatname{algorithm}{#1}%
          caption
          }

          begin{document}

          begin{algorithm}[H]
          caption{BLAH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          ENSURE $A$.
          STATE Set $A$
          end{algorithmic}
          end{algorithm}

          begin{algorithm}[H]
          altcaption{Not an algorithm but want the layout}{BLEH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          STATE Compute $B$
          end{algorithmic}
          end{algorithm}

          begin{algorithm}[H]
          caption{BLAH}
          begin{algorithmic}[1]
          REQUIRE $Input$
          STATE Compute $B$
          end{algorithmic}
          end{algorithm}

          end{document}


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 9 hours ago

























          answered 9 hours ago









          egreg

          700k8518633138




          700k8518633138












          • Neat-O! Thanks!
            – User525412790
            9 hours ago






          • 1




            @User525412790 I made a small change to remove the added space.
            – egreg
            9 hours ago










          • What's the change? I don't see anything different.
            – User525412790
            9 hours ago










          • @User525412790 renewcommandthealgorithm{unskip}
            – egreg
            9 hours ago










          • Oh I guess I saw the modified version directly.
            – User525412790
            9 hours ago




















          • Neat-O! Thanks!
            – User525412790
            9 hours ago






          • 1




            @User525412790 I made a small change to remove the added space.
            – egreg
            9 hours ago










          • What's the change? I don't see anything different.
            – User525412790
            9 hours ago










          • @User525412790 renewcommandthealgorithm{unskip}
            – egreg
            9 hours ago










          • Oh I guess I saw the modified version directly.
            – User525412790
            9 hours ago


















          Neat-O! Thanks!
          – User525412790
          9 hours ago




          Neat-O! Thanks!
          – User525412790
          9 hours ago




          1




          1




          @User525412790 I made a small change to remove the added space.
          – egreg
          9 hours ago




          @User525412790 I made a small change to remove the added space.
          – egreg
          9 hours ago












          What's the change? I don't see anything different.
          – User525412790
          9 hours ago




          What's the change? I don't see anything different.
          – User525412790
          9 hours ago












          @User525412790 renewcommandthealgorithm{unskip}
          – egreg
          9 hours ago




          @User525412790 renewcommandthealgorithm{unskip}
          – egreg
          9 hours ago












          Oh I guess I saw the modified version directly.
          – User525412790
          9 hours ago






          Oh I guess I saw the modified version directly.
          – User525412790
          9 hours ago




















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462037%2fdisable-algorithm-numbers-for-only-certain-algorithms-in-a-document%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          サソリ

          広島県道265号伴広島線

          Accessing regular linux commands in Huawei's Dopra Linux