emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Defining a new emphasis


From: Francesco Pizzolante
Subject: [O] Defining a new emphasis
Date: Mon, 07 May 2012 10:28:54 +0200
User-agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.1.50 (windows-nt)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]