[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [Bug] ~Verbatim~ in headlines breaks LaTeX

From: Titus von der Malsburg
Subject: [O] [Bug] ~Verbatim~ in headlines breaks LaTeX
Date: Fri, 29 May 2015 20:38:39 -0700

* The variable ~JAVA_HOME~

Exporting this to LaTeX and then compiling to PDF, produces the
following error:

  ! Missing $ inserted.
  <inserted text> 
  l.35 \section{The variable \verb~JAVA_HOME~}

Apparently, \verb is not allow in command arguments:


One solution is uses \cprotect:

  \cprotect\section{The variable \verb~JAVA_HOME~}

I don’t know how the exporter works but I wouldn’t be surprised if it
wasn’t entirely trivial to implement this.

The problem also exists in other situations where ~verbatim~ is used in
embedded contexts, for example when used in link descriptions:


Is there anything that speaks against using \texttt for ~verbatim~?  The
HTML exporter uses the code tag for ~verbatim~ and =code=.


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]