[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] org-add-link-type
From: |
Thomas S. Dye |
Subject: |
[Orgmode] org-add-link-type |
Date: |
Sun, 26 Dec 2010 14:29:23 -1000 |
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
- [Orgmode] org-add-link-type,
Thomas S. Dye <=