From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/22776 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Newsgroups: gmane.text.pandoc Subject: Re: docx writer: using styles from reference document Date: Tue, 21 May 2019 16:26:13 +0200 Message-ID: References: <0c37bc1d-ea10-4945-98a8-b169997ac437@googlegroups.com> <87v9ynr3wc.fsf@jhu.edu> <87y331f3jz.fsf@jhu.edu> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000382651058966a26f" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="57637"; mail-complaints-to="usenet@blaine.gmane.org" Cc: pandoc-discuss To: Jesse Rosenthal Original-X-From: pandoc-discuss+bncBCHJFA6CVYERBEMVSDTQKGQE4KD6CCI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue May 21 16:26:26 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ed1-f55.google.com ([209.85.208.55]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hT5ik-000ErL-Au for gtp-pandoc-discuss@m.gmane.org; Tue, 21 May 2019 16:26:26 +0200 Original-Received: by mail-ed1-f55.google.com with SMTP id c26sf30888831eda.15 for ; Tue, 21 May 2019 07:26:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1558448786; cv=pass; d=google.com; s=arc-20160816; b=U63McyS9mIkqhp0fby2s59fUuDaBsCkP0A1L+bi09ynoMdiIQBAps+ZFnYazPCeNWy URqVpfmWlKQaELd6V/96MsQ6ZdudyxZkD2RXboMZmxXk4Ucnsle/bo0OM+VEpvtv2QPX 8miERZmEuvgErRNyZFvG2rz9SZBb4Bp1NgoQoaYsNOi8Lv9hJFr5Il9v5Mg8Yw32Y35O QG46l54vVuHh5WXY4q6yZMzpavAHLRyY14i7tx+fcQZmKhW+MnL2XPhlpSIVYd/o19H/ dvL3EXh2ZsiTk1mgQPnvoZd4G41o/xT5Dl8yMz1MgL8GUUt8Ye1z+s1Nu16u/64EyNGE qrmg== 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:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:sender:dkim-signature :dkim-signature; bh=W7nMrqrBswktQC0P3z+Da2FdiMNeLw/Tap4MKgnfx6U=; b=w2LJex3Zd/A39xjDiC9KBY9BAnmnRoJD/8fODrba6WOZ01oQiS5TguCIryg0yAtALQ EbZMEDlP/FfVDW3Mel2oaQiBXo0bUTmjcr/5O+dofCFhwMx1X4356VO9RjfhrY8sRbHR viQkFp9VHH6vHgK4hpzgEVkanA8LtLeYpm2BaXEvc2uRizR2qA+kNwRDBhyfXNS/XwcR YaD8T18E5OAQGmsQhZ09guEyLWmeIxl9lE4iR82tCz+K6of8wlqYiTJ9xOAyLJDD3thu YY7oz3BWZhwUnUisZtd4PuI61VI9aNz5DUzO5kWt8li2GaduG6J+R7CeLh7QQNFMkkZv thVA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Xp7AlNzq; spf=pass (google.com: domain of alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42a as permitted sender) smtp.mailfrom=alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:references:in-reply-to:from:date:message-id :subject:to:cc: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=W7nMrqrBswktQC0P3z+Da2FdiMNeLw/Tap4MKgnfx6U=; b=c+6hiScvlXodeuGEEZEv4D4Yx6UxehmUak6/hEB4TZK+suQe4eYMp6uw6Iwfxssa0O nHv1nJRScQsSWiWpYJoeO/ANzZ8KpU/cnhBzM9iitjzN5l5xjYHkbQ4P+e5FtdW/1HaH J0mohzIw5Ysg1wH4P02vpGlTyNgbyJPEBQ/UghKl9DnH16muGm+FxqKYNClAnjMAfWen DhZ5d1ZBIBy8aZmvf1TwtNXxPiSnp+ZOnJbN34tLbIM81K+h2eJmk6P82lcAPsDnfjfM nELeKE3tllljEDrr1zMhn1XFVDryQ37Wncc/rLArBJ9wfe0Y3gSVY6S/7KgYHAEhzb42 uX/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc: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=W7nMrqrBswktQC0P3z+Da2FdiMNeLw/Tap4MKgnfx6U=; b=h82b0Z+JQjl4/LMBpgYXkLy9Ldt/BQxLhjyiJoHHXqOzZZY6y/MMv0xEefDUqRPRY7 73HVgBsCuxx36a79D0aZy3ze9VXeirl8wEyxDZcoQRtAk5Qx6IJppr0OUKAMkZ6sycRn nLBRzqvaVJiZYoHlvPiQOMuFN5V6qoo44KcsWkcgXyyUIsQ5aAtjlGP4tLCki/CaMi2/ zNlXK9ciXO9jbvmVAJ90/HPZd0UVn5Pd2K6CQzH0sGMpJP8+F9n1zGhuFrcT5RW+Ka8s 2mCfbeP4OJAdrQaQPelG8UN9aLotp1p32ixjmqo9yUH2K9NIcQfBakv6mQgrnRtR349q Ddaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:references:in-reply-to:from :date:message-id:subject:to:cc: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=W7nMrqrBswktQC0P3z+Da2FdiMNeLw/Tap4MKgnfx6U=; b=CogRMMZmlnWFiYHCtQafxNyPn3NYnTQ3rMOo/ktagJiA92RKVxrPKLwHWiynn+6EV2 q761E2Q4imH+NrrGP/OMhD6xvLCVB+91zLvn0ghS9Ka2Mdzltn0mHNxaiL6oxAJ0w5W3 n24HdestSO9hbo5Ziu4Xos74eX18f52c6ztWTlzBz9KI8V9z5D8RqLmVOQADP0khxm02 BzF+AytEVKoB5ShcewPSPZJSvxPn3nuWrLh1MbeoqVAoXXVXICNoxxGvaLCYnJvrv7SI jIem4qwD5To9OUjA86Gw9bbk+gBhxsjX7lFC1d6I3zpFjUSHtndp1yppJl+d/W2aJKAo G1Ng== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAWSnz3BJ13eRFVwseYXn6y23nx0MbeJX92ytFzclgTPMzy+fJhT /if6P+RL0ti5lCZwkA36W7s= X-Google-Smtp-Source: APXvYqzwWaJuKi1JFN1caL6kO4GbqimfAhVKgo5N3DYebtVS0XFSKUqui3ExGWqz6ifDkTKUT1jo5g== X-Received: by 2002:a17:906:9a9:: with SMTP id q9mr8989390eje.125.1558448785921; Tue, 21 May 2019 07:26:25 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:906:95a:: with SMTP id j26ls1809865ejd.5.gmail; Tue, 21 May 2019 07:26:25 -0700 (PDT) X-Received: by 2002:a17:906:1344:: with SMTP id x4mr21277392ejb.249.1558448785140; Tue, 21 May 2019 07:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558448785; cv=none; d=google.com; s=arc-20160816; b=lwxuAVpgzK9nmdriLsce4gSaS7uQadAOd9WSW6JC+K8V7e4FCjEPX7Dy7nxkE28V+g 9fhyVbd9efFxZdlzgpot013iBAGi5c6a2LOCpkliLGmA/qxuqn1GByiGSkvJ1wwbktvz 2vpwhxAQkcw1peFC8pSm1ow/3HLPrsw7blOQt9c6NUWHWm4+EeCbGnq40ky3oG+sDh58 iHHnoSZgbFjfqPCZdff2FUaLAP8XCx1F1zJXwQdD+NJ7W0zN2xugbA0iyxOb5YfOjE5n 7/PEQ8lMly4tcD56+pYK8RO/MyXbQBBlGuX5eyKZmvGzPpNz/1S+ndt48RJxaZ2XSQqQ 8/Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=dy/vVdqjW9dbYM1WsTA2Tj+HHFLWBIq5J5IN34Eeo8w=; b=AHt1Ph02pPipsxfLLFvCSSun/2345dXvFInrSA0VH3jLx6l09J3cRptZp3D4rIgB7w vbpLGWR4Z4BBjvNb/YBQlm/A0BS8r+nqoC5PFQYir2Nuy52qowYgo15zWcOQmeoWMkYA IDbTiyia3DG/coHSv/nIkfPbB32tcGvFd+v/uraHVTEuk4Wo3NOUWhIGiG2sN/b0+Trv bMeF05qb/wr8sEncJPvARmDY7xOo6GselgV8dlCuZhpiOCcoOTNcplwUVdgz7IxnCbFE nWZPK+yh1118MWTVITrhogFTTugUvmZZ8xqu1+hr7r1bIBisrJkXGL19Qx6dyZaf9kfn jRiQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Xp7AlNzq; spf=pass (google.com: domain of alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42a as permitted sender) smtp.mailfrom=alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com. [2a00:1450:4864:20::42a]) by gmr-mx.google.com with ESMTPS id l30si2520016edd.4.2019.05.21.07.26.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 May 2019 07:26:25 -0700 (PDT) Received-SPF: pass (google.com: domain of alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42a as permitted sender) client-ip=2a00:1450:4864:20::42a; Original-Received: by mail-wr1-x42a.google.com with SMTP id w13so8104119wru.11 for ; Tue, 21 May 2019 07:26:25 -0700 (PDT) X-Received: by 2002:adf:83c5:: with SMTP id 63mr20717737wre.33.1558448784810; Tue, 21 May 2019 07:26:24 -0700 (PDT) In-Reply-To: <87y331f3jz.fsf-4GNroTWusrE@public.gmane.org> X-Original-Sender: alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Xp7AlNzq; spf=pass (google.com: domain of alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::42a as permitted sender) smtp.mailfrom=alan.mcl-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:22776 Archived-At: --000000000000382651058966a26f Content-Type: text/plain; charset="UTF-8" Thanks John, Jesse Yes, I meant page breaks. Sorry for not being clear. The raw openxml block approach works well, thanks for that. I need to mull over whether to support a replacement element in the source document (eg the horiz line) or just do something like add page breaks before L1 headers, but either way it should be doable. Footers: my reference.docx has got a footer, but it contains two elements: an image and a page number. The page number text isn't making it to the pandoc output, but the image is. I'm still tinkering with this to see if I figure out what's going wrong. regards Alan On Mon, May 20, 2019 at 7:17 PM Jesse Rosenthal wrote: > John MacFarlane writes: > > > You should be able to insert page breaks using a lua > > filter, though. (You'd need to figure out exactly > > what openxml code to insert as raw openxml.) > > The openxml is: > > > > So you should be able to insert that as a RawBlock with format "openxml". > > > > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CABQ_dt-d1KyE2U4_Hgfbx4%3D2tMtUaHO-5SfrnqJs8HLFEtTG4w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. --000000000000382651058966a26f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks John, Jesse

Yes, I me= ant page breaks. Sorry for not being clear.
The raw openxml block= approach works well, thanks for that. I need to mull over whether to suppo= rt a replacement element in the source document (eg the horiz line) or just= do something like add page breaks before L1 headers, but either way it sho= uld be doable.

Footers: my reference.docx has got = a footer, but it contains two elements: an image and a page number. The pag= e number text isn't making it to the pandoc output, but the image is. I= 'm still tinkering with this to see if I figure out what's going wr= ong.

regards
Alan



On Mon, May 20, 2019 at 7:17 PM Jesse Rosenthal <jrosenthal-4GNroTWusrE@public.gmane.org> wrote:
=
John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> w= rites:

> You should be able to insert page breaks using a lua
> filter, though.=C2=A0 (You'd need to figure out exactly
> what openxml code to insert as raw openxml.)

The openxml is:

=C2=A0 =C2=A0 <w:p><w:r><w:br w:type=3D"page" />= ;</w:r></w:p>

So you should be able to insert that as a RawBlock with format "openxm= l".



--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://group= s.google.com/d/msgid/pandoc-discuss/CABQ_dt-d1KyE2U4_Hgfbx4%3D2tMtUaHO-5Sfr= nqJs8HLFEtTG4w%40mail.gmail.com.
For more options, visit http= s://groups.google.com/d/optout.
--000000000000382651058966a26f--