emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Question on formatting result blocks in LaTeX
@ 2012-09-09 23:47 Richard Stanton
  0 siblings, 0 replies; only message in thread
From: Richard Stanton @ 2012-09-09 23:47 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-09-09 23:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-09 23:47 Question on formatting result blocks in LaTeX Richard Stanton

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).