From: massifrg <massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: map p+class and span+class to para and char style names in html to docx, odt, icml and vice versa
Date: Tue, 29 Dec 2015 07:07:14 -0800 (PST) [thread overview]
Message-ID: <337e7324-35e6-4774-ad4b-574e33cede54@googlegroups.com> (raw)
In-Reply-To: <6f4a2ed7-3eb3-4f09-8fc2-07c823e62ff2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 2477 bytes --]
I try to reformulate and simplify the question.
Example:
A <span class="myStyle">word</span> with a custom style.
Convert it from markdown to HTML (pandoc -f markdown -t html) and you get:
<p>A <span class="myStyle">word</span> with a custom style.</p>
Convert it from markdown to ICML (pandoc -f markdown -t icml) and you get:
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/Paragraph">
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
<Content>A </Content>
</CharacterStyleRange>
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
<Content>word</Content>
</CharacterStyleRange>
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
<Content> with a custom style.</Content>
</CharacterStyleRange><Br />
</ParagraphStyleRange>
The styled word is put in a CharacterStyleRange of its own, but there's no
trace of the class attribute.
Is there a way to get this:
<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/Paragraph">
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
<Content>A </Content>
</CharacterStyleRange>
<CharacterStyleRange AppliedCharacterStyle="$ID/myStyle">
<Content>word</Content>
</CharacterStyleRange>
<CharacterStyleRange AppliedCharacterStyle="$ID/NormalCharacterStyle">
<Content> with a custom style.</Content>
</CharacterStyleRange><Br />
</ParagraphStyleRange>
This way, when you import the ICML in InDesign, in a document with myStyle
previously defined as a character style, you get the right formatting.
The same could be thought for DOCX and ODT, with reference documents that
contain the styles you need.
I have used the class attribute to map the style, but another attribute
could be used: it's only conventional.
I think this "style mapping" should be disabled by default, but enabled by
a command line option.
--
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/337e7324-35e6-4774-ad4b-574e33cede54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 12194 bytes --]
next prev parent reply other threads:[~2015-12-29 15:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 12:40 massifrg
[not found] ` <6f4a2ed7-3eb3-4f09-8fc2-07c823e62ff2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-12-29 15:07 ` massifrg [this message]
[not found] ` <337e7324-35e6-4774-ad4b-574e33cede54-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-12-31 17:23 ` mb21
[not found] ` <984a8c71-60cd-4766-83d3-219d178ab923-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-01-02 14:28 ` massifrg
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=337e7324-35e6-4774-ad4b-574e33cede54@googlegroups.com \
--to=massifrg-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).