emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] BUG: the builtin LaTeX/P DF exporter mislabels source blocks as


From: Emmanuel Charpentier
Subject: Re: [O] BUG: the builtin LaTeX/P DF exporter mislabels source blocks as figures.
Date: Tue, 30 Apr 2019 19:39:24 +0200
User-agent: Evolution 3.30.5-1

Hi, Nicolas !

Le mardi 30 avril 2019 à 19:05 +0200, Nicolas Goaziou a écrit :
> Hello,
> 
> Emmanuel Charpentier <address@hidden> writes:
> 
> > Whereas the HTML exporter correctly recognize a source block as
> > such,
> > the LaTeX/PDF exporter does not.
> > 
> > This can be demonstrated in a (minimal) org file using *only* the
> > built-in tools (no external packages), where a source block is
> > labelled
> > as such by the HTML exporter but as a figure by the LaTeX
> > exporter.The
> > generated LaTeX source shows a suspicious
> > "\captionof{figure}{\label{orgf2d4160}" in the export of the source
> > block.
> > 
> > Further tests (not shown) show that the proble persists when org-
> > mode
> > is set up to use the minted package for LaTeX export of source
> > blocks
> > (minted is indeed used, but the block is s still mislabeled).
> 
> What LaTeX code do you suggest instead?

Dunno. Maybe \captionof{listing} ? Or let minted do its thing ? Anyway,
in most cases, the code excerpts will be too long for a float ; the
idea is to send them (unfloated but labeled/captioned) in an appendix
and point to them via a link.

[ BTW : we should stop suggesting to use listings, which is problematic
for anything not strictly ASCII, bloody likely to occur at least on a
comment/prompt for most of mankind... Listingsutf8 is but a patch
working only for (a subset of) European languages. Arabic, Hebrew,
Asian languages : nope. Minted in (xe|lua)tex is probably more usable
(but needs --shell-escape, which can justifiably frowned upon... ].

> > The org source and resulting pdf and html files are available here
> > : 
> > https://drive.google.com/drive/folders/1bQmaefiztW9ZDRNLcjOD_WbEmTg4d8dG?usp=sharing
> 
> Could you send your ECM in the ML without requiring to access Google
> Drive?

Attached.

But please coordinate with Bastien, who asked me just yesterday to
avoid posting fat attachments to a message going to a lot of people.
Which I did (to no avail : the "heavy" mail went through anyway. Go
figure.... ;-).


> Thank you.

You're welcome ;-). Thank YOU for considering scratching *MY* itch...

--
Emmanuel Charpentier

The R block 1 generates the figure 1:

Fig.png

Figure 1: Figure generated by R

curve(sin(x),from=-pi, to=pi)

Problem: whereas the HTML export labels the source listing as "Listing 1" and is correctly refers to 1, the PDF export labels it "Figure 2" (and points to it).

Created: 2019-04-30 mar. 08:53

Validate

Attachment: C1.org
Description: Text document

Attachment: C1.pdf
Description: Adobe PDF document

Attachment: C1.tex
Description: Text Data

Attachment: Fig.png
Description: PNG image


reply via email to

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