[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] LaTeX export and org-add-link-type
From: |
Serge Cohen |
Subject: |
[O] LaTeX export and org-add-link-type |
Date: |
Mon, 21 Jul 2014 15:28:11 +0200 |
Hello list,
When using hte org to LaTeX exporter, I would like to use the link-type
capabilities described here :
http://orgmode.org/worg/org-contrib/babel/examples/article-class.html#sec-3
To follow the instruction, I have added the lines to my ~/.emacs.el
(org-add-link-type
"ltx" nil
(lambda (path desc format)
(cond
((eq format 'html)
(format "<span style=\"color:grey;\" class=\"%s\">%s</span>" path desc))
((eq format 'latex)
(format "\\%s{%s}" path desc)))))
I have even added the following call just after that (but I have the feeling
this is un-necessary, since should already be done within org-add-link-type
function).
(org-make-link-regexps)
Then adding a [[ltx:foo][albert]] to an org file, and exporting to a HTML
buffer, I get what I am expecting :
<span style="color:grey;" class="foo">bar</span>
But when I export to a LaTeX buffer, irrelevant to what I use as link/path I
get :
\texttt{bar}
To me this means that the org-link-type mechanism is bypassed when exporting to
LaTeX (indeed from org-latex.el , I have the feeling that the function
org-export-latex-link is taking care of the link parsing, without carrign for
the content of org-link-types nor org-link-types-re).
Is this normal, if so is there another way to obtain the same results as what
is proposed in the documentation ?
To complete the post : I am using Aquamacs (MacOSX gui-version), based on GNU
emacs 23.4.1
The included version of org.el is Version: 6.33x
Hoping someone will be able to point me to the right direction. Thanks in
advance,
Serge.
signature.asc
Description: Message signed with OpenPGP using GPGMail
- [O] LaTeX export and org-add-link-type,
Serge Cohen <=