From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30724 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: William Lupton Newsgroups: gmane.text.pandoc Subject: Re: External default files specified in the YAML section of a Markdown file Date: Fri, 10 Jun 2022 17:31:12 +0100 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000000d836e05e11a78bd" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30651"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCS4HJ6WSAHBBXHDRWKQMGQEVTRHBKQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jun 10 18:31:29 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pj1-f58.google.com ([209.85.216.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nzhXl-0007oH-0s for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 10 Jun 2022 18:31:29 +0200 Original-Received: by mail-pj1-f58.google.com with SMTP id w36-20020a17090a6ba700b001e876698a01sf1679676pjj.5 for ; Fri, 10 Jun 2022 09:31:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654878687; cv=pass; d=google.com; s=arc-20160816; b=NTXRpeVllHR4W6sGtAndLNlfcGfH/C5MaY+A90qoofTHAXF+5NLHU9+iEYmlaCpi9p gh94owu4mBoX2iRvH50G1kPXt60eO/OsITJy9sy64CJwq2qFeIqqOVKg775t0xfATnaU rlanNH188gJLXQdrRw0OG1DIxUcsrIk9FwmQO2uXJAOLgUilzmYVzn4w4+JUtaSQKJBF XdvtRmz/7FDM2WPzUus0EKoH6Vl3OsNHuVa4ZNxguoFMk5Lyy2nXO6G80l3gj0C7tQph Vv8BI3da3Vj5lYqEgqpbZu3UKp6IcY1W+AxBRFLNggsjpS1P9WMTfUys57pQcwhS5XaY TBjw== 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:to:subject:message-id:date :from:in-reply-to:references:mime-version:sender:dkim-signature; bh=43e87EtMnh1X6sv8a+HcxJsOiqgs80ruZY6bbyNW+9c=; b=F/4GxapsdDvNR8Mkdqip/PPWCyWkzW8Y2J8Dg8cDAtawueH5khDiPFPvqlNlE3NMqy GAxGeSRCO5ilm0QkbKhpTBxK7PTvkS5vXbTtyfw0rZhb/Rb7wJqOwfG/mTqy7Vaf0Fmb D2oBbDg1C/BoZWTmqjVXwv6s76L+bB/BQnrB5Krn/gKiLqnJb/bLwyc7o1CBtvhdiLZq GQ1n/3DKd+Fql2DLlOIO1p/fpA7r4yaClWhTSj4EFbigK9XvK5m+vSSiM3WsvIe6ArYI AxZkZTrQOBXoHIwEPQkiT2d8okkjLFfHu2QZH+mbKjTQ+d2pZkIoCBqMKax3Do3EzBpr BBUA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20210112.gappssmtp.com header.s=20210112 header.b=3elO+q8c; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b2f as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:mime-version:references:in-reply-to:from:date:message-id :subject:to: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=43e87EtMnh1X6sv8a+HcxJsOiqgs80ruZY6bbyNW+9c=; b=Ctyghu2w03gXuLh9JDlUoIokhXuUbKHDuCMEbtwczf99ZFBUkUhKB6qUUFWAREJ+gD uyPCQux/vxCxYEcSh+q6HQicI14NfmOQoZsa42j+GoEpgBhncpdtLhFjco6t3f0TlgcG lvurmou6n1OVL7mXnggoOK5ZUW9HuzImkvjZBPWl4IxOiQggIp8OYSQyq4KChpDdV/lf IQqAAOGWV+BTf0IL3168XtW2kf7HF7g35sUFCmjZ/wJhGo3AQp5Kru8iRupL25rQ132d C3iYvPQFoeih0ANCx5oPUZrUyEV+XjBLSAYKaIevGN8GbLqRp5yP2PHs9IgJlvUAnY8H /YUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:mime-version:references:in-reply-to:from :date:message-id:subject:to: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=43e87EtMnh1X6sv8a+HcxJsOiqgs80ruZY6bbyNW+9c=; b=7ectYEdH5DHIGgKcIACaRprI7PwjajZFPcACMTePrLHiR6CqQHKMhuL0n4okR6EFQw THq59gZpdrJqcxu5IDDa361O4E+WO5RFxcb+LajPOKTzjDTlE/2AL+AKk7qqAEdxScJc oVfGOw4M+b/+vt1QfornWFLvno7YJOHz012vktQhTotzkPAHjr/aEACP4W4pG1Xu9I09 2aSZb1qze1PL7qKWX/UufrEj1gq+ftI6yZmXU3Iwd9oKep+Vu6y2oW9ku24B6VKM20oQ CEG3onmwc3IR+12lAhk718slO1LfL100HmjANGLulxB5ynsjFZNW9BajEnZKmT9eJF5E JYRw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530E3Nom8zysA7dhpAyNZjS1v3Vd1+F7cGWNFwWhrOqc3Td0T65l Tm5nPHSznMpwVO4l7pCvzxM= X-Google-Smtp-Source: ABdhPJzjistzVdczPy2ktrBzAKj3bgax360M8i5FjROCwfg4S8JyUgu3BJc7nO7yTHGiC2bOGThXAQ== X-Received: by 2002:a63:5e47:0:b0:401:a9bc:4add with SMTP id s68-20020a635e47000000b00401a9bc4addmr6607791pgb.306.1654878687615; Fri, 10 Jun 2022 09:31:27 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6a00:179d:b0:505:9501:adc5 with SMTP id s29-20020a056a00179d00b005059501adc5ls11097599pfg.2.gmail; Fri, 10 Jun 2022 09:31:24 -0700 (PDT) X-Received: by 2002:a63:f95c:0:b0:3fd:7e21:749e with SMTP id q28-20020a63f95c000000b003fd7e21749emr28774769pgk.49.1654878684099; Fri, 10 Jun 2022 09:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654878684; cv=none; d=google.com; s=arc-20160816; b=emLoye45fGvbFHo1Ccl271yPUWK7r0vOvTm3vkO7YrUdCP/0TxBvAvxa9VI+T+F8Un i02AeBiUZZnG5luC05H2GVWPgJLwj2t0rp9Jj9og0i20tgFUqGMyAxpYsq6XIqh7fWus BUOU4fHvu1U4xaWS5WuokMT/G/6wOHxee89W7GJR1MVr/w+Ws4jNb8FbKTQJJtS2V/qT jdxHXlGqoT0xr/KN4xemC9Z4fAUbUWgTWNDzB/nrozrF/9jMSwTaKNCf04LKvDSWyuP4 xuj+X484iM+ZVYRngS+xjcpyMmlZrBtv1SyR5iNtfhrQK9h82xIJQ0Sv3tYTP0C7BDeO Nc4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=s1S+cDK1OqsM+ENkrF/6oSysryZvcBZQ/DXQVz24Ijk=; b=llQGpWVIrIfzC6kx7/PP+3RlhSMQ1lpiqrCAWmJCLopxggjSF5P70vIFg4dGJb00dm ovT2WPptV0vjWm96+O2Q2DPsSiFK3CvnCPfodyTrIVLh06FOsERwHK0VOJbmRZ4HFgoC CGal97GOgBVbxIqKSJ7DKauAH5hxPodP6/88q1wWt3mBGWYSTrm29eW4PTwAZCnaV13p XXhbE69CiV6I34wTs8O56RRUohm5W/idYEYZFPzxDkDcGeIqJOELaU+jTLJMRy2XicBg LTtYBRmiWe/+YdfxSYTg4mYECCRjTAw+iqKbdrKFUcyBViMpGDpKQwbHGhDoDlqSa2Uq 20BQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20210112.gappssmtp.com header.s=20210112 header.b=3elO+q8c; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b2f as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org Original-Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com. [2607:f8b0:4864:20::b2f]) by gmr-mx.google.com with ESMTPS id u21-20020a656715000000b003c1fd25c98esi1030355pgf.1.2022.06.10.09.31.24 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Jun 2022 09:31:24 -0700 (PDT) Received-SPF: pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b2f as permitted sender) client-ip=2607:f8b0:4864:20::b2f; Original-Received: by mail-yb1-xb2f.google.com with SMTP id r3so13681011ybr.6 for ; Fri, 10 Jun 2022 09:31:23 -0700 (PDT) X-Received: by 2002:a05:6902:728:b0:663:5591:aa2c with SMTP id l8-20020a056902072800b006635591aa2cmr31608182ybt.288.1654878683098; Fri, 10 Jun 2022 09:31:23 -0700 (PDT) In-Reply-To: X-Original-Sender: wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@broadband-forum-org.20210112.gappssmtp.com header.s=20210112 header.b=3elO+q8c; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2607:f8b0:4864:20::b2f as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@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:30724 Archived-At: --0000000000000d836e05e11a78bd Content-Type: text/plain; charset="UTF-8" i think you need to distinguish defaults (command-line options) and metadata (although perhaps there's some overlap?). this works: % cat file.md # I don't think you can specify the name of the defaults file here, so I removed it; also not sure about ${.} --- title: This is a simple Markdown file author: Emiliano --- # Heading This is the content of the section. % cat defaults.yaml pdf-engine: wkhtmltopdf % cat config.yaml lang: en-US papersize: a4 linestretch: 1.5 mainfont: "Palatino" geometry: - top=2.5cm - left=3cm - right=3cm - bottom=2.5cm % pandoc --defaults defaults.yaml --metadata-file config.yaml file.md -o file.pdf Loading pages (1/6) Counting pages (2/6) Resolving links (4/6) Loading headers and footers (5/6) Printing pages (6/6) Done On Fri, 10 Jun 2022 at 17:06, Emiliano wrote: > Hello everyone! > > I'm trying to simplify the YAML section of my Markdown files by writing > most of my settings in a separate default file or metadata file. The idea > is to write just a few lines of YAML in my Markdown file and then having a > separate file (let's call it config.yaml) in which I can set everything > else. Let me provide a practical example: > > > file.md > ```markdown > --- > title: This is a simple Markdown file > author: Emiliano > default: ${.}/config.yaml > --- > > # Heading > > This is the content of the section. > ``` > > > config.yaml > ```yaml > --- > lang: en-US > papersize: a4 > linestretch: 1.5 > mainfont: "Palatino" > geometry: > - top=2.5cm > - left=3cm > - right=3cm > - bottom=2.5cm > pdf-engine: xelatex > --- > ``` > > This very example I provided does not work! Do you have any idea of how to > solve this issue? > > Many thanks in advance! > Emiliano > > -- > 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/e80a4dce-27f5-4379-a44f-5f43af197cc9n%40googlegroups.com > > . > -- 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/CAEe_xxgEvEhGY2kVfuMLteaXUpHfYOpZG4LLXW2fN5jt2%3D79tA%40mail.gmail.com. --0000000000000d836e05e11a78bd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
i think you need to distinguish defaults (command-line opt= ions) and metadata (although perhaps=C2=A0there's some overlap?).
<= br>
this works:

% cat file.md=C2=A0 =C2= =A0# I don't think you can specify the name of the defaults file here, = so I removed it; also not sure about ${.}
---
title: This is a simple= Markdown file
author: Emiliano
---

# Heading

This is t= he content of the section.

% cat defaults.yaml=
pdf-engine: wkhtmltopdf

% cat config.yaml=
lang: en-US
papersize: a4
linestretch: 1.5
mainfont: "Pa= latino"
geometry:
=C2=A0 - top=3D2.5cm
=C2=A0 - left=3D3cm=C2=A0 - right=3D3cm
=C2=A0 - bottom=3D2.5cm

% pandoc --defaults defaults.yaml --metadata-file config.yaml file.md -o= file.pdf
Loading pages (1/6)
Counting pages (2/6) =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
R= esolving links (4/6) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
Loading = headers and footers (5/6) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0
Printing pages (6/6)
Done=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=C2=A0

On Fri, 10 Jun 2022 = at 17:06, Emiliano <gattu= lli.emiliano-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hello everyone!

I'm trying to = simplify the YAML section of my Markdown files by writing most of my settin= gs in a separate default file or metadata file. The idea is to write just a= few lines of YAML in my Markdown file and then having a separate file (let= 's call it config.yaml) in which I can set everything else. Let me prov= ide a practical example:

> file.md
``= `markdown
---
title: This is a simple Markdown file
author: Emiliano
default: ${.}/config.yaml
---

# Heading

This is the cont= ent of the section.
```

> config.yaml=
```yaml
---
lang: en-US
papersize:= a4
linestretch: 1.5
mainfont: "Palatino"
geometry:
= =C2=A0 - top=3D2.5cm
=C2=A0 - left=3D3cm
=C2=A0 - right=3D3cm
=C2= =A0 - bottom=3D2.5cm
pdf-engine: xelatex
---
<= div>```

This very example I provided does not work= ! Do you have any idea of how to solve this issue?

Many thanks in advance!
Emiliano

--
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 pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https= ://groups.google.com/d/msgid/pandoc-discuss/e80a4dce-27f5-4379-a44f-5f43af1= 97cc9n%40googlegroups.com.

--
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://group= s.google.com/d/msgid/pandoc-discuss/CAEe_xxgEvEhGY2kVfuMLteaXUpHfYOpZG4LLXW= 2fN5jt2%3D79tA%40mail.gmail.com.
--0000000000000d836e05e11a78bd--