emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Defining a new emphasis
@ 2012-05-07  8:28 Francesco Pizzolante
  2012-05-07  9:28 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Francesco Pizzolante @ 2012-05-07  8:28 UTC (permalink / raw)
  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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-07 10:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-07  8:28 Defining a new emphasis Francesco Pizzolante
2012-05-07  9:28 ` Nicolas Goaziou
     [not found]   ` <87lil449xx.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-05-07 10:23     ` Francesco Pizzolante
2012-05-07 10:39       ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).