Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICML: Styles for unnumbered headings #5140

Closed
cprecioso opened this issue Dec 10, 2018 · 3 comments · Fixed by #5142
Closed

ICML: Styles for unnumbered headings #5140

cprecioso opened this issue Dec 10, 2018 · 3 comments · Fixed by #5142

Comments

@cprecioso
Copy link

This is a feature request. When dealing with an unnumbered heading (the ones with a trailing {-}), the ICML writer just uses the same style than regular headings.

For me this was not enough, as I was numbering the headers with InDesign Paragraph Styles, and I didn't have a way of taking out the numbering for unnumbered headings.

@cprecioso
Copy link
Author

I worked around it writing my own filter that detects unnumbered headings and rewrites them with a RawBlock like:

<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/Header{N} &gt; Unnumbered">
  <CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
    <Content>{...}</Content>
  </CharacterStyleRange>
</ParagraphStyleRange>

And then, I customized the template.icml file adding styles like:

<ParagraphStyle Self="ParagraphStyle/Header{N} &gt; Unnumbered" Name="Header{N} &gt; Unnumbered" LeftIndent="0" PointSize="36">
  <Properties>
    <BasedOn type="object">$$ID/NormalParagraphStyle</BasedOn>
  </Properties>
</ParagraphStyle>

mb21 added a commit to mb21/pandoc that referenced this issue Dec 10, 2018
@jgm jgm closed this as completed in #5142 Dec 10, 2018
jgm pushed a commit that referenced this issue Dec 10, 2018
@jgm
Copy link
Owner

jgm commented Dec 10, 2018

@cprecioso can you comment on whether @mb21's approach in the linked PR will work for you?

@cprecioso
Copy link
Author

cprecioso commented Dec 10, 2018

Yep, that's perfect! Thanks!

daamien pushed a commit to daamien/pandoc that referenced this issue Dec 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants