emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] latex listings number-lines problems with new exporter


From: Nicolas Goaziou
Subject: Re: [O] latex listings number-lines problems with new exporter
Date: Tue, 05 Mar 2013 12:18:36 +0100

Hello,

Thomas Alexander Gerds <address@hidden> writes:

> using org-mode "7.9.3f" and the new exporter I was desperately trying to
> get line numbers back for exported R code blocks using the latex listing
> package. first I tried
>
> (setq org-latex-listings-options
>     '(("basicstyle" "\\small")
>       ("numbers" "left")))
>
> which gives
>
> ,----
> | \lstset{basicstyle=\small,numbers=left,language=R,numbers=none}      
> `----
>
> that this is possible seems sub-optimal :)

Thanks. This should be fixed in master. If user provides "numbers"
option, "+n" and "-n" switches will be ignored from src-block.

> some debugging led me via org-latex-src-block to
> org-element-src-block-parser which indicated adding a switch "-n" behind
> to the scr-block:
>
> ,----
> | #+BEGIN_SRC R -n :results output raw  :exports both  :session *R* :cache yes
>
>
> this works and has a new feature (switch +n) which allows numbering to
> be continued in subsequent blocks.
>
> Now, I would like to set numbers on globally or buffer-local for all
> blocks. But is it possible to set a switch globally?  I think parameters
> can still be set with an appropriate #+PROPERTY: statement!?

This isn't possible. But, as noted previously, you can activate
numbering globally by adding ("numbers" "left") association to
`org-latex-listings-options'.

> whatever the answer, it would be nice if this feature was mentioned in
> the help string of org-latex-listing-options.

I don't seed the need for that. "+n" and "-n" switches are already
documented in the manual, and are not "listings" specific. They are not
even LaTeX specific.

Anyway, if you think it's still important, I will accept a patch for it
(along with one modifying `org-latex-minted-options' accordingly).


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]