From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: Why is text marked as ~verbatim~ exported in LaTeX as \texttt{} Date: Fri, 28 Jan 2011 14:14:39 -1000 Message-ID: <3E80295A-B248-4C79-8F26-0CA85E6332DA@tsdye.com> References: <15472.1296258039@gamaville.americas.hpqcorp.net> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=33049 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiySp-0001PE-LQ for emacs-orgmode@gnu.org; Fri, 28 Jan 2011 19:14:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PiySn-0004at-Vk for emacs-orgmode@gnu.org; Fri, 28 Jan 2011 19:14:51 -0500 Received: from cpoproxy3-pub.bluehost.com ([67.222.54.6]:55201) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PiySn-0004af-MO for emacs-orgmode@gnu.org; Fri, 28 Jan 2011 19:14:49 -0500 In-Reply-To: <15472.1296258039@gamaville.americas.hpqcorp.net> 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: nicholas.dokos@hp.com Cc: Michael Broschinsky , emacs-orgmode@gnu.org 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. >> >> =This is teletype text.= >> >> ~This is verbatim text.~ >> >> When I choose the LaTeX export option and inspect the LaTeX output, I >> see that both the text marked as =code= and the text marked as >> ~verbatim~ are exported as \texttt{}. >> >> I expected that =code= would be exported as \texttt{}, but I expected >> ~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=14257 for > an explanation and some references. > > Nick > The problem appears to be the docstring of org-export-latex-emphasis- alist, which refers to the behavior before Carsten's fix. Now it seems that the 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) ("/" "\\emph{%s}" nil) ("_" "\\underline{%s}" nil) ("+" "\\st{%s}" nil) ("=" "\\verb" t) ("~" "\\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