public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: concatenating md have a page-break between in resulting docx?
Date: Thu, 5 Sep 2019 22:43:37 +0200	[thread overview]
Message-ID: <CADAJKhCuGvDDSueCMNS+E6EW2cboz5LVQBSjPR7KmRo0Lic5bQ@mail.gmail.com> (raw)
In-Reply-To: <CADAJKhB0LFNiTyspQnN5_4j87P1vA0LcgSM-9GrDKoLEOZGrDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2236 bytes --]

You could create a file which contains only the page break code and use
some shell script or Makefile trickery to insert it between the other input
file arguments. You could also use a shell script (untested!)

echo "" > concat.md

for arg in "$@"
do
    if [ ${arg: -3} == ".md" ]
    then
      cat $arg break.md >> concat.md
    fi
done

pandoc concat.md -o output.docx

rm concat.md

Den tors 5 sep. 2019 21:55BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> https://github.com/pandoc/lua-filters/tree/master/pagebreak
>
> Den tors 5 sep. 2019 19:25Joseph Reagle <joseph.2011-T1oY19WcHSwdnm+yROfE0A@public.gmane.org> skrev:
>
>>
>> On 9/2/19 12:03 PM, Joseph Reagle wrote:
>> > There might be some hacks I can resort to in [1], but does anyone
>> > have a simple solution for ensuring there's a page break between the
>> > two sources in the docx file?
>>
>> I could do this in the shell/script, but I assume there's no inbuilt way
>> to append a file like page-break.md to *each* of the input files, rather
>> than the output file?
>>
>>
>> ╰─➤  cat page-break.md
>> ```{=openxml}
>> <w:p> <w:r> <w:br w:type="page"/> </w:r> </w:p>
>> ```
>>
>> ```
>> ╭─reagle@hom ~/joseph/2019/09
>> ╰─➤  pandoc -f markdown+raw_attribute --toc -A page-break.md -i
>> 1-chap.md 2-chap.md
>> ```
>>
>> --
>> 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/db6ee278-4ed8-6e81-e42e-5c155c412795%40reagle.org
>> .
>>
>

-- 
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/CADAJKhCuGvDDSueCMNS%2BE6EW2cboz5LVQBSjPR7KmRo0Lic5bQ%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 3939 bytes --]

  parent reply	other threads:[~2019-09-05 20:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02 16:03 Joseph Reagle
     [not found] ` <f9be4687-f24a-919d-e699-75a535d0d492-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2019-09-05 17:24   ` Joseph Reagle
     [not found]     ` <db6ee278-4ed8-6e81-e42e-5c155c412795-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2019-09-05 19:55       ` BPJ
     [not found]         ` <CADAJKhB0LFNiTyspQnN5_4j87P1vA0LcgSM-9GrDKoLEOZGrDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-09-05 20:43           ` BPJ [this message]
     [not found]             ` <CADAJKhCuGvDDSueCMNS+E6EW2cboz5LVQBSjPR7KmRo0Lic5bQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-09-05 20:48               ` Joseph Reagle
     [not found]                 ` <236f815f-2db1-4ee2-30d0-5794cd6301b3-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2019-09-16 20:15                   ` Number concatenated chapters (Was: concatenating md have a page-break between in resulting docx?) Joseph Reagle
     [not found]                     ` <83bd8e54-4c7f-2fd7-966e-fe2fb55755bd-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2019-09-19 22:00                       ` brainchild
2019-09-25  8:10                       ` Agustín Martín
     [not found]                         ` <d4057f17-ab65-4bb4-afb4-7ec97ab3cb22-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-09-25 10:25                           ` 山本一貴
2019-09-05 20:46           ` concatenating md have a page-break between in resulting docx? Joseph Reagle
     [not found]             ` <16c406f5-ca1a-c2f2-de16-db846a919570-T1oY19WcHSwdnm+yROfE0A@public.gmane.org>
2019-09-06  9:14               ` BP Jonsson
     [not found]                 ` <CAFC_yuTGVSn9VaG4h3-NgngzKxOW0maTvcpnxakUx7oTYYEjWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-09-06 16:24                   ` -L for --lua-filter? John MacFarlane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADAJKhCuGvDDSueCMNS+E6EW2cboz5LVQBSjPR7KmRo0Lic5bQ@mail.gmail.com \
    --to=melroch-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).