From: Charles Berry <ccberry@ucsd.edu>
To: emacs-orgmode@gnu.org
Subject: Re: «Macro» expansion in source blocks; code-sharing between blocks
Date: Fri, 19 Sep 2014 02:59:15 +0000 (UTC) [thread overview]
Message-ID: <loom.20140919T045137-939@post.gmane.org> (raw)
In-Reply-To: CAN7vk5RmQ_ysxMdOZ6s0o4R=wOwr0wEg57GA2uR34sfVj-7NZw@mail.gmail.com
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
next prev parent reply other threads:[~2014-09-19 8:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 13:17 «Macro» expansion in source blocks; code-sharing between blocks Tobias Getzner
2014-09-18 13:26 ` Tobias Getzner
2014-09-18 14:01 ` Eric S Fraga
2014-09-18 14:40 ` Tobias Getzner
2014-09-18 23:44 ` Andreas Kiermeier
2014-09-19 2:59 ` Charles Berry [this message]
2014-09-19 10:18 ` Andreas Kiermeier
2014-09-19 7:44 ` Eric S Fraga
2014-09-19 9:04 ` Rainer M Krug
2014-09-19 10:19 ` Andreas Kiermeier
2014-09-19 10:59 ` header arguments, inheritance, and noweb expansion Was: " Rainer M Krug
2014-09-20 6:57 ` Andreas Kiermeier
2014-09-20 16:06 ` Charles Berry
2014-09-21 4:19 ` Andreas Kiermeier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20140919T045137-939@post.gmane.org \
--to=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.