* 'listings' package used but not required in LaTeX export
@ 2013-06-08 19:41 Thorsten Jolitz
2013-06-08 23:16 ` Rasmus
0 siblings, 1 reply; 5+ messages in thread
From: Thorsten Jolitz @ 2013-06-08 19:41 UTC (permalink / raw)
To: emacs-orgmode
Hi List,
at the risk that this is caused by some personnal configuration I'm not
aware of at the moment, I report it nevertheless:
When I export an .org buffer with source code blocks (e.g. R) to LaTeX,
functions from the 'listings' package are used in the LaTeX sources,
like e.g.
,---------------------------------
| \lstset{language=R,numbers=none}
| \begin{lstlisting}
`---------------------------------
but there is no
,----------------------
| \usepackage{listings}
`----------------------
statement in the preamble. This is about exporting with no further
options or properties set, the default case so to say.
PS
Emacs Version:
(24.3.1 24 3 gnu/linux hostname x86_64-unknown-linux-gnu x nil)
Org-mode version 8.0.3 (release_8.0.3-165-g60ca9e @
/home/tj/gitclone/org-mode/lisp/)
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 'listings' package used but not required in LaTeX export
2013-06-08 19:41 'listings' package used but not required in LaTeX export Thorsten Jolitz
@ 2013-06-08 23:16 ` Rasmus
2013-06-08 23:52 ` Thorsten Jolitz
0 siblings, 1 reply; 5+ messages in thread
From: Rasmus @ 2013-06-08 23:16 UTC (permalink / raw)
To: emacs-orgmode
Thorsten Jolitz <tjolitz@gmail.com> writes:
> but there is no
>
> ,----------------------
> | \usepackage{listings}
> `----------------------
This is a feature to my understanding.
Several packagess can format, and I for instance prefer pygments if I
need code formatting.
You could add listings to your packages list, either
org-latex-packages-alist or even org-latex-default-packages-alist, if
you really want to.
You could probably also write a clever filter to load a package if it
is missing.
–Rasmus
--
When in doubt, do it!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 'listings' package used but not required in LaTeX export
2013-06-08 23:16 ` Rasmus
@ 2013-06-08 23:52 ` Thorsten Jolitz
2013-06-09 7:34 ` Nicolas Goaziou
0 siblings, 1 reply; 5+ messages in thread
From: Thorsten Jolitz @ 2013-06-08 23:52 UTC (permalink / raw)
To: emacs-orgmode
Rasmus <rasmus@gmx.us> writes:
> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> but there is no
>>
>> ,----------------------
>> | \usepackage{listings}
>> `----------------------
>
> This is a feature to my understanding.
mmhh ... I would rather say that the defaults can be as simple as
possible (or desired), but should result in reasonable output without
any user interaction. But without adding a \usepackage{listings} or
modifying the variables you mention the LaTeX output is unusable in this
case.
> Several packagess can format, and I for instance prefer pygments if I
> need code formatting.
Then the default should be loading one of them rather than using package
macros in the exported LaTeX sources without loading a package that
contains those macros.
> You could add listings to your packages list, either
> org-latex-packages-alist or even org-latex-default-packages-alist, if
> you really want to.
>
> You could probably also write a clever filter to load a package if it
> is missing.
I could, and thanks for the tips, but I still think this can be
considered a bug (if I'm not the only one having the problem).
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 'listings' package used but not required in LaTeX export
2013-06-08 23:52 ` Thorsten Jolitz
@ 2013-06-09 7:34 ` Nicolas Goaziou
2013-06-09 11:50 ` Thorsten Jolitz
0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2013-06-09 7:34 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode
Hello,
Thorsten Jolitz <tjolitz@gmail.com> writes:
> Rasmus <rasmus@gmx.us> writes:
>
>> Thorsten Jolitz <tjolitz@gmail.com> writes:
>>
>>> but there is no
>>>
>>> ,----------------------
>>> | \usepackage{listings}
>>> `----------------------
>>
>> This is a feature to my understanding.
>
> mmhh ... I would rather say that the defaults can be as simple as
> possible (or desired), but should result in reasonable output without
> any user interaction. But without adding a \usepackage{listings} or
> modifying the variables you mention the LaTeX output is unusable in this
> case.
>
>> Several packagess can format, and I for instance prefer pygments if I
>> need code formatting.
>
> Then the default should be loading one of them rather than using package
> macros in the exported LaTeX sources without loading a package that
> contains those macros.
>
>> You could add listings to your packages list, either
>> org-latex-packages-alist or even org-latex-default-packages-alist, if
>> you really want to.
>>
>> You could probably also write a clever filter to load a package if it
>> is missing.
>
> I could, and thanks for the tips, but I still think this can be
> considered a bug (if I'm not the only one having the problem).
By default, `org-latex-listings' is nil, which means no "listings" code
is inserted in the output. Therefore, the problem comes from your
configuration (i.e. you changed variable's value without reading its
docstring).
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 'listings' package used but not required in LaTeX export
2013-06-09 7:34 ` Nicolas Goaziou
@ 2013-06-09 11:50 ` Thorsten Jolitz
0 siblings, 0 replies; 5+ messages in thread
From: Thorsten Jolitz @ 2013-06-09 11:50 UTC (permalink / raw)
To: emacs-orgmode
Rasmus <rasmus@gmx.us> writes:
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> By default, `org-latex-listings' is nil, which means no "listings" code
> is inserted in the output. Therefore, the problem comes from your
> configuration (i.e. you changed variable's value without reading its
> docstring).
Ok, thanks to both of you, knowing what to search for I found the entry
in my init file and adapted my settings such that 'listings' are enabled
_and_ the package is loaded by default.
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-09 11:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-08 19:41 'listings' package used but not required in LaTeX export Thorsten Jolitz
2013-06-08 23:16 ` Rasmus
2013-06-08 23:52 ` Thorsten Jolitz
2013-06-09 7:34 ` Nicolas Goaziou
2013-06-09 11:50 ` Thorsten Jolitz
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).