public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Problem with page breaks in InDesign ICML files
@ 2018-02-05 18:18 Benji Sunarjo
       [not found] ` <5af32d28-2122-4597-8137-d7848c617093-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Benji Sunarjo @ 2018-02-05 18:18 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1201 bytes --]

I've finally found my ideal workflow, where I can write latex in a 
plain-text editor, manage my references with bibtex, and then do the layout 
and styling in InDesign. Pandoc is amazing.

It doesn't seem to be converting the latex \newpage and \pagebreak commands 
properly however, they seem to get lost in translation to the icml. Should 
I report a bug? Looking at an icml that's been edited in InDesign, it looks 
like the appropriate sequence in the icml looks something like this:

<CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Default" 
ParagraphBreakType="NextPage">
<Br />
</CharacterStyleRange>

Thanks!

-- 
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/5af32d28-2122-4597-8137-d7848c617093%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2159 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with page breaks in InDesign ICML files
       [not found] ` <5af32d28-2122-4597-8137-d7848c617093-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2018-02-07 16:54   ` John MacFarlane
  2018-02-13 14:34   ` Benji Sunarjo
  1 sibling, 0 replies; 3+ messages in thread
From: John MacFarlane @ 2018-02-07 16:54 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

The pandoc document model doesn't support pagebreaks.
There are a couple issues proposing adding this, but it's
a relatively big change, affecting all readers and writers,
so nothing yet.

You could use a lua filter to intercept the raw latex
and convert it to raw icml.  See docs on lua filters on
the website.

+++ Benji Sunarjo [Feb 05 18 10:18 ]:
>   I've finally found my ideal workflow, where I can write latex in a
>   plain-text editor, manage my references with bibtex, and then do the
>   layout and styling in InDesign. Pandoc is amazing.
>   It doesn't seem to be converting the latex \newpage and \pagebreak
>   commands properly however, they seem to get lost in translation to the
>   icml. Should I report a bug? Looking at an icml that's been edited in
>   InDesign, it looks like the appropriate sequence in the icml looks
>   something like this:
>   <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Default"
>   ParagraphBreakType="NextPage">
>   <Br />
>   </CharacterStyleRange>
>   Thanks!
>
>   --
>   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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/5af32d28-2122-4597-
>   8137-d7848c617093%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/5af32d28-2122-4597-8137-d7848c617093-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with page breaks in InDesign ICML files
       [not found] ` <5af32d28-2122-4597-8137-d7848c617093-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2018-02-07 16:54   ` John MacFarlane
@ 2018-02-13 14:34   ` Benji Sunarjo
  1 sibling, 0 replies; 3+ messages in thread
From: Benji Sunarjo @ 2018-02-13 14:34 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1173 bytes --]

Thanks for the reply! That worked great. One problem, however, is that 
additional line-breaks are inserted before and after the page-break, which 
would be fine if it was a normal paragraph, but it's not. Any ideas how to 
suppress those?

Here the script I'm using:

function RawBlock(elem)
  if elem.text == "\\newpage" then
    return pandoc.RawBlock("icml", "<ParagraphStyleRange 
AppliedParagraphStyle='ParagraphStyle/Paragraph'><CharacterStyleRange 
AppliedCharacterStyle='CharacterStyle/Default' 
ParagraphBreakType='NextPage'><Br 
/></CharacterStyleRange></ParagraphStyleRange>")
  end
end



-- 
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/be0f6262-326e-42d3-87b4-59788fe8c42f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2115 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-13 14:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-05 18:18 Problem with page breaks in InDesign ICML files Benji Sunarjo
     [not found] ` <5af32d28-2122-4597-8137-d7848c617093-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-02-07 16:54   ` John MacFarlane
2018-02-13 14:34   ` Benji Sunarjo

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).