emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Problem with src blocks line numbers when generating PDF output using latex listings.
@ 2016-01-14 18:21 P-O Gustafsson
  2016-01-31 22:32 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: P-O Gustafsson @ 2016-01-14 18:21 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Problem with src blocks line numbers when generating PDF output using latex listings.
  2016-01-14 18:21 Problem with src blocks line numbers when generating PDF output using latex listings P-O Gustafsson
@ 2016-01-31 22:32 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2016-01-31 22:32 UTC (permalink / raw)
  To: P-O Gustafsson; +Cc: emacs-orgmode

Hello,

P-O Gustafsson <kullager@gmail.com> writes:

> 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

Indeed. Fixed. Thank you.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-31 22:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-14 18:21 Problem with src blocks line numbers when generating PDF output using latex listings P-O Gustafsson
2016-01-31 22:32 ` Nicolas Goaziou

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