From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31977 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.text.pandoc Subject: AW: Front, main, and back matter? Date: Wed, 11 Jan 2023 10:12:17 +0000 Message-ID: <49968a6819234bc2a33f72f0197fa1c8@unibe.ch> References: <1bba18b4-dde6-4423-810a-2a553f9e1916n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_49968a6819234bc2a33f72f0197fa1c8unibech_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25089"; mail-complaints-to="usenet@ciao.gmane.io" Cc: To: Original-X-From: pandoc-discuss+bncBCZ27W53TUFBBBEX7KOQMGQEZVDYV5Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jan 11 11:12:25 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f63.google.com ([209.85.128.63]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pFY5o-0006KH-Vk for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 11 Jan 2023 11:12:24 +0100 Original-Received: by mail-wm1-f63.google.com with SMTP id n18-20020a05600c4f9200b003d993e08485sf7581690wmq.2 for ; Wed, 11 Jan 2023 02:12:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673431944; cv=pass; d=google.com; s=arc-20160816; b=vWGiklI48+ceI9aTi1+O2Ta6iqBhq964ExMJpVemVe8S4HX1EKFbhj5VyqRyOnDRoO EeP1udLQFVdN+MY2qSXuarxFaA1edeldKE9K8Q8B5XUPVgoVZRE/F3+/HkhiqTfFw5wU SbiJrIOblBE0C23lYhi3t/9CqoaDlHrfQx+w3ZiJzARRD8lguyqZtXhkvRik5c7BODOJ IeRBbzRXtYDLWY3bJnwhAJ8neWNEutNJbmGTSO7qPv5+LUgn1I3m5WyqhF/csYh4lj9i MYa6HFOT7/aAYu3ILWwB+SJ73yd1uCDMcPfthzc4wQkhUrD2GqTIaTpKjv6YfEzZvMu6 F12A== 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 :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:sender :dkim-signature; bh=QdnNaldsN+CJk0vMLKBjeKIQPHsX7G2zZTsdi/QZaTk=; b=Y0kt5gTpI0BSKHzIKWm+SRXIFiT6Qth2ALmadrmRzyrvqene3chh9e+qUDMCFMqGxX 1h0pdRaV3rPtdeN4Fw24pPkVos2ExlPKo/RTstvT+d1/wNnTEHjN5FqJUBdAWnIo99Qg H26FtWV5b0T7xEmH8SA3mfOPThMONH/H9lhYeH8RVy3vJLMeXNc2nOFo7GdpE6REE9q2 AeG3/rJvet/tSHaEGov/khKZ0hONHQBfd3UGAvO8LsV/ti0/mgS9E9V70F0gW2cUINY+ X/ZTiLHSGzYg018Xd2FqCjDLe73IEXD8IAmRIOAcVkD8LRfsP8grQbhtV3jY0Lmzjht1 1Png== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@unibe.ch header.s=mgwsel1 header.b=hGj4kDWr; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.82 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:sender:from:to:cc :subject:date:message-id:reply-to; bh=QdnNaldsN+CJk0vMLKBjeKIQPHsX7G2zZTsdi/QZaTk=; b=pLILsBLkEO4WA+umajgJ1Ddr/DBuQypANArZMShbAdbZuOtAoHPgKJD8yCDUfp0zam hrezLPrw/GDm3oL/r8wSMWkjQxRgb5+d1wusRul5h8jJk8SaXs/9vs+AsAv+yN7hBM0k ejEZmdJi1+rQTwqjyi5RdXz3ybNjc6mvXS637U0Wr9gDtDar1P8wtb+NTUo338HFYQD7 aqYUU+jwrPIn/8dV8O5GwsRH1MIy5TYYK6DZXuof3aCEMDLoPBOS4/8bEWZVPDFpktpj dgfPDcW6yWwYQFnmY+HkLh0booexz X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=QdnNaldsN+CJk0vMLKBjeKIQPHsX7G2zZTsdi/QZaTk=; b=lImfiukFB1wLjfxQ9jmwu7ITK1XPJlXIL5iP23YYUcLCHeFVWZpQfj8Muv+1Qh6zht +3u2o774VApNjFF2Qvtc6eqN7u4wiWiEl3APgmC2E6gZnVXO7SH7Mf0shbswM3pA7Jsq BHb330IH6xyCkNXFeCsS2/2sVZXl9Rhkj9jGsHq3riQwn/oX0o0YweLNXORpOmxcFWNM Ma8sE+5dIBqDyPpuwCWop+IAUjQztDq+KvPT1/ss3cnmsqjiMN2o Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AFqh2kqQPgY+CIHN6D/IHY+vvV1g0aQbSJacvSXDLCyZSjpJsqxLgKUq GFGrUKvVW/ZRAb1JiW4LlRU= X-Google-Smtp-Source: AMrXdXuG3iN7v0VbsFsorALaoAm+SWX3Q3lN7fQ3tRw2S5av3P3gSFGd/OnUEUjQ57r8ItUL8R6OeA== X-Received: by 2002:adf:ebc5:0:b0:242:5058:3819 with SMTP id v5-20020adfebc5000000b0024250583819mr2704346wrn.172.1673431944253; Wed, 11 Jan 2023 02:12:24 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a1c:541e:0:b0:3d9:de91:ba54 with SMTP id i30-20020a1c541e000000b003d9de91ba54ls126194wmb.0.-pod-preprod-gmail; Wed, 11 Jan 2023 02:12:19 -0800 (PST) X-Received: by 2002:a05:600c:44d4:b0:3cf:7925:7a3 with SMTP id f20-20020a05600c44d400b003cf792507a3mr50958389wmo.24.1673431939685; Wed, 11 Jan 2023 02:12:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673431939; cv=none; d=google.com; s=arc-20160816; b=Mac6JMn1VdA2Xi1X5zFHUe3QnL1bE8D6gbQNPE6hgbopC7/SfETCjY/NzpuUKV//L4 ew+ucZY802b/LUT9vhcgtJtzJ/8OzTNNx8riWjLUujV+b4vmvk/+bZNzxhvv/jg7oFc7 tLrtu+ivOw81scaJSpcwgPqD4AO/vEurqBEEIwC6BGXHicKu8bYRdGGEYGnyecoQvG6t g+TGT6S5qA36YszpFtsCj3B9XLRFFc4synheHlt6UdC8X4Mtvg3EoiZJo0b33QOc+7Ba 4xK5zFeQQvpP+Um0lQSHJzzr+OSwswkjcOl3uUWXVE52X7OO0K58cbJqQi68CbQt7meI wFCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature; bh=tA4qyF8JYoz9Zj3L0r+0IComSxtKWJzv7MLCT2j2ues=; b=OIZS8EkABsa0AlL3/un6su3ZgT4vjM3cCbwixx+ZJA1W2/Tz7YzS9FYymtAPt5CFUV PVhh7bsHGMYZkVewFwN+YnCQPS61rJ+RQl8hNH8qJ9Veq5awrRj31Q4HP5SbK0LgNo+E 5VlkUtaDgq/FwwqRYThcJHeuGecw9mDN2GJC5TqaKgoQSZhh9QAiQrMhF2p/3slcySGn FBWMc9s9SlcMUKHWMCe3yranD5XkXJAA5Ajz+u93QPxrKgsoFw5rV8xPEp90oVaazpwZ Kuufl51lIc/zUe3T4DB9p8EFc7fNZ9abKegKHB4hmc5ZiHSVOPqjume3ti+SfAbLS3mz Ghjg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@unibe.ch header.s=mgwsel1 header.b=hGj4kDWr; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.82 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch Original-Received: from mailhub-lb1.unibe.ch (mailhub-lb1.unibe.ch. [130.92.0.82]) by gmr-mx.google.com with ESMTPS id fm14-20020a05600c0c0e00b003d9c774d43fsi246259wmb.2.2023.01.11.02.12.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 02:12:19 -0800 (PST) Received-SPF: pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.82 as permitted sender) client-ip=130.92.0.82; X-Virus-Scanned: By University of Bern - MGW Original-Received: from mail.campus.unibe.ch (aai-edge-02.campus.unibe.ch [130.92.13.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailhub-lb1.unibe.ch (Postfix) with ESMTPS id 27D85500116; Wed, 11 Jan 2023 11:12:18 +0100 (CET) Original-Received: from aai-mail-02.campus.unibe.ch (130.92.13.168) by AAI-EDGE-02.campus.unibe.ch (130.92.13.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P256) id 15.1.2507.16; Wed, 11 Jan 2023 11:12:12 +0100 Original-Received: from aai-mail-03.campus.unibe.ch (130.92.13.41) by aai-mail-02.campus.unibe.ch (130.92.13.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P256) id 15.1.2507.16; Wed, 11 Jan 2023 11:12:17 +0100 Original-Received: from aai-mail-03.campus.unibe.ch ([172.18.73.17]) by aai-mail-03.campus.unibe.ch ([172.18.73.17]) with mapi id 15.01.2507.016; Wed, 11 Jan 2023 11:12:17 +0100 Thread-Topic: Front, main, and back matter? Thread-Index: AQHZGWZ/tSt910AZI0GxvaBJeZiP0q6ZDb3QgAAIkOA= In-Reply-To: Accept-Language: de-CH, en-US Content-Language: de-DE x-originating-ip: [130.92.13.161] X-Original-Sender: denis.maier-NSENcxR/0n0@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@unibe.ch header.s=mgwsel1 header.b=hGj4kDWr; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.82 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch 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:31977 Archived-At: --_000_49968a6819234bc2a33f72f0197fa1c8unibech_ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Addendum: If you choose to just enter the LaTeX commands directly to your markdown so= urces, pandoc=E2=80=99s internal representation will look like this : Source : ``` *Hello* world! \frontmatter Hi again ``` Output (native): ``` [ Para [ Emph [ Str "Hello" ] , Space , Str "world!" ] , RawBlock (Format "tex") "\\frontmatter" , Para [ Str "Hi" , Space , Str "again" ] ] ``` So you could even just use the LaTeX commands directly, and use a filter to= transform the RawBlocks with content \\frontmatter to something else when = your target is not LaTeX. Best, Denis Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Im A= uftrag von denis.maier-NSENcxR/0n0@public.gmane.org Gesendet: Mittwoch, 11. Januar 2023 11:04 An: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Cc: isenguard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Betreff: AW: Front, main, and back matter? Hi, if your main/only target is LaTeX, you should be able to just add these com= mand directly to your markdown sources. Pandoc will pass those through as i= s when the output is LaTeX, and ignore those for other output formats. When you want a more robust solution filters are indeed the way to go. Some= thing as simple as this might already work : function Str (elem) if elem.text =3D=3D "{{frontmatter}}" then if FORMAT:match 'latex' then return pandoc.RawBlock('latex','\\fontmatter') end end end You can add more instructions for other output formats as needed. Best, Denis Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org >= Im Auftrag von Lyndon Drake Gesendet: Montag, 26. Dezember 2022 21:13 An: pandoc-discuss > Betreff: Front, main, and back matter? Hi, Is there any common approach to dealing with front matter, main matter, and= back matter? In general front matter is often unnumbered or under a differ= ent page numbering scheme (i, ii, iii, =E2=80=A6) and includes such things = as contents, lists of tables and figures, abbreviations, abstract, preface,= and so forth. Main matter then is the body of the work, typically in chapt= ers, and then the back matter is such things as appendices, indices, and bi= bliographies. In LaTeX these are indicated by the `\frontmatter`, `\mainmat= ter`, and `\backmatter` commands, but it is possible to do similar things i= n other formats albeit with less semantic content. At the moment, after producing my LaTeX file, I manually move the `\frontma= tter` command to the correct place. I imagine that I might be able to write= a filter to do the same thing but I'm not sure how to start. Given that this is no doubt a common issue for the production of books, I'm= also wondering if there might be a good way to approach the issue so that = (in time) there can be a canonical approach to this? (There might be similar things around 'Part's of books, and to things such = as variations in citation formatting per-chapter.) Best, Lyndon -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org. To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/1bba18b4-dde6-4423-810a-2a553f9e1916n%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 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/b48088746ffe40018e63dd41526b1ced%40unibe.ch. --=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/49968a6819234bc2a33f72f0197fa1c8%40unibe.ch. --_000_49968a6819234bc2a33f72f0197fa1c8unibech_ Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Addendum:=

If you choose to just enter the LaTeX commands directly to your markd= own sources, pandoc=E2=80=99s internal representation will look like this&n= bsp;:

 

Source :

 

```<= /o:p>

*Hello* w= orld!

&nbs= p;

\frontmat= ter

&nbs= p;

Hi again<= o:p>

```<= /o:p>

&nbs= p;

Output (n= ative):

&nbs= p;

```<= /o:p>

[ Para [ = Emph [ Str "Hello" ] , Space , Str "world!" ]

, RawBloc= k (Format "tex") "\\frontmatter"

, Para [ = Str "Hi" , Space , Str "again" ]

]

```<= /o:p>

&nbs= p;

So you co= uld even just use the LaTeX commands directly, and use a filter to transfor= m the RawBlocks with content \\frontmatter to something else when your targ= et is not LaTeX.

&nbs= p;

Best,

Denis

&nbs= p;

Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von denis.maier-NSENcxR/0n0@public.gmane.org
Gesendet: Mittwoch, 11. Januar 2023 11:04
An: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Cc: isenguard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Betreff: AW: Front, main, and back matter?

 

Hi,<= /o:p>

&nbs= p;

if your main/only target is LaTeX, you should be able to just add the= se command directly to your markdown sources. Pandoc will pass those throug= h as is when the output is LaTeX, and ignore those for other output formats.

 

When you want a more robust solution filters are indeed the way to go= . Something as simple as this might already work :

&nbs= p;

function = Str (elem)

  if= elem.text =3D=3D "{{frontmatter}}" then

 &nb= sp;  if FORMAT:match 'latex' then

 &nb= sp;    return pandoc.RawBlock('latex','\\fontmatter')

 &nb= sp;  end

  en= d

end<= /o:p>

&nbs= p;

You can add more instructions for other output formats as needed.

 

Best,

Denis

&nbs= p;

Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von Lyndon Drake
Gesendet: Montag, 26. Dezember 2022 21:13
An: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Front, main, and back matter?

 

Hi,

 

Is there any common approach to dealing with front m= atter, main matter, and back matter? In general front matter is often unnum= bered or under a different page numbering scheme (i, ii, iii, =E2=80=A6) an= d includes such things as contents, lists of tables and figures, abbreviations, abstract, preface, and so forth. Mai= n matter then is the body of the work, typically in chapters, and then the = back matter is such things as appendices, indices, and bibliographies. In L= aTeX these are indicated by the `\frontmatter`, `\mainmatter`, and `\backmatter` commands, but it is possi= ble to do similar things in other formats albeit with less semantic content= .

 

At the moment, after producing my LaTeX file, I manu= ally move the `\frontmatter` command to the correct place. I imagine that I= might be able to write a filter to do the same thing but I'm not sure how = to start.

 

Given that this is no doubt a common issue for the p= roduction of books, I'm also wondering if there might be a good way to appr= oach the issue so that (in time) there can be a canonical approach to this?=

 

(There might be similar things around 'Part's of boo= ks, and to things such as variations in citation formatting per-chapter.)

 

Best,

Lyndon

--
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-d= iscuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/1bba18b4-dde6-4423-810a-2a= 553f9e1916n%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 pandoc-d= iscuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/b48088746ffe40018e63dd4152= 6b1ced%40unibe.ch.

--
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/49968a6819234bc2a33f72f0197fa1c8%40unibe.ch.
--_000_49968a6819234bc2a33f72f0197fa1c8unibech_--