public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* epub backmatter appendix support
@ 2018-08-08 14:15 'o0RoUGhFiSh0o' via pandoc-discuss
       [not found] ` <058abc78-e555-4372-be20-ade0b5d539ca-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: 'o0RoUGhFiSh0o' via pandoc-discuss @ 2018-08-08 14:15 UTC (permalink / raw)
  To: pandoc-discuss


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

Hi,

I'm trying to convert markdown files into a single epub. The problem is 
that I didn't find out any good way to place the appendix. the epub 
standard supports backmatter and appendix 
(http://www.idpf.org/epub/profiles/edu/structure/#h.bd4uivk2tanq).
I want the toc to be generated accordingly. All the headlines should be 
numbered like 1.1, 1.2, 2.1, 2.2, 2.3 and so on. The appendix should be 
numbered like A., B. and so on. How could I do this?

Also in the epub standard are a log of attributes which are used by epub 
readers (at least should be used) but pandoc doesn't allow them to be used 
inside the AST because since epub is using HTML5 it always prepends the 
attributes with "data-" (e.g.: <h1 id="foo" 
data-epub:type="appendix"></h1>) This is bad because you always need a 
RawBlock inside the AST to work around this. Is there a way to stop pandoc 
from adding "data" to every non HTML5 attribute?

There are epub:types for frontmatter, bodymatter and backmatter. Also for 
appendix and alot of other stuff. This should be considered when generating 
an epub. Especially for the toc.

Thanks in advance

-- 
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/058abc78-e555-4372-be20-ade0b5d539ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: epub backmatter appendix support
       [not found] ` <058abc78-e555-4372-be20-ade0b5d539ca-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2018-08-08 16:33   ` John MacFarlane
       [not found]     ` <yh480kzhxw95t5.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: John MacFarlane @ 2018-08-08 16:33 UTC (permalink / raw)
  To: 'o0RoUGhFiSh0o' via pandoc-discuss, pandoc-discuss

"'o0RoUGhFiSh0o' via pandoc-discuss"
<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> writes:

I suppose these issue are related.

We could tweak the section numbering algorithm so that
sections with epub:type="appendix" get different kinds
of numbers.

The other issue, prepending data-, should be easy to
fix, as long as the relevant attributes all start with
the "epub:" prefix.

Can you put an issue on the issue tracker for this,
including a link to the URL you link to below?

> Hi,
>
> I'm trying to convert markdown files into a single epub. The problem is 
> that I didn't find out any good way to place the appendix. the epub 
> standard supports backmatter and appendix 
> (http://www.idpf.org/epub/profiles/edu/structure/#h.bd4uivk2tanq).
> I want the toc to be generated accordingly. All the headlines should be 
> numbered like 1.1, 1.2, 2.1, 2.2, 2.3 and so on. The appendix should be 
> numbered like A., B. and so on. How could I do this?
>
> Also in the epub standard are a log of attributes which are used by epub 
> readers (at least should be used) but pandoc doesn't allow them to be used 
> inside the AST because since epub is using HTML5 it always prepends the 
> attributes with "data-" (e.g.: <h1 id="foo" 
> data-epub:type="appendix"></h1>) This is bad because you always need a 
> RawBlock inside the AST to work around this. Is there a way to stop pandoc 
> from adding "data" to every non HTML5 attribute?
>
> There are epub:types for frontmatter, bodymatter and backmatter. Also for 
> appendix and alot of other stuff. This should be considered when generating 
> an epub. Especially for the toc.
>
> Thanks in advance
>
> -- 
> 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/058abc78-e555-4372-be20-ade0b5d539ca%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: epub backmatter appendix support
       [not found]     ` <yh480kzhxw95t5.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2018-08-08 16:56       ` John MacFarlane
  0 siblings, 0 replies; 3+ messages in thread
From: John MacFarlane @ 2018-08-08 16:56 UTC (permalink / raw)
  To: 'o0RoUGhFiSh0o' via pandoc-discuss, pandoc-discuss


I've modified the HTML writer (also used for EPUB) so
that data- won't be added to epub: attributes.

The other change (numbering) would be more difficult.
For now I'd suggest using the .unnumbered class for
these sections.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-08 16:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08 14:15 epub backmatter appendix support 'o0RoUGhFiSh0o' via pandoc-discuss
     [not found] ` <058abc78-e555-4372-be20-ade0b5d539ca-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-08-08 16:33   ` John MacFarlane
     [not found]     ` <yh480kzhxw95t5.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2018-08-08 16:56       ` John MacFarlane

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).