ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Quick question about dual output pdf and epub
@ 2020-02-28 10:48 Christoph Hintermüller
  2020-02-28 11:07 ` Hans Hagen
  2020-02-28 11:07 ` Quick question about dual output pdf and epub Hans Hagen
  0 siblings, 2 replies; 18+ messages in thread
From: Christoph Hintermüller @ 2020-02-28 10:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi 
Hust not to miss something or mess up every thing.
Can i setup my document preamble such that i can without any switching
create pdf and epub output at the same time.

Want to provide my lecture notes in pdf and epub format.

In other words does it have any side effects on pdf output, if i put
\setuptoutput command preparing document for xhtml/epub output in my
document preamble/main document?

Or would i have to enclose this in some \ifelse conditional block? If
is there a possibility to control condition from mtxrun command line?

Best 
Xristoph


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
  2020-02-28 10:48 Quick question about dual output pdf and epub Christoph Hintermüller
@ 2020-02-28 11:07 ` Hans Hagen
  2020-02-28 14:09   ` Henning Hraban Ramm
                     ` (2 more replies)
  2020-02-28 11:07 ` Quick question about dual output pdf and epub Hans Hagen
  1 sibling, 3 replies; 18+ messages in thread
From: Hans Hagen @ 2020-02-28 11:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Christoph Hintermüller

On 2/28/2020 11:48 AM, Christoph Hintermüller wrote:
> Hi
> Hust not to miss something or mess up every thing.
> Can i setup my document preamble such that i can without any switching
> create pdf and epub output at the same time.
> 
> Want to provide my lecture notes in pdf and epub format.
> 
> In other words does it have any side effects on pdf output, if i put
> \setuptoutput command preparing document for xhtml/epub output in my
> document preamble/main document?
> 
> Or would i have to enclose this in some \ifelse conditional block? If
> is there a possibility to control condition from mtxrun command line?
Currently it is created at the same time but it runs slower. Indeed 
using some mode makes sense because you might also want to have a 
different layout (the simpler, the less possible side effects, actually 
when doing epub or export using some very large page also makes sense as 
then there can be less interference of page breaks and so).

\startmode [epub]
   ....
\stopmode

and then run with --mode=epub

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
  2020-02-28 10:48 Quick question about dual output pdf and epub Christoph Hintermüller
  2020-02-28 11:07 ` Hans Hagen
@ 2020-02-28 11:07 ` Hans Hagen
  1 sibling, 0 replies; 18+ messages in thread
From: Hans Hagen @ 2020-02-28 11:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Christoph Hintermüller

On 2/28/2020 11:48 AM, Christoph Hintermüller wrote:
> Hi
> Hust not to miss something or mess up every thing.
> Can i setup my document preamble such that i can without any switching
> create pdf and epub output at the same time.
> 
> Want to provide my lecture notes in pdf and epub format.
> 
> In other words does it have any side effects on pdf output, if i put
> \setuptoutput command preparing document for xhtml/epub output in my
> document preamble/main document?
> 
> Or would i have to enclose this in some \ifelse conditional block? If
> is there a possibility to control condition from mtxrun command line?
> 
> Best
> Xristoph
> 
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
  2020-02-28 11:07 ` Hans Hagen
@ 2020-02-28 14:09   ` Henning Hraban Ramm
       [not found]   ` <136b07463b64fcaa4e9b1850c030527a011570ab.camel@out-world.com>
  2020-03-03 18:37   ` Hans van der Meer
  2 siblings, 0 replies; 18+ messages in thread
From: Henning Hraban Ramm @ 2020-02-28 14:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users



> Am 2020-02-28 um 12:07 schrieb Hans Hagen <j.hagen@xs4all.nl>:
> 
> On 2/28/2020 11:48 AM, Christoph Hintermüller wrote:
>> Hi
>> Hust not to miss something or mess up every thing.
>> Can i setup my document preamble such that i can without any switching
>> create pdf and epub output at the same time.
>> Want to provide my lecture notes in pdf and epub format.
>> In other words does it have any side effects on pdf output, if i put
>> \setuptoutput command preparing document for xhtml/epub output in my
>> document preamble/main document?

Yes, it has (or at least used to have) side effects if you enable XML output – hyphenation and line breaking is affected.


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
       [not found]   ` <136b07463b64fcaa4e9b1850c030527a011570ab.camel@out-world.com>
@ 2020-02-28 21:39     ` Hans Hagen
  2020-03-01 13:05       ` Christoph Hintermüller
  0 siblings, 1 reply; 18+ messages in thread
From: Hans Hagen @ 2020-02-28 21:39 UTC (permalink / raw)
  To: Christoph Hintermüller, mailing list for ConTeXt users

On 2/28/2020 2:52 PM, Christoph Hintermüller wrote:

> Second am i right that i have to use also startmode and stopmode to
> include svg image instead of metapost image in epub or is there some
> other trick to make metapost image in epub. What would be the keywords
> to use on wiki search.
> 
> Or are the two questions currently beyond possibilities of epub
> support?
It depends a bit. One can for instance make the mp images independent 
(include mp code from a file) and then also make small independent pdf 
files from them that then can be converted to svg using mutool / mudraw. 
You can try that concept with

\startMPpage
    some mp code
\stopMPage

If we're only talking of 'kind of stand alone images' (not backgrounds 
behind texts and other ornamental mp images) I can think about some 
mechanism that does that automatic. In the end much is possible (given 
time and reason) and often not even that hard to do.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
  2020-02-28 21:39     ` Hans Hagen
@ 2020-03-01 13:05       ` Christoph Hintermüller
  0 siblings, 0 replies; 18+ messages in thread
From: Christoph Hintermüller @ 2020-03-01 13:05 UTC (permalink / raw)
  To: Hans Hagen, mailing list for ConTeXt users

Hi Hans
[Inline Response to message by Hans Hagen, Fr, 2020-02-28 22:39 +0100:
Answers and comments below corresponding cited paragraphs.]

> It depends a bit. One can for instance make the mp images
> independent 
> (include mp code from a file) and then also make small independent
> pdf 
> files from them that then can be converted to svg using mutool /
> mudraw. 

What is i already do as MP images are created from Inkscape SVG images
by exporting them to EPS. which are further converted to MP using
pstoedit with some minor sed based postprocessing (removing defaultfont
instruction, modifying showtext macro to daw textetx). 

This works pleasingly well. I find it quite annoying if ebooks try to
enforce a specific branded font and font size, disallowing handicapped
readers for example to use the Dyslexic font or alike, set a wider
spacing of glyphs or use big fontsizes for better reading experience.
Thus i would be ok directly using the Inkscape SVG images or a
canonicalized version thereof unsing different font than set for the
rest of the document.
Thus as a first solution it would be ok for me switching between MP and
SVG image using  \startmode \stopmode.

> You can try that concept with
> 
> \startMPpage
>     some mp code
> \stopMPage
> 
> If we're only talking of 'kind of stand alone images' (not
> backgrounds 
> behind texts and other ornamental mp images) I can think about some 
> mechanism that does that automatic. In the end much is possible
> (given 
> time and reason) and often not even that hard to do.
> 

Hm as said above I already take the opposit route to obtain MP images
cause of using same fonts on images as in the rest of the document
through  texttext macro. Thus it is rather strange to than backconvert
the MP image again into an SVG. The resulting SVG has the same fonts as
as i set for the pdfdocument but when users switch fonts on their reader or fontsize the fonts in the images will not change too so, having matching fonts as of now is of not much use. And it is questionable whether it ever will be unless minimum image size would automatically scaleup with fontsize and spacing too. And than it would require to strip the texts from the original SVG and overtype them using context/tex commands only. The latter would call for a context specific Exportmodule for Inkscape and others which would have to be coded first.

Best
Xristoph



___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
  2020-02-28 11:07 ` Hans Hagen
  2020-02-28 14:09   ` Henning Hraban Ramm
       [not found]   ` <136b07463b64fcaa4e9b1850c030527a011570ab.camel@out-world.com>
@ 2020-03-03 18:37   ` Hans van der Meer
  2020-03-03 18:47     ` Wolfgang Schuster
  2 siblings, 1 reply; 18+ messages in thread
From: Hans van der Meer @ 2020-03-03 18:37 UTC (permalink / raw)
  To: NTG ConTeXt


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

> 
> and then run with --mode=epub

I am running with:
    mtxrun --autogenerate --mode=epub --script context "$1"
but no epub document is generated, just the same result.pdf I get without that mode.

In .bashrc using:
# The current version of the ConTeXt luametatex in use:
CONTEXTLMTX=$HOME/TeX/context-lmtx ; export CONTEXTLMTX
CONTEXTCURRENT=$CONTEXTLMTX ; export CONTEXTCURRENT
MYTEXMFHOME=$HOME/TeX/texmf ; export MYTEXMFHOME
TEXMF=$MYTEXMFHOME:$CONTEXTCURRENT/tex ; export TEXMF
PATH=$CONTEXTCURRENT/tex/texmf-osx-64/bin:$PATH ; export PATH

Log shows: ConTeXt  ver: 2019.10.02 12:53 MKIV beta  fmt: 2019.10.2

I am doing something wrong here?

dr. Hans van der Meer


> On 28 Feb 2020, at 12:07, Hans Hagen <j.hagen@xs4all.nl> wrote:
> 
> On 2/28/2020 11:48 AM, Christoph Hintermüller wrote:
>> Hi
>> Hust not to miss something or mess up every thing.
>> Can i setup my document preamble such that i can without any switching
>> create pdf and epub output at the same time.
>> Want to provide my lecture notes in pdf and epub format.
>> In other words does it have any side effects on pdf output, if i put
>> \setuptoutput command preparing document for xhtml/epub output in my
>> document preamble/main document?
>> Or would i have to enclose this in some \ifelse conditional block? If
>> is there a possibility to control condition from mtxrun command line?
> Currently it is created at the same time but it runs slower. Indeed using some mode makes sense because you might also want to have a different layout (the simpler, the less possible side effects, actually when doing epub or export using some very large page also makes sense as then there can be less interference of page breaks and so).
> 
> \startmode [epub]
>  ....
> \stopmode
> 
> and then run with --mode=epub
> 
> Hans
> 
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


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

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
  2020-03-03 18:37   ` Hans van der Meer
@ 2020-03-03 18:47     ` Wolfgang Schuster
  2020-03-03 20:58       ` Hans van der Meer
  0 siblings, 1 reply; 18+ messages in thread
From: Wolfgang Schuster @ 2020-03-03 18:47 UTC (permalink / raw)
  To: ntg-context

On Tue, 3 Mar 2020 19:37:47 +0100
Hans van der Meer <havdmeer@ziggo.nl> wrote:

> > 
> > and then run with --mode=epub
> 
> I am running with:
>     mtxrun --autogenerate --mode=epub --script context "$1"
> but no epub document is generated, just the same result.pdf I get without that mode.

You need

  \setupbackend[export=yes]

in your document. When you put the setup above in a "epub"
mode you create a epub-document only when you enable the mode
which is recommended because it can have side effects for
the normal PDF.

To avoid these side effects make an extra ConTeXt run
by enabling the mode to get the epub file.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
  2020-03-03 18:47     ` Wolfgang Schuster
@ 2020-03-03 20:58       ` Hans van der Meer
  2020-03-03 21:02         ` Wolfgang Schuster
  2020-03-03 21:04         ` Rik Kabel
  0 siblings, 2 replies; 18+ messages in thread
From: Hans van der Meer @ 2020-03-03 20:58 UTC (permalink / raw)
  To: NTG ConTeXt

I followed your advice and added the setup:

> You need
>  \setupbackend[export=yes]
> in your document. 

This, however, does not result in an .epub file but an export directory containing an html and xhtml file (only partially conformant to the equivalent pdf).

Can I get the output as an .epub file? Some more changes needed?

> 
> On Tue, 3 Mar 2020 19:37:47 +0100
> Hans van der Meer <havdmeer@ziggo.nl> wrote:
> 
>>> 
>>> and then run with --mode=epub
>> 
>> I am running with:
>>    mtxrun --autogenerate --mode=epub --script context "$1"
>> but no epub document is generated, just the same result.pdf I get without that mode.
> 
> You need
> 
>  \setupbackend[export=yes]
> 
> in your document. When you put the setup above in a "epub"
> mode you create a epub-document only when you enable the mode
> which is recommended because it can have side effects for
> the normal PDF.
> 
> To avoid these side effects make an extra ConTeXt run
> by enabling the mode to get the epub file.
> 
> Wolfgang
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
  2020-03-03 20:58       ` Hans van der Meer
@ 2020-03-03 21:02         ` Wolfgang Schuster
  2020-03-03 21:04         ` Rik Kabel
  1 sibling, 0 replies; 18+ messages in thread
From: Wolfgang Schuster @ 2020-03-03 21:02 UTC (permalink / raw)
  To: ntg-context

On Tue, 3 Mar 2020 21:58:16 +0100
Hans van der Meer <havdmeer@ziggo.nl> wrote:

> I followed your advice and added the setup:
> 
> > You need
> >  \setupbackend[export=yes]
> > in your document. 
> 
> This, however, does not result in an .epub file but an export directory containing an html and xhtml file (only partially conformant to the equivalent pdf).
> 
> Can I get the output as an .epub file? Some more changes needed?

Your log file should have a line like this when you put the \setupbackend setting in your document:

backend         > export > create epub with: mtxrun --script epub --make "test" [--purge --rename --svgmath]

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
  2020-03-03 20:58       ` Hans van der Meer
  2020-03-03 21:02         ` Wolfgang Schuster
@ 2020-03-03 21:04         ` Rik Kabel
  2020-03-04  7:49           ` Jan U. Hasecke
  2020-03-04 12:23           ` epub and pdf not the same Hans van der Meer
  1 sibling, 2 replies; 18+ messages in thread
From: Rik Kabel @ 2020-03-03 21:04 UTC (permalink / raw)
  To: ntg-context

Instructions for creating the .epub from the export are contained in the 
log file.

On 3/3/2020 15:58, Hans van der Meer wrote:
> I followed your advice and added the setup:
>
>> You need
>>   \setupbackend[export=yes]
>> in your document.
> This, however, does not result in an .epub file but an export directory containing an html and xhtml file (only partially conformant to the equivalent pdf).
>
> Can I get the output as an .epub file? Some more changes needed?
>
>> On Tue, 3 Mar 2020 19:37:47 +0100
>> Hans van der Meer <havdmeer@ziggo.nl> wrote:
>>
>>>> and then run with --mode=epub
>>> I am running with:
>>>     mtxrun --autogenerate --mode=epub --script context "$1"
>>> but no epub document is generated, just the same result.pdf I get without that mode.
>> You need
>>
>>   \setupbackend[export=yes]
>>
>> in your document. When you put the setup above in a "epub"
>> mode you create a epub-document only when you enable the mode
>> which is recommended because it can have side effects for
>> the normal PDF.
>>
>> To avoid these side effects make an extra ConTeXt run
>> by enabling the mode to get the epub file.
>>
>> Wolfgang
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!
>>
>> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki     : http://contextgarden.net
>> ___________________________________________________________________________________
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
  2020-03-03 21:04         ` Rik Kabel
@ 2020-03-04  7:49           ` Jan U. Hasecke
  2020-03-04  8:51             ` Hans Hagen
  2020-03-04 10:02             ` Henning Hraban Ramm
  2020-03-04 12:23           ` epub and pdf not the same Hans van der Meer
  1 sibling, 2 replies; 18+ messages in thread
From: Jan U. Hasecke @ 2020-03-04  7:49 UTC (permalink / raw)
  To: ntg-context

Am 03.03.20 um 22:04 schrieb Rik Kabel:
> Instructions for creating the .epub from the export are contained in the
> log file.

Has anyone ever got an epub that validates?

juh
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
  2020-03-04  7:49           ` Jan U. Hasecke
@ 2020-03-04  8:51             ` Hans Hagen
  2020-03-04  9:31               ` luigi scarso
  2020-03-04 10:02             ` Henning Hraban Ramm
  1 sibling, 1 reply; 18+ messages in thread
From: Hans Hagen @ 2020-03-04  8:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Jan U. Hasecke

On 3/4/2020 8:49 AM, Jan U. Hasecke wrote:
> Am 03.03.20 um 22:04 schrieb Rik Kabel:
>> Instructions for creating the .epub from the export are contained in the
>> log file.
> 
> Has anyone ever got an epub that validates?
last time i looked into it i found that there was no real consustency in 
checking (apart from device specific issues) so i gave up on that

anyway, an export is not per se an epub .. one might for instance add 
additional css

(in the meantime i actually gave away my ebook reader ... now i wait 
till color shows up in e-ink which might give me a reason to play a bit 
more)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
  2020-03-04  8:51             ` Hans Hagen
@ 2020-03-04  9:31               ` luigi scarso
  2020-03-04  9:46                 ` Hans Hagen
  0 siblings, 1 reply; 18+ messages in thread
From: luigi scarso @ 2020-03-04  9:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Wed, Mar 4, 2020 at 9:51 AM Hans Hagen <j.hagen@xs4all.nl> wrote:

>
> (in the meantime i actually gave away my ebook reader ... now i wait
> till color shows up in e-ink which might give me a reason to play a bit
> more)
>
>
https://news.lenovo.com/pressroom/press-releases/lenovo-unveils-preview-worlds-first-foldable-pc-thinkpad-x1-family/

>
sound quite interesting ....

-- 
luigi

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

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
  2020-03-04  9:31               ` luigi scarso
@ 2020-03-04  9:46                 ` Hans Hagen
  0 siblings, 0 replies; 18+ messages in thread
From: Hans Hagen @ 2020-03-04  9:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 3/4/2020 10:31 AM, luigi scarso wrote:
> 
> 
> On Wed, Mar 4, 2020 at 9:51 AM Hans Hagen <j.hagen@xs4all.nl 
> <mailto:j.hagen@xs4all.nl>> wrote:
> 
> 
>     (in the meantime i actually gave away my ebook reader ... now i wait
>     till color shows up in e-ink which might give me a reason to play a bit
>     more)
> 
> https://news.lenovo.com/pressroom/press-releases/lenovo-unveils-preview-worlds-first-foldable-pc-thinkpad-x1-family/
> 
> sound quite interesting ....
yes, but i wonder how the spine will hold (samsung already found out the 
hard way) .. ok, if we see it as a spine we can live with a middle area 
that degrades over time i guess (but it will not last for decades, like 
books do)

(Unfortunately these gadgets are too expensive to experiment and play 
around with.)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Quick question about dual output pdf and epub
  2020-03-04  7:49           ` Jan U. Hasecke
  2020-03-04  8:51             ` Hans Hagen
@ 2020-03-04 10:02             ` Henning Hraban Ramm
  1 sibling, 0 replies; 18+ messages in thread
From: Henning Hraban Ramm @ 2020-03-04 10:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2020-03-04 um 08:49 schrieb Jan U. Hasecke <juh+ntg-context@mailbox.org>:
> Am 03.03.20 um 22:04 schrieb Rik Kabel:
>> Instructions for creating the .epub from the export are contained in the
>> log file.
> Has anyone ever got an epub that validates?

Only with a lot of manual corrections.

I use the "raw" XML export, a bunch of XSL templates and a shell script, but still need to put stuff in place manually (i.e. everything that’s just visually formatted like the inner title and imprint).

I’m working on enhancing my workflow to at least succeed with epubcheck. I’ll probably need more than XSLT to e.g. check for image files (since I don’t use the file extension in ConTeXt, the XML processor can’t know if it’s a JPEG, PNG or PDF) etc. Maybe use Python instead of Shell + XSLT.

Our eBook distributor (BookWire) has even higher demands or checks better than the official epubcheck. (There are even example files in the consortiums’s GitHub that don’t validate.)


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* epub and pdf not the same
  2020-03-03 21:04         ` Rik Kabel
  2020-03-04  7:49           ` Jan U. Hasecke
@ 2020-03-04 12:23           ` Hans van der Meer
  2020-03-04 16:30             ` Wolfgang Schuster
  1 sibling, 1 reply; 18+ messages in thread
From: Hans van der Meer @ 2020-03-04 12:23 UTC (permalink / raw)
  To: NTG ConTeXt


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



> On 3 Mar 2020, at 22:04, Rik Kabel <context@rik.users.panix.com> wrote:
> 
> Instructions for creating the .epub from the export are contained in the log file.

In the log comes:
    create epub with: mtxrun --script epub --make "kookboek" --purge --rename --svgmath
This I did.

The log gives:
 adding: mimetype (stored 0%)
  adding: META-INF/ (stored 0%)
  adding: META-INF/container.xml (deflated 32%)
  adding: OEBPS/ (stored 0%)
  adding: OEBPS/nav.xhtml (deflated 49%)
  adding: OEBPS/images/ (stored 0%)
  adding: OEBPS/kookboek.opf (deflated 65%)
  adding: OEBPS/styles/ (stored 0%)
  adding: OEBPS/styles/kookboek-styles.css (deflated 35%)
  adding: OEBPS/styles/kookboek-defaults.css (deflated 80%)
  adding: OEBPS/styles/kookboek-images.css (deflated 7%)
  adding: OEBPS/cover.xhtml (deflated 38%)
  adding: OEBPS/kookboek-div.html (deflated 67%)
  adding: OEBPS/toc.ncx (deflated 53%)
mtx-epub        | epub archive made using zip: kookboek.epub


But, the resulting epub is bad. Compare the output as pdf with the output as epub and it is immediately clear that something is wrong in the production of the epub. See also the corresponding -raw.xml. Unless I am making a gross mistake.



dr. Hans van der Meer


[-- Attachment #1.2.1: Type: text/html, Size: 6044 bytes --]

[-- Attachment #1.2.2: kookboek.epub --]
[-- Type: application/epub+zip, Size: 9071 bytes --]

[-- Attachment #1.2.3: Type: text/html, Size: 249 bytes --]

[-- Attachment #1.2.4: kookboek.pdf --]
[-- Type: application/pdf, Size: 19573 bytes --]

[-- Attachment #1.2.5: Type: text/html, Size: 249 bytes --]

[-- Attachment #1.2.6: kookboek-raw.xml --]
[-- Type: application/xml, Size: 2642 bytes --]

[-- Attachment #1.2.7: Type: text/html, Size: 421 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: epub and pdf not the same
  2020-03-04 12:23           ` epub and pdf not the same Hans van der Meer
@ 2020-03-04 16:30             ` Wolfgang Schuster
  0 siblings, 0 replies; 18+ messages in thread
From: Wolfgang Schuster @ 2020-03-04 16:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hans van der Meer schrieb am 04.03.2020 um 13:23:
>> On 3 Mar 2020, at 22:04, Rik Kabel <context@rik.users.panix.com 
>> <mailto:context@rik.users.panix.com>> wrote:
>>
>> Instructions for creating the .epub from the export are contained in 
>> the log file.
>
> In the log comes:
>     create epub with: mtxrun --script epub --make "kookboek" --purge 
> --rename --svgmath
> This I did.
>
> The log gives:
>  adding: mimetype (stored 0%)
>   adding: META-INF/ (stored 0%)
>   adding: META-INF/container.xml (deflated 32%)
>   adding: OEBPS/ (stored 0%)
>   adding: OEBPS/nav.xhtml (deflated 49%)
>   adding: OEBPS/images/ (stored 0%)
>   adding: OEBPS/kookboek.opf (deflated 65%)
>   adding: OEBPS/styles/ (stored 0%)
>   adding: OEBPS/styles/kookboek-styles.css (deflated 35%)
>   adding: OEBPS/styles/kookboek-defaults.css (deflated 80%)
>   adding: OEBPS/styles/kookboek-images.css (deflated 7%)
>   adding: OEBPS/cover.xhtml (deflated 38%)
>   adding: OEBPS/kookboek-div.html (deflated 67%)
>   adding: OEBPS/toc.ncx (deflated 53%)
> mtx-epub     | epub archive made using zip: kookboek.epub
>
>
> But, the resulting epub is bad. Compare the output as pdf with the 
> output as epub and it is immediately clear that something is wrong in 
> the production of the epub. See also the corresponding -raw.xml. 
> Unless I am making a gross mistake.

You make things easier when you show your TeX file.

Wolfgang


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

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2020-03-04 16:30 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-28 10:48 Quick question about dual output pdf and epub Christoph Hintermüller
2020-02-28 11:07 ` Hans Hagen
2020-02-28 14:09   ` Henning Hraban Ramm
     [not found]   ` <136b07463b64fcaa4e9b1850c030527a011570ab.camel@out-world.com>
2020-02-28 21:39     ` Hans Hagen
2020-03-01 13:05       ` Christoph Hintermüller
2020-03-03 18:37   ` Hans van der Meer
2020-03-03 18:47     ` Wolfgang Schuster
2020-03-03 20:58       ` Hans van der Meer
2020-03-03 21:02         ` Wolfgang Schuster
2020-03-03 21:04         ` Rik Kabel
2020-03-04  7:49           ` Jan U. Hasecke
2020-03-04  8:51             ` Hans Hagen
2020-03-04  9:31               ` luigi scarso
2020-03-04  9:46                 ` Hans Hagen
2020-03-04 10:02             ` Henning Hraban Ramm
2020-03-04 12:23           ` epub and pdf not the same Hans van der Meer
2020-03-04 16:30             ` Wolfgang Schuster
2020-02-28 11:07 ` Quick question about dual output pdf and epub Hans Hagen

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