From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/25997 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Hiding TeX headers from HTML output Date: Tue, 25 Aug 2020 23:18:50 -0700 Message-ID: References: <95f7f71e-6af3-4d73-b47e-dd7bd28585e9n@googlegroups.com> 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="10781"; mail-complaints-to="usenet@ciao.gmane.io" To: Pranesh Prakash , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBV75S75AKGQEUGI7Q5Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Aug 26 08:19:07 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-io1-f55.google.com ([209.85.166.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kAom2-0002fv-U3 for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 26 Aug 2020 08:19:06 +0200 Original-Received: by mail-io1-f55.google.com with SMTP id s19sf536915ioc.1 for ; Tue, 25 Aug 2020 23:19:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1598422746; cv=pass; d=google.com; s=arc-20160816; b=ICqOv7qGpJ19tCoVtB3a9cfrc045Js2HQ6jZoCQpUIAgVxzHXLWTaPbgXUp2Wc/ptC LpW/UJ0X4BXOlXDkgtrB7zJP92xA5jwRGpW30h8CMPWQO4njOidrGtNyy/Ab4eZfSxv4 vXeVIN4GC3Qk2gmKEYz6XfraGX0nO+N60U6/jKxpUOPQUCZxF93d2ZVAGs8DPyur0UFS 2zS2PVMdefsDUyFTDyLN7kcpqKVVhGwctyq1mrQFXK8+D/HnB5CKv+qH0DQHaVbWyAlc qCXCkL+txN6Ed00vaa3J3DvbmMVrTjJHj35zFsvLB7mp6YQVJo2bSMjG8KIiTPTd7ZT1 hdkQ== 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=W+UQQtY19iGSZVGyrKPihc0iGYchWMpS+lnLQr3RBCQ=; b=XAhZmtjMKWC1FTaC+XANV+U16RUTIj7rLOjNrcqkI04A5A8cIH8oeg9NHpvDr1bli4 ZykItf8LLazi3utXOdvndBKZ02dcg0Czb7lUe9MPP+1YUt1j9HrVxG/wvvhdtYCRMZ0/ XBCjAJrUcg0Ua7JeDMKIlre7BRGpGVnHqvUlrDy/W4ZUd/LM3ghvWXu/COAZLLW/T7/d IK0SNyrYWqkOqwYTWzDiRkjpIRgUPJYXeaQDAd2HsvVIBSSVOmeR6xpAEJrcPCWxIUH0 6K3/NsF274rGNAlVLNh56w28vfwuaKLQmgQKTkIKOt9OJa5oj3Az3ltLBNN7r+krEFX1 YowA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b="EhAI/Hq/"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::535 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:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=W+UQQtY19iGSZVGyrKPihc0iGYchWMpS+lnLQr3RBCQ=; b=KUyFhqS7vxgNjaS6sSAtDeUqkr1+xx3eH5YsDrL8kAnQtqMxbExyVbxnvWR40J25l0 GsxJnhQVfUqf18ljB0WtZsBuIYifxlx9W7FbW1u8Hk/g7FlSwvdhqd49G1BTmTlMlqzz F2K5RUdNP9SuEImwUL8axqZFgDiMTt5RAglY45QbPhCrJUEZniUlSah9wGZjqFz/7wzD +3uZCDtYXTlEN7i88aV/EwLLK7c1S1En/IocXz2vBFKBQqOfWGnOmGuGa2FDqQdeRRWg UYHH5c2KKlhYjhiNG++qrArvD1t5KH2rTe/IDvZZmK2Uy9zbTd1/foz1i7DowfI7yZ/1 ytzQ== 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:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=W+UQQtY19iGSZVGyrKPihc0iGYchWMpS+lnLQr3RBCQ=; b=Zqwvq1QQX73UNxiKn+COCa5z0k0Ur3tvbX22vBg1zHX3hAf1QaUXEv113tw/u2DQDp EaaL0PMMdHIk184BSQNhtoFUGzi4LAe1RmXfK3TVZO5CTtrn4oDm8w2gluDgJiMEnMXa V9ThGExfsuutRcq2iNiT0AtZIm7NIae7PSCo1Lk8x2pdO2gDd7zJ5GS+EfTJJammpJeo XOZ5CCt3aOxazJTKLpBXEKvTFEqh6r0/vS0gCbLu60nRsE+gO2390maJ+rY3J4BSkA7r x++qXBDdZ4qrB3lbQUJv5MakF7p+6Epqg+Jc1SZWhuUk3l5HC5ryueCOCtqoU0Y+h3xu QXag== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533DMRdDhUKpu6wmJmco3b2GBSQOfVyD4gRTzsxQtzZjKgAJXjGL h4Nl7dBOK+9cdnJlx3SAg2s= X-Google-Smtp-Source: ABdhPJwqj/vjefxc+11fBN4QQxuhErq97oA0x1rF4eEYFOqSeEA4mdcvmf1kDIe8bX8X5eet1ZYUmA== X-Received: by 2002:a6b:e517:: with SMTP id y23mr11818826ioc.190.1598422745943; Tue, 25 Aug 2020 23:19:05 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6638:248e:: with SMTP id x14ls141840jat.2.gmail; Tue, 25 Aug 2020 23:19:03 -0700 (PDT) X-Received: by 2002:a02:6995:: with SMTP id e143mr301262jac.78.1598422743100; Tue, 25 Aug 2020 23:19:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598422743; cv=none; d=google.com; s=arc-20160816; b=vuWfwm5un2L5pGgzfbImt2c7JQXECbQCEBwiBepnFOOf9QVSevbUCY6fh3hxnqVbZt 69aw34G67Gl5rZ7dYBryAaYcM/T5SCVeZpZS1wDyB7pPC29EmKUYfkK0nuABKfZYMtS+ WxUGW5XFeCgxy/TbxX4XIdDvfQ5IJNyB4mEgeLgzEI7mL2mGS+tee+jgk8irRndXmFN8 FoPAI6uyIr27D7cTQXQ7dar20yYU1RwGAM7mVWNGLgs8QB/D3WO9Plprl92VRunSjGqV FEOhSzVP1XB64C4lkeYEYBM3lh33KuldgVv9WoDMx8Wap3GY7fLP08nFNPhjLZiB/Fnr hqcg== 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=OcAUWIMrDRDO2LN2wwBJMDnCfIPc5XsoSjH1u2YXv44=; b=sEeLkA31ZM1Nq9ZYuspt9Ru5T5+f36d3JdJ4Wwdeo214rrNIYrzopbKGMCNqkNMMAi 1IB5KFis36Ym7jVuF6yT5Ynqr8eeqJbdSP+NVVJLrF5nI6r4vKEpSPUFEznzrC837xYa 61OIg3EuO64ULAUueecn06NL1d9UyJhdDpFUe5xVupTXpI6cJtcb4Z/TlKEgsqvFoZEx WNRBrMb+SHPmAUF/h/uTUZGVunZTbnLfbedTn4nDkByl7ivfuWDjqD1i2EU329JWMFfF fclCFj7T7IDLgpd+WVtAQdQO1XA7P0/IiUNnXL1PHD+a7Bckwe/uHxpUSbnH4WvhLUZ0 nAcA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b="EhAI/Hq/"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::535 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com. [2607:f8b0:4864:20::535]) by gmr-mx.google.com with ESMTPS id m13si61793ilf.5.2020.08.25.23.19.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Aug 2020 23:19:03 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::535 as permitted sender) client-ip=2607:f8b0:4864:20::535; Original-Received: by mail-pg1-x535.google.com with SMTP id 67so510025pgd.12 for ; Tue, 25 Aug 2020 23:19:03 -0700 (PDT) X-Received: by 2002:a63:36c6:: with SMTP id d189mr8840829pga.392.1598422742359; Tue, 25 Aug 2020 23:19:02 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id h14sm1357199pfk.195.2020.08.25.23.19.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Aug 2020 23:19:01 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id A821DA2A1; Wed, 26 Aug 2020 02:18:50 -0400 (EDT) In-Reply-To: <95f7f71e-6af3-4d73-b47e-dd7bd28585e9n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 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="EhAI/Hq/"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::535 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:25997 Archived-At: OK, I thought you were talking about metadata in the document, not defaults.yaml. defaults.yaml isn't quite the same -- it is a way of specifying default values for things you can specify on the command line, and they work the same for the most part. Metadata in defaults.yaml files is NOT parsed as Markdown, but rather as plain text, just like --metadata on the command line. This is pointed out in the documentation, which notes: # metadata values specified here are parsed as literal # string text, not markdown If you want to include some metadata conditionally, depending on the output format, but NOT by adding header-includes to the YAML metadata in a markdown file, then your best bet is to use a lua filter, which has access to the output format in the FORMAT variable and can insert the appropriate thing into header-includes in the document's metadata. Pranesh Prakash writes: > On Wednesday, 26 August, 2020 at 3:14:37 am UTC+5:30 John MacFarlane wrote: >> header-includes is the field name to use. > > If I use header-includes in my defaults.yaml file thusly, without > back-ticks: > --- > metadata: > header-includes: | > \usepackage{microtype,parskip,bookmark,setspace,xurl,secdot} > \usepackage[hang,bottom]{footmisc} > \setlength{\footnotesep}{3mm} > ... > > I get the following error: > >> Error producing PDF. >> ! LaTeX Error: Missing \begin{document}. >> >> See the LaTeX manual or LaTeX Companion for explanation. >> Type H for immediate help. >> ... >> >> l.43 \textbackslash > > If I use header-includes in my defaults.yaml file thusly, with back-ticks: > --- > metadata: > header-includes: > - | > ```{=latex} > \usepackage{microtype,parskip,bookmark,setspace,xurl,secdot} > \usepackage[hang,bottom]{footmisc} > \setlength{\footnotesep}{3mm} > ``` > ... > > I get the following error: > >> Error producing PDF. >> ! LaTeX Error: Missing \begin{document}. >> >> See the LaTeX manual or LaTeX Companion for explanation. >> Type H for immediate help. >> ... >> >> l.43 ` > > Regards, > Pranesh > > -- > 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/95f7f71e-6af3-4d73-b47e-dd7bd28585e9n%40googlegroups.com.