emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-add-link-type
@ 2010-12-27  0:29 Thomas S. Dye
  2010-12-27  6:10 ` org-add-link-type Christian Moe
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas S. Dye @ 2010-12-27  0:29 UTC (permalink / raw)
  To: emacs-orgmode ml

Aloha all,

Sorry in advance for coming to the list with a beginner type question,  
but I'm stumped.

I'm trying to use the extended link syntax to export citations to  
LaTeX.  If the link lacks a description, then I don't want the \citep  
command to have an optional argument.  As I understand the  
documentation, if the description is absent, then the variable desc is  
nil, so the following looks good to my untrained eye.  But, it doesn't  
add the optional argument when the description is present.

   (org-add-link-type
    "citep" 'ebib
    (lambda (path desc format)
      (cond
       ((eq format 'latex)
        (when (and desc)
          (format "\\citep[%s]{%s}" desc path)
          (format "\\citep{%s}" path))))))

All the best,
Tom

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

end of thread, other threads:[~2011-02-12 23:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-27  0:29 org-add-link-type Thomas S. Dye
2010-12-27  6:10 ` org-add-link-type Christian Moe
2010-12-27  7:06   ` org-add-link-type Thomas S. Dye
2010-12-27 10:58     ` org-add-link-type Christian Moe
2011-01-17 18:35     ` org-add-link-type Bastien
2011-01-18 17:45       ` org-add-link-type Thomas S. Dye
2011-02-12 22:39         ` org-add-link-type Bastien
2011-02-12 23:16           ` org-add-link-type Thomas S. Dye
2011-02-12 23:32             ` org-add-link-type Bastien

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