From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Harkins Subject: [ox-latex] How to force ALL captions below their referents? Date: Thu, 2 Oct 2014 15:23:29 +0800 Message-ID: <20141002152329.673e445b@hjh-e431> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZak9-0007i1-N9 for emacs-orgmode@gnu.org; Thu, 02 Oct 2014 03:24:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZak4-0002Tm-69 for emacs-orgmode@gnu.org; Thu, 02 Oct 2014 03:24:05 -0400 Received: from smtpproxy19.qq.com ([184.105.206.84]:57914) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZak3-0002RU-GL for emacs-orgmode@gnu.org; Thu, 02 Oct 2014 03:24:00 -0400 Received: from hjh-e431 (unknown [219.136.1.220]) by esmtp4.qq.com (ESMTP) with SMTP id 0 for ; Thu, 02 Oct 2014 15:23:31 +0800 (CST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: orgmode 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