From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Broschinsky Subject: Re: Why is text marked as ~verbatim~ exported in LaTeX as \texttt{} Date: Sat, 29 Jan 2011 10:42:27 -0700 Message-ID: References: <15472.1296258039@gamaville.americas.hpqcorp.net> <3E80295A-B248-4C79-8F26-0CA85E6332DA@tsdye.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=33578 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjEol-0006Bj-Rb for emacs-orgmode@gnu.org; Sat, 29 Jan 2011 12:42:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjEof-0005JT-B6 for emacs-orgmode@gnu.org; Sat, 29 Jan 2011 12:42:30 -0500 Received: from mail-yi0-f41.google.com ([209.85.218.41]:60600) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjEof-0005JF-6n for emacs-orgmode@gnu.org; Sat, 29 Jan 2011 12:42:29 -0500 Received: by yia25 with SMTP id 25so1865258yia.0 for ; Sat, 29 Jan 2011 09:42:28 -0800 (PST) In-Reply-To: <3E80295A-B248-4C79-8F26-0CA85E6332DA@tsdye.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org On Fri, Jan 28, 2011 at 5:14 PM, Thomas S. Dye wrote: > > On Jan 28, 2011, at 1:40 PM, Nick Dokos wrote: > >> Michael Broschinsky wrote: >> >>> I have a small test document: >>> >>> #+TITLE: Title >>> >>> This is normal text. >>> >>> =3DThis is teletype text.=3D >>> >>> ~This is verbatim text.~ >>> >>> When I choose the LaTeX export option and inspect the LaTeX output, I >>> see that both the text marked as =3Dcode=3D and the text marked as >>> ~verbatim~ are exported as \texttt{}. >>> >>> I expected that =3Dcode=3D would be exported as \texttt{}, but I expect= ed >>> ~verbatim~ to be expected with the LaTeX \verb command. >>> >>> Then when I explored org-export-latex-emphasis-alist, I see that the >>> documentation indicates that if the string to wrap the fontified text >>> is \verb, then "Org will automatically select a delimiter character >>> not in the string", which also leads me to believe that that >>> ~verbatim~ will be exported as \verb. >>> >>> What simple thing am I missing to export ~verbatim~ text as \verb? >>> >> >> See http://thread.gmane.org/gmane.emacs.orgmode/14256/focus=3D14257 for >> an explanation and some references. >> >> Nick >> > > The problem appears to be the docstring of org-export-latex-emphasis-alis= t, > which refers to the behavior before Carsten's fix. =A0Now it seems that t= he > second element, \\verb, yields \texttt{} instead of \verb. > > org-export-latex-emphasis-alist is a variable defined in `org-latex.el'. > Its value is > (("*" "\\textbf{%s}" nil) > =A0("/" "\\emph{%s}" nil) > =A0("_" "\\underline{%s}" nil) > =A0("+" "\\st{%s}" nil) > =A0("=3D" "\\verb" t) > =A0("~" "\\verb" t)) > > > Documentation: > Alist of LaTeX expressions to convert emphasis fontifiers. > Each element of the list is a list of three elements. > The first element is the character used as a marker for fontification. > The second element is a formatting string to wrap fontified text with. > If it is "\verb", Org will automatically select a delimiter > character that is not in the string. > The third element decides whether to protect converted text from other > conversions. > > Tom > > So, if I understand correctly (and if I read line 1981 in org-latex.el correctly, from Org 7.4), ~verbatim~ and =3Dcode=3D are exported identically, using \texttt{}? I stumbled upon this when I was writing a document with the following character sequence: !--dar-- When I exported to LaTeX and then processed the file, the \texttt{!--dar--} wound up collapsing the two hyphens into a single hyphen (or an en-dash; hard to tell in the tt font). Of course, that behavior *doesn't* happen when the string is preceded by the \verb command in LaTeX. Do I have other options for marking up verbatim inline content?