From: Carsten Dominik <cdominik@newartisans.com>
To: emacs-orgmode@gnu.org
Subject: [Accepted] Optional \caption argument for LaTeX export
Date: Sun, 8 May 2011 22:16:43 +0200 (CEST) [thread overview]
Message-ID: <20110508201643.8825B3A2C6B@carsten-dominiks-macbook-pro.local> (raw)
In-Reply-To: m1wri1c5qc.fsf@tsdye.com
Patch 794 (http://patchwork.newartisans.com/patch/794/) is now "Accepted".
Maintainer comment: No comment
This relates to the following submission:
http://mid.gmane.org/%3Cm1wri1c5qc.fsf%40tsdye.com%3E
Here is the original message containing the patch:
> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [O] Optional \caption argument for LaTeX export
> Date: Mon, 09 May 2011 01:11:39 -0000
> From: Thomas S. Dye <tsd@tsdye.com>
> X-Patchwork-Id: 794
> Message-Id: <m1wri1c5qc.fsf@tsdye.com>
> To: emacs-orgmode@gnu.org
>
> Aloha all,
>
> The attached patch initializes the existing variable shortn, adds it to
> two caption situations in addition to the one already coded, and adds
> some description to the manual.
>
> With this patch, #+CAPTION: [Short caption]{Long caption.} in the
> Org-mode source exports to \caption[Short caption]{Long caption.} in the
> LaTeX export, which is, I think, as it should be.
>
> Many thanks to Nick Dokos who made me understand why earlier patches
> hadn't shown up on the patchwork server (wrong mime type, evil mail
> client). This one sent with gnus and fingers crossed.
>
> All the best,
> Tom
>
>
> >From 9dc65f7e598dd171ebce9448cd39c4062f7cafff Mon Sep 17 00:00:00 2001
> From: Tom Dye <tsd@tsdye.com>
> Date: Sun, 8 May 2011 06:56:25 -1000
> Subject: [PATCH] optional caption arguments in LaTeX export
>
> ---
> doc/org.texi | 5 +++++
> lisp/org-exp.el | 2 +-
> lisp/org-latex.el | 4 ++--
> 3 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/doc/org.texi b/doc/org.texi
> index 844de6d..3988838 100644
> --- a/doc/org.texi
> +++ b/doc/org.texi
> @@ -8817,6 +8817,11 @@ the object with @code{\ref@{tab:basic-data@}}:
> |-----|----|
> @end example
>
> +Optionally, the caption can take the form:
> +@example
> +#+CAPTION: [Caption for list of figures]{Caption for table (or link).}
> +@end example
> +
> @cindex inlined images, markup rules
> Some backends (HTML, @LaTeX{}, and DocBook) allow you to directly include
> images into the exported document. Org does this, if a link to an image
> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
> index cda1f98..e840b6c 100644
> --- a/lisp/org-exp.el
> +++ b/lisp/org-exp.el
> @@ -1871,7 +1871,7 @@ table line. If it is a link, add it to the line containing the link."
> 'org-label label))
> (if label (push (cons label label) target-alist))
> (goto-char end)
> - (setq cap nil attr nil label nil)))))
> + (setq cap nil shortn nil attr nil label nil)))))
> target-alist)
>
> (defun org-export-remove-comment-blocks-and-subtrees ()
> diff --git a/lisp/org-latex.el b/lisp/org-latex.el
> index bc9a3f3..516ee12 100644
> --- a/lisp/org-latex.el
> +++ b/lisp/org-latex.el
> @@ -2199,12 +2199,12 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
> (multicolumnp "\\begin{figure*}%placement
> \\centering
> \\includegraphics[%attr]{%path}
> -\\caption{%labelcmd%caption}
> +\\caption%shortn{%labelcmd%caption}
> \\end{figure*}")
> (floatp "\\begin{figure}%placement
> \\centering
> \\includegraphics[%attr]{%path}
> -\\caption{%labelcmd%caption}
> +\\caption%shortn{%labelcmd%caption}
> \\end{figure}")
> (t "\\includegraphics[%attr]{%path}")))
>
> --
> 1.7.1
>
>
next prev parent reply other threads:[~2011-05-10 6:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-08 20:11 [PATCH] Optional \caption argument for LaTeX export Thomas S. Dye
2011-05-08 20:16 ` Carsten Dominik [this message]
2011-05-08 21:32 ` Bernt Hansen
2011-05-08 23:22 ` Thomas S. Dye
2011-05-09 2:22 ` Bernt Hansen
2011-05-09 2:49 ` Thomas S. Dye
2011-05-09 2:52 ` Bernt Hansen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110508201643.8825B3A2C6B@carsten-dominiks-macbook-pro.local \
--to=cdominik@newartisans.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.