From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29791 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Adding boilerplate text in docx Date: Wed, 15 Dec 2021 10:21:38 -0800 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31965"; mail-complaints-to="usenet@ciao.gmane.io" To: Chanamel Ungar , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBSHE5CGQMGQE3HIANCA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Dec 15 19:22:05 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qt1-f191.google.com ([209.85.160.191]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mxYuj-00083S-5y for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 15 Dec 2021 19:22:05 +0100 Original-Received: by mail-qt1-f191.google.com with SMTP id g2-20020ac87d02000000b002b277218d03sf30709191qtb.16 for ; Wed, 15 Dec 2021 10:22:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1639592523; cv=pass; d=google.com; s=arc-20160816; b=lvwY9abUNOecAEg67L6RjZaYXS65RCSeU6pOfUZlYmc1+zkwKSZ5G71ojchd9aOL0u 8Y1rNE2yRwQVYJCZuj/LDIHVlvYftY9SOScysrRTvjZ8lAE3b3n+7RHm5b9MDiCRNOcn xVv9yVZilwjQC6oWLV5K33n7n1GQczxRoLB9/APflFtVPrzcum8Nysyu9pd8P36Shdcj m5yzdMizJx7qPiQXxqv3KeKq73J0oACCXv5hZfSwRiQouUBFjRpDT1kLKc7eJ00swarm Ay+zTR1tn8opzg5QWXdDQ9w6LYz4e+hpM5jrwv6c0rrB994m7jxk3mp0sPWoa8l9FLKU XaTg== 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:reply-to:mime-version:message-id :date:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=KVO+OC6U+6fmOUGqLh0zEdeVAL4t6A2LaTjeAPTy4zs=; b=cr+OMNYZXGeZzLkTVHfHe1OpXy4AYjczapywV+X0GAQmOEUFBCF917lvurM+xKJW5J UuVga3D93HNP7610NK8QY+z0IzyfvjUoL8d+uW9Ja+FevJ+2iMMkCYabPh1eiueL1AhI QGkJ4FQ6H0SK/3BCfPmpcvZQCWd2TBLkzWIqs71K9tOwR9fhLJ3FKHoCjxChh5Pqkhx6 KPCwXU1WKlVHbOL0VC/XSLb84pMyprW2x8c/80//qn4ohlbM5poP9hW6EcF/lPq0tDbQ F7ltv+JoqQ6mLyG7zWuBhwukBBbbt3hvnKsdzXxwnamU6/xpikYyZsf/d3ObfOvsnBsV FOvQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=k472zU7Q; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102c 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=20210112; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=KVO+OC6U+6fmOUGqLh0zEdeVAL4t6A2LaTjeAPTy4zs=; b=Ho/1Cy2PNGokd1kyYJys6C2tOvoc7ecV1Y3tnQTzoOsi+7+WUJScYL32wkv2AlScR3 BnEeT7CVDi8LVZu01EQMvwi360SRw6BKSBKMPyrgUMlLoqeBf6Z/utKyy3J+fQ80cw0g 7/ofiQpOX99kHw17hLVisvSFs1sL3yj4HXww1TPZEoSJ3urz2RFIxxYL0+44JfUipYKF Ej+I/Saj2fVaC5yaXQKnftDThPW4fBg2pfKJMmvfI4rCQ6Jvd2tviupiXL5/gCRVPZLl 11aVeFaDANIW6panZtl+NeiKQj5BRAqST8NJ1daRkUxu0Oj58fMk2O6wae2slrwXYlty sdrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=KVO+OC6U+6fmOUGqLh0zEdeVAL4t6A2LaTjeAPTy4zs=; b=vOxzrzTzgtJkAq/2gRndypOyNo2dxkeoyrL4y4nRcczTB8HFTDWmRhGWhpmxyjW78Q FkjFsAP9dDDVUAJLw2Qj9fF8onk5XT4JIn7hhK43qt9Vq+jiBl2O/aWCzlq9ItyrPWeN JkpB6FkNwFpi7IlYpaEoaRjTZr7RvNBvhR7NBFdrzgW8xGvufJXqxDc8x5KHE/dg04F2 TtlSxhIHV6D7jrtXi8pTMpTj06YtVxnNDTI5Bd/+40pkAEiAoO8/Ucl4b2rBeO98IOvT 4J9Oe4xQkrCQ36JzjdEsaQ32Zl2YiX7fIBKzhlfkZa2cXxIQMBjFpHpLM0qj8dA3l91T pdtQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533L0nKkmXdK+AKfN3T4kYSv03XDJw98Mi3gixwhaKv1QfBzqtmK 0CXYzG7HDD/MqreMyVa0dCQ= X-Google-Smtp-Source: ABdhPJzUZ3+n+DntxD1rUITMQKcGYplyTA0gr2FyDTH1GFPZjjc/HZxtG0lGHEzOyoR5AdbMHqe4EA== X-Received: by 2002:a05:6214:529e:: with SMTP id kj30mr1672199qvb.117.1639592523748; Wed, 15 Dec 2021 10:22:03 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a0c:dd13:: with SMTP id u19ls1432995qvk.3.gmail; Wed, 15 Dec 2021 10:22:00 -0800 (PST) X-Received: by 2002:a05:6214:29e7:: with SMTP id jv7mr2968112qvb.16.1639592519972; Wed, 15 Dec 2021 10:21:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639592519; cv=none; d=google.com; s=arc-20160816; b=dfq5EJkEMyoZNFmINEM/89eS3EbSGelOpY24zZRwrDhRM10Cno9R0RGV6QNPPUA4NM enLDkiSJ/8fd2nSOze8+PQx8zkRfnPpDfN41r3C/k3H0JEZCiTDxQxBUHZDd5x9OQ50w bee7JjY4t605p7D6mhUiRDspKnpLGdo26IVWqdpBMqeqzDdM7ohMzMoLOFQUBPjDlsv4 mPLAorOdMub6/S8ixRPxmo6kqSn4FsYXScoHTonfF8fJ+objAoBP7+Hgx6FeHcyPNxSh My7cIN/k4/N1+VAen7YWqpkQikSbZ6feDw5HWPz+MSxazki4haCVpdHVrwxzYgqk/BiY n11g== 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=+dJkvKG7qypDZZt/B0p3XDv9374donhe7EGLB5h8jqE=; b=eun6vWshCXf8rXH2Com3UYnezch0AGmRRF8JevYJN5xw76URb+6wMLii8QgHBgFMdM 9ed6upL1A2wVYxjHmMGN790mgxBHYL+jq0XXne9i3K9SgZRQrpVg4lSOpFWK09dXQtMt UtnxhLX35hMFxwcJfvcUyNNcGMP//GO5ZZmLgHokBPkw7WWENl1YnqU4PI0vL6UXF6HP 7eoaUrqTXm0krYpLL8u6gyNkpBS6sdj3nTGY9R2E1NwMO3oVG9XThmJ8+JIzAa9Jw5nk i9hWNSpxsTKtC8pThQ1A4JO3NeoMTCDqt7W91ifemqukoU/n0AZe5RGnQEJVBwpT/QV4 ufZg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b=k472zU7Q; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102c as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com. [2607:f8b0:4864:20::102c]) by gmr-mx.google.com with ESMTPS id w9si317180qtc.5.2021.12.15.10.21.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Dec 2021 10:21:59 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102c as permitted sender) client-ip=2607:f8b0:4864:20::102c; Original-Received: by mail-pj1-x102c.google.com with SMTP id j6-20020a17090a588600b001a78a5ce46aso21209002pji.0 for ; Wed, 15 Dec 2021 10:21:59 -0800 (PST) X-Received: by 2002:a17:902:d4c1:b0:148:a3f4:1ec6 with SMTP id o1-20020a170902d4c100b00148a3f41ec6mr4937339plg.32.1639592518479; Wed, 15 Dec 2021 10:21:58 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id z13sm3553276pfj.7.2021.12.15.10.21.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Dec 2021 10:21:58 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 03DC6A1D6; Wed, 15 Dec 2021 13:21:47 -0500 (EST) 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.20210112.gappssmtp.com header.s=20210112 header.b=k472zU7Q; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102c 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.io gmane.text.pandoc:29791 Archived-At: Chanamel Ungar writes: > Hey, > > Currently have a few issues with the docx transformation I wonder if you > good folks could help me with: > > 1. I have some boilerplate text that needs to be inserted in *most*, but > not all docx generated from a source markdown file. It needs to appear as a > footnote of the first page of the document. What would be the best way to > do this? It would be relatively easy to write a filter that adds a footnote to an element, say the title. > 2. Currently, the date in the generated docx is automatically set to today. > Is there any way to pass in a specific date into the document? Yes, if you're going from markdown, just include the date in your metadata: --- title: Whatever date: July 3, 2021 ... > 3. Is there any way in markdown to create tables with merged cells? > > I.e. > > | A | B | > ----------- > |fruit | apple | 80kcal | > | | pear | 60kcal | > | veg | carrot | 30kcal | No, not with native md tables. But you could include an HTML table and use a special filter to parse it. This is due to BPJ on this list: https://groups.google.com/g/pandoc-discuss/c/seVGKkR-bKQ/m/UoOUx8GxAAAJ ```lua function RawBlock (raw) if 'html' == raw.format then local html = raw.text local doc = pandoc.read(html, 'html') if doc then return doc.blocks end end return nil end ```