public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Claudio Di Vita <claudio.divita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Print value of YAML variable set in document header
Date: Tue, 3 Jan 2023 06:38:24 -0800 (PST)	[thread overview]
Message-ID: <02843fb1-466a-407a-8a38-7c72d1720939n@googlegroups.com> (raw)
In-Reply-To: <b29c66da-1338-4550-9626-3b259a13d2c6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>


[-- 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 --]

      parent reply	other threads:[~2023-01-03 14:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-27 16:16 Seagoon
     [not found] ` <b29c66da-1338-4550-9626-3b259a13d2c6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-01-03 14:38   ` Claudio Di Vita [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=02843fb1-466a-407a-8a38-7c72d1720939n@googlegroups.com \
    --to=claudio.divita-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).