emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jeff Rush <jrush@taupro.com>
To: emacs-orgmode@gnu.org
Subject: Unable to Style RESULTS Blocks
Date: Mon, 21 May 2012 12:36:56 -0500	[thread overview]
Message-ID: <4FBA7D38.4020505@taupro.com> (raw)

Using org-babel, I cannot figure out how to make the export of the
results of execution appear in LaTeX as a shaded box, like I see on so
many of the org-mode websites.

#+name: example
#+BEGIN_SRC python -n :results output :exports both
  print "Hello World"
#+END_SRC

#+results: example
: Hello World

The results are exported as:

\begin{verbatim}
 Hello World
\end{verbatim}

which lacks any shading/borders.  The org-mode documentation at:

  http://orgmode.org/worg/org-tutorials/org-latex-export.html

shows this example but the example expects the results to be wrapped in
a 'results' environment instead of the 'verbatim' environment I'm seeing.

#+LaTeX_HEADER: \usepackage{framed}
#+LaTeX_HEADER: \usepackage{xcolor}
#+LaTeX_HEADER: \definecolor{shadecolor}{gray}{.95}
#+LaTeX_HEADER: \newenvironment{results}{\begin{shaded}}{\end{shaded}}

I'm running org-mode 7.8.03 under Linux, and I've defined my own LaTeX
document class to format the other parts of my document.  I am new to
LaTeX though.  I just expected the formatting of source and results to
be a well-solved problem w/good looking defaults in org-mode.

-Jeff

             reply	other threads:[~2012-05-21 17:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-21 17:36 Jeff Rush [this message]
2012-05-21 17:58 ` Unable to Style RESULTS Blocks Thomas S. Dye
2012-05-21 18:28   ` Mikhail Titov
2012-05-21 21:39     ` Thomas S. Dye
2012-05-21 22:17       ` Mikhail Titov

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=4FBA7D38.4020505@taupro.com \
    --to=jrush@taupro.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).