Solution 1 :

$icones$ is only referring to a single item in icones: inside the for loop, i.e. not inside the value of mais:. Likewise, the for loop iterates over $icones$, so $mais$ does not refer to a single value of the mais: sequence.

You could do something like this:

  - {url: {front: "", back: "/logo=$gnome$"}}

And then:

  <img alt="$icones.nome$"   name="$icones.nome$"   src="https://$mais.first.url.front$$icones.nome$$mais.first.url.back$"/>

Problem :

Observe well the last variable mais, which will get the array from the variable icones:

  • YAML in a Markdown file:

gnome: 'gnome'

  - {nome: actions}
  - {nome: apps}
  - {nome: devices}
  - {nome: mimetypes}
  - {nome: places}
  - {nome: status}

  - {url: '$icones.nome$/logo=$gnome$'}

  • In another Markdown file:
  <img alt="$icones.nome$"   name="$icones.nome$"   src="https://$mais.url$"/>

The item will get successfully all the variables, but the variable $mais.url$ will not get the array variables.

Here is the result:

<img alt="actions"   name="actions"   src="https://"/>
<img alt="apps"   name="apps"   src="https://"/>
<img alt="devices"   name="devices"   src="https://"/>
<img alt="mimetypes"   name="mimetypes"   src="https://"/>
<img alt="places"   name="places"   src="https://"/>
<img alt="status"   name="status"   src="https://"/>

It should be like:

<img alt="actions"   name="actions"   src=""/>
<img alt="apps"      name="apps"      src=""/>
<img alt="devices"   name="devices"   src=""/>
<img alt="mimetypes" name="mimetypes" src=""/>
<img alt="places"    name="places"    src=""/>
<img alt="status"    name="status"    src=""/>


Comment posted by mb21

I suppose those are pandoc template files, or..? how do you call pandoc? what version?

Comment posted by mb21

ah, shouldn’t it be

Comment posted by Oo’-

@mb21, yes, it is correct, my Pandoc version on Arch Linux is 2.8. I run the command

Comment posted by mb21

yes, like:

Comment posted by