From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Francesco Pizzolante" Subject: Defining a new emphasis Date: Mon, 07 May 2012 10:28:54 +0200 Message-ID: <4gd36gl7i1.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: mailing-list-org-mode Hi, I'm trying to define a new emphasis that would work like org-code (=) except that it would export to \textsf instead of \texttt in LaTeX. I tried several combinations using org-emphasis-alist and org-export-latex-emphasis-alist, but I must admit that I'm lost amongst all parameters controlling how the emphasis is processed: - org-emphasis-alist defines a 'verbatim' optional parameter - org-export-latex-emphasis-alist defines a protected (t/nil) parameter - special format string like \\verb or \\protectedtexttt may also be used Here are tests I've made (using the option ^:nil) with this reference string =look_at:my~ti ny\reference^string=: | verbatim | protected | format string | Resulting LaTeX code | Comment | |----------+-----------+-------------------+---------------------------------------------------------------------------------------+-----------------------------| | no | nil | \\textsf{%s} | look\_{}at:my\~{}ti ny\reference\^{}string | OK except for the backslash | | no | t | \\textsf{%s} | look_at:my~ti ny\reference^string | NOT OK | | yes | nil | \\textsf{%s} | look_at:my~ti ny\reference^string | NOT OK | | yes | t | \\textsf{%s} | look_at:my~ti ny\reference^string | NOT OK | | yes | nil | \\protectedtexttt | look\_at:my\textasciitilde\{}ti ny\textbackslash\{}reference\textasciicircum\{}string | NOT OK | | yes | t | \\protectedtexttt | look\_at:my\textasciitilde{}ti ny\textbackslash{}reference\textasciicircum{}string | OK | I would like to get the exact same output as == gives (no interpretation of the chars I write) except that I'd like to use \textsf instead of \texttt but I can't find the right combination for the parameters (verbatim, protected) to achieve this goal. Any help or comment is welcome. Thanks a lot. Francesco