From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: Passing font size to exported LaTeX table Date: Tue, 24 May 2011 21:42:14 +0200 Message-ID: <80k4df51ih.fsf@somewhere.org> 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: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi John and Nick, Nick Dokos wrote: > John Hendy wrote: >> On Tue, May 24, 2011 at 11:44 AM, Sebastien Vauban wrote: >> John Hendy wrote: >> > I can control a table font size directly from the .tex file like s= o: >> > >> > --- >> > \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-expo= rt. >> > >> > I tried [...] >> > 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\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? >> --- >>=20 >> I'm assuming something is not liking that dangling "}"... >>=20 >> Thoughts? Now, a real-life example that used to work -- and still does! #+LaTeX: {\fontsize{3.8}{4.2}\selectfont #+BEGIN: columnview :hlines 1 :id local | Task | Orig. | Time | Estim. | PRIOR | SCHEDULED | DEA= DLINE | |----------------------+--------+--------+--------+-------+-----------+----= ------| | * POC | 856:00 | 698:50 | 775:55 | | | = | | ** Setup | 32:00 | 2:00 | 10:00 | | | = | | *** Bugs or features | | 32:05 | 0:15 | | | = | | *** TODO Caching? | | | | | | = | #+END: #+LaTeX: } So, diffs are here: - I'm using an explicit size - I don't use LaTeX blocks but just LaTeX one-liners > 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. > > [fn:1] Maybe I should add it to the FAQ? Asking the question is answering it...=C2=A0;-) Best regards, Seb --=20 S=C3=A9bastien Vauban