emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: P-O Gustafsson <kullager@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Problem with src blocks line numbers when generating PDF output using latex listings.
Date: Thu, 14 Jan 2016 19:21:53 +0100	[thread overview]
Message-ID: <CAGy7dLg1bN22E9MszKFyZw9ZezhXRVxRGhsL6vRqFMWRj58HAw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

Hello,

I ran into what I think is a bug in ox-latex.el. I tried to generate a PDF
document that contains the source code for two files. The first file is
split into two src block snippets and I used the switches '-n' and '+n' to
have the line numbering starting in the first snippet and continue over to
the second snippet. For the third snippet I used the '-n' switch and I
expected the line numbering for snippet three to start a 1, but it
continued with the line numbering sequence from snippet two. The line
numbering behaved as I expected when I generated HTML output, so I had a
look in ox-latex.el. I solved the problem by deleting the code on line
2800, but that might not be the best solution which is why I thought I'd
report it so that someone who knows the code can take look.

org-version: 8.3.3

Configuration:
(add-to-list 'org-latex-packages-alist '("" "listings"))
(add-to-list 'org-latex-packages-alist '("" "color"))
(setq org-latex-listings t)

Workaround: I deleted the code on line 2800 in ox-latex.el

File              Line                       Code
ox-latex.el    2800                      ((zerop num-start) '(("numbers"
"left")))

Best regards
Per

[-- Attachment #2: Type: text/html, Size: 1487 bytes --]

             reply	other threads:[~2016-01-14 18:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-14 18:21 P-O Gustafsson [this message]
2016-01-31 22:32 ` Problem with src blocks line numbers when generating PDF output using latex listings Nicolas Goaziou

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=CAGy7dLg1bN22E9MszKFyZw9ZezhXRVxRGhsL6vRqFMWRj58HAw@mail.gmail.com \
    --to=kullager@gmail.com \
    --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).