1

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

\begin{frame}[fragile]

\note{\begin{verbatim}
 #
\end{verbatim}
}

\end{frame}

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

1
  • 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

2

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}}
\documentclass{beamer}
\usepackage{verbatimbox}
\usepackage{pgfpages}
\setbeamertemplate{note page}{\insertnote\par}
\begin{document}
\begin{frame}[fragile]
\begin{verbbox}
 # verbatim
 \material $%here
\end{verbbox}
\note{\theverbbox}
Here is my slide
\end{frame}
\end{document}

enter image description here

0

You must log in to answer this question.

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