[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Passing font size to exported LaTeX table
From: |
Thomas S. Dye |
Subject: |
Re: [O] Passing font size to exported LaTeX table |
Date: |
Tue, 24 May 2011 09:58:23 -1000 |
John Hendy <address@hidden> writes:
> On Tue, May 24, 2011 at 2:25 PM, Nick Dokos <address@hidden> wrote:
>
>> John Hendy <address@hidden> wrote:
>>
>> > On Tue, May 24, 2011 at 11:44 AM, Sebastien Vauban <
>> address@hidden> 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 the
>> 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 }.
>> > <inserted text>
>> > \par
>> > l.142 }
>> >
>> > Runaway argument?
>> > \par \par \par
>> > ! Paragraph ended before \frame was complete.
>> > <to be read again>
>> > \par
>> > l.142 }
>> >
>> > ! Extra }, or forgotten \endgroup.
>> > <recently read> }
>> >
>> > l.142 }
>> >
>> > ! Extra }, or forgotten \endgroup.
>> > \endframe ->\egroup
>> > \begingroup \def address@hidden {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 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. Thanks!
> On Tue, May 24, 2011 at 2:25 PM, Nick Dokos <span
> dir="ltr"><mailto:address@hidden></span> wrote:
> John Hendy <mailto:address@hidden> wrote:
>
>> On Tue, May 24, 2011 at 11:44 AM, Sebastien Vauban <mailto:address@hidden>
>> 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 the 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 }.
>> <inserted text>
>> \par
>> l.142 }
>>
>> Runaway argument?
>> \par \par \par
>> ! Paragraph ended before \frame was complete.
>> <to be read again>
>> \par
>> l.142 }
>>
>> ! Extra }, or forgotten \endgroup.
>> <recently read> }
>>
>> l.142 }
>>
>> ! Extra }, or forgotten \endgroup.
>> \endframe ->\egroup
>> \begingroup \def address@hidden {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 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. Thanks!
>
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
--
Thomas S. Dye
http://www.tsdye.com
- [O] Passing font size to exported LaTeX table, John Hendy, 2011/05/24
- Re: [O] Passing font size to exported LaTeX table, Sebastien Vauban, 2011/05/24
- Re: [O] Passing font size to exported LaTeX table, John Hendy, 2011/05/24
- Re: [O] Passing font size to exported LaTeX table, Nick Dokos, 2011/05/24
- Re: [O] Passing font size to exported LaTeX table, John Hendy, 2011/05/24
- Re: [O] Passing font size to exported LaTeX table,
Thomas S. Dye <=
- Re: [O] Passing font size to exported LaTeX table, Nick Dokos, 2011/05/24
- Re: [O] Passing font size to exported LaTeX table, Nick Dokos, 2011/05/24
- Re: [O] Passing font size to exported LaTeX table, Nick Dokos, 2011/05/24
- Re: [O] Passing font size to exported LaTeX table, Thomas S. Dye, 2011/05/25
- Re: [O] Passing font size to exported LaTeX table, suvayu ali, 2011/05/26
- Re: [O] Passing font size to exported LaTeX table, Thomas S. Dye, 2011/05/27
- Re: [O] Passing font size to exported LaTeX table, suvayu ali, 2011/05/27
- Re: [O] Passing font size to exported LaTeX table, Thomas S. Dye, 2011/05/27
- Re: [O] Passing font size to exported LaTeX table, Suvayu Ali, 2011/05/27
- Re: [O] Passing font size to exported LaTeX table, Thomas S. Dye, 2011/05/27