From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: org-caption-shortn Date: Wed, 16 Feb 2011 18:23:06 -1000 Message-ID: <461D5ABC-6BC6-4A8E-9BC1-218F64EE97C6@tsdye.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=36285 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpvOe-00028y-RY for emacs-orgmode@gnu.org; Wed, 16 Feb 2011 23:23:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpvOd-0003Ue-Jf for emacs-orgmode@gnu.org; Wed, 16 Feb 2011 23:23:16 -0500 Received: from oproxy3-pub.bluehost.com ([69.89.21.8]:35326) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PpvOd-0003SR-A5 for emacs-orgmode@gnu.org; Wed, 16 Feb 2011 23:23:15 -0500 Received: from cpe-66-91-68-127.hawaii.res.rr.com ([66.91.68.127] helo=[192.168.1.3]) by box472.bluehost.com with esmtpa (Exim 4.69) (envelope-from ) id 1PpvOX-0007n9-Gz for emacs-orgmode@gnu.org; Wed, 16 Feb 2011 21:23:11 -0700 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode 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