Hello again.
If I try to insert RawInline instead I get an extra space instead of an
extra \n..
I solved it using a bash script:
#! /bin/env bash
INPUT=$1
REGEX='ParagraphBreakType="NextFrame"'
for i in $(seq $(grep -c "$REGEX" $INPUT))
do
LINENUMBER=$(sed -n "/$REGEX/=" "$INPUT" | sed -n "${i}p")
PRE=$((LINENUMBER - 1))
SUC=$((LINENUMBER + 1))
sed -i "${PRE}d; ${SUC}d" $INPUT
done
It finds lines with the framebreak and removes the line before and after
that line.
If someone knows a better way please let me know :).
Best,
A
On Monday, 21 January 2019 22:07:28 UTC+1, sonya....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:
>
> 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/d560de22-bbac-40e0-ae25-75f02627175d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.