Inline todo-notes including verbatim blocks?

How to pronounce 'c++' in Spanish

What is purpose of DB Browser(dbbrowser.aspx) under admin tool?

Older movie/show about humans on derelict alien warship which refuels by passing through a star

Negative Resistance

Cayley's Matrix Notation

Multiple options vs single option UI

How do I produce this Greek letter koppa: Ϟ in pdfLaTeX?

Will I lose my paid in full property

Mistake in years of experience in resume?

A faster way to compute the largest prime factor

Injection into a proper class and choice without regularity

Find a stone which is not the lightest one

My bank got bought out, am I now going to have to start filing tax returns in a different state?

Find the identical rows in a matrix

Is there a word for the censored part of a video?

"My boss was furious with me and I have been fired" vs. "My boss was furious with me and I was fired"

How much cash can I safely carry into the USA and avoid civil forfeiture?

Trouble removing package using Yum on CentOS7

What makes accurate emulation of old systems a difficult task?

Is Diceware more secure than a long passphrase?

Nails holding drywall

Magical attacks and overcoming damage resistance

Philosophical question on logistic regression: why isn't the optimal threshold value trained?

How long after the last departure shall the airport stay open for an emergency return?



Inline todo-notes including verbatim blocks?














0















I'm making a major change to a document, and I want to turn some quite large sections into notes using todonotes. According to the documentation, this can be done with



todo[inline,caption={My Caption}]{
begin{minipage}{textwidth}

< all my stuff >

end{minipage}
}


The trouble is that my sections include clumps of computer code, either with the verbatim environment, or with the lstlistings environment from the listings package. And each one throws an error about the brackets - the closing bracket of the todo material seems to be mishandled by the other environments, even though they're in a minipage. I can get the correct visual effect by putting all computer code into texttt{ } but then I need to fiddle with newlines and horizontal whitespace to show indentation.



Here's a minimal non-working example:



documentclass{article}

usepackage{todonotes}

begin{document}
This is a test of an inline note:

todo[inline,caption={My caption}]{
begin{minipage}{textwidth}
A test of verbatim:
begin{verbatim}
And this...
... is this!
end{verbatim}
end{minipage}
}

end{document}


The error is: Argument of @xverbatim has an extra }. I've tried using Verbatim from the fancyvrb package, and also the listings package, with the same error.



So - how can I include a verbatim environment inside a minipage inside a todo note?









share



























    0















    I'm making a major change to a document, and I want to turn some quite large sections into notes using todonotes. According to the documentation, this can be done with



    todo[inline,caption={My Caption}]{
    begin{minipage}{textwidth}

    < all my stuff >

    end{minipage}
    }


    The trouble is that my sections include clumps of computer code, either with the verbatim environment, or with the lstlistings environment from the listings package. And each one throws an error about the brackets - the closing bracket of the todo material seems to be mishandled by the other environments, even though they're in a minipage. I can get the correct visual effect by putting all computer code into texttt{ } but then I need to fiddle with newlines and horizontal whitespace to show indentation.



    Here's a minimal non-working example:



    documentclass{article}

    usepackage{todonotes}

    begin{document}
    This is a test of an inline note:

    todo[inline,caption={My caption}]{
    begin{minipage}{textwidth}
    A test of verbatim:
    begin{verbatim}
    And this...
    ... is this!
    end{verbatim}
    end{minipage}
    }

    end{document}


    The error is: Argument of @xverbatim has an extra }. I've tried using Verbatim from the fancyvrb package, and also the listings package, with the same error.



    So - how can I include a verbatim environment inside a minipage inside a todo note?









    share

























      0












      0








      0


      1






      I'm making a major change to a document, and I want to turn some quite large sections into notes using todonotes. According to the documentation, this can be done with



      todo[inline,caption={My Caption}]{
      begin{minipage}{textwidth}

      < all my stuff >

      end{minipage}
      }


      The trouble is that my sections include clumps of computer code, either with the verbatim environment, or with the lstlistings environment from the listings package. And each one throws an error about the brackets - the closing bracket of the todo material seems to be mishandled by the other environments, even though they're in a minipage. I can get the correct visual effect by putting all computer code into texttt{ } but then I need to fiddle with newlines and horizontal whitespace to show indentation.



      Here's a minimal non-working example:



      documentclass{article}

      usepackage{todonotes}

      begin{document}
      This is a test of an inline note:

      todo[inline,caption={My caption}]{
      begin{minipage}{textwidth}
      A test of verbatim:
      begin{verbatim}
      And this...
      ... is this!
      end{verbatim}
      end{minipage}
      }

      end{document}


      The error is: Argument of @xverbatim has an extra }. I've tried using Verbatim from the fancyvrb package, and also the listings package, with the same error.



      So - how can I include a verbatim environment inside a minipage inside a todo note?









      share














      I'm making a major change to a document, and I want to turn some quite large sections into notes using todonotes. According to the documentation, this can be done with



      todo[inline,caption={My Caption}]{
      begin{minipage}{textwidth}

      < all my stuff >

      end{minipage}
      }


      The trouble is that my sections include clumps of computer code, either with the verbatim environment, or with the lstlistings environment from the listings package. And each one throws an error about the brackets - the closing bracket of the todo material seems to be mishandled by the other environments, even though they're in a minipage. I can get the correct visual effect by putting all computer code into texttt{ } but then I need to fiddle with newlines and horizontal whitespace to show indentation.



      Here's a minimal non-working example:



      documentclass{article}

      usepackage{todonotes}

      begin{document}
      This is a test of an inline note:

      todo[inline,caption={My caption}]{
      begin{minipage}{textwidth}
      A test of verbatim:
      begin{verbatim}
      And this...
      ... is this!
      end{verbatim}
      end{minipage}
      }

      end{document}


      The error is: Argument of @xverbatim has an extra }. I've tried using Verbatim from the fancyvrb package, and also the listings package, with the same error.



      So - how can I include a verbatim environment inside a minipage inside a todo note?







      verbatim todonotes





      share












      share










      share



      share










      asked 1 min ago









      AlasdairAlasdair

      2,33232147




      2,33232147






















          0






          active

          oldest

          votes












          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',
          autoActivateHeartbeat: false,
          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%2f487681%2finline-todo-notes-including-verbatim-blocks%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f487681%2finline-todo-notes-including-verbatim-blocks%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

          Paper upload error, “Upload failed: The top margin is 0.715 in on page 3, which is below the required...

          Emraan Hashmi Filmografia | Linki zewnętrzne | Menu nawigacyjneGulshan GroverGulshan...

          How can I write this formula?newline and italics added with leqWhy does widehat behave differently if I...