From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31952 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Claudio Di Vita Newsgroups: gmane.text.pandoc Subject: Re: Print value of YAML variable set in document header Date: Tue, 3 Jan 2023 06:38:24 -0800 (PST) Message-ID: <02843fb1-466a-407a-8a38-7c72d1720939n@googlegroups.com> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_12286_586124744.1672756704505" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25043"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDOYFIOXRYHRBYP32COQMGQEMLMALWA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Jan 03 15:38:31 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f58.google.com ([209.85.161.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pCiQv-0006HN-B1 for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 03 Jan 2023 15:38:29 +0100 Original-Received: by mail-oo1-f58.google.com with SMTP id m14-20020a4a240e000000b004d05e6df28bsf8911392oof.22 for ; Tue, 03 Jan 2023 06:38:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=SfzuMcdgmfEQuaSFtKUi1Mm/kQEpzY/E7LD4oSontbM=; b=maLl7fS8xGsCOtTgXmZCPOZVifJci23GLJZFcI+v/KQtBhSzBIGUI3sjyhn2aS74i2 PquP7YTTSuJOH/rlbV0vK3F9Qmsw1I4E/5yskzEVKmAayqlotRtekF3hZxD9+1i64HEM 1NLAp2Kt/25s1ny/NmPlpACfvdz2IVfP4b26ehTIdKxXl5jd/7u20g8CJpRdKlc2H6UT uBEDrwPssH6WsmOhJ9aROD/46vAeaTZSdaDi5bscTVkuqFW9U+n5l3mnL4MEbnL4lK0f dQomqBalYXpULKvw0nh+BMWHE+OkshMfU3Fha2C1yqz/vg4Tt1UTJ+JydZlWeiKaTXG3 /fcg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=SfzuMcdgmfEQuaSFtKUi1Mm/kQEpzY/E7LD4oSontbM=; b=TdpSarWzLZe0fuKlrdBETsStGK/WbZ8bTIrdNyBJgTsvit7W+ORZkDp/PqyhJmeu8/ mFn/6xrWoi7NwIwag9DHCVkelvYhl5nVPGerD/PWoeGrhAVVBGp076c4juvwwaifdYXK cdSE/W7JPqOljoQIhZnDajxBtR9sHHjmLXrqEVQDtpepHxDXsVc9yEDoKrE+VKsP7D5X GDChg3QjQbH/gSl8s3zaWqlD/0FFCmCMyk4aDqRYKL9zTFn50FaIb6d2RBOHS1EnU2cl YxxhrmOzuYBEg4XeM0kbR1XaSDQSDMT3eeI9LNo+v5pc1EeSDDbdAvm2bb/xUGuvugEt v3mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=SfzuMcdgmfEQuaSFtKUi1Mm/kQEpzY/E7LD4oSontbM=; b=hfqHeuIA2IrPcuANHyJ63EWeYIJ6ONzklOBbfJvqE38/3PeDRsIsAB06SppkPrrNnW 1bt0pzwbi9Yz3B74ItNZkAHtIRQKj0L2x200yrzKK9oyeK1CQxXCgoJeWqDU8eHObwGm rNjO4ga9Z516iEy97w21/oL56GxnGrLOrTb36GvXR3Q3zpAKs8ro8BXUeaYxbwGtVLIE JL49xvOAF801mINS5+c9FlPdwgX9BvdhveSWKUfWSejnANj5QV5ThCuc1hAvAzmekZjo yIZMTx0VA491cbtuEG4TBlJjvJmlnOhC8qG9NejEfUvmmzYhD9UsYVYGkqXhs3bFH82o bbmA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AFqh2kqcfwmKDdXv5IOmPiIrcItcFevYSatREevaDckM6iDDRa0fp7DT iA4Nbi+Qam4JZX9RmUfHJn4= X-Google-Smtp-Source: AMrXdXtJ44Oh/sr2rGTLVoO8+LCgSImbbawfHQhEcLJS2S/e8cSq0/4DjX42l7qkQ0wfPUGjAyhD1Q== X-Received: by 2002:a05:6830:1d4d:b0:671:70ce:3528 with SMTP id p13-20020a0568301d4d00b0067170ce3528mr2226484oth.296.1672756708177; Tue, 03 Jan 2023 06:38:28 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a54:4412:0:b0:35b:2747:ee0f with SMTP id k18-20020a544412000000b0035b2747ee0fls8057312oiw.3.-pod-prod-gmail; Tue, 03 Jan 2023 06:38:25 -0800 (PST) X-Received: by 2002:a05:6808:18d:b0:35e:e1d8:5b4 with SMTP id w13-20020a056808018d00b0035ee1d805b4mr2325557oic.207.1672756705359; Tue, 03 Jan 2023 06:38:25 -0800 (PST) In-Reply-To: X-Original-Sender: claudio.divita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:31952 Archived-At: ------=_Part_12286_586124744.1672756704505 Content-Type: multipart/alternative; boundary="----=_Part_12287_1745352496.1672756704505" ------=_Part_12287_1745352496.1672756704505 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, maybe it may look like an overengineering, but you could use this Lua=20 filter: https://github.com/cdivita/pandoc-curly-switch (disclaimer: I'm the= =20 author). It allows to reference variables defined in the YAML metadata block in your= =20 document, so you can print the value of the title variable referencing it= =20 as ${title} in your document. Cheers, Claudio Il giorno marted=C3=AC 27 dicembre 2022 alle 17:16:54 UTC+1 Seagoon ha scri= tto: > Hello, > > I have set the value of title: in my YAML header to a .md file. Is it=20 > possible to print the value of that variable in the document body? I have= =20 > used \let\maketitle\relax in my header to suppress the default template= =20 > \maketitle, but would like to print the title elsewhere in the document= =20 > body. > > Thanks > --=20 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 e= mail 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. ------=_Part_12287_1745352496.1672756704505 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi,

maybe it may look like an overengineering, but you c= ould use this Lua filter: https://github.com/cdivita/pandoc-curly-swit= ch (disclaimer: I'm the author).

It allows to refe= rence 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 yo= ur document.

Cheers,

Clau= dio


Il giorno marted=C3=AC 27 dicembre 2022 alle= 17:16:54 UTC+1 Seagoon ha scritto:
Hello,

I have set the value of ti= tle: 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<= /div>

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@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.
------=_Part_12287_1745352496.1672756704505-- ------=_Part_12286_586124744.1672756704505--