From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23583 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Using template variables in plain documents Date: Mon, 14 Oct 2019 08:25:00 -0700 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="10852"; mail-complaints-to="usenet@blaine.gmane.org" To: Thomas Byskov Dalgaard , pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBWNGSLWQKGQEXBU6KZQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Oct 14 17:25:15 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-oi1-f189.google.com ([209.85.167.189]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1iK2Dj-0002eb-Cp for gtp-pandoc-discuss@m.gmane.org; Mon, 14 Oct 2019 17:25:15 +0200 Original-Received: by mail-oi1-f189.google.com with SMTP id r144sf9969121oie.4 for ; Mon, 14 Oct 2019 08:25:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1571066714; cv=pass; d=google.com; s=arc-20160816; b=J+PWQ1ZP/nLpe2ztq+9IE1z94E3GYX73S9qUTJiT6KEC/Af/mOTeDqIAljregEFE0l IOI8hLYbUqLG4/NuOYfpZkxITMqRCkXptNVye05a1dwc/rPZd4IFMXDOPi/obnrNpwDh +VEow3WgmO5Xf3T5HPJ6D8lg4sVpXzeMTO/orn7PMdCqV7iPP+bU6SG/zr+f00xeQuWT ocvpUeSoU7X0jV2swOW3E5Q8vRBpoh7mndBRuDFbWQ1lYo4INwF3C1d7p/cUMEEeg+GQ Hw35appSmiJXhYnsit2dZXAxXqVMKNlQ/sDHBoTK+u0LNnTe3+kdy2xTjxIKAwF9FWej wOGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:content-transfer-encoding:reply-to :mime-version:message-id:date:references:in-reply-to:subject:to:from :sender:dkim-signature; bh=7nQqHIHkvDvWQ+xsOMpqejsLyt2Ir6l0ZL40vod3k2E=; b=ZmzYEKdByQEUO9wd9Lm7prHoRIOKIhEE/dsIqu9xUY9SFHYy2SDHEnDSP+Z1DuOJYy PvoVDnyXqft4T5/tmG0rucCGufNNM01JD9vKvFGlHlKlas5JK7GAEtR+HBwzBzkY6U6U vDEKDd1Aeg0hwfS4mI6/2tR4afZ1Z3rEPouNfhehAKh5Gqr6HEFKiC7lf5IJuKKJV2I9 OWFXXNf0UYp2HqAH/asOcArwj7b0+ik0VS+IyiZhKEraXjSqp1FMp/Ix7JINk6NBW8+/ DLG3x1HBv7Qqhyyy2C1N1wUFWbpTizvkPunFBVFYhSY+obF/bEu8qLdxOvXTLAxbcp0x u7fQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=WHtVXqQr; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:content-transfer-encoding:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=7nQqHIHkvDvWQ+xsOMpqejsLyt2Ir6l0ZL40vod3k2E=; b=joo6AguR7BRQeDFIFG9eE6HuWdkCZm3LRomX/nHjgbYUUmUDIN8MOgH5bUHHNV7MwH rxZe6+I1+d4Jze2BnoqrWvpIjgJxQ1Gu85wotr0ApWMaZ7cNdsST/YcaJzneAmjmTNOs paLTtq2ctrmllYzB3pFsh8+F8CrGWCyRPNFlMNgXFpPeHU+C6arCfr406TxvgOc4CKzy boKQAzrWk+O61v8Sdt1iSqNWnT27KweLr2Dn5GNTT5ESLkd33dLfftGYh22Qe0+wvBzx WZfs9bE/RtMlirmxOt9bOlP08Ps+aW8B6K+o6emlYfyoTl/0tp5yTCfIat2jbTBWyEvA CctA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:x-original-sender :x-original-authentication-results:reply-to :content-transfer-encoding:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=7nQqHIHkvDvWQ+xsOMpqejsLyt2Ir6l0ZL40vod3k2E=; b=p69NVVQv2EVbLiW0pCGYHfiiY6kXurZHCKJ8Gn9bRzcATAKg2OYLVGwj20PfGR9moN 794phmX9dKEiyyVOxbR5kL+2xUuTlc09xl9FKmmKHQyInCe7buDXWnvQW4iZFWGycehD VHirXdd926jlQGNC+yuiOFYQ38G4jyAqJaptqqwAa80Q8ov20OTC/MIvOVmU7P9QcwGX vB7wy2i8f7ni3GYjKbpBlNLwLtPBShpbC7Q4L4x7o26PvBj4m+Q6TPf0t2i49sNjsBCI JSPKDS+chBmWL1HoUttYFAXHxjcJHKo7cZzivnSxjDj2qJzmVDdIM08L/r+HLE6F Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAVpE/5WBsn3vXWzbinqVVgdo4aPLJhiRsQFjStUw+03dneGK7vR SFOnyHn12ucl1I375cop7VA= X-Google-Smtp-Source: APXvYqyQFTSsZrJw1Lp6pZhCnxHCn4YylgLE14CUhO3ptp4SteMo5Avs3tf9Pn3imEOHI7BFymvzkQ== X-Received: by 2002:a9d:7e81:: with SMTP id m1mr24301091otp.60.1571066714103; Mon, 14 Oct 2019 08:25:14 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:5886:: with SMTP id m128ls2674426oib.14.gmail; Mon, 14 Oct 2019 08:25:13 -0700 (PDT) X-Received: by 2002:aca:2b10:: with SMTP id i16mr25405347oik.45.1571066713127; Mon, 14 Oct 2019 08:25:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571066713; cv=none; d=google.com; s=arc-20160816; b=KKFjdGaNEueNtkcuwKdOEFMHZzgbyd3eEMvh9paXJzqHkPMOunyQEkhooWogczxlG4 mD64V3QtOkRpfGUHem0ufCGdsWtpP6A/AaMuxXK6uY5xbJpm3CvunsTPFWHOaytoCR/B xPti4kwzUdZJ76na0uwTpfh3UPWo22gxkd6YcklU+FL41mFLa6OrbH/VD/2NBvRsn2hq hdSw0XzrwddJhIDCl6uUJfgDN6Q+oXkb4v8u25JXAI32qmgU0nWRED2qnAqcPeUVrOD4 1pawfP0BrUfdEBSHwdMtSSHegsC1oqHuw9VlqI7NgnhQhcb/cNqpfvdLvMx7U2qQFC3T 2Eng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=F6RMKowQwNxbBpzCIs63DmOJCjrgGtrmFuI+nY8bACA=; b=CrfH8AQk47sD73dAmbe7KXjeZXN2eTdM6w9DmpI5Vm/wM58v74qE/s19WKJpDoqNMy 0HJA2hNwh38baWINi3v7b3HRNgRaU8DhbdXttWiphP5j4bx705UhIwvSNkw01/QhRc01 033e/PxhuyCJydsc0ev3pvXE5N3lkRx5xqJjwpq8lu+ATGTAmF5gNCePrQTAoxpYp7jK JJPGx+jrUyAii40Q5mvLsopxTseYTvJHRihUqwbMPdIC4MwL6cepMAfQgpcv5zn3eOTb 8+WQoiK7DgwUUe5//RrFooAiT/Xpke0Z4zSGIDV5DFDthlXr4rNLdES+58CgwcuFJFnG wjnQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=WHtVXqQr; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com. [2607:f8b0:4864:20::62e]) by gmr-mx.google.com with ESMTPS id v3si958375oth.4.2019.10.14.08.25.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Oct 2019 08:25:13 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) client-ip=2607:f8b0:4864:20::62e; Original-Received: by mail-pl1-x62e.google.com with SMTP id u12so8141471pls.12 for ; Mon, 14 Oct 2019 08:25:13 -0700 (PDT) X-Received: by 2002:a17:902:7b95:: with SMTP id w21mr31446122pll.322.1571066712756; Mon, 14 Oct 2019 08:25:12 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id k23sm20041299pgi.49.2019.10.14.08.25.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2019 08:25:11 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 1FDCFA17F; Mon, 14 Oct 2019 11:25:01 -0400 (EDT) In-Reply-To: X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=WHtVXqQr; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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.org gmane.text.pandoc:23583 Archived-At: 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-metad= ata-value Thomas Byskov Dalgaard 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. S= ince these documents are very different I do not see the need changing temp= lates. I would rather instruct Pandoc to read the document and work with th= e variables I put in the raw Markdown file. > Is this possible or do I need to make custom templates for each small cha= nge I want for specific documents? > Best regards Thomas > > --=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= email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/BBF1C5F2-788C-45B7-BC56-EA1F6AFEF91F%40coolfortheblind.dk. --=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/m2zhi3uz77.fsf%40johnmacfarlane.net.