From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Passing font size to exported LaTeX table Date: Tue, 24 May 2011 15:25:14 -0400 Message-ID: <5180.1306265114@alphaville.americas.hpqcorp.net> References: <80oc2s3v6k.fsf@somewhere.org> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOxEE-0002Uq-9n for emacs-orgmode@gnu.org; Tue, 24 May 2011 15:25:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOxED-0002z7-Bn for emacs-orgmode@gnu.org; Tue, 24 May 2011 15:25:18 -0400 Received: from g1t0028.austin.hp.com ([15.216.28.35]:32991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOxED-0002yr-5L for emacs-orgmode@gnu.org; Tue, 24 May 2011 15:25:17 -0400 In-Reply-To: Message from John Hendy of "Tue\, 24 May 2011 13\:57\:45 CDT." 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: John Hendy Cc: Sebastien Vauban , nicholas.dokos@hp.com, emacs-orgmode@gnu.org John Hendy wrote: > On Tue, May 24, 2011 at 11:44 AM, Sebastien Vauban wrote: >=20 > Hi John, >=20=20=20=20 > John Hendy wrote: > > I can control a table font size directly from the .tex file like so: > > > > --- > > \scriptsize{ > > \begin{center} > > \begin{tabular}{lllrr} > > > > table entries here > > > > \end{tabular} > > \end{center} > > } > > --- > > > > Any way to pass this from org-mode? Otherwise, I keep changing the = org file, > > exporting, and then having to add this to the tex file and re-expor= t. > > > > I tried: > > --- > > #+begin_latex > > \scriptsize{ > > #+end_latex > > > > |org|table|here| > > > > #+begin_latex > > } > > #+end_latex > > --- > > > > without success. >=20=20=20=20 > You put the things in the wrong order: >=20=20=20=20 > 1. put a group around some LaTeX commands > 2. add the macro \scriptsize in it >=20=20=20=20 > Hence: >=20=20=20=20 > #+begin_src org > =C2=A0#+begin_latex > =C2=A0{\scriptsize > =C2=A0#+end_latex >=20=20=20=20 > =C2=A0|org|table|here| >=20=20=20=20 > =C2=A0#+begin_latex > =C2=A0} > =C2=A0#+end_latex > #+end_src >=20=20=20=20 > should do it (not tested). >=20 > I'm getting this error upon export (no PDF created): > --- > ! Argument of \frame has an extra }. > =C2=A0 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \par=C2=A0 > l.142 } > =C2=A0 =C2=A0 =C2=A0 =C2=A0 > Runaway argument? > =C2=A0\par \par \par=C2=A0 > ! Paragraph ended before \frame was complete. > =C2=A0 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0\par= =C2=A0 > l.142 } > =C2=A0 =C2=A0 =C2=A0 =C2=A0 > ! Extra }, or forgotten \endgroup. > } > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 > l.142 } > =C2=A0 =C2=A0 =C2=A0 =C2=A0 > ! Extra }, or forgotten \endgroup. > \endframe ->\egroup=C2=A0 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \be= gingroup \def \@currenvir {frame} > l.145 \end{frame} > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 > ) > Runaway argument? > --- >=20 > I'm assuming something is not liking that dangling "}"... >=20 > Thoughts? >=20 I didn't try Seb's workaround but your original solution almost works: what stops it is YAB in the latex exporter, but having been bitten by such a couple of times in the past, I applied my usual[fn:1] workaround and presto! it works: ,---- |=20 | * foo |=20 | #+begin_latex | \scriptsize{ %} | #+end_latex |=20 | #+tblname: foo | | table | here | | |-------+------| | | table | here | |=20 | #+begin_latex | } | #+end_latex `---- The opening brace on the \scriptsize line confuses the exporter and it leaves the table alone. Adding a commented-out closing brace unconfuses it. Nick Footnotes: [fn:1] Maybe I should add it to the FAQ?