From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23462 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Agust=C3=ADn_Mart=C3=ADn?= Newsgroups: gmane.text.pandoc Subject: Re: Number concatenated chapters (Was: concatenating md have a page-break between in resulting docx?) Date: Wed, 25 Sep 2019 01:10:31 -0700 (PDT) Message-ID: References: <236f815f-2db1-4ee2-30d0-5794cd6301b3@reagle.org> <83bd8e54-4c7f-2fd7-966e-fe2fb55755bd@reagle.org> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_6566_1629615615.1569399031967" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="150207"; mail-complaints-to="usenet@blaine.gmane.org" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDC7PRMFWYJBB76BVTWAKGQEQHPDHWA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Sep 25 10:10:44 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ot1-f58.google.com ([209.85.210.58]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1iD2Nm-000cqK-0Q for gtp-pandoc-discuss@m.gmane.org; Wed, 25 Sep 2019 10:10:42 +0200 Original-Received: by mail-ot1-f58.google.com with SMTP id h13sf2756057otk.20 for ; Wed, 25 Sep 2019 01:10:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=vBH3PPKEf62zx58jcHRYJjOhjYu7lcGlBr1olx0PrWc=; b=YNVvcIXUIwnW1qbbunPj5p5IK8VKU+6BX7ahrfeY8SzNgzvTp/Cg7rEP43FhKPbii6 Cyo7rpBh1VDI1q3mZg2yjaPzNQcaxBB1g7PrD09BaqJ+Yf5ePQBWs2jFtBn7unjeVS5c mIJUtvmyP6w7At6O4T8PsBps+1td2lpOREVw78H6GfW6vDyhr30aQOqG4I7nnOmIOcGy YVRM6xShH+928/j3Pl7VSGd44azfemwtNHmZ9P/dCdPAF0AUk8+kyyDdIXJskbvXBp4M Ot392cttLJN791zcvjt+YX99MMYCvYIMDWw//WPCtLCqGCX2ya9gPe0ZxO9T2fbtbUjL WQag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; 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=vBH3PPKEf62zx58jcHRYJjOhjYu7lcGlBr1olx0PrWc=; b=maa/CW43Y4vHM2O5dWAjNosMtyi9M3zDCwcmreFvkLXhoipTqNDGY07B1smU1y7Y+n rAkXEIOUtSW5LJ2K1wwSXJTgjmQ3I/ctP8zs5UiR3JJKCAbnOvGTKkJ1JE4w7cY+FbZ1 uBu6+To2jOHJ5qUetJ2fsmEH9RkCsdjiRqHmGN+fgcUxZUZGixEfPsRads0927ZIbtlX bC/eWeQawtUWuKXM2zDBKSGyUgCj4C42GnOC8mwbjvitySkO6sLzOD5mXFpj1ieSERU0 /BkwbRMfhyQAVIbZ2AKZ2ppBd76iSGsBOh8D8lh2z5yFQw1H4nTcpLzG6n25jINHH4fQ 194g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=vBH3PPKEf62zx58jcHRYJjOhjYu7lcGlBr1olx0PrWc=; b=RiwPVzeVpsHk63xdDtz5ckjYf/YBugmNzBhzljmKx1rdoVsF62wnRK9CCcw7ll1cDK q9wl1rmLUWKP7XMpjZqPS1x7QmUEnWaSmcK7SJ1p15P3hIO6Q8V+s4V3xP5jU6/T2CZd dQSHakQD2Mafe1AMd2GgE5lEowgtF8SpGc/odK5jhbytDGRoJj47tZRs4vdWTmxUBuiT qImC/atiMZzIMK/JOBBmUe1uIlwcyvkuNTVJeW/E29N7Cp8nfIreYt3ZB0ihsOsciejk 3mrocLeyjetJHAEw8xzYG5DRr5WGtb3d+JFEfDvHn2wW0rpUMfn3MjSxOOfXKXw//743 Jg/w== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAUkv32IemIf8bcs08EjM94d5WPmaT1+rDmu9EtFe58htzGrTH8g 3xdHEXXrKHhT4gW/NPudu6U= X-Google-Smtp-Source: APXvYqzQrUh2ZHaZHPWdSAkmuJKdiWEUJn2KHuO/xFA2VWB9XnsjtNfsBYCMLTWNebFwBxVfxWVsNA== X-Received: by 2002:aca:cdc1:: with SMTP id d184mr3705354oig.23.1569399040352; Wed, 25 Sep 2019 01:10:40 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a54:4f98:: with SMTP id g24ls190286oiy.12.gmail; Wed, 25 Sep 2019 01:10:39 -0700 (PDT) X-Received: by 2002:aca:574c:: with SMTP id l73mr3811377oib.47.1569399039259; Wed, 25 Sep 2019 01:10:39 -0700 (PDT) In-Reply-To: <83bd8e54-4c7f-2fd7-966e-fe2fb55755bd-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> X-Original-Sender: agusmba-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.org gmane.text.pandoc:23462 Archived-At: ------=_Part_6566_1629615615.1569399031967 Content-Type: multipart/alternative; boundary="----=_Part_6567_56827958.1569399031967" ------=_Part_6567_56827958.1569399031967 Content-Type: text/plain; charset="UTF-8" > In addition to adding page breaks between the chapters, I'd like to have the title (first level-1 heading, in this case) prefixed with an chapter number taken from the file name. I want to do this dynamically, as I might rename/resort/reorganize the files based on their names. I'm not sure if you're artificially complicating matters. Both things can be achieved simply by modifying your reference-doc heading styles, having first level heading include a pagebreak before, and being numbered. Then you can put any name to the files (numbers if you like for sorting), and all your chapters will be sensibly numbered (independently of what the name of the original file was). On Monday, September 16, 2019 at 10:15:49 PM UTC+2, Joseph wrote: > > > On 9/5/19 4:48 PM, Joseph Reagle wrote: > > ``` > > for f in *-*-*.md; do cat $f page-break.md; done > test.md > > ``` > > In addition to adding page breaks between the chapters, I'd like to have > the title (first level-1 heading, in this case) prefixed with an chapter > number taken from the file name. I want to do this dynamically, as I might > rename/resort/reorganize the files based on their names. > > So, for example, `1-01-reagle.md` is the first chapter in the first > section, and could have '1.' prefixed to its first heading. In looking at > filters, especially panflute, all the examples are of stand-alone filters > that are stateless between invocations... > > ``` > 0-01-reagle-koerner.md > 1-00-hindsight.md > 1-01-reagle.md > 1-02-benjakob-harrison.md > 1-03-hill-shaw.md > ``` > > Any suggestions? > > -- 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/d4057f17-ab65-4bb4-afb4-7ec97ab3cb22%40googlegroups.com. ------=_Part_6567_56827958.1569399031967 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> In addition to adding page breaks between the chapter= s, I'd like to have the title (first level-1 heading, in this case) pre= fixed with an chapter number taken from the file name. I want to do this dy= namically, as I might rename/resort/reorganize the files based on their nam= es.

I'm not sure if you're artificially complica= ting matters. Both things can be achieved simply by modifying your referenc= e-doc heading styles, having first level heading include a pagebreak before= , and being numbered. Then you can put any name to the files (numbers if yo= u like for sorting), and all your chapters will be sensibly numbered (indep= endently of what the name of the original file was).



On Monday, September 16, 2019 at 10:15:49 PM UTC+2, Joseph wrote= :

On 9/5/19 4:48 PM, Joseph Reagle wrote:
> ```
> =C2=A0for f in *-*-*.md; do cat $f page-break.md; done > test.m= d
> ```

In addition to adding page breaks between the chapters, I'd like to= have the title (first level-1 heading, in this case) prefixed with an chap= ter number taken from the file name. I want to do this dynamically, as I mi= ght rename/resort/reorganize the files based on their names.

So, for example, `1-01-reagle.md` is the first chapter in the first sec= tion, and could have '1.' prefixed to its first heading. In looking= at filters, especially panflute, all the examples are of stand-alone filte= rs that are stateless between invocations...

```
0-01-reagle-koerner.md=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0<= wbr>=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
1-00-hindsight.md=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
1-01-reagle.md=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=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0 = =C2=A0
1-02-benjakob-harrison.md=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
1-03-hill-shaw.md
```

Any suggestions?

--
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/d4057f17-ab65-4bb4-afb4-7ec97ab3cb22%40googlegroups.co= m.
------=_Part_6567_56827958.1569399031967-- ------=_Part_6566_1629615615.1569399031967--