emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Thomas S. Dye" <tsd@tsdye.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: org-caption-shortn
Date: Wed, 16 Feb 2011 18:23:06 -1000	[thread overview]
Message-ID: <461D5ABC-6BC6-4A8E-9BC1-218F64EE97C6@tsdye.com> (raw)

Aloha all,

I stumbled across code in org-exp.el and org-latex.el that appears to  
my untrained eye to be designed to parse the optional argument to the  
LaTeX \caption command.

This bit in org-exp.el appears to parse out the optional command:

	  (when (string-match "\\[\\(.*\\)\\]{\\(.*\\)}" cap)
	    (setq shortn (match-string 1 cap)
		  cap (match-string 2 cap)))

Then it is easy to find code in org-latex.el by searching for 'shortn'  
that looks like it writes out the full command to the .tex file.

I can't find documentation for this, though.  It looks (to my  
untrained eye) like it should be possible to write something like:

#+CAPTION: [short]{long}

and get

\caption[short]{long} in the .tex file.

But this doesn't work for me.  The [short] part doesn't make it into  
the .tex file.

I don't know enough lisp to figure this out in a reasonable amount of  
time, so have come to the list to ask if anyone familiar with the code  
knows whether this should work or not, and if it should work, how to  
markup the org file.

All the best,
Tom

             reply	other threads:[~2011-02-17  4:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17  4:23 Thomas S. Dye [this message]
2011-02-17 16:42 ` org-caption-shortn Thomas S. Dye
2011-02-18  1:32   ` org-caption-shortn Thomas S. Dye

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=461D5ABC-6BC6-4A8E-9BC1-218F64EE97C6@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).