[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] ox-latex and small caps links
From: |
Thomas S. Dye |
Subject: |
Re: [O] ox-latex and small caps links |
Date: |
Tue, 21 Apr 2015 16:59:49 -1000 |
Aloha David,
David Dynerman <address@hidden> writes:
>> ,---------------------------------------------
>> | Code within @@latex:some code@@ a paragraph.
>> `---------------------------------------------
>
> This works great! Thanks Tom!
Good news.
> It might be nice to document this somehwere, to make the transition a
> little easier when 8.3 rolls out and the old [[latex:textsc][Hello]]
> links cause export errors.
I just tested the latex link type and it seems to work fine here with a
recent Org mode from master.
I executed the source code block and then exported the following buffer
to LaTeX.
,------------------------------------------------------------------------------
| #+LATEX_CLASS: article
| #+DATE: \today
|
| * Test link type
| This is [[latex:textsc][small caps]].
|
| * Link type :noexport:
| #+begin_src emacs-lisp
| (org-add-link-type
| "latex" nil
| (lambda (path desc format)
| (cond
| ((eq format 'html)
| (format "<span class=\"%s\">%s</span>" path desc))
| ((eq format 'latex)
| (format "\\%s{%s}" path desc)))))
| #+end_src
`------------------------------------------------------------------------------
The LaTeX output looks fine:
,-----------------------------
| \begin{document}
|
| \tableofcontents
|
| \section{Test link type}
| \label{sec-1}
| This is \textsc{small caps}.
| \end{document}
`-----------------------------
Did your recent Org mode upgrade lose the latex link type somehow?
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com