* Print value of YAML variable set in document header @ 2022-12-27 16:16 Seagoon [not found] ` <b29c66da-1338-4550-9626-3b259a13d2c6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 2+ messages in thread From: Seagoon @ 2022-12-27 16:16 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 725 bytes --] Hello, I have set the value of title: in my YAML header to a .md file. Is it possible to print the value of that variable in the document body? I have used \let\maketitle\relax in my header to suppress the default template \maketitle, but would like to print the title elsewhere in the document body. Thanks -- 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/b29c66da-1338-4550-9626-3b259a13d2c6n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 1054 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <b29c66da-1338-4550-9626-3b259a13d2c6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Print value of YAML variable set in document header [not found] ` <b29c66da-1338-4550-9626-3b259a13d2c6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2023-01-03 14:38 ` Claudio Di Vita 0 siblings, 0 replies; 2+ messages in thread From: Claudio Di Vita @ 2023-01-03 14:38 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 1217 bytes --] Hi, maybe it may look like an overengineering, but you could use this Lua filter: https://github.com/cdivita/pandoc-curly-switch (disclaimer: I'm the author). It allows to reference variables defined in the YAML metadata block in your document, so you can print the value of the title variable referencing it as ${title} in your document. Cheers, Claudio Il giorno martedì 27 dicembre 2022 alle 17:16:54 UTC+1 Seagoon ha scritto: > Hello, > > I have set the value of title: in my YAML header to a .md file. Is it > possible to print the value of that variable in the document body? I have > used \let\maketitle\relax in my header to suppress the default template > \maketitle, but would like to print the title elsewhere in the document > body. > > Thanks > -- 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/02843fb1-466a-407a-8a38-7c72d1720939n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 1831 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-03 14:38 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-12-27 16:16 Print value of YAML variable set in document header Seagoon [not found] ` <b29c66da-1338-4550-9626-3b259a13d2c6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2023-01-03 14:38 ` Claudio Di Vita
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).