From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: Passing font size to exported LaTeX table Date: Tue, 24 May 2011 09:58:23 -1000 Message-ID: References: <80oc2s3v6k.fsf@somewhere.org> <5180.1306265114@alphaville.americas.hpqcorp.net> 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]:49367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOxkP-0001wM-Fd for emacs-orgmode@gnu.org; Tue, 24 May 2011 15:58:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOxkN-0000Er-D5 for emacs-orgmode@gnu.org; Tue, 24 May 2011 15:58:33 -0400 Received: from oproxy6-pub.bluehost.com ([67.222.54.6]:50646) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QOxkN-0000EU-2Q for emacs-orgmode@gnu.org; Tue, 24 May 2011 15:58:31 -0400 In-Reply-To: (John Hendy's message of "Tue, 24 May 2011 14:31:43 -0500") 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 writes: > On Tue, May 24, 2011 at 2:25 PM, Nick Dokos wrote: > >> John Hendy wrote: >> >> > On Tue, May 24, 2011 at 11:44 AM, Sebastien Vauban < >> wxhgmqzgwmuf@spammotel.com> wrote: >> > >> > Hi John, >> > >> > 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 t= he >> org file, >> > > exporting, and then having to add this to the tex file and >> re-export. >> > > >> > > I tried: >> > > --- >> > > #+begin_latex >> > > \scriptsize{ >> > > #+end_latex >> > > >> > > |org|table|here| >> > > >> > > #+begin_latex >> > > } >> > > #+end_latex >> > > --- >> > > >> > > without success. >> > >> > You put the things in the wrong order: >> > >> > 1. put a group around some LaTeX commands >> > 2. add the macro \scriptsize in it >> > >> > Hence: >> > >> > #+begin_src org >> > #+begin_latex >> > {\scriptsize >> > #+end_latex >> > >> > |org|table|here| >> > >> > #+begin_latex >> > } >> > #+end_latex >> > #+end_src >> > >> > should do it (not tested). >> > >> > I'm getting this error upon export (no PDF created): >> > --- >> > ! Argument of \frame has an extra }. >> > >> > \par >> > l.142 } >> > >> > Runaway argument? >> > \par \par \par >> > ! Paragraph ended before \frame was complete. >> > >> > \par >> > l.142 } >> > >> > ! Extra }, or forgotten \endgroup. >> > } >> > >> > l.142 } >> > >> > ! Extra }, or forgotten \endgroup. >> > \endframe ->\egroup >> > \begingroup \def \@currenvir {frame} >> > l.145 \end{frame} >> > >> > ) >> > Runaway argument? >> > --- >> > >> > I'm assuming something is not liking that dangling "}"... >> > >> > Thoughts? >> > >> >> 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: >> >> ,---- >> | >> | * foo >> | >> | #+begin_latex >> | \scriptsize{ %} >> | #+end_latex >> | >> | #+tblname: foo >> | | table | here | >> | |-------+------| >> | | table | here | >> | >> | #+begin_latex >> | } >> | #+end_latex >> `---- >> >> > Awesome!! And now I recall seeing it before on the list. Very cool. > > >> 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? >> > > Perhaps -- the tough things is that an issue with braces is not what I wo= uld > have expected the problem was. I thought I just wasn't combining things > right or that the org exporter was making something like this impossible > based on how it parsed the text. In any case, yes, it would be cool to ha= ve > in public written somewhere. Thanks! > On Tue, May 24, 2011 at 2:25 PM, Nick Dokos wrote: > John Hendy wrote: > >> On Tue, May 24, 2011 at 11:44 AM, Sebastien Vauban wrote: >> >> =C2=A0 =C2=A0 Hi John, >> >> =C2=A0 =C2=A0 John Hendy wrote: >> =C2=A0 =C2=A0 > I can control a table font size directly from the .tex f= ile like so: >> =C2=A0 =C2=A0 > >> =C2=A0 =C2=A0 > --- >> =C2=A0 =C2=A0 > \scriptsize{ >> =C2=A0 =C2=A0 > \begin{center} >> =C2=A0 =C2=A0 > \begin{tabular}{lllrr} >> =C2=A0 =C2=A0 > >> =C2=A0 =C2=A0 > table entries here >> =C2=A0 =C2=A0 > >> =C2=A0 =C2=A0 > \end{tabular} >> =C2=A0 =C2=A0 > \end{center} >> =C2=A0 =C2=A0 > } >> =C2=A0 =C2=A0 > --- >> =C2=A0 =C2=A0 > >> =C2=A0 =C2=A0 > Any way to pass this from org-mode? Otherwise, I keep ch= anging the org file, >> =C2=A0 =C2=A0 > exporting, and then having to add this to the tex file a= nd re-export. >> =C2=A0 =C2=A0 > >> =C2=A0 =C2=A0 > I tried: >> =C2=A0 =C2=A0 > --- >> =C2=A0 =C2=A0 > #+begin_latex >> =C2=A0 =C2=A0 > \scriptsize{ >> =C2=A0 =C2=A0 > #+end_latex >> =C2=A0 =C2=A0 > >> =C2=A0 =C2=A0 > |org|table|here| >> =C2=A0 =C2=A0 > >> =C2=A0 =C2=A0 > #+begin_latex >> =C2=A0 =C2=A0 > } >> =C2=A0 =C2=A0 > #+end_latex >> =C2=A0 =C2=A0 > --- >> =C2=A0 =C2=A0 > >> =C2=A0 =C2=A0 > without success. >> >> =C2=A0 =C2=A0 You put the things in the wrong order: >> >> =C2=A0 =C2=A0 1. put a group around some LaTeX commands >> =C2=A0 =C2=A0 2. add the macro \scriptsize in it >> >> =C2=A0 =C2=A0 Hence: >> >> =C2=A0 =C2=A0 #+begin_src org >> =C2=A0 =C2=A0 =C2=A0#+begin_latex >> =C2=A0 =C2=A0 =C2=A0{\scriptsize >> =C2=A0 =C2=A0 =C2=A0#+end_latex >> >> =C2=A0 =C2=A0 =C2=A0|org|table|here| >> >> =C2=A0 =C2=A0 =C2=A0#+begin_latex >> =C2=A0 =C2=A0 =C2=A0} >> =C2=A0 =C2=A0 =C2=A0#+end_latex >> =C2=A0 =C2=A0 #+end_src >> >> =C2=A0 =C2=A0 should do it (not tested). >> >> 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\pa= r=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 \b= egingroup \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? >> --- >> >> I'm assuming something is not liking that dangling "}"... >> >> Thoughts? >> > > I didn't try Seb's workaround but your original solution almost w= orks: > 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: > > ,---- > | > | * foo > | > | #+begin_latex > | \scriptsize{ %} > | #+end_latex > | > | #+tblname: foo > | | table | here | > | |-------+------| > | | table | here | > | > | #+begin_latex > | } > | #+end_latex > `---- > Awesome!! And now I recall seeing it before on the list. Very cool.=C2=A0 > > 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?Perhaps -- the tough things is th= at an issue with braces is not what I would have expected the problem was. = I thought I just wasn't combining things right or that the org exporter= was making something like this impossible based on how it parsed the text.= In any case, yes, it would be cool to have in public written somewhere. Th= anks!=C2=A0 > Aloha all, This appears to work for tabular environments only. When I add a caption the table is set normalsize and the text following it is set scriptsize. Or, am I doing something wrong? All the best, Tom --=20 Thomas S. Dye http://www.tsdye.com