emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* LaTeX export and org-add-link-type
@ 2014-07-21 13:28 Serge Cohen
  2014-07-21 14:19 ` Leonard Avery Randall
  0 siblings, 1 reply; 3+ messages in thread
From: Serge Cohen @ 2014-07-21 13:28 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

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.



[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 841 bytes --]

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

end of thread, other threads:[~2014-07-29 14:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-21 13:28 LaTeX export and org-add-link-type Serge Cohen
2014-07-21 14:19 ` Leonard Avery Randall
2014-07-29 14:38   ` Fabrice Niessen

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).