emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Caption and notes for images in latex export
Date: Fri, 28 Sep 2012 14:15:25 +0200	[thread overview]
Message-ID: <87txui738i.fsf@gmail.com> (raw)
In-Reply-To: <20120928081607.GA21607@panahar> (Vikas Rawal's message of "Fri, 28 Sep 2012 13:46:07 +0530")

Hello,

Vikas Rawal <vikaslists@agrarianresearch.org> writes:

> By default, orgmode export to latex puts captions of images below the
> images. How to change the behaviour and make the captions appear at
> the top? 

You can use filters:

#+begin_src emacs-lisp
(defun my-latex-captions-above (link backend info)
  (when (and (memq backend '(e-latex e-beamer))
             (string-match
              "\\(^\\\\centering\n\\\\includegraphics.*\n\\)\\(\\\\caption.*\n\\)"
              link))
    (replace-match "\\2\\1" nil nil link)))

(add-to-list 'org-export-filter-link-functions 'my-latex-captions-above)
#+end_src

> Also, I would like to add "Notes" and "Source" below the
> image. What is the right way of doing that?

You can use the same filter. This is left as an exercise.


Regards,

-- 
Nicolas Goaziou

  parent reply	other threads:[~2012-09-28 12:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28  8:16 Caption and notes for images in latex export Vikas Rawal
2012-09-28  8:45 ` Bastien
2012-09-28 12:15 ` Nicolas Goaziou [this message]
2012-09-29 20:46   ` Vikas Rawal

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=87txui738i.fsf@gmail.com \
    --to=n.goaziou@gmail.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).