From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Latex Export: Place Caption Below Table Date: Wed, 28 Sep 2011 15:40:46 -0400 Message-ID: <17486.1317238846@alphaville.dokosmarshall.org> References: <87zkhor9hb.fsf@ucl.ac.uk> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8zzz-00062g-1E for emacs-orgmode@gnu.org; Wed, 28 Sep 2011 15:40:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R8zzx-0006Cp-0i for emacs-orgmode@gnu.org; Wed, 28 Sep 2011 15:40:55 -0400 Received: from g5t0006.atlanta.hp.com ([15.192.0.43]:45444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R8zzw-0006AL-Qu for emacs-orgmode@gnu.org; Wed, 28 Sep 2011 15:40:52 -0400 In-Reply-To: Message from tsd@tsdye.com (Thomas S. Dye) of "Wed\, 28 Sep 2011 09\:02\:21 -1000." 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: "Thomas S. Dye" Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org, Jakob Lombacher --=-=-= Content-Type: text/plain Thomas S. Dye wrote: > Eric S Fraga writes: > > > Jakob Lombacher writes: > > > >> Hi, > >> > >> if I export a document to latex, the caption of a table is always on the top. > >> > >> How can I place it at the bottom? Is there a parameter to config it? > > > > No, the placement is (currently) fixed to come before the tabular (or > > alternative) environment. Line 1970 or thereabouts in > > org-latex.el. Should be straightforward to modify although it is a > > quite common convention to have the caption above the table... > > Hi Eric, > > Are you able to propose a patch? This came up in my work recently with > a journal that puts captions below a table (and ends them with a > period!). > It's just a matter of emitting the \caption after the contents of the table, rather than before: ,---- | \begin{table}[htb] | \begin{center} | \begin{tabular}{rr} | ... | \end{tabular} | \end{center} | \caption{Squares} | \end{table} `---- instead of ,---- | \begin{table}[htb] | \caption{Squares} | \begin{center} | \begin{tabular}{rr} | ... | \end{tabular} | \end{center} | \end{table} `---- The following patch (deliberately hidden as a binary octet-stream to keep it out of patchwork) will do that - but IMO, it would be better to have yet another user-settable option to control the placement. Nick --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=caption-below-table.patch Content-Transfer-Encoding: base64 Content-Description: caption below table patch ZGlmZiAtLWdpdCBhL2xpc3Avb3JnLWxhdGV4LmVsIGIvbGlzcC9vcmctbGF0ZXguZWwKaW5kZXgg MTc2MjZiNS4uMzBhYTJhNCAxMDA2NDQKLS0tIGEvbGlzcC9vcmctbGF0ZXguZWwKKysrIGIvbGlz cC9vcmctbGF0ZXguZWwKQEAgLTE5NjUsMTIgKzE5NjUsNiBAQCAoZGVmdW4gb3JnLWV4cG9ydC1s YXRleC10YWJsZXMgKGluc2VydCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY29uY2F0 ICJcXGJlZ2lue2xvbmd0YWJsZX17IiBhbGlnbiAifVxuIikKICAgICAgICAgICAgICAgICAgICAg ICAgICAgKGlmIGZsb2F0cAogCQkJICAgICAgKGZvcm1hdCAiXFxiZWdpbnslc30lc1xuIiB0Ymxl bnYgcGxhY2VtZW50KSkpCi0gICAgICAgICAgICAgICAgICAgICAgICAoaWYgZmxvYXRwCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgKGZvcm1hdAotICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAiXFxjYXB0aW9uJXN7JXN9ICVzIgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo aWYgc2hvcnRuIChjb25jYXQgIlsiIHNob3J0biAiXSIpICIiKQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAob3IgY2FwdGlvbiAiIikKLQkJCSAgICAgKGlmIGxhYmVsIChmb3JtYXQgIlxc bGFiZWx7JXN9IiBsYWJlbCkgIiIpKSkKICAgICAgICAgICAgICAgICAgICAgICAgIChpZiAoYW5k IGxvbmd0YmxwIGNhcHRpb24pICJcXFxcXG4iICJcbiIpCiAgICAgICAgICAgICAgICAgICAgICAg ICAoaWYgKGFuZCBvcmctZXhwb3J0LWxhdGV4LXRhYmxlcy1jZW50ZXJlZCAobm90IGxvbmd0Ymxw KSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiXFxiZWdpbntjZW50ZXJ9XG4iKQpAQCAt MTk5Myw2ICsxOTg3LDEyIEBAIChkZWZ1biBvcmctZXhwb3J0LWxhdGV4LXRhYmxlcyAoaW5zZXJ0 KQogICAgICAgICAgICAgICAgICAgICAgICAgKGlmIChub3QgbG9uZ3RibHApIChmb3JtYXQgIlxu XFxlbmR7JXN9IiB0YWJ1bGFyLWVudikpCiAgICAgICAgICAgICAgICAgICAgICAgICAoaWYgbG9u Z3RibHAgIlxuIiAoaWYgb3JnLWV4cG9ydC1sYXRleC10YWJsZXMtY2VudGVyZWQKICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiXG5cXGVuZHtjZW50ZXJ9XG4i ICJcbiIpKQorICAgICAgICAgICAgICAgICAgICAgICAgKGlmIGZsb2F0cAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChmb3JtYXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIlxc Y2FwdGlvbiVzeyVzfSAlcyIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGlmIHNob3J0 biAoY29uY2F0ICJbIiBzaG9ydG4gIl0iKSAiIikKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKG9yIGNhcHRpb24gIiIpCisJCQkgICAgIChpZiBsYWJlbCAoZm9ybWF0ICJcXGxhYmVseyVz fSIgbGFiZWwpICIiKSkpCiAgICAgICAgICAgICAgICAgICAgICAgICAoaWYgbG9uZ3RibHAKICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAiXFxlbmR7bG9uZ3RhYmxlfSIKICAgICAgICAgICAg ICAgICAgICAgICAgICAgKGlmIGZsb2F0cCAoZm9ybWF0ICJcXGVuZHslc30iIHRibGVudikpKSkp CkBAIC0yMDQyLDExICsyMDQyLDExIEBAIChkZWZ1biBvcmctZXhwb3J0LWxhdGV4LWNvbnZlcnQt dGFibGUuZWwtdGFibGUgKCkKICAgICAgIChzZXRxIHRibCAoY29uY2F0ICJcXGJlZ2lue2NlbnRl cn1cbiIgdGJsICJcXGVuZHtjZW50ZXJ9IikpKQogICAgICh3aGVuIGZsb2F0cAogICAgICAgKHNl dHEgdGJsIChjb25jYXQgIlxcYmVnaW57dGFibGV9XG4iCisJCQl0YmwKIAkJCShmb3JtYXQgIlxc Y2FwdGlvbiVzeyVzJXN9XG4iCiAJCQkJKGlmIHNob3J0biAoZm9ybWF0ICJbJXNdIiBzaG9ydG4p ICIiKQogCQkJCShpZiBsYWJlbCAoZm9ybWF0ICJcXGxhYmVseyVzfSIgbGFiZWwpICIiKQogCQkJ CShvciBjYXB0aW9uICIiKSkKLQkJCXRibAogCQkJIlxuXFxlbmR7dGFibGV9XG4iKSkpCiAgICAg KGluc2VydCAob3JnLWV4cG9ydC1sYXRleC1wcm90ZWN0LXN0cmluZyB0YmwpKSkpCiAK --=-=-=--