From: sonya.mamurin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: How to get a page break (/f) from Markdown -> docx?
Date: Mon, 21 Jan 2019 13:07:28 -0800 (PST) [thread overview]
Message-ID: <f2152eb3-5e8e-42b7-9450-72035339de40@googlegroups.com> (raw)
In-Reply-To: <6ecc8d08-7c6d-4e76-8b35-004176e6af4b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 2362 bytes --]
Hi!
I've been trying to get frame breaks to work from markdown to ICML. I first
tried to insert the XML directly into the markdown, but the problem I have
is that I get a <Br /> after the inserted raw XML, so the frame begins with
a blank line. I tried to use your script (with NextColumn changed to
NextFrame, it works but gives the same <Br /> after the inserted XML.
Does anyone have any suggestions how to get around that? I have tried to
not have empty lines before and after the \\FRAMEBREAK but then the text
isn't replaced with XML.
Best,
A
On Tuesday, 13 June 2017 13:03:24 UTC+2, endymion...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
>
> Dear fellows,
> I just wanted to thank you for the code I found on this discussion and for
> every contribution. Unfortunately I have absolutely zero knowledge of
> Haskell, but with a minimal edit to your code, I managed to make a little
> filter to enable forwarding a custom page break command from Markdown to
> ICML.
> I needed this very much for my master's thesis. I am very grateful for
> your sharing your knowledge. The code I used is this.
>
> #!/usr/bin/env runhaskell
> -- icmlpagebreaks.hs
>
> import Text.Pandoc.JSON
> import Text.Pandoc
> import Text.Pandoc.Walk (walk)
>
> pgBrkIcml :: String
> pgBrkIcml = " <CharacterStyleRange
> AppliedCharacterStyle=\"CharacterStyle/$ID/[No character style]\"
> ParagraphBreakType=\"NextColumn\"><Br/></CharacterStyleRange> "
>
> pgBrkBlock :: Block
> pgBrkBlock = RawBlock (Format "icml") pgBrkIcml
>
> insertPgBrks :: Block -> Block
> insertPgBrks (Para [Str "\\PAGEBREAK"]) = pgBrkBlock
> insertPgBrks blk = blk
>
> main = toJSONFilter insertPgBrks
>
> At the moment, it looks like it's working. I hope it is correct. Thank you
> again, cheers
>
> David
>
--
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/f2152eb3-5e8e-42b7-9450-72035339de40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 5702 bytes --]
next prev parent reply other threads:[~2019-01-21 21:07 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-03 13:55 Ken Kleinman
[not found] ` <65081506-a54b-4aff-96a0-d8e1cb6accc2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-10-03 14:10 ` Jesse Rosenthal
[not found] ` <87fvf5ckhv.fsf-4GNroTWusrE@public.gmane.org>
2014-10-03 14:21 ` Ken Kleinman
[not found] ` <d4db22fa-7e71-4ae5-aa46-ff75a2fe3a62-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-10-03 14:28 ` Ken Kleinman
[not found] ` <404e04a7-e51c-4afe-ab5a-826a2ccfec86-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-10-03 14:43 ` Jesse Rosenthal
[not found] ` <874mvlcixp.fsf-4GNroTWusrE@public.gmane.org>
2014-10-03 14:50 ` Ken Kleinman
[not found] ` <c4a5f8d6-a674-4ffd-8f90-afa87647f069-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2014-10-16 21:15 ` Gavin Swanson
2014-10-03 14:39 ` Jesse Rosenthal
2014-10-03 14:27 ` John MacFarlane
2015-04-20 17:05 ` hjallen44-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <2085f4cb-d713-4975-a739-9ad775cd37c4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-04-20 17:17 ` John MacFarlane
[not found] ` <20150420171718.GB49983-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org>
2015-04-20 17:35 ` hjallen44-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <86515234-38b7-4fa5-8d21-0c94fe3cf9f6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-04-20 18:31 ` fiddlosopher
[not found] ` <253add6a-b873-4a1c-ad97-3dadf4c7ed1f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-04-22 13:28 ` hjallen44-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <f65a84c9-7e2f-4ba1-a092-0c52f5f79186-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-04-22 15:44 ` John MacFarlane
[not found] ` <20150422154425.GC52517-bi+AKbBUZKbivNSvqvJHCtPlBySK3R6THiGdP5j34PU@public.gmane.org>
2015-04-22 16:59 ` hjallen44-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <2f0fdd14-9f3e-4aa7-9d9c-756cc82f3a5d-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-05-27 22:52 ` JO
[not found] ` <0ef1e813-31dc-4c69-b37b-2114f4c4621a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-05-28 17:59 ` 'Jason Seeley' via pandoc-discuss
2016-08-29 20:45 ` joel allen
[not found] ` <a1dc8029-bc47-49d4-a55f-0c035c076ba5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-06-13 11:03 ` endymionselenicz-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <6ecc8d08-7c6d-4e76-8b35-004176e6af4b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-07-22 11:33 ` Jonathan Van Belle
2019-01-21 21:07 ` sonya.mamurin-Re5JQEeQqe8AvxtiuMwx3w [this message]
[not found] ` <f2152eb3-5e8e-42b7-9450-72035339de40-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-02-15 18:17 ` sonya.mamurin-Re5JQEeQqe8AvxtiuMwx3w
2015-05-30 15:41 ` amygroshek-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <9c2658ec-c79f-4dd7-b403-21c88dc93bc4-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-05-30 17:13 ` Jason White
[not found] ` <20150530171323.GA20492-4VuKTzg51y8@public.gmane.org>
2015-12-09 1:58 ` Courtney Campany
[not found] ` <81dcb1b1-eb5a-4bb6-afdc-3ce9542d2cdb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-12-11 13:49 ` Andrew Dunning
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=f2152eb3-5e8e-42b7-9450-72035339de40@googlegroups.com \
--to=sonya.mamurin-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).