public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Using template variables in plain documents
@ 2019-10-14  9:18 Thomas Byskov Dalgaard
       [not found] ` <BBF1C5F2-788C-45B7-BC56-EA1F6AFEF91F-AHfMSizzl90sTMJHDOTzqX9LOBIZ5rWg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Byskov Dalgaard @ 2019-10-14  9:18 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hi!

Is it possible to use template variables inside documents?
I have a few Markdown documents where I want to customize a few things. Since these documents are very different I do not see the need changing templates. I would rather instruct Pandoc to read the document and work with the variables I put in the raw Markdown file.
Is this possible or do I need to make custom templates for each small change I want for specific documents?
Best regards Thomas

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/BBF1C5F2-788C-45B7-BC56-EA1F6AFEF91F%40coolfortheblind.dk.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Using template variables in plain documents
       [not found] ` <BBF1C5F2-788C-45B7-BC56-EA1F6AFEF91F-AHfMSizzl90sTMJHDOTzqX9LOBIZ5rWg@public.gmane.org>
@ 2019-10-14 15:25   ` John MacFarlane
  0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2019-10-14 15:25 UTC (permalink / raw)
  To: Thomas Byskov Dalgaard, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


You can use a lua filter to do this kind of thing.
See the example here
https://pandoc.org/lua-filters.html#replacing-placeholders-with-their-metadata-value

Thomas Byskov Dalgaard <tbdlist-AHfMSizzl90sTMJHDOTzqX9LOBIZ5rWg@public.gmane.org> writes:

> Hi!
>
> Is it possible to use template variables inside documents?
> I have a few Markdown documents where I want to customize a few things. Since these documents are very different I do not see the need changing templates. I would rather instruct Pandoc to read the document and work with the variables I put in the raw Markdown file.
> Is this possible or do I need to make custom templates for each small change I want for specific documents?
> Best regards Thomas
>
> -- 
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/BBF1C5F2-788C-45B7-BC56-EA1F6AFEF91F%40coolfortheblind.dk.

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/m2zhi3uz77.fsf%40johnmacfarlane.net.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-14 15:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14  9:18 Using template variables in plain documents Thomas Byskov Dalgaard
     [not found] ` <BBF1C5F2-788C-45B7-BC56-EA1F6AFEF91F-AHfMSizzl90sTMJHDOTzqX9LOBIZ5rWg@public.gmane.org>
2019-10-14 15:25   ` John MacFarlane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).