emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Problem with references to babel source blocks (possible bug).


From: John Kitchin
Subject: Re: [O] Problem with references to babel source blocks (possible bug).
Date: Thu, 20 Dec 2018 15:47:40 -0500
User-agent: mu4e 1.0; emacs 25.3.1

I guess there is some subtle point missing. For the source blocks I
usually use the minted package, which I think makes code blocks as a
listing float. In your tex file, they are verbatim environments, and you
have \captionof{figure} under them which is presumably why they are
labeled as figures.

Try adding ("" "minted" nil) to # org-latex-packages-alist:

and add this to an init file: (setq org-latex-listings 'minted).

Best wishes,

Emmanuel Charpentier <address@hidden> writes:

> I wish to be able to reference (i. e cross-references, lists) both some
> tables or figures AND the code producing the objects.
>
> To this effect, I added (distinct) #+caption:s to the source blocks AND
> to the results, adorned with (distinct) org-ref's labels. An example (
> Min-Ref.org) is included in this Google Drive directory*:
> https://drive.google.com/drive/folders/1T6N_-WwphlnL2mB4f6BgX0u1K5mLnz4i?usp=sharing
> .
>
> The comparison of this source, the LaTeX code obtained by org-latex
> export-to latex (Min-Ref.tex) and the resultant PDF (Min-Ref exported
> by org-latex-export-to-pdf.pdf) show that the labels attributed to
> source blocks are mislabeled as figures. Furthermore, while the org
> source requests a list of figure, a list of table and a list of
> listings (in that order), the list of figures appears *after* the list
> of tables.
>
> I am tempted to conclude that there is some confusion between figures
> and listings. Further attempts tend to show that the problem may live n
> the core org's code, rather than any specific exporter :
>
> The ODT "native" exporter (org-odt-export-to-odt) is much less capable,
> as shown in Min-Ref exported by org-odt-export-to-odt.odt.
>
> Attempts to export via Pandoc to PDF (Min-Ref exported by org-pandoc-
> export-to-latex-pdf.pdf), ODT (Min-Ref exported by org-pandoc-export-
> to-odt.odt) and DOCX (Min-Ref.docx) show that these exporters may need
> some specific configurations in order to be even vaguely usable.
>
> Previous trials, using #+names: rather than org-ref's labels, gave
> similar failures. If needed, I can reproduce these trials.
>
> So I have a couple questions :
>
> 1) Is the confusion of source blocks and figures a bug, or do I miss a
> subtle point ?
>
> 2) Is there some introductory material to the care and feeding of ox-
> pandoc demonstrating the use of this exporter's options to enable the
> addition of the needed features (figure inclusion, tables of tables /
> figures / listings, etc...) ? The "manual" available as a README is way
> too terse to be usable without diving in the source code and pandoc's
> documentation.
>
> Sincerely,


--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



reply via email to

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