No caption or error in displaying

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 replacement.png 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:

The same thing after another paragraph. A new image with caption. I refer also to images in the text.

In the next post what I got

After compiling I got no caption after the first figure:

Surprisingly the second figure displayed so in pdf

You can see I have a duplicate caption Figure 1: Figura 2 (etc).
I decided to put Figura 2 with strong style.

  1. Why no caption in first figure?
  2. why there is “Figure 1” before the caption of second image?
  3. why so much empty space before second image?

I tried to compile in pdf.
I obtained a good results (but captions are not parsed)

in docx conversion and also in html all is right!

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

\captionsetup[figure]{labelformat=empty}% redefines the caption setup of the figures environment

Then in your Pandoc metadata you can set nonumberfigures to true. My Pandoc templates already include this which you can see as an example: … .yaml#L146 … latex#L174

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

- docx
- pdf
- html


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


Sorry for the late reply, did you fix this? You can attach the .md and .tex output from a compile and I can have a look…