emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thomas Alexander Gerds <tag@biostat.ku.dk>
To: emacs-orgmode@gnu.org
Subject: latex listings number-lines problems with new exporter
Date: Tue, 05 Mar 2013 10:59:18 +0100	[thread overview]
Message-ID: <grb6151ubui2vd.fsf@linuxifsv005.sund.root.ku.dk> (raw)

Hi 

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

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!?

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

regards,
Thomas

             reply	other threads:[~2013-03-05  9:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05  9:59 Thomas Alexander Gerds [this message]
2013-03-05 11:18 ` latex listings number-lines problems with new exporter Nicolas Goaziou
2013-03-05 14:03   ` Thomas Alexander Gerds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=grb6151ubui2vd.fsf@linuxifsv005.sund.root.ku.dk \
    --to=tag@biostat.ku.dk \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).