public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Some ePubs generated by pandoc cannot be opened by Google Play Book on Android
@ 2016-12-26  1:50 Kolen Cheung
       [not found] ` <8fbdd76c-3d1d-409b-a14c-72180cddcb10-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Kolen Cheung @ 2016-12-26  1:50 UTC (permalink / raw)
  To: pandoc-discuss


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

, but the same ePub can be opened in iBooks.

I tried <http://validator.idpf.org/application/validate>, and among a long 
list of warnings (`Remote resource reference not allowed; resource must be 
placed in the OCF.`), there's 1 error: `Error while parsing file 'element 
"p" not allowed here; expected the element end-tag or element "base", 
"command", "epub:trigger", "link", "meta", "script" or "style"'.`

The epubs can be found at [Releases · 
ickc/selected-hymns](https://github.com/ickc/selected-hymns/releases). The 
error message is generated when I use the `en.epub` file. What puzzles me 
is the markdown markup used are very simple: title, heading 1, numerated 
lists, etc. Nothing fancy is going on.

I didn't have a MWE for now. For now my question is if anyone has similar 
experiences and how did you solve it? And if the same behavior hasn't seen. 
I will try to hunt down a MWE.

(pandoc version: 1.19.1, epub output version: epub3).

Thanks.

-- 
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/8fbdd76c-3d1d-409b-a14c-72180cddcb10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Some ePubs generated by pandoc cannot be opened by Google Play Book on Android
       [not found] ` <8fbdd76c-3d1d-409b-a14c-72180cddcb10-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2016-12-28  2:10   ` srgb
       [not found]     ` <0d28bfa6-1dc0-4af5-a22d-63d80fbba92a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: srgb @ 2016-12-28  2:10 UTC (permalink / raw)
  To: pandoc-discuss


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

1) epub3 doesn't accept external resources (css files external references 
in you case);
2) title_page.xhtml has the p tag inside its header (head content), should 
be only within body content (there might be other ones, didn't check all 
the 800+ xhtml files!)

Some readers don't care, others might be tolerant.

I have Google Book disabled on my Android device, so can't (won't) verify; 
FBReader is ok with it.

So change the external references to local ones (within the epub), correct 
the title_page, and try again. No a pandoc problem though.

-- 
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/0d28bfa6-1dc0-4af5-a22d-63d80fbba92a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Some ePubs generated by pandoc cannot be opened by Google Play Book on Android
       [not found]     ` <0d28bfa6-1dc0-4af5-a22d-63d80fbba92a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2016-12-28  2:15       ` srgb
  2017-01-01  4:19       ` Kolen Cheung
  1 sibling, 0 replies; 9+ messages in thread
From: srgb @ 2016-12-28  2:15 UTC (permalink / raw)
  To: pandoc-discuss


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

/Edit: "Not a pandoc problem though."
(can't directly edit posts on ggl grps... :( )

-- 
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/b92eebca-0ee3-4491-90fd-f1b4f8b51b41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Some ePubs generated by pandoc cannot be opened by Google Play Book on Android
       [not found]     ` <0d28bfa6-1dc0-4af5-a22d-63d80fbba92a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2016-12-28  2:15       ` srgb
@ 2017-01-01  4:19       ` Kolen Cheung
       [not found]         ` <CAFC_yuRLkYw9YoBiFhtucEZSWvvDpEYh4T+NG0RD=V+Bf+qRKg@mail.gmail.com>
  1 sibling, 1 reply; 9+ messages in thread
From: Kolen Cheung @ 2017-01-01  4:19 UTC (permalink / raw)
  To: pandoc-discuss


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



Thanks.

Regarding the p tag error, I found <p> </p> in title_page.xhtml, so should 
this be considered a bug in pandoc/pandoc-template? I wonder why there’s an 
empty p tag element within the head there…

On Tuesday, December 27, 2016 at 6:10:33 PM UTC-8, srgb wrote:

1) epub3 doesn't accept external resources (css files external references 
> in you case);
> 2) title_page.xhtml has the p tag inside its header (head content), should 
> be only within body content (there might be other ones, didn't check all 
> the 800+ xhtml files!)
>
> Some readers don't care, others might be tolerant.
>
> I have Google Book disabled on my Android device, so can't (won't) verify; 
> FBReader is ok with it.
>
> So change the external references to local ones (within the epub), correct 
> the title_page, and try again. No a pandoc problem though.
>
​

-- 
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/bcdb10aa-8d2d-4c1f-a7ca-d35ef97a44e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Some ePubs generated by pandoc cannot be opened by Google Play Book on Android
       [not found]             ` <CAFC_yuQWTx7z5O0cMt+cdHuoC0ggUjiRWp7Lv8pC29avQAK7GA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-01-01 13:35               ` BP Jonsson
  2017-01-01 19:04                 ` John MacFarlane
  2017-01-02  3:21                 ` Kolen Cheung
  0 siblings, 2 replies; 9+ messages in thread
From: BP Jonsson @ 2017-01-01 13:35 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 3437 bytes --]

Probably because something was included from metadata (an empty field
value) which pandoc interpreted as an empty paragraph. It is always wise to
use something like my code2raw filter on metadata values which are going to
be included in the header/preamble.

BTW I wonder what they were thinking when they forbid external links. Is it
because eBook readers can't display the targets anyway? It would not be too
hard to write a filter which recognises absolute URLs in links and turn
those links into spans with the URL in parentheses or a note after the link
text. I used a filter like that for PDFs meant to be printed before the
link_as_note feature (which however still has the URL text as a link) got
included in the default template. It hadn't occurred to me to hack LaTeX to
achieve the same effect. In principle a filter could also download and
'localize' images with absolute URLs, but mind the licenses of images of
course. Perl has the URI module which can help recognise absolute URLs and
extract the filename part of URLs, but I guess Python has something similar
since you prefer that language.

/bpj


Den 1 jan 2017 05:19 skrev "Kolen Cheung" <christian.kolen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:

Thanks.

Regarding the p tag error, I found <p> </p> in title_page.xhtml, so should
this be considered a bug in pandoc/pandoc-template? I wonder why there’s an
empty p tag element within the head there…

On Tuesday, December 27, 2016 at 6:10:33 PM UTC-8, srgb wrote:

1) epub3 doesn't accept external resources (css files external references
> in you case);
> 2) title_page.xhtml has the p tag inside its header (head content), should
> be only within body content (there might be other ones, didn't check all
> the 800+ xhtml files!)
>
> Some readers don't care, others might be tolerant.
>
> I have Google Book disabled on my Android device, so can't (won't) verify;
> FBReader is ok with it.
>
> So change the external references to local ones (within the epub), correct
> the title_page, and try again. No a pandoc problem though.
>
​

-- 
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/bcdb10aa-8d2d-4c1f-a7ca-d35ef97a44e0%40googlegroups.com
<https://groups.google.com/d/msgid/pandoc-discuss/bcdb10aa-8d2d-4c1f-a7ca-d35ef97a44e0%40googlegroups.com?utm_medium=email&utm_source=footer>
.

For more options, visit https://groups.google.com/d/optout.

-- 
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/CAFC_yuTGjwuaQ_81qE4gAOtOFnoWc%3DoLZbCoEp7_58LqB_d%3D%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 9332 bytes --]

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

* Re: Some ePubs generated by pandoc cannot be opened by Google Play Book on Android
  2017-01-01 13:35               ` BP Jonsson
@ 2017-01-01 19:04                 ` John MacFarlane
  2017-01-02  3:21                 ` Kolen Cheung
  1 sibling, 0 replies; 9+ messages in thread
From: John MacFarlane @ 2017-01-01 19:04 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ BP Jonsson [Jan 01 17 14:35 ]:
>   occurred to me to hack LaTeX to achieve the same effect. In principle a
>   filter could also download and 'localize' images with absolute URLs,

Pandoc already does that, in fact, when constructing an
EPUB.  But only for regular images, not for things included
as raw HTML or in CSS.


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

* Re: Some ePubs generated by pandoc cannot be opened by Google Play Book on Android
  2017-01-01 13:35               ` BP Jonsson
  2017-01-01 19:04                 ` John MacFarlane
@ 2017-01-02  3:21                 ` Kolen Cheung
       [not found]                   ` <82c2ab8e-a365-4a24-bb7b-8461444162e0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  1 sibling, 1 reply; 9+ messages in thread
From: Kolen Cheung @ 2017-01-02  3:21 UTC (permalink / raw)
  To: pandoc-discuss


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

@bpj, you are right, indeed it is because I have LaTeX code in 
`header-include`.

@jgm, do you consider this a bug/enhancement: that when a raw LaTeX is 
used, and the output format isn't LaTeX, it should be skipped entirely 
rather than having an empty `<p>` tag?

On Sunday, January 1, 2017 at 5:35:05 AM UTC-8, BP Jonsson wrote:
>
> Probably because something was included from metadata (an empty field 
> value) which pandoc interpreted as an empty paragraph. It is always wise to 
> use something like my code2raw filter on metadata values which are going to 
> be included in the header/preamble.
>
> BTW I wonder what they were thinking when they forbid external links. Is 
> it because eBook readers can't display the targets anyway? It would not be 
> too hard to write a filter which recognises absolute URLs in links and turn 
> those links into spans with the URL in parentheses or a note after the link 
> text. I used a filter like that for PDFs meant to be printed before the 
> link_as_note feature (which however still has the URL text as a link) got 
> included in the default template. It hadn't occurred to me to hack LaTeX to 
> achieve the same effect. In principle a filter could also download and 
> 'localize' images with absolute URLs, but mind the licenses of images of 
> course. Perl has the URI module which can help recognise absolute URLs and 
> extract the filename part of URLs, but I guess Python has something similar 
> since you prefer that language.
>
> /bpj
>
>
> Den 1 jan 2017 05:19 skrev "Kolen Cheung" <christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 
> <javascript:>>:
>
> Thanks.
>
> Regarding the p tag error, I found <p> </p> in title_page.xhtml, so 
> should this be considered a bug in pandoc/pandoc-template? I wonder why 
> there’s an empty p tag element within the head there…
>
> On Tuesday, December 27, 2016 at 6:10:33 PM UTC-8, srgb wrote:
>
> 1) epub3 doesn't accept external resources (css files external references 
>> in you case);
>> 2) title_page.xhtml has the p tag inside its header (head content), 
>> should be only within body content (there might be other ones, didn't check 
>> all the 800+ xhtml files!)
>>
>> Some readers don't care, others might be tolerant.
>>
>> I have Google Book disabled on my Android device, so can't (won't) 
>> verify; FBReader is ok with it.
>>
>> So change the external references to local ones (within the epub), 
>> correct the title_page, and try again. No a pandoc problem though.
>>
> ​
>
> -- 
> 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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>.
> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 
> <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/bcdb10aa-8d2d-4c1f-a7ca-d35ef97a44e0%40googlegroups.com 
> <https://groups.google.com/d/msgid/pandoc-discuss/bcdb10aa-8d2d-4c1f-a7ca-d35ef97a44e0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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/82c2ab8e-a365-4a24-bb7b-8461444162e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

* Re: Some ePubs generated by pandoc cannot be opened by Google Play Book on Android
       [not found]                   ` <82c2ab8e-a365-4a24-bb7b-8461444162e0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-01-02  5:26                     ` John MacFarlane
       [not found]                       ` <20170102052657.GC37532-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: John MacFarlane @ 2017-01-02  5:26 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Kolen Cheung [Jan 01 17 19:21 ]:
>   @bpj, you are right, indeed it is because I have LaTeX code in
>   `header-include`.
>   @jgm, do you consider this a bug/enhancement: that when a raw LaTeX is
>   used, and the output format isn't LaTeX, it should be skipped entirely
>   rather than having an empty `<p>` tag?

I beliee this has recently been addressed by
https://github.com/jgm/pandoc/commit/9b29a55d9bdf561405bc1021011bf67d24ee0c96


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

* Re: Some ePubs generated by pandoc cannot be opened by Google Play Book on Android
       [not found]                       ` <20170102052657.GC37532-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
@ 2017-01-02  5:28                         ` Kolen Cheung
  0 siblings, 0 replies; 9+ messages in thread
From: Kolen Cheung @ 2017-01-02  5:28 UTC (permalink / raw)
  To: pandoc-discuss


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

Oh, thank you. Next time I'll try to remember testing it with the master 
branch first.

On Sunday, January 1, 2017 at 9:27:12 PM UTC-8, John MacFarlane wrote:
>
> +++ Kolen Cheung [Jan 01 17 19:21 ]: 
> >   @bpj, you are right, indeed it is because I have LaTeX code in 
> >   `header-include`. 
> >   @jgm, do you consider this a bug/enhancement: that when a raw LaTeX is 
> >   used, and the output format isn't LaTeX, it should be skipped entirely 
> >   rather than having an empty `<p>` tag? 
>
> I beliee this has recently been addressed by 
>
> https://github.com/jgm/pandoc/commit/9b29a55d9bdf561405bc1021011bf67d24ee0c96 
>

-- 
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/88d9d773-1c3d-42f3-b190-9be856b4f64c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2017-01-02  5:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-26  1:50 Some ePubs generated by pandoc cannot be opened by Google Play Book on Android Kolen Cheung
     [not found] ` <8fbdd76c-3d1d-409b-a14c-72180cddcb10-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-12-28  2:10   ` srgb
     [not found]     ` <0d28bfa6-1dc0-4af5-a22d-63d80fbba92a-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-12-28  2:15       ` srgb
2017-01-01  4:19       ` Kolen Cheung
     [not found]         ` <CAFC_yuRLkYw9YoBiFhtucEZSWvvDpEYh4T+NG0RD=V+Bf+qRKg@mail.gmail.com>
     [not found]           ` <CAFC_yuQWTx7z5O0cMt+cdHuoC0ggUjiRWp7Lv8pC29avQAK7GA@mail.gmail.com>
     [not found]             ` <CAFC_yuQWTx7z5O0cMt+cdHuoC0ggUjiRWp7Lv8pC29avQAK7GA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-01 13:35               ` BP Jonsson
2017-01-01 19:04                 ` John MacFarlane
2017-01-02  3:21                 ` Kolen Cheung
     [not found]                   ` <82c2ab8e-a365-4a24-bb7b-8461444162e0-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-01-02  5:26                     ` John MacFarlane
     [not found]                       ` <20170102052657.GC37532-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2017-01-02  5:28                         ` Kolen Cheung

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