From mboxrd@z Thu Jan 1 00:00:00 1970 From: Titus von der Malsburg Subject: Re: [Bug] ~Verbatim~ in headlines breaks LaTeX Date: Fri, 29 May 2015 22:18:02 -0700 Message-ID: <87vbfa63ud.fsf@posteo.de> References: <87382eg2f4.fsf@posteo.de> <87617a65y5.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyZ9y-00058J-2f for emacs-orgmode@gnu.org; Sat, 30 May 2015 01:18:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyZ9u-0000P1-O0 for emacs-orgmode@gnu.org; Sat, 30 May 2015 01:18:14 -0400 Received: from mx02.posteo.de ([89.146.194.165]:43215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyZ9u-0000Ou-Hw for emacs-orgmode@gnu.org; Sat, 30 May 2015 01:18:10 -0400 In-reply-to: <87617a65y5.fsf@alphaville.usersys.redhat.com> 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: Nick Dokos Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2015-05-29 Fri 21:32, Nick Dokos wrote: > 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. >> =20 >> $ >> 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=3Dverbwithin >> >> One solution is uses \cprotect: >> >> \cprotect\section{The variable \verb~JAVA_HOME~} >> >> I don=E2=80=99t know how the exporter works but I wouldn=E2=80=99t be su= rprised if it >> wasn=E2=80=99t 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=3DJAVA_HOME][Google >> ~JAVA_HOME~]] >> >> Is there anything that speaks against using \texttt for ~verbatim~? The >> HTML exporter uses the code tag for ~verbatim~ and =3Dcode=3D. >> >> 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=3D14257 > > 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? Yes, I saw this thread after sending the previous email. According to `org-latex-text-markup-alist', protectedtexttt should be used, which seems like a good-enough solution for this problem. But for some reason that doesn=E2=80=99t happen. BTW, I used the latest development versions of Emacs (-Q) and Org-mode to test this. Titus --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVaUgLAAoJEK40WfPGE2id/40IAK0Tx6gMKA/fTgpJbGqktnBZ HHS1a/aPJSlrRbIa9FdttirqMpivgrpsvklNCRDjkNVq4Tm3JDPK2g2p7YB5uDK2 HLTP8jE5JdzBGjy8/ql97h2ymwte767wCJBJvS++iaKihyera50LfP+n/lBn2WtP I2lOZ6XsU9Xm04Fqv/LcPiUQ2CsAbSduxWVlsBAOOPnp5Zfr10JWQSEFWNikySJo y1FYGMaVFOTWdZsCf+vI+ybPUHmfmSmUvSUnm7RZEH1GJeC4dRT8qHUQbhNxKKD3 uciRXV3F5omrreb/9a5TYidToPoVxMWY8rHad8Ga3kaNAQolm1tEoeL6AVLUiA4= =/ypo -----END PGP SIGNATURE----- --=-=-=--