Hi, everyone.
I’m writing an essay using MMD and pandoc workflow. I use the same settings of a scrivener’s project. To be sure I renamed a scrivener project “workflow.scriv” using the same styles and setting there.
I modified only the first line of replacements so I can display “Figura” in my native language.
Now, during my essay I wrote same text and put an image with caption that you can see. I was careful to push enter after the image and after caption I push two times a carriage return:
You need TWO newlines ¶ (i.e. 1 empty line) before and after a figure, so that Pandoc knows it should be a block figure. So what is happening is that the first figure caption doesn’t get called. This causes the numbering to start at 1 for the second figure. The white space is probably due to LaTeX, as it tries to layout figures as best it can, but it is not always correct. Not sure why this doesn’t apply to DOCX though, that sounds strange… You can attach a simple project and I can have a look…
REgarding the double figure numbers: if you use Scrivener’s figure numbering and referencing with LaTeX — LaTeX also numbers figures by default which results in double labels in the captions. The solution is to ensure that the LaTeX template includes the following after \usepackage[]{caption}.
$if(nonumberfigures)$
\captionsetup[figure]{labelformat=empty}% redefines the caption setup of the figures environment
$endif$
Then in your Pandoc metadata you can set nonumberfigures to true. My Pandoc templates already include this which you can see as an example:
Hi non troppo!,
I’m very sorry to answer only now but I had a lor of deadlines in the meantimes…
Everything is ok with word’s caption (I need to force me to use always two empty space…)
But I checked latex template and pandocomatic.yaml and I have the same settings you suggested.
I’m pretty new though to latex. I tried to produce pdf with this code:
[code]# Standard Scrivener+Pandoc YAML metadata
title: “<$projecttitle>”
compiled: <$date>
comments: “Draft ad uso esclusivamente interno - RISERVATO”
Select which templates pandocomatic will use
you can enter overrides to the templates here as well
pandocomatic_:
use-template:
- docx
- pdf
- html
[/code]
in my pandocomatic.yaml I have this code for producing pdf:
#-----------------------------------------------------------------------------
pdf:
pandoc:
to: pdf
pdf-engine: 'xelatex'
cleanup: ['latexmk -c']
#-----------------------------------------------------------------------------
Finally, after conversion in pdf with double captioning, I got this message:
:: [WARNING] Missing character: There is no
in font [lmroman10-regular]:mapping=tex-text;!
::: Script does not exist: ''.
:: exit status: pid 1110 exit 243