emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Exporting via babel to LaTeX
Date: Mon, 28 May 2012 13:48:26 -0500	[thread overview]
Message-ID: <CA+M2ft_R0X+J6OeacqAURUT2hiJG+YRSJmb43Tb9aXhR2YTk5A@mail.gmail.com> (raw)

I've only ever used src blocks to make plots or create files to
include. I have my first opportunity to actually try and include both
code and results and have a question about spacing. You won't have my
data, but this is pretty simple stuff.:

#+begin_src R :session basic :results output :exports both
nrow(data)
#+end_src
#+begin_src R :session basic :results output :exports both
nrow(nonzero.data)
#+end_src

I split them up because I wanted the results like so:

Code-A
Results-A
Code-B
Results-B

If I kept them together, it came out Code-A, Code-B, then Results-A, Results-B.

Anyway, the LaTeX output is creating the following:

\begin{verbatim}
nrow(data)
\end{verbatim}

\begin{verbatim}
 [1] 681
\end{verbatim}

\begin{verbatim}
nrow(nonzero.data)
\end{verbatim}

\begin{verbatim}
 [1] 455
\end{verbatim}

This gives really, really spaced out results. I'd prefer output that
looks more like an R terminal output, which can be done by not putting
code and results in separate verbatim blocks. Is this standard
spacing/behavior or is there an option/exporter tweak I can use on
this? It just ends up taking so much space.

I'm super new to this and barely know anything about the header
arguments at all. I will say I was thrilled to find out about the
:session option. I was worried about "walking through code" because I
rely on initial block results to carry through to the others. What do
you know? There's a way to do that :) Thanks for this wonderful
implementation. I've seen it come up on the list hundreds of time and
have to say it's really cool actually getting to work with it!


Best regards,
John

             reply	other threads:[~2012-05-28 18:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-28 18:48 John Hendy [this message]
2012-05-28 18:56 ` Exporting via babel to LaTeX Achim Gratz
2012-05-28 21:32 ` Thomas S. Dye
2012-05-28 23:02   ` John Hendy
2012-05-28 23:35     ` Thomas S. Dye
2012-05-29  2:33       ` John Hendy
2012-05-29  3:29         ` Thomas S. Dye
2012-05-29  3:46           ` John Hendy
2012-05-29  4:53             ` Thomas S. Dye
2012-05-28 23:10   ` John Hendy
2012-05-28 23:30     ` Thomas S. Dye

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+M2ft_R0X+J6OeacqAURUT2hiJG+YRSJmb43Tb9aXhR2YTk5A@mail.gmail.com \
    --to=jw.hendy@gmail.com \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).