emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Thomas S. Dye" <tsd@tsdye.com>
To: emacs-orgmode ml <emacs-orgmode@gnu.org>
Subject: org-add-link-type
Date: Sun, 26 Dec 2010 14:29:23 -1000	[thread overview]
Message-ID: <CA64C7FD-68A3-4120-B883-662A520470A4@tsdye.com> (raw)

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

             reply	other threads:[~2010-12-27  0:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-27  0:29 Thomas S. Dye [this message]
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

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=CA64C7FD-68A3-4120-B883-662A520470A4@tsdye.com \
    --to=tsd@tsdye.com \
    --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).