From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/14152 Path: news.gmane.org!not-for-mail From: massifrg Newsgroups: gmane.text.pandoc 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) Message-ID: <337e7324-35e6-4774-ad4b-574e33cede54@googlegroups.com> References: <6f4a2ed7-3eb3-4f09-8fc2-07c823e62ff2@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3321_1368379784.1451401634677" X-Trace: ger.gmane.org 1451401639 8685 80.91.229.3 (29 Dec 2015 15:07:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Dec 2015 15:07:19 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDZYJ4HW2QPBBJGDRK2AKGQE2I6RNTQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Dec 29 16:07:19 2015 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ob0-f187.google.com ([209.85.214.187]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aDvrp-0002f5-JN for gtp-pandoc-discuss@m.gmane.org; Tue, 29 Dec 2015 16:07:18 +0100 Original-Received: by mail-ob0-f187.google.com with SMTP id wj7sf27553086obb.0 for ; Tue, 29 Dec 2015 07:07:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe; bh=PcVbt4jaqwGSx2LnzXB8ZZpB14TiyeNpn7QEJbihrOc=; b=UA95SPh6CkzyiXp4GE92K0iITho6r226LbzhJQV7lcsu3OqKRSejYxOuTlrIzXLVVP G5dQErRKc/1xHL6lhyqkINls5D2Vf3h5CqIGRkAjcg6ZQjLny6y5fJh9WRqKobnf4gpg DPuZl1/gvYf9xnabJJ7CMnTGwf0Mee235DzIdPw6KUeThyqKDcEkmmEsOiFNPmSM8450 GCrvLZutAd7Prv41CwWylRzBdKoAPZz7KiC4rD1ivu4fAbhDj8qLWrjmRdwz9IEocQwj NcM1JOJ8e+2yv6Qsy3chwdPNEH8mRjkZz3jwCurVVqH3CFhKrLB8PEq1Fc96lxBVUR6o 6Egw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :content-type:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe; bh=PcVbt4jaqwGSx2LnzXB8ZZpB14TiyeNpn7QEJbihrOc=; b=hIjaCaWYXVL1V4nawGk8FJocRNkCvGvfkXIojCxjGpW0RtWuX8qBWLEJTtxGIbiB5L xjiFmtM9b+/91k7723o1lTf5Rto9wpdAxuTTbRk1iQTLKjf+1IgxzsVHCGDSg/LA5iU3 YBp32Pd7RD9bX7NswuBYBN4VtEGy8MReV7tnkpES6qIsZ+F0aN3uli59ASYEvMWUdGPO C2a3uSfH3PJ5ACVvFPdQSeC/E6lDVaZjPfKnMnhxENJ/cF0ESbciEt7S4LVQP654BhWl hvA8kigBbA4eKV3FCvfP9SPnU7LDhr8V/nKLjC/Sq2VTRZ7ONAdenpB1pKsS4Gzy9WxR 4hSA== X-Received: by 10.50.118.7 with SMTP id ki7mr925808igb.7.1451401636855; Tue, 29 Dec 2015 07:07:16 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.107.18.39 with SMTP id a39ls2231236ioj.14.gmail; Tue, 29 Dec 2015 07:07:15 -0800 (PST) X-Received: by 10.50.114.163 with SMTP id jh3mr920964igb.1.1451401635966; Tue, 29 Dec 2015 07:07:15 -0800 (PST) In-Reply-To: <6f4a2ed7-3eb3-4f09-8fc2-07c823e62ff2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: massifrg-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:14152 Archived-At: ------=_Part_3321_1368379784.1451401634677 Content-Type: multipart/alternative; boundary="----=_Part_3322_966044337.1451401634677" ------=_Part_3322_966044337.1451401634677 Content-Type: text/plain; charset=UTF-8 I try to reformulate and simplify the question. Example: A word with a custom style. Convert it from markdown to HTML (pandoc -f markdown -t html) and you get:

A word with a custom style.

Convert it from markdown to ICML (pandoc -f markdown -t icml) and you get: A word with a custom style.
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: A word with a custom style.
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. ------=_Part_3322_966044337.1451401634677 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I try to reformulate and simplify the question.
Example= :

A <= /span><= span class=3D"myStyle">word</span> with a custom style.

Convert it from markdown to HTML (pando= c -f markdown -t html) and you get:

<p>A <span class=3D"myStyle">word= </span> with a custom style.</p>

Convert it from markdown to= ICML (pandoc -f markdown -t icml) and you get:

<ParagraphStyleRange AppliedParagraphStyle= =3D"ParagraphStyle/Par= agraph">
= =C2=A0
<= ;CharacterStyleRange AppliedCharacterStyle=3D"$ID/NormalCharacterStyle">
=C2=A0 =C2=A0
<Content>A </Content>
=C2=A0
</CharacterStyleRange>
=C2=A0 <CharacterStyleR= ange AppliedCharacte= rStyle=3D<= /span>"$ID/N= ormalCharacterStyle">
=C2=A0 =C2=A0
<Content>word</Content>
=C2=A0
</CharacterStyleRange>
=C2=A0
<CharacterStyleRange<= span style=3D"color: #000;" class=3D"styled-by-prettify">
AppliedCharacterStyle=3D"$ID/NormalCharact= erStyle">=C2=A0 =C2=A0 <Content> with a custom style.</Content>
=C2=A0
</CharacterStyleRange><Br />
</ParagraphStyleRange>
<= /div>
The styled word is put in a CharacterStyleRange of its own, but th= ere's no trace of the class attribute.
Is there a way to get this:
<Pa= ragraphStyleRange Ap= pliedParagraphStyle=3D"ParagraphStyle/Paragraph">
=C2=A0
<CharacterStyleRange AppliedCharacterStyle=3D"$ID/NormalCharacterStyle">
=C2=A0 =C2=A0 <Content>= ;A = </Content><= /span>
=C2=A0 =
</Chara= cterStyleRange>
=C2=A0
<CharacterStyleRange AppliedCharacterStyle=3D&quo= t;$ID/myStyle">
=C2=A0 =C2=A0
<Content>word</Content>
=C2=A0
</CharacterStyleRange>
=C2=A0
<CharacterStyleRange<= span style=3D"color: #000;" class=3D"styled-by-prettify">
AppliedCharacterStyle
=3D"$ID/NormalCharact= erStyle">=C2=A0 =C2=A0 <Content> with a custom style.</Content>
=C2=A0
</CharacterStyleRange><Br />
</ParagraphStyleRange>

This way, when you import the ICML in InDesign, in a documen= t with myStyle previously defined as a character style, you get the right f= ormatting.
The same could be thought for DOCX and ODT, with reference do= cuments that contain the styles you need.
I have used the class attribut= e to map the style, but another attribute could be used: it's only conv= entional.
I think this "style mapping" should be disabled by d= efault, but enabled by a command line option.

--
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/337e7324-35e6-4774-ad4b-574e33cede54%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_3322_966044337.1451401634677-- ------=_Part_3321_1368379784.1451401634677--