From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23426 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Reagle Newsgroups: gmane.text.pandoc Subject: Number concatenated chapters (Was: concatenating md have a page-break between in resulting docx?) Date: Mon, 16 Sep 2019 16:15:34 -0400 Message-ID: <83bd8e54-4c7f-2fd7-966e-fe2fb55755bd@reagle.org> References: <236f815f-2db1-4ee2-30d0-5794cd6301b3@reagle.org> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="177386"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBD65ZAVVYEKRB4W277VQKGQEJGP53EQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Sep 16 22:15:50 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-vs1-f64.google.com ([209.85.217.64]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1i9xPY-000k03-Uj for gtp-pandoc-discuss@m.gmane.org; Mon, 16 Sep 2019 22:15:49 +0200 Original-Received: by mail-vs1-f64.google.com with SMTP id o1sf280060vsp.3 for ; Mon, 16 Sep 2019 13:15:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1568664947; cv=pass; d=google.com; s=arc-20160816; b=IykHLLg64W0WoVu83wmm6pjVJRIfzjWcVTYSenS5GA3VjAJcQrSGZS60IO44Choa6l Bm+WZZZIp7JKilpKpSLmRRYhp9RzUyqQCjEqSCztp4C8s8NVwTutoE3fpSn+W9sI1FGy r+DOKZLkArS7bkHnfZnbIfWFYuso9mVsBBiH0uH2GfPMima/HJdOLPXRlKDvk4+Af0yp NvQiXdlPZ/2Gad7LXnTZ+fm3Yyfa4mZ2K+n2yMUkYP3rNpg4EmJUqIGFNxjT6xjwV4Uc YHqprneuEs1V7BMYPQiW66RFjfyttU3658A6HERWTCKBYJY1NNUCfLP7xwIo5dzbOr3D Lh8g== 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:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:to:from:subject:sender:dkim-signature; bh=CF7drVcM7/7qSpGzSzq5iBCa8Y4qomhGcdxT3AkLvNY=; b=sqgENVFZSwZU5aA8m8t3O4E7bSd5ZeeYhw4iNAHvaIMG4uRkgAA/Fcg9Ut1IFgLozL 2Z+pv1+RJiK7O8YCHUI7zV5jmBz3Ot0BBq2NE3tbhWu9eD0Za01HB7decxPck3NHeUkg r3f6P9u/Ayg81VYK87F58kEbJG35z0YEJd6nDe0AFjpk1zSb22BRQlQW3q9IKdREo8pC QRcsNz7J5W1Z81LxCFNLEeFObZF8E4T2BhwekTv8iEjw0nRQAdpzZnUZvqUplLHG0Lr/ 0jnKUEZhUzl3lvea46i4OKTNriCOc+2yK8PwWmeBCx5iD3eAIf2SvCD8x11DZyklJo/e qaCg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@reagle.org header.s=default header.b=rQu77YVs; spf=pass (google.com: domain of joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org designates 23.83.212.19 as permitted sender) smtp.mailfrom=joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:subject:from:to:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding :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=CF7drVcM7/7qSpGzSzq5iBCa8Y4qomhGcdxT3AkLvNY=; b=DwdF6q8LRgfIq+CF693yPhVXjV2Bj8YjbWGvrUSXB2mTobmOLSEr9358YGV1wqYJ6W /w9PMGIbuBZVONFXhQzVPpGRFPXmfGJquK2XiuEx/+++CKue5EkdqWHstcARdaaSpODb d47lGs7shUnPusEXS0cyN/JnaLXlgAShA2UQMepETQ8kRYryRl0PDXvvCDXIt/NzFJY7 xbFlJAk+fPPjxzbQlovgv4oMqmmhffSR0A3B8ONezLwGtjHEsBdV1li3wtgNWvUUPnRX 9n0nwlU/V6bwipiFglw7DOpI+HqRcj+Y1ceSTyCgBBC1IVLuFNao9RwNFEiw5RiXV9IP 5lUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:subject:from:to:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding: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=CF7drVcM7/7qSpGzSzq5iBCa8Y4qomhGcdxT3AkLvNY=; b=uMRiyasyPd3AuHZIWuSKhwVEy8SYWnifQQCI2cKTGB60N08hEqp115pTRZe1p6pEte gysZmnSDFJ6+husJ0Rhh/81sW/Idylo4CHHQiLiRiQNlTtmXndz7jnS1BCPBIREcNFTW lX7tMyXsaP3wGvpE+/9xhgqacME0CjRHozLy6HW9bdyU0YTJTZcSF46ZjRKxA4pnju+0 +2tgFfWDyJxUSNdQs6oK7sVi0qF3OojXZsaS20UerKfBbGsWAQqi6iC+oe+oWNUaXUf7 3Q7gZAEIyrRi+wQC0LiP5k/HhCfReFI4RTSH Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAWW6fgQA9En1oHKchE3VvyUJBcMSsT/xXuid8kESxFw7gGJYkZn aXrPMru3vOr2o5YeBn2wzNg= X-Google-Smtp-Source: APXvYqyVStkZTxTFJ2NzZRoyBs6C3VPZFfNWZVjWfmcgiXwQWMPfC0jBnUxF9HG5qSekyBwveZ1wuQ== X-Received: by 2002:ab0:b06:: with SMTP id b6mr80238uak.78.1568664947657; Mon, 16 Sep 2019 13:15:47 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6102:204a:: with SMTP id q10ls98787vsr.15.gmail; Mon, 16 Sep 2019 13:15:46 -0700 (PDT) X-Received: by 2002:a67:eb42:: with SMTP id x2mr993710vso.88.1568664946725; Mon, 16 Sep 2019 13:15:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568664946; cv=none; d=google.com; s=arc-20160816; b=xMlhTpyvWj9bLVLkvS6JmO6UkfATYN9bHbObRxELtg8mna7WZsBfYeqN4b+dLZ3YvK O9S2Ia9rXaldz4bjgFO+2Z0iw2ObsI2+oLdKh0/IPCBCeK+NHirZYaCdD1seL31E56qe R/sB6DT/lLtmn+W+tfiu9Q+rYg+b8uDARaFniuX62wq0o3PkJRRtuHIkAQ4exmhyoMK+ 2XKI3j5tMeOkg/Hq0/BBszqgz4xBcfhNrn5Gf6aou5aAKjezQZW/ytP8CANCSrw/cmT/ bMUfhw424cZyfWOGLgfge+EKpmdXeSn13AcUDS+4irpL7a4/F3893306d2wTcXL9SX2o vK7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:references:to:from:subject :dkim-signature; bh=ZFCbqdKB2w3Qw0hS2tmhwViECwcxjXvlFIekEwrS7Es=; b=rukEW1LWPzUY5c0f78ALXZrud4oFAIoT4KNyW7k0NHM6nUCcuG9w4XBrH4J//9umVk XgUI6hgiedAdXONsGOrLS1L9tFwjBywPA7ZFvxpQ90Q0cRf58FNQ7kWNsYicTUvqZW38 W+s9RhLvOOqAcHgE4gbhYbTBtuNieYnMK+rQJ0omakBAc0MeueDaGDze+jSXRuffgLgu 7XVTxxWQztZ0w2MOV9hDKR4UU7pzzsqauww07UXgelgTh0fJuZrfu7QBGju/wNFymjIP tc2TC/CSzVSWQeG9SMALeamwA5oX/Ove1viFt6MVqQtk8RQr//RMpFoeQeyfZDudBvNV LlKQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@reagle.org header.s=default header.b=rQu77YVs; spf=pass (google.com: domain of joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org designates 23.83.212.19 as permitted sender) smtp.mailfrom=joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org Original-Received: from black.elm.relay.mailchannels.net (black.elm.relay.mailchannels.net. [23.83.212.19]) by gmr-mx.google.com with ESMTPS id v12si148460vsl.2.2019.09.16.13.15.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Sep 2019 13:15:46 -0700 (PDT) Received-SPF: pass (google.com: domain of joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org designates 23.83.212.19 as permitted sender) client-ip=23.83.212.19; X-Sender-Id: a2hosting|x-authuser|joseph-T1oY19WcHSwdnm+yROfE0A@public.gmane.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C045C501790 for ; Mon, 16 Sep 2019 20:15:44 +0000 (UTC) Original-Received: from az1-ss21.a2hosting.com (100-96-38-104.trex.outbound.svc.cluster.local [100.96.38.104]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 3EC6B500731 for ; Mon, 16 Sep 2019 20:15:44 +0000 (UTC) X-Sender-Id: a2hosting|x-authuser|joseph-T1oY19WcHSwdnm+yROfE0A@public.gmane.org Original-Received: from az1-ss21.a2hosting.com ([TEMPUNAVAIL]. [68.66.224.43]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.5); Mon, 16 Sep 2019 20:15:44 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|joseph-T1oY19WcHSwdnm+yROfE0A@public.gmane.org X-MailChannels-Auth-Id: a2hosting X-Blushing-Abortive: 369c488a133bf673_1568664944513_1652645556 X-MC-Loop-Signature: 1568664944513:2368982827 X-MC-Ingress-Time: 1568664944513 Original-Received: from c-73-149-23-48.hsd1.ma.comcast.net ([73.149.23.48]:59048 helo=[192.168.0.50]) by az1-ss21.a2hosting.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1i9xPO-004KLU-Ev for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Mon, 16 Sep 2019 13:15:38 -0700 In-Reply-To: <236f815f-2db1-4ee2-30d0-5794cd6301b3-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> Content-Language: en-US X-AuthUser: joseph-T1oY19WcHSwdnm+yROfE0A@public.gmane.org X-Original-Sender: joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@reagle.org header.s=default header.b=rQu77YVs; spf=pass (google.com: domain of joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org designates 23.83.212.19 as permitted sender) smtp.mailfrom=joseph.2011-T1oY19WcHSwdnm+yROfE0A@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:23426 Archived-At: 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 th= e title (first level-1 heading, in this case) prefixed with an chapter numb= er taken from the file name. I want to do this dynamically, as I might rena= me/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 =09 1-00-hindsight.md =20 1-01-reagle.md =20 1-02-benjakob-harrison.md =09 1-03-hill-shaw.md ``` Any suggestions? --=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/83bd8e54-4c7f-2fd7-966e-fe2fb55755bd%40reagle.org.