From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/21915 Path: news.gmane.org!.POSTED.ciao.gmane.org!not-for-mail From: sonya.mamurin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Newsgroups: gmane.text.pandoc Subject: Re: How to get a page break (/f) from Markdown -> docx? Date: Mon, 21 Jan 2019 13:07:28 -0800 (PST) Message-ID: References: <65081506-a54b-4aff-96a0-d8e1cb6accc2@googlegroups.com> <2085f4cb-d713-4975-a739-9ad775cd37c4@googlegroups.com> <20150420171718.GB49983@localhost.hsd1.ca.comcast.net> <86515234-38b7-4fa5-8d21-0c94fe3cf9f6@googlegroups.com> <253add6a-b873-4a1c-ad97-3dadf4c7ed1f@googlegroups.com> <20150422154425.GC52517@localhost.hsd1.ca.comcast.net> <2f0fdd14-9f3e-4aa7-9d9c-756cc82f3a5d@googlegroups.com> <6ecc8d08-7c6d-4e76-8b35-004176e6af4b@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2127_2047603114.1548104848754" Injection-Info: ciao.gmane.org; posting-host="ciao.gmane.org:195.159.176.228"; logging-data="118010"; mail-complaints-to="usenet@ciao.gmane.org" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDIMPNGY3YLRBEPJTDRAKGQE4MT6HBA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jan 21 22:07:34 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ot1-f61.google.com ([209.85.210.61]) by ciao.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1glgn5-000Ubn-R8 for gtp-pandoc-discuss@m.gmane.org; Mon, 21 Jan 2019 22:07:32 +0100 Original-Received: by mail-ot1-f61.google.com with SMTP id q16sf8745733otf.5 for ; Mon, 21 Jan 2019 13:07:31 -0800 (PST) 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=H3krfy1m8jE2RHEFw6rHKNpO4pvP7UIScfFH71fNRuI=; b=haq0XCEviOWXzNieL2mpVhioBX2rdaakwBShmT+MkkNjdOQNZyAdO/CQI8/2FsTP6T zMrTu44kFo86ed7w3pz1UBDbml2bcAVtwAWG/y2pAZWHrlvHz+CRDRWBbCr0EigC9Q2X supwvNjvfJ6kMNFrgOEylQRARmS6WYOsMRd4I+9L1SkUOqHtFkyetfshsm72osLOt3+w mnYaV6MU+jPGz9vO/xKrcwRkQ/oQkcpn9p7ffH6jKZqR8zr/NlHCCzKwjoNipKXSqhCl 9Eg7ks95gmPIu+OU8LKvTFTar83tUI/kXyr6X5eB7XZJMceRTgOUoT8mon0o77LTbc5e 4OrQ== 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=H3krfy1m8jE2RHEFw6rHKNpO4pvP7UIScfFH71fNRuI=; b=ZdlDxKG1bDEY+kQWJLVmItcXJhc4y9O3zQaT33arZmPepHvsJR+zF5ZCjUtkriFbZR x5DufwO84A+Lr7CYJlKP9jFpNH0ngzMORqqVFiohlHD+NumAL/6pl+p5DEDu4Pu/q7X0 sDFtIbN2+Z6yFIx0m6irDP6uZZO5D6/DBgHWjgJnMCKqqhPXPzHrOTeYaG9lk8y9NEdJ xPF568Uls2R6K3sUQ5Riq0MNyQ80OZQw6nTRe1I6nEfjy4o+lSgwtzKTyqQKZKsid/0A R3SPqCzfoCmNlV52UMHkWKFUphFzqAM9QVeOf+aDCc4PjtKibrQtFlcX1UvJ1aKH04Id b5VQ== 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=H3krfy1m8jE2RHEFw6rHKNpO4pvP7UIScfFH71fNRuI=; b=HZXU975pb78JR1t8Q8YXw1GpSWNMiFWeQKHnxnI70T7k0x7h2eWJE+3CEsr9BcSUq7 A/8TB6+LuNwPXLQEPxq7S3mlCAVjVq7AZpD/PasGK1ZasgHSv9hIInuyx+uSRe9yNMxv nQXFx+TTirFPmpfPfX76sKTNUM30S0OkxYMdqSHKqKb/28E+nnnCxt8CqXuujTsOI+tA pIxFsKWESFn4HHx3a5QXU4CH9CtSu9DG8AaBLizoQ1FRdplBwLbt5TWD+mOFdDMVslFd gZ8H0Mok4MhkntfVGWtFAXxL3/TeQjhh6DBtBY+hdh7kzyh2z6ZDWvkn+VZlL1opPv0B 7+gQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJcUukeKNi/6ui7a3yGL8mYCzkCBtJkHb2uDiXJdPEJ+iF4uyYUchmqE L/ih6Af+41iH9W7mNlmKPXU= X-Google-Smtp-Source: ALg8bN567A84bVRTF9xpgIT3AS6EMN+etOS/fO+Kvg6CxC/Bhc1nvv2SLrUnJbzleQ3jm53F750DoA== X-Received: by 2002:a9d:148:: with SMTP id 66mr503610otu.5.1548104850577; Mon, 21 Jan 2019 13:07:30 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:75d0:: with SMTP id c16ls3623464otl.3.gmail; Mon, 21 Jan 2019 13:07:29 -0800 (PST) X-Received: by 2002:a9d:6f9a:: with SMTP id h26mr492439otq.0.1548104849499; Mon, 21 Jan 2019 13:07:29 -0800 (PST) In-Reply-To: <6ecc8d08-7c6d-4e76-8b35-004176e6af4b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: sonya.mamurin-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-Spam-Checked-In-Group: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:21915 Archived-At: ------=_Part_2127_2047603114.1548104848754 Content-Type: multipart/alternative; boundary="----=_Part_2128_790852186.1548104848754" ------=_Part_2128_790852186.1548104848754 Content-Type: text/plain; charset="UTF-8" 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
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
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 = " AppliedCharacterStyle=\"CharacterStyle/$ID/[No character style]\" > ParagraphBreakType=\"NextColumn\">
" > > 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. ------=_Part_2128_790852186.1548104848754 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi!

I've been trying to get frame b= reaks to work from markdown to ICML. I first tried to insert the XML direct= ly into the markdown, but the problem I have is that I get a <Br /> a= fter the inserted raw XML, so the frame begins with a blank line. I tried t= o use your script (with NextColumn changed to NextFrame, it works but gives= the same <Br /> after the inserted XML.

Doe= s anyone have any suggestions how to get around that? I have tried to not h= ave 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 j= ust wanted to thank you for the code I found on this discussion and for eve= ry 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 y= our sharing your knowledge. The code I used is this.

#!/usr/bin/e= nv runhaskell
-- icmlpagebreaks.hs

import Text.Pandoc.JSON
import Text= .Pandoc=
import
Text.Pandoc.Walk<= span style=3D"color:#000"> (walk)

pgBrkIcml
:: String
pgBrkIcml
=3D " <CharacterStyleRange AppliedCharacterStyle=3D\"Charac= terStyle/$ID/[No character style]\" ParagraphBreakType=3D\"N= extColumn\"><Br/></CharacterStyleRange> "


pgBrkBlock
:: Block
pgBrkBlock
=3D RawBlock (Format "icml") pgBrkIcml <= br>
insertPgBrks
:: Block -> Block
insertPgBrks
(= Para [
Str "\\PAGEBREAK&= quot;])= =3D pg= BrkBlock
insertPgBrks blk
=3D blk

main =3D toJSONFilter insertPgBrks

At the moment, it looks like it's working. I h= ope it is correct. Thank you again, cheers

David

--
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://groups.google.com/d/= msgid/pandoc-discuss/f2152eb3-5e8e-42b7-9450-72035339de40%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_2128_790852186.1548104848754-- ------=_Part_2127_2047603114.1548104848754--