Hello, 

Thank you very much for your response!

On Tuesday, August 27, 2019 at 5:33:24 PM UTC+1, John MacFarlane wrote:

One possibility would be to change pandoc's HTML reader so that
<h1 class="title"> is normally parsed as a regular level-1
heading, UNLESS <meta generator="pandoc"> is present in the
head section.  That would allow nice round tripping from pandoc
but not get in the way of other HTML-producers.


However, it may be that pandoc's current behavior is actually
better in many cases, even when processing HTML produced by
other sources.  So it's quite possible that making this change
would lead to a surge of complaints. (Comments welcome on this.)

I would suggest that this behaviour become the default, BUT you add a command line option to invoke the present behaviour.

So:

- with <meta generator="pandoc">, process <h1 class="title"> as metadata
- with --title-metadata (or similar), process <h1 class="title"> as metadata
- otherwise process <h1 class="title"> as a header
 

Another, probably better approach would be to parse
<h1 class="title"> as a metadata title when pandoc is run
with --standalone, but not when pandoc is run in fragment mode.

But I want to get a complete ODT document as output. Don't I need to use --standalone? If I do then this fix would do nothing for me.
 

A workaround for you would be to preprocess the input, or
run in --standalone mode and use a lua filter that extracts
the metadata title and inserts a level 1 header with its content
at the beginning of the document.

Preprocessing the input with a mere search and replace, changing class="title" to class="meow", is a simple approach that works. But it is a mandatory extra step.

 Yours, Mikhail Ramendik 

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/684df614-496b-455f-aa2d-e602b19c96b0%40googlegroups.com.