emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Stanton <stanton@haas.berkeley.edu>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Question on formatting result blocks in LaTeX
Date: Sun, 9 Sep 2012 16:47:24 -0700	[thread overview]
Message-ID: <40C7B1BFC291ED4E9D10436D07736A3347089E6598@EXMAIL7.haas.uc.berkeley.edu> (raw)

Using Org-mode version 7.9.1 (release_7.9.1-163-g27101a @ c:/emacs/site-lisp/org-mode/lisp/), here's an example of some Python code with an output block:

#+name: read_excel
#+begin_src python :results output :exports both
from pandas import *
import requests, StringIO
xls = requests.get('http://www.econ.yale.edu/~shiller/data/chapt26.xls')
f = io.parsers.ExcelFile(StringIO.StringIO(xls.content))
dat=f.parse('Data',skiprows=[0,1,3,4,5,6,7],index_col=0).dropna(thresh=3).ix[:,'P':'CPI'].convert_objects()
print dat.head(5)
#+end_src

#+RESULTS: read_excel
: NOTE *** Ignoring non-worksheet data named u'PDVPlot' (type 0x02 = Chart)
: NOTE *** Ignoring non-worksheet data named u'ConsumptionPlot' (type 0x02 = Chart)
:          P     D     E     R  RLONG        CPI
: 1871  4.44  0.26  0.40  6.35   5.32  12.464061
: 1872  4.86  0.30  0.43  7.81   5.36  12.654392
: 1873  5.11  0.33  0.46  8.35   5.58  12.939807
: 1874  4.66  0.33  0.46  6.86   5.47  12.368896
: 1875  4.54  0.30  0.36  4.96   5.07  11.512651

When I export this org file to HTML, the output block has the same format (colors, etc.) as the source block. When I export to PDF via LaTeX,  however, the result block seems to get formatted as regular text, and looks nothing like the source block. Is there any way to get the same formatting for the result block as for the source block when exporting to LaTeX/PDF?

Thanks.

Richard Stanton

                 reply	other threads:[~2012-09-09 23:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=40C7B1BFC291ED4E9D10436D07736A3347089E6598@EXMAIL7.haas.uc.berkeley.edu \
    --to=stanton@haas.berkeley.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 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).