[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] «Macro» expansion in source blocks; code-sharing between blocks
From: |
Charles Berry |
Subject: |
Re: [O] «Macro» expansion in source blocks; code-sharing between blocks |
Date: |
Fri, 19 Sep 2014 02:59:15 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Andreas Kiermeier <andreas.kiermeier <at> gmail.com> writes:
>
> My two blocks (with some code removed for simplicity) are as follow:
>
> #+NAME: tbl-refyear
> #+BEGIN_SRC R :results silent :exports none
> latex(tabular( <code remove> ))
> #+END_SRC
>
> #+BEGIN_SRC latex :noweb yes
> \begin{table}[h]
> \label{tbl:refyear}
> \caption{Separation outcomes (death or any type of discharge) by
> reference year.}
> <<tbl-refyear()>>
> \end{table}
> #+END_SRC
>
> I've tried :cache yes as part of the tbl-refyear source block, but
> that didn't stop if from being run twice. Am I missing a suitable
> header argument?
>
> This is the only way I could find to wrap the latex table (which has
> some complex formatting and hence why I've used it over just producing
> a table) in a float with a caption (though I still can't properly
> reference the label when I export to a PDF file).
>
> Any thought would be greatly appreciated. TIA!
>
Why not use library(xtable) and do it all in R?
If you are not sure this is the right choice, I suggest you look at the
help page for print.xtable - you have a lot of control over caption,
label, positioning, etc.
HTH,
Chuck
- [O] «Macro» expansion in source blocks; code-sharing between blocks, Tobias Getzner, 2014/09/18
- Re: [O] «Macro» expansion in source blocks; code-sharing between blocks, Tobias Getzner, 2014/09/18
- Re: [O] «Macro» expansion in source blocks; code-sharing between blocks, Eric S Fraga, 2014/09/18
- Re: [O] «Macro» expansion in source blocks; code-sharing between blocks, Tobias Getzner, 2014/09/18
- Re: [O] «Macro» expansion in source blocks; code-sharing between blocks, Andreas Kiermeier, 2014/09/18
- Re: [O] «Macro» expansion in source blocks; code-sharing between blocks, Eric S Fraga, 2014/09/19
- Re: [O] «Macro» expansion in source blocks; code-sharing between blocks,
Charles Berry <=
- Re: [O] «Macro» expansion in source blocks; code-sharing between blocks, Andreas Kiermeier, 2014/09/19
- Re: [O] «Macro» expansion in source blocks; code-sharing between blocks, Rainer M Krug, 2014/09/19
- Re: [O] «Macro» expansion in source blocks; code-sharing between blocks, Andreas Kiermeier, 2014/09/19
- [O] header arguments, inheritance, and noweb expansion Was: «Macro» expansion in source blocks; code-sharing between blocks, Rainer M Krug, 2014/09/19
- Re: [O] header arguments, inheritance, and noweb expansion Was: «Macro» expansion in source blocks; code-sharing between blocks, Andreas Kiermeier, 2014/09/20
- Re: [O] header arguments, inheritance, and noweb expansion Was: «Macro» expansion in source blocks; code-sharing between blocks, Charles Berry, 2014/09/20
- Re: [O] header arguments, inheritance, and noweb expansion Was: «Macro» expansion in source blocks; code-sharing between blocks, Andreas Kiermeier, 2014/09/21