Hi Nick. I don't know about your first question, but for your second I have done something similar in my site.

Assuming that the version string comes from the command line at compile time, I would pass it in as a variable (-V) and alter the output template to decide what to do with it.

In my case, I have a custom HTML template containing

$if(favicon)$

   <link rel="icon" href="$favicon$" type="image/icon type">

$endif$

and my invocation of pandoc looks something like this (you could replace "/d.png" by a shell expansion)

pandoc -V favicon="/d.png" -f markdown -t html --template="custom-template.html"

I don't think this is very flexible, but I'm not sure how to write a filter that does it.

On Tuesday, August 16, 2022 at 5:42:30 PM UTC+1 nick...@gmail.com wrote:
Hi all,
I wanted to ask why there's no global --lot  and --lof options in pandoc as it is for --toc?
I want to add both to the docx writer (halfway there) how can I check from the option if the user has requested them?

What is your opinion they should be added to the general options?

question n2:
- how can i preprocess the document before the conversion? I need to replace a variable taking it from git (I need to extract the latest document version and add it to the generated doc file.

Thanks,
Nick

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/24f764fe-52ec-409c-ae5c-d0b718a09fa8n%40googlegroups.com.