From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [Bug] ~Verbatim~ in headlines breaks LaTeX Date: Sat, 30 May 2015 00:32:34 -0400 Message-ID: <87617a65y5.fsf@alphaville.usersys.redhat.com> References: <87382eg2f4.fsf@posteo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyYS4-0007KD-2A for emacs-orgmode@gnu.org; Sat, 30 May 2015 00:32:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyYS0-0005zI-QP for emacs-orgmode@gnu.org; Sat, 30 May 2015 00:32:52 -0400 Received: from plane.gmane.org ([80.91.229.3]:42707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyYS0-0005z3-Js for emacs-orgmode@gnu.org; Sat, 30 May 2015 00:32:48 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YyYRy-0005G6-9f for emacs-orgmode@gnu.org; Sat, 30 May 2015 06:32:46 +0200 Received: from pool-108-7-223-120.bstnma.fios.verizon.net ([108.7.223.120]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 30 May 2015 06:32:46 +0200 Received: from ndokos by pool-108-7-223-120.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 30 May 2015 06:32:46 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Titus von der Malsburg writes: > #+BEGIN_EXAMPLE > * The variable ~JAVA_HOME~ > & > #+END_EXAMPLE > > Exporting this to LaTeX and then compiling to PDF, produces the > following error: > > ! Missing $ inserted. > > $ > l.35 \section{The variable \verb~JAVA_HOME~} > > Apparently, \verb is not allow in command arguments: > > http://www.tex.ac.uk/cgi-bin/texfaq2html?label=verbwithin > > 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: > > [[https://encrypted.google.com/search?q=JAVA_HOME][Google > ~JAVA_HOME~]] > > Is there anything that speaks against using \texttt for ~verbatim~? The > HTML exporter uses the code tag for ~verbatim~ and =code=. > > Titus I don't know what \cprotect does but there was a discussion of this a long time ago: http://thread.gmane.org/gmane.emacs.orgmode/14256/focus=14257 and back then, Carsten changed it so that verbatim in headlines used \texttt - but that was the old latex exporter: I take it things are different now? Nick