emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: tsd@tsdye.com (Thomas S. Dye)
To: David Dynerman <david@block-party.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: ox-latex and small caps links
Date: Tue, 21 Apr 2015 16:59:49 -1000	[thread overview]
Message-ID: <m2vbgosw9m.fsf@tsdye.com> (raw)
In-Reply-To: <m2wq15ey7s.fsf@block-party.net> (David Dynerman's message of "Tue, 21 Apr 2015 20:41:27 -0500")

Aloha David,

David Dynerman <david@block-party.net> 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

  reply	other threads:[~2015-04-22  3:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22  0:59 ox-latex and small caps links David Dynerman
2015-04-22  1:27 ` Thomas S. Dye
2015-04-22  1:41   ` David Dynerman
2015-04-22  2:59     ` Thomas S. Dye [this message]
2015-04-22  9:08 ` Rasmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2vbgosw9m.fsf@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=david@block-party.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).