I'm trying to use a # character inside a verbatim that's inside a note :




This produces the following errror :

>   ! Illegal parameter number in definition of \beamer@todo.
>    to be read again> 
>   l.5 }

How can I write the # character in a way that doesn't break the latex compilation ?

Thanks in advanced,

PS : This is related to the following problem in pandoc : https://github.com/jgm/pandoc/issues/3293

  • Welcome to TeX.SX! This will not work at all, since you cannot use the verbatim environment as argument of a macro, here \note (at least it looks as if \note takes an argument). When parsing this argument, # signals a parameter number that has to follow. To solve your problem you have to untangle \note and verbatim environment.
    – gernot
    Dec 9, 2016 at 15:43

1 Answer 1


I don't know how to get the particular layout you may desire (no info was given), but the verbatimbox package can be used to get the verbatim content into the \note.

\AtBeginDocument{\setbeameroption{show notes on second screen=left}}
\setbeamertemplate{note page}{\insertnote\par}
 # verbatim
 \material $%here
Here is my slide

enter image description here


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .