all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: James Harkins <jamshark70@qq.com>
To: orgmode <emacs-orgmode@gnu.org>
Subject: [ox-latex] How to force ALL captions below their referents?
Date: Thu, 2 Oct 2014 15:23:29 +0800	[thread overview]
Message-ID: <20141002152329.673e445b@hjh-e431> (raw)

I'm struggling a bit with caption placement in LaTeX export.

In the document I'm working on now, I have:

- Image links, exported as floating figures (by inclusion of a
  caption). ox-latex places the caption at the end of the figure
  environment, so the caption appears below the image.

#+name: fig1
#+caption: blah blah
#+attr_latex: :width 0.75\textwidth
[[./img/blahblah.png]]

\begin{figure}[htb]
\centering
\includegraphics[width=0.75\textwidth]{./img/blahblah.png}
\caption{\label{fig1}blah blah}
\end{figure}

- A figure block containing some figures. The entire block should be
  captioned. ox-latex places a caption first in the figure environment,
  so the caption is on top.

#+name: product1
#+caption: blah blah
#+begin_figure
#+begin_latex
\begin{subfigure}[b]{0.4\textwidth}
        \includegraphics[width=\textwidth]{./img/blah1.png}
\end{subfigure} \hfill \begin{subfigure}[b]{0.4\textwidth}
        \includegraphics[width=\textwidth]{./img/blah2.png}
\end{subfigure}
#+end_latex
#+end_figure

\begin{figure}
\caption{\label{product1}blah blah}
\begin{subfigure}...... (omitted)
\end{figure}

I don't like the typographical inconsistency. It would be much better,
I think, if I could specify in one place that I want *all* captions
below or above the entity being captioned.

It seems somebody recognized a while ago that this was a problem, and
introduced org-latex-table-caption-above. But this applies only to
tables, not to "figure" special blocks, nor to source code blocks, and
probably some other cases that I can't think of. Well,  I can customize
org-latex-listings-options to include ("captionpos" "b"), but I think
this is not quite ideal because:

a/ image captions always go at the bottom;
b/ table captions can be configured;
c/ listings captions can be configured in a different variable;
d/ many types of captions always go at the top, conflicting with a/.

Is there a plan to deal with this, other than my hacking ox-latex
locally?

hjh

             reply	other threads:[~2014-10-02  7:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02  7:23 James Harkins [this message]
2014-10-02 16:54 ` [ox-latex] How to force ALL captions below their referents? Nicolas Goaziou
2014-10-04  3:41   ` James Harkins
2014-10-05  8:37     ` Nicolas Goaziou
2014-10-12 15:36       ` Aaron Ecay
2014-10-13 15:58         ` Nicolas Goaziou
2014-10-17 20:08           ` Nicolas Goaziou
2014-10-21 10:56             ` Eric S Fraga
2014-10-21 16:47               ` Nicolas Goaziou
2014-10-22 14:03                 ` Eric S Fraga
2014-10-23 21:08                   ` Nicolas Goaziou
2014-10-24  7:59                     ` Eric S Fraga
2014-10-24  9:28                       ` Nicolas Goaziou
2014-10-24 12:46                         ` Rasmus
2014-10-24 19:51                         ` Eric S Fraga
2014-10-24 22:12                           ` Nicolas Goaziou

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=20141002152329.673e445b@hjh-e431 \
    --to=jamshark70@qq.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.