emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Caption and notes for images in latex export
@ 2012-09-28  8:16 Vikas Rawal
  2012-09-28  8:45 ` Bastien
  2012-09-28 12:15 ` Nicolas Goaziou
  0 siblings, 2 replies; 4+ messages in thread
From: Vikas Rawal @ 2012-09-28  8:16 UTC (permalink / raw)
  To: emacs-orgmode

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? Also, I would like to add "Notes" and "Source" below the
image. What is the right way of doing that?

Vikas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Caption and notes for images in latex export
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Bastien @ 2012-09-28  8:45 UTC (permalink / raw)
  To: emacs-orgmode

Hi Vikas,

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? 

Well, you can't at the moment.

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

To use #+CAPTION :)

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Caption and notes for images in latex export
  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
  2012-09-29 20:46   ` Vikas Rawal
  1 sibling, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2012-09-28 12:15 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Caption and notes for images in latex export
  2012-09-28 12:15 ` Nicolas Goaziou
@ 2012-09-29 20:46   ` Vikas Rawal
  0 siblings, 0 replies; 4+ messages in thread
From: Vikas Rawal @ 2012-09-29 20:46 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode


> > 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.
> 

Thanks for responses.

I am not sure if I should, at the moment, allow myself to get
distracted into experimenting with the org-mode code. I am going to
let it be, and leave it for later.

Thanks again,

Vikas

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-29 20:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-09-29 20:46   ` Vikas Rawal

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).