On May 4, 2011, at 11:59 AM, Robert Goldman wrote:
On 5/4/11 May 4 -4:13 PM, Thomas S. Dye wrote:
Aloha Robert,
Have a look at the listings and minted packages. You can specify
font
size on a per-document or per-language basis. I believe listings
has an
option to wrap long lines (don't remember this for minted, though).
The instructions here might be helpful:
http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12_2
Hm. I'm still grappling with this. I am including many of these
examples by using a source snippet (in sh) that goes out and pulls the
example out of a source code file.
Even after adding
#+LaTeX_HEADER \usepackage{listings}
and
#+src: setup-listings
Sorry for the confusion. In the example, the line
#+source: setup-listings
names the source code block that follows. I don't think it will do
anything by itself in your document.
That code block named setup-listings contains an example of a listings
setup that maps Org-mode's output for Emacs Lisp code blocks to
something listings recognizes. It can be executed in Org-mode, using
Babel, to setup the listings export. After this is done, then the
example should export correctly.
I'm not sure what is going wrong on your end. Perhaps org-export-
latex-custom-lang-environments needs to be configured for the language
you're using?
hth,
Tom
to the top of my file, and setting
org-export-latex-listings to 'listings
the :results of the source blocks, which look like, e.g., the
following:
#+begin_src sh :exports results :results output
sourceSample.perl single code/ontology/top.prxo 'Class Pattern'
#+end_src
come out wrapped in
\begin{verbatim}
...
\end{verbatim}
Maybe I'm not doing enough. I'm a bit confused by the listings
example
in the tutorial because it has the configuration examples be in their
own source block, and adds all of the options for specially
typesetting
particular programming languages. It's not altogether clear to me
which
bits of that are critical to getting the listings stuff to work at
all,
and which are only specially tailoring its function.
Is it necessary to specify what programming language is used in
order to
typeset using listings? I am using a domain specific language for
which
there is no obvious listings setting and, anyway, what I am trying to
typeset is the /results/ of the source blocks, which are in a
different
programming language from the /source/ of the source blocks.
I suspect I am just looking for a simpler solution, e.g., one which
would make org-mode give me the source blocks in
{\small
\begin{verbatim}
...
\end{verbatim}
}
instead of
\begin{verbatim}
...
\end{verbatim}
or something like that.
best,
r