From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31976 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:04:16 +0000 Message-ID: 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_b48088746ffe40018e63dd41526b1cedunibech_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24331"; mail-complaints-to="usenet@ciao.gmane.io" Cc: To: Original-X-From: pandoc-discuss+bncBCZ27W53TUFBBJMT7KOQMGQE5YDST6Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jan 11 11:04:27 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f189.google.com ([209.85.208.189]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pFXy6-0006Cr-US for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 11 Jan 2023 11:04:26 +0100 Original-Received: by mail-lj1-f189.google.com with SMTP id e28-20020a05651c039c00b0028112f8e550sf3801616ljp.23 for ; Wed, 11 Jan 2023 02:04:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673431466; cv=pass; d=google.com; s=arc-20160816; b=S/C2WRd9irXmHVxIrUkUG/xJgfV6PTccqdScFpWEWNqZ4wbQUTBMvlg/uilaI6tH2w /BcQCW6osDGPkm7bDrAS/G1lysqukmKZQwsHXKCBEgsjtDPetS/U7oyZpxtdQGGuyVUp Iah2MB83au/bbXLjlb9vwYAcNAgvJ937MppyBLYFf/25BwuH7QGS4WWUkktw+rD3HIh7 E4FG5iurrvVIasoxXIsL4m21HGPvlcbE5CwoMsi+sEVO1yWDZxkTQpd+goN2NkMzz4Vm 7hzPPBT1qJunbE8IMWsiUkKLQLAaeA3ZMDttZOn3Qiev0dITii7xYsSvowqx4Lk5yPdc k8Qg== 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=9EYsNLJnvj+bXcyFy4iUkYwttzo3y1RUNlWMcMiBa1U=; b=yjzyCW72D23RpzgW8TRJMoVnI/mXlwn3lodoSFexEsOq4A6ZUBm8Wy/NmlrSgdCdFB /eT+QnZrQDGBJWLtLhqqXOdyoXoIFEo4XqxZTOC8OFiuy9KJVhXURLVTxRmmbQn7Pf7W qtCiLHk/KE1vmJVif6aX/SifpRPxi5Urw7o/H6smxF/lcvUU82SkzEhcOMJ667nqvu3s 8lbEEfMk9c/nQKRXWBJ1v84NYSITt0TOtWYhKJIA1tJRJcnXPS3MLU/Mvo4YCLUEEGEF tVWGNidFzuphka4FsWNR9l6K32IaKgiWp4Bj3e7gSV0IYOIq1Z7CCAJm3WMBJI/oYJI9 +hrQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@unibe.ch header.s=mgwsel1 header.b="UE3pUh/Y"; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.83 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=9EYsNLJnvj+bXcyFy4iUkYwttzo3y1RUNlWMcMiBa1U=; b=VOhfLm+l3OQW/a2Rs7NAlmWI2AVwEXv31z54c66AedLAfa0g7yGj5lEgvBMAC6vfxH StMqig9BhkJjC4oXNke/B+kObfmjAKY3S+BXferksyYTFG0eAWalvXItyQjP8bNIxLt6 P6qKyR3C530QwcxlV2fDdp7M38nnO/DiadzcrwdLM86Qy8bQAZMwwpFLb+COMp9bwm8z GXKUl+NNTxv70A/+7qjAY63Z9N/5JVMjtt3aNbVv4/wEQORhYz7jzeiN7XdZPXyFYmKE unrObuUCeyAGy7+cvz0HKe3AoQVho 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=9EYsNLJnvj+bXcyFy4iUkYwttzo3y1RUNlWMcMiBa1U=; b=uKMp1bz+HH93IrD67/Ol6r9GAcWP/ma4lgb/mnsslaUw2xBhYVPl2Y1TCWVrVRuwrl u0S2t72thhe3oY9B91by7apHZczmjw4a7xBz+AEvKbznuMxeCJNkOBVLGZh6vCqIH3mn ite9s7rh34BRmoAKvxBWD8jQyvDNZ/CMeGVDsJUBdbvn4T+lU5r14ZcpizU5GGPlXRJt Kd35Cz4k9QXwvRaMJKmjTfRFMwq9bNKrrYlfECjqtRElvv0LBHLh Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AFqh2krdXUFFia5klrOqDI69WP2+BU45FCWu86mxdNj3s8Z5gcYu1SnO dQcpMjYfK+18v5OwUIONmtk= X-Google-Smtp-Source: AMrXdXuw4l7hjERK8mIZ6bWbZt135AECJPSwuWSwZisnysYgo89Kuz+ITSul+z7XqlQ2x5AotgLjpQ== X-Received: by 2002:a2e:aa1b:0:b0:26f:c03d:f99b with SMTP id bf27-20020a2eaa1b000000b0026fc03df99bmr4321845ljb.190.1673431466342; Wed, 11 Jan 2023 02:04:26 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:3609:0:b0:27a:3eb5:4759 with SMTP id d9-20020a2e3609000000b0027a3eb54759ls2125056lja.0.-pod-prod-gmail; Wed, 11 Jan 2023 02:04:20 -0800 (PST) X-Received: by 2002:a05:651c:2103:b0:27a:1535:6277 with SMTP id a3-20020a05651c210300b0027a15356277mr23641814ljq.50.1673431460161; Wed, 11 Jan 2023 02:04:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673431460; cv=none; d=google.com; s=arc-20160816; b=VoSXMtojEVBhQqE9husOQuLq1kwBeKljmAqRwunB2cuJgVV6/pK1qF65f53yTwxej+ 2q6ez7/lRe9z7kfTLGzoJWWrpUymjY5cTlcxhQjEcj69OueZsydbLg7wRmWn3915DHec IH0Y1kQHRyVFQg4n4Nr6u38YDMUMfLZntNQo+B2uL+xAkbF6hxc4R9y2oyJhDbPQhdUy YtSR6qvCY9FEpHgKm/cZsF52X2YSSXg6kgBfKPPNQtkUa8uKnQfM1jetq6dZxWMmEVEU NK9hHtx7jLi27RBJ0n0ZJhwjVkWdAff9CnRbKX8aFmUsypvSIapVEDM9UpBF17WXAXcW JroA== 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=yTeSgCDnVcSwYJCrQeJEy+rueP9sCAMW5puo+85XSoo=; b=DLuK7reeVlmcF75x3Vq2ZWD0ur0nBCpEGzzi+zs3s+gNMqO31RArI6axDAhqR8Sfq/ vnJOngtRIVL8pUJuoLoPsRqImYftdjSaui5XJSKHiKfg1ZW7Z5oCy7aztjcrux35dVS2 v9aYQCMkXZyBd1sZ6UOFz3lTM6oKrz7TRwZfpvYZbGqZoVpypy1itDgJVmEX60+gRl4w +N9q/6NXXKO2wdaRw3zGLVjJhlACCYTdhjB20ERCqXU8wNwWr079PkjzumXxnSSvcL/G LB7RZgCAdziRkCzIGOqq10nFxTnR+JWrzi79/PnNznyWPUo1Y7FMhpIPgiIAURwTYQBm suEw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@unibe.ch header.s=mgwsel1 header.b="UE3pUh/Y"; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.83 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-lb2.unibe.ch (mailhub-lb2.unibe.ch. [130.92.0.83]) by gmr-mx.google.com with ESMTPS id k9-20020a2ea269000000b0028002e5a082si614755ljm.4.2023.01.11.02.04.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 02:04:20 -0800 (PST) Received-SPF: pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.83 as permitted sender) client-ip=130.92.0.83; X-Virus-Scanned: By University of Bern - MGW Original-Received: from mail.campus.unibe.ch (aai-edge-03.campus.unibe.ch [130.92.13.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailhub-lb2.unibe.ch (Postfix) with ESMTPS id D6C19500196; Wed, 11 Jan 2023 11:04:16 +0100 (CET) Original-Received: from aai-mail-02.campus.unibe.ch (130.92.13.168) by AAI-EDGE-03.campus.unibe.ch (130.92.13.18) 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:04:10 +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:04:16 +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:04:16 +0100 Thread-Topic: Front, main, and back matter? Thread-Index: AQHZGWZ/tSt910AZI0GxvaBJeZiP0q6ZDb3Q In-Reply-To: <1bba18b4-dde6-4423-810a-2a553f9e1916n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 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="UE3pUh/Y"; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.83 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:31976 Archived-At: --_000_b48088746ffe40018e63dd41526b1cedunibech_ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 A= uftrag 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. --=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/b48088746ffe40018e63dd41526b1ced%40unibe.ch. --_000_b48088746ffe40018e63dd41526b1cedunibech_ Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

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 pand= oc-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.
--_000_b48088746ffe40018e63dd41526b1cedunibech_--