From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30726 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Emiliano Newsgroups: gmane.text.pandoc Subject: Re: External default files specified in the YAML section of a Markdown file Date: Sun, 12 Jun 2022 07:19:10 -0700 (PDT) Message-ID: <01b37417-1002-445e-9140-fb36beb3f8c8n@googlegroups.com> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1739_627376008.1655043550636" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22140"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDM7PRPHYAPRBX7LS6KQMGQET5PDMAA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Jun 12 16:19:16 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f61.google.com ([209.85.160.61]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o0OQt-0005d9-8I for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 12 Jun 2022 16:19:15 +0200 Original-Received: by mail-oa1-f61.google.com with SMTP id 586e51a60fabf-1012777dde9sf1219778fac.19 for ; Sun, 12 Jun 2022 07:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=p5iGfJiOBs8/M44+ZIiE8MRZeQjA+3d4GkVh5mIJK5k=; b=Vt3T+TbpXqW/2SfyNxWxlzLIDU3ERcnmsL04P1mULHouIHCxSTFK5PsX3jdutlhNre CYqnj7/pYCkI3yKhkUDup6l8gl4TZxNmGnv4failpT95kVfI0+eJi6b32h7l7j/nGXtn kzJyYaBBtH58x4T1PZUUNzJKXVvfeH0B0SeCs+jOjGn486LERbNRVzD1EmBOd3RnNSfV GB5T7JHO+QNbbpxSr3BFJUIHZdHsJWL2xFtlT/ko5MqRxytvSjy7wD9fb22+inQh062z RA43vpBIUI5/KNICjniRzrhW99gNzOiZsj4Y6xN3/JrSByc5ljx9nK1HIA8+nA3oEbnb hz8A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=p5iGfJiOBs8/M44+ZIiE8MRZeQjA+3d4GkVh5mIJK5k=; b=DdMQIrzfJ5QH1hCD/sR7F2zdsxttz4KWoBOSHBq7H3Rvsb4ga13qVUJiXwE/jFQ9Mv zmgr1K0U9bhxXZIqov+QK4OsSkJIrm5S902XtW/vQr7AcmKlCXTb1quel9wHPzCQ7b/r euv+cIrkbGwZC9MFlhYUoJ1REpDwwOm7gn/4tyYV7qF5rQrLAXs5GSpP8kXcmBTqnZAC cvZYKmvG2yVPJDuxBMnRYxqSJB3rklDrTktV87odVgz0G4B6gUSEwuZ5aiXyxr72710o S27Zo3LSSwqIbSbGlqzZwYbld8VKrpoI0V72P+O+8xSU4y2EaNxC0qQq4IsiLlZEUxeD qFDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=p5iGfJiOBs8/M44+ZIiE8MRZeQjA+3d4GkVh5mIJK5k=; b=NdbhdfOM1bnQF+lQI2GG8cUOgz6AxS+Eq4LZY52FQiG6n18ee4kHjehmswCOi7O6ez RA1qiCBj6c1zp4I4LcIAmBuPil/V2TodJupM9k+zf1d9qkezNUn8ZaN+8P561Tc9wkdf DEtQ4wMh+sqc+WZw3rz5OuWjIbQMRk4/lWrXhPlryghvO4obvK86B8kPh5LiZLNj4akS Tfup942fVuV4l0S4/k/V8hTi0RO78VgjnELys4qVzYMNy8T+6fEGIInga9rhJmxzgcFm t0WCHs3ej3nTRjI7b6L0V3PYFxbxpFZz0v0S+gMgwme5JvU5zxSxMO2oSwrcrRtHmqD4 J96g== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530p1QbvKiRviKcGOPIBJV0SGH+w5QHuU+E9SkiQohFHr8xxD4U0 oO7yskgwkKjWumOc5R5T2gQ= X-Google-Smtp-Source: ABdhPJwzeDGdxv4tGXEhevQV6mRSE27VFo5SzfYOtA4hLVqTSOCg9IxKeiIpRfmZpDIoMSQM2AoOGg== X-Received: by 2002:a05:6808:7c8:b0:32e:64fd:c5d with SMTP id f8-20020a05680807c800b0032e64fd0c5dmr4655992oij.192.1655043554086; Sun, 12 Jun 2022 07:19:14 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:319c:b0:60c:6020:aa7b with SMTP id p28-20020a056830319c00b0060c6020aa7bls73177ots.4.gmail; Sun, 12 Jun 2022 07:19:11 -0700 (PDT) X-Received: by 2002:a9d:22e4:0:b0:606:d53c:98e6 with SMTP id y91-20020a9d22e4000000b00606d53c98e6mr22981385ota.325.1655043551264; Sun, 12 Jun 2022 07:19:11 -0700 (PDT) In-Reply-To: X-Original-Sender: gattulli.emiliano-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:30726 Archived-At: ------=_Part_1739_627376008.1655043550636 Content-Type: multipart/alternative; boundary="----=_Part_1740_2066431526.1655043550636" ------=_Part_1740_2066431526.1655043550636 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you William, problem solved! Il giorno venerd=C3=AC 10 giugno 2022 alle 18:31:27 UTC+2 William Lupton ha= =20 scritto: > i think you need to distinguish defaults (command-line options) and=20 > metadata (although perhaps there's some overlap?). > > this works: > > % cat file.md # I don't think you can specify the name of the defaults= =20 > 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=20 > pdf-engine: wkhtmltopdf > > % cat config.yaml=20 > lang: en-US > papersize: a4 > linestretch: 1.5 > mainfont: "Palatino" > geometry: > - top=3D2.5cm > - left=3D3cm > - right=3D3cm > - bottom=3D2.5cm > > % pandoc --defaults defaults.yaml --metadata-file config.yaml file.md -o= =20 > file.pdf > Loading pages (1/6) > Counting pages (2/6) =20 > Resolving links (4/6) = =20 > =20 > Loading headers and footers (5/6) = =20 > =20 > Printing pages (6/6) > Done =20 > > 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= =20 >> most of my settings in a separate default file or metadata file. The ide= a=20 >> is to write just a few lines of YAML in my Markdown file and then having= a=20 >> separate file (let's call it config.yaml) in which I can set everything= =20 >> 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=3D2.5cm >> - left=3D3cm >> - right=3D3cm >> - bottom=3D2.5cm >> pdf-engine: xelatex >> --- >> ``` >> >> This very example I provided does not work! Do you have any idea of how= =20 >> to solve this issue? >> >> Many thanks in advance! >> Emiliano >> >> --=20 >> You received this message because you are subscribed to the Google Group= s=20 >> "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n=20 >> email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit=20 >> https://groups.google.com/d/msgid/pandoc-discuss/e80a4dce-27f5-4379-a44f= -5f43af197cc9n%40googlegroups.com=20 >> >> . >> > --=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/01b37417-1002-445e-9140-fb36beb3f8c8n%40googlegroups.com. ------=_Part_1740_2066431526.1655043550636 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you William, problem solved!

Il giorno venerd=C3=AC 10 giugno 2022 alle= 18:31:27 UTC+2 William Lupton ha scritto:
i think you need to distingu= ish defaults (command-line options) and metadata (although perhaps=C2=A0the= re's some overlap?).

this works:

% cat file.md=C2=A0 =C2=A0# I don't think you can specify the nam= e of the defaults file here, so I removed it; also not sure about ${.}

---
title: This is a simple Markdown fi= le
author: Emiliano
---

# He= ading

This is the content of the section.

% cat defaults.yaml
pdf-engine: wk= htmltopdf

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

% pandoc --defaults def= aults.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
Resolving 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 <= br>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 Ju= n 2022 at 17:06, Emiliano <ga= ttulli...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hello everyone!
I'm trying to simplify the YAML section of my Markdown file= s by writing most of my settings in a separate default file or metadata fil= e. The idea is to write just a few lines of YAML in my Markdown file and th= en having a separate file (let's call it config.yaml) in which I can se= t everything else. Let me provide a practical example:

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

# Heading
<= br>
This is the content of the section.
```
<= br>
> config.yaml
```yaml
---
la= ng: 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
pdf-engine: = xelatex
---
```

This very exam= ple I provided does not work! Do you have any idea of how to solve this iss= ue?

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-discus...@googleg= roups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e80a4dce-2= 7f5-4379-a44f-5f43af197cc9n%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://groups.google.com/d= /msgid/pandoc-discuss/01b37417-1002-445e-9140-fb36beb3f8c8n%40googlegroups.= com.
------=_Part_1740_2066431526.1655043550636-- ------=_Part_1739_627376008.1655043550636--