public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: massifrg <massifrg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: map p+class and span+class to para and char style names in html to docx, odt, icml and vice versa
Date: Tue, 22 Sep 2015 05:40:56 -0700 (PDT)	[thread overview]
Message-ID: <6f4a2ed7-3eb3-4f09-8fc2-07c823e62ff2@googlegroups.com> (raw)


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

Hello,
I'm working on documents marked up with XHTML.
I wrote some utilities to convert them in docx, pdf (through PrinceXML or 
ConTeXt) and ICML.
Those utilities are far from complete and I'd like to use Pandoc instead.

It would be great to convert <p class=...> and <span class=...> elements to 
some corresponding paragraph and character styles in docx, odt and ICML.
The concepts of paragraph styles and character styles are common in Word, 
OpenOffice/Libreoffice Writer and InDesign (and not only them).
They map well to HTML's p+class and span+class.

In Pandoc, paragraphs lack attributes(see Pandoc.Text.Definition 
<http://hackage.haskell.org/package/pandoc-types-1.12.4.4/docs/Text-Pandoc-Definition.html>), 
even if there's a workaround (see here 
<https://groups.google.com/forum/#!searchin/pandoc-discuss/paragraph$20attributes/pandoc-discuss/hmcT7edsHd8/SH-l8AWYiqoJ>
).

It would be really useful if Pandoc mapped p+class and span+class elements 
to para and char styles with the same name in docx, odt, icml.
What do you think?

I think it should be an option that you could toggle (i.e. "--map-styles"). 
Something like (or working with) --reference-odt and --reference-docx (and 
maybe --reference-icml or --reference-idml in the future), but not limited 
to a fixed set of styles.

I don't know how they should be marked up in markdown, but since it would 
be specific to those formats, markdown writer could simply ignore that 
feature.

-- 
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/6f4a2ed7-3eb3-4f09-8fc2-07c823e62ff2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

             reply	other threads:[~2015-09-22 12:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 12:40 massifrg [this message]
     [not found] ` <6f4a2ed7-3eb3-4f09-8fc2-07c823e62ff2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-12-29 15:07   ` massifrg
     [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=6f4a2ed7-3eb3-4f09-8fc2-07c823e62ff2@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).