Hi List, when I export an Org file with Source blocks to LaTeX (:exports code), the blocks are converted into environments of package 'listings': ,---------------------- | \lstset{language=...} | \begin{lstlisting} | (def ... ) | \end{lstlisting} `---------------------- but: 1. the package is not loaded in the preamble (there is no \usepackage{listings}). 2. the language name in {language=XXX} is simply copied from '#+begin_src XXX' and might not be defined in the listings package. Both points cause LaTeX errors. -- cheers, Thorsten
Aloha Thorsten, Thorsten Jolitz <tjolitz@googlemail.com> writes: > Hi List, > > when I export an Org file with Source blocks to LaTeX (:exports code), > the blocks are converted into environments of package 'listings': > What is the value of the variable org-export-latex-listings? If it is 'listings or 'minted, then there is quite a bit of setup required for all the parts to work together correctly (see http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12). All the best, Tom -- Thomas S. Dye http://www.tsdye.com
tsd@tsdye.com (Thomas S. Dye) writes: Hi Tom, > What is the value of the variable org-export-latex-listings? ,--------------------------------------- | org-export-latex-listings's value is t `--------------------------------------- > If it is 'listings or 'minted, then there is quite a bit of setup > required for all the parts to work together correctly (see > http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12). Thats quite some stuff to digest, does that hold for both, the new and the old exporter? In this case I just wanted a quick LaTeX export with the default settings, however ugly or unsatisfactoy, and I remember that this used to work. I will have a deeper look, thanks. -- cheers, Thorsten
Hi Thorsten, Thorsten Jolitz <tjolitz@googlemail.com> writes: > tsd@tsdye.com (Thomas S. Dye) writes: > > Hi Tom, > >> What is the value of the variable org-export-latex-listings? > > ,--------------------------------------- > | org-export-latex-listings's value is t > `--------------------------------------- > >> If it is 'listings or 'minted, then there is quite a bit of setup >> required for all the parts to work together correctly (see >> http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-12). > > Thats quite some stuff to digest, does that hold for both, the new and > the old exporter? In this case I just wanted a quick LaTeX export with > the default settings, however ugly or unsatisfactoy, and I remember that > this used to work. I haven't exported fancy listings with the new exporter yet, so I can't answer your question. I do have org-export-latex-listings set to nil, and it gives me the results I think you're looking for--a no fuss export of some source code. The corresponding variable in the new exporter is org-e-latex-listings. Both of these variables are set to nil by default. Perhaps you are setting one of these in .emacs, or there is an old customization? All the best, Tom -- Thomas S. Dye http://www.tsdye.com
tsd@tsdye.com (Thomas S. Dye) writes: Hi Tom, > I do have org-export-latex-listings set to nil, and it gives me the > results I think you're looking for--a no fuss export of some source > code. The corresponding variable in the new exporter is > org-e-latex-listings. thats probably what I want - and what I had before. > Both of these variables are set to nil by default. Perhaps you are > setting one of these in .emacs, or there is an old customization? sometimes I copy large chunks of Emacs configuration from other people, I'm pretty sure in one of those chunks these variables were set. I have to check. Thanks. -- cheers, Thorsten
[-- Attachment #1: Type: text/plain, Size: 976 bytes --] Hi, don't know if this has allready been reported, but I just upgraded to 8.0 and I stumped into this... this in the .org file \begin{theoremwithname}[hei] theorem \begin{align*} 2+2 \end{align*} \end{theoremwithname} gets latex-exported to this (note that after \endtheoremwithname everything is replicated with escape characters): \begin{theoremwithname}[hei] theorem \begin{align*} 2+2 \end{align*} \end{theoremwithname}$\backslash$begin\{align*\} 2+2 $\backslash$end\{align*\} $\backslash$end\{theoremwithname\} \begin{align*} 2+2 \end{align*} \end{theoremwithname} which obviously brings to uncompilable latex code. BTW in the preamble I have this that defines the environment theoremwithname: #+LATEX_HEADER: \newtheoremstyle{withname}{}{}{\itshape}{}{\bfseries}{.}{.5em}{\thmname{#3} \thmnumber{#2}} #+LATEX_HEADER: \theoremstyle{withname} #+LATEX_HEADER: \newtheorem{theoremwithname}[equation]{Teorema} cheers, renato [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 490 bytes --]
On Sat, Apr 27, 2013 at 12:05:37PM +0200, renato wrote:
> Hi, don't know if this has allready been reported, but I just upgraded
> to 8.0 and I stumped into this...
>
> this in the .org file
>
> \begin{theoremwithname}[hei]
> theorem
> \begin{align*}
> 2+2
> \end{align*}
> \end{theoremwithname}
I think only basic macros are supported. You could just wrap the above
in a #+begin_latex..#+end_latex block.
--
Suvayu
Open source is the future. It sets us free.
Hello,
renato <rennabh@gmail.com> writes:
> this in the .org file
>
> \begin{theoremwithname}[hei]
> theorem
> \begin{align*}
> 2+2
> \end{align*}
> \end{theoremwithname}
>
> gets latex-exported to this (note that after \endtheoremwithname
> everything is replicated with escape characters):
This should be fixed. Thank you for reporting it.
Regards,
--
Nicolas Goaziou
Aloha all, I have this in my Org mode file: #+name: tab:hanamiai-oxcal-files #+attr_latex: :font \footnotesize :environment longtable :booktabs #+caption: =OxCal= input files for the Hanamiai models And this in the exported LaTeX file: {\footnotesize \begin{longtable}{lll} \caption{\label{tab:orgf695a5d} \texttt{OxCal} input files for the Hanamiai models} \\ The linebreak at the end of the \caption line introduces a space before the caption in the list of tables. I can get rid of the space like this: {\footnotesize \begin{longtable}{lll} \caption{\label{tab:orgf695a5d}% \texttt{OxCal} input files for the Hanamiai models} \\ Note the % at the end of the \caption line. A bug, or something in my setup? All the best, Tom -- Thomas S. Dye http://tsdye.online/tsdye