Re: [NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-19 Thread Keith Schultz
Hi Hans,

I have been playing with the on using LaTeX and later LuaLaTeX
for create epub or ebook. Though I have not got around to.


The idea was to set enviorments, macros and commands that would depending
on a switch that would output the need HTML and epub structure or
call the normal *TeX ones.

In ConTeXt maybe the mode-system could be used.
Like I said I have not investigated deeply, yet.

regards
Keith.
 
 Am 18.02.2015 um 17:54 schrieb Hans Hagen pra...@wxs.nl:
 
 On 2/17/2015 10:01 PM, Keith Schultz wrote:
 
 
 Context outputs three varants: regular xml, xhtml, and stupified xhtml
 with div/class tagging. The last one is supposed to work on all
 devices as it doesn't demands anything beyond css.
 If that is the case it is not very useful for a decent workflow. There
 would be to much to
 tweak to make good looking output.
 
 i'm not sure what you have in mind but context is a typesetting system and as 
 such cannot produce an epub simply because epub is a blob of xml (html) with 
 a css packages in a zip
 

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-18 Thread Henning Hraban Ramm

Am 2015-02-18 um 04:37 schrieb Aditya Mahajan adit...@umich.edu:

 On Tue, 17 Feb 2015, Hans Hagen wrote:
 
 Context outputs three varants: regular xml, xhtml, and stupified xhtml with 
 div/class tagging. The last one is supposed to work on all devices as it 
 doesn't demands anything beyond css.
 
 The XML generated by ConTeXt is very well structured. So, an option is to 
 simply provide XLST stylesheets that transform ConTeXT-XML to 
 XHTML/HTML5/whatever.
 
 Such XLST transformation will be better than have ConTeXt chase a moving 
 target.

See e.g. http://wiki.contextgarden.net/Epub_Sample

I’ll try to update the pages about ConTeXt’s current export soon, since I have 
a new book in the pipeline.

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-18 Thread Hans Hagen

On 2/17/2015 10:01 PM, Keith Schultz wrote:



Am 17.02.2015 um 21:16 schrieb Hans Hagen pra...@wxs.nl
mailto:pra...@wxs.nl:

On 2/17/2015 8:24 AM, Keith J. Schultz wrote:

Hi Axel, All,



[snip, snip]

IMHO : ConTeXt should not output XHMTL for epub, but HMTL5.
Yes, yes, I know XHMTL is part of HMTL5.


And html 5 is just html with some extras (and assuming javascript i
guess) ... marketing.

The html 5 standard is far more. For one is makes flash, java and more
obsolete. Far more than a marketing gag!


well, if javascript is used instead it's still fluent ... every time i 
played with e.g. jquery or libraries i had to make sure i used the 
latest and had to adapt code .. there will be something new (and maybe 
even different) every decade (if only because that generates money)



Another question for me is if ConTeXt should also output code for
the iBooks epub format, (Basicaly epub, but some extras).


Isn't a book supposed to be independent and kind of portable + long
term visible? So no way that a context epub will be specific for a
device. (I probably can't even get it on / test it on my outdated ipad
1 anyway.)

I was thinking more along the line of the spine.


ah, direct neural injection ...


There are thing you can do in/with ConTeXt that would work with iBooks
that do not in „ordinary“ epub books.

Then, there is the Kindle format one might want to consider!


Another lock-in device.


Another, question which needs investigation is if the ConTeXt output for
epub,
also, implementing the fallbacks for missing features which is required?


Context outputs three varants: regular xml, xhtml, and stupified xhtml
with div/class tagging. The last one is supposed to work on all
devices as it doesn't demands anything beyond css.

If that is the case it is not very useful for a decent workflow. There
would be to much to
tweak to make good looking output.


i'm not sure what you have in mind but context is a typesetting system 
and as such cannot produce an epub simply because epub is a blob of xml 
(html) with a css packages in a zip



I have not investigated how it handles dimensions, widths, font sizes,
spacing, etc.


structure normally doesn't carry that information


These are important in order to create output that adjust proper to the
 devices capabilities.
One should avoid absolute values.


there are hardly any values output ... but one can of course extend the 
css with font and color directives, probably different from the ones 
used in the pdf



Of course if we want to emulate the printed output then we could simply
create a pdf or very page as pdf and put in an epub wrapper.


i've seen impressive examples of pdf turned html (huge html files btw)

(fyi: i see pdf and html as independent things)

(and i don't believe in reflow of pdf: it's either a design for made up 
pages or a flexible adaptive one as in html; and till now i never wished 
a paper book to reflow itself anyway but maybe if i really would use an 
epub device ... who knows ... i don't own ebooks currently as i cannot 
share docs freely then like i share books and i consider ebooks to be 
way too expensive for fun)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-18 Thread Hans Hagen

On 2/17/2015 11:37 PM, Aditya Mahajan wrote:

On Tue, 17 Feb 2015, Hans Hagen wrote:


Context outputs three varants: regular xml, xhtml, and stupified xhtml
with div/class tagging. The last one is supposed to work on all
devices as it doesn't demands anything beyond css.


The XML generated by ConTeXt is very well structured. So, an option is
to simply provide XLST stylesheets that transform ConTeXT-XML to
XHTML/HTML5/whatever.

Such XLST transformation will be better than have ConTeXt chase a moving
target.


indeed, and the context wiki can provide useful examples

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-18 Thread Keith J. Schultz
Hi Hraban,

Good to know. I will investigate at another time and give feed back.
I am in the middle of moving, so I do not have much time.

We ought to think of making a export specific to epub in the long run!
 
regards
Keith.
 Am 18.02.2015 um 09:14 schrieb Henning Hraban Ramm te...@fiee.net:
 
 
 Am 2015-02-18 um 04:37 schrieb Aditya Mahajan adit...@umich.edu:
 
 On Tue, 17 Feb 2015, Hans Hagen wrote:
 
 Context outputs three varants: regular xml, xhtml, and stupified xhtml with 
 div/class tagging. The last one is supposed to work on all devices as it 
 doesn't demands anything beyond css.
 
 The XML generated by ConTeXt is very well structured. So, an option is to 
 simply provide XLST stylesheets that transform ConTeXT-XML to 
 XHTML/HTML5/whatever.
 
 Such XLST transformation will be better than have ConTeXt chase a moving 
 target.
 
 See e.g. http://wiki.contextgarden.net/Epub_Sample
 
 I’ll try to update the pages about ConTeXt’s current export soon, since I 
 have a new book in the pipeline.
 
 Greetlings, Hraban
 ---
 http://www.fiee.net
 http://wiki.contextgarden.net
 https://www.cacert.org (I'm an assurer)
 
 ___
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-18 Thread Henning Hraban Ramm

Am 2015-02-18 um 20:10 schrieb Keith J. Schultz keithjschu...@web.de:

 Hi Hraban,
 
 Good to know. I will investigate at another time and give feed back.
 I am in the middle of moving, so I do not have much time.
 
 We ought to think of making a export specific to epub in the long run!

For me, the regular export XML plus XSL conversion is the way to go; the „HTML“ 
is rather unusable.
The epub script is nice and all, it was important for me to get me running, but 
I guess I won’t use it in my final workflow.


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-18 Thread Hans Hagen

On 2/18/2015 3:10 PM, Keith J. Schultz wrote:

Hi Hraban,

Good to know. I will investigate at another time and give feed back.
I am in the middle of moving, so I do not have much time.

We ought to think of making a export specific to epub in the long run!


The export is not really geared at that, as it's a representation of the 
rendering (although structured). The additional html output can be used 
for previewing and to what extend it's okay depends on the intended use.


Normally one starts from a neutral source (xml or tex) and then produces 
different output. So, for specific epub (or whatever) one can either 
start with the original code (xml) or manipulate what comes out of the 
export. The export is kind of standard so one can build all kind of 
scripts to convert it. There is no universal epub (rendering) solution, 
just as there is no universal pdf layout.


Of course the idea is that the default export is good enough for simple 
documents. What more gets provided depends on needs (and currently at 
least I have no need for epub other than a dedicated pdf suitable for 
displays).


Hans



regards
Keith.

Am 18.02.2015 um 09:14 schrieb Henning Hraban Ramm te...@fiee.net:


Am 2015-02-18 um 04:37 schrieb Aditya Mahajan adit...@umich.edu:


On Tue, 17 Feb 2015, Hans Hagen wrote:


Context outputs three varants: regular xml, xhtml, and stupified xhtml with 
div/class tagging. The last one is supposed to work on all devices as it 
doesn't demands anything beyond css.


The XML generated by ConTeXt is very well structured. So, an option is to 
simply provide XLST stylesheets that transform ConTeXT-XML to 
XHTML/HTML5/whatever.

Such XLST transformation will be better than have ConTeXt chase a moving target.


See e.g. http://wiki.contextgarden.net/Epub_Sample

I’ll try to update the pages about ConTeXt’s current export soon, since I have 
a new book in the pipeline.

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-17 Thread Hans Hagen

On 2/17/2015 8:24 AM, Keith J. Schultz wrote:

Hi Axel, All,

You have mentioned that most current ebook readers can not display MathML.

Well, the problem lies in the epub guidelines for the readers.

The problem is even worse. many readers do not even implement the full HTML5
standard. though that is the standard used in the latest epub stadnard.
The fact is to be considered epub readers the do not have to, it is a
problem
of the epub reader definition.

The problem is what should ConTeXt output?
Should it output code that implements according to the full epub standard
OR JUST
what is handled by most epub readers!

IMHO : ConTeXt should not output XHMTL for epub, but HMTL5.
Yes, yes, I know XHMTL is part of HMTL5.


And html 5 is just html with some extras (and assuming javascript i 
guess) ... marketing.



Another question for me is if ConTeXt should also output code for
the iBooks epub format, (Basicaly epub, but some extras).


Isn't a book supposed to be independent and kind of portable + long term 
visible? So no way that a context epub will be specific for a device. (I 
probably can't even get it on / test it on my outdated ipad 1 anyway.)



There are thing you can do in/with ConTeXt that would work with iBooks
that do not in „ordinary“ epub books.

Then, there is the Kindle format one might want to consider!


Another lock-in device.


Another, question which needs investigation is if the ConTeXt output for
epub,
also, implementing the fallbacks for missing features which is required?


Context outputs three varants: regular xml, xhtml, and stupified xhtml 
with div/class tagging. The last one is supposed to work on all devices 
as it doesn't demands anything beyond css.



Just some added thoughts.

Basically, you can only expect ConTeXts epub output to be a starting
point that
then has to be tweak.


Indeed, as it's all xml one can process it into something 'better'. 
There is no way we can adapt to every change in specs, so the best we 
can do is something generic.


Hans


regards
Keith.


Am 17.02.2015 um 07:11 schrieb Axel Kielhorn t...@axelkielhorn.de
mailto:t...@axelkielhorn.de:

[...]
Yes I know.
Let me rephrase the question:

Should the symbols used in epub be identical to those used in the pdf
or should the css determine the look of the symbols?
Especially when one considers that most current ebook readers can't
display MathML.

Even if I substitute the Symbols:

\definesymbol[uni1][•]
\definesymbol[uni2][–]
\definesymbol[uni3][*]
\definesymbol[uni4][·]

\setupitemgroup [itemize] [1] [symbol=uni1]
\setupitemgroup [itemize] [2] [symbol=uni2]
\setupitemgroup [itemize] [3] [symbol=uni3]
\setupitemgroup [itemize] [4] [symbol=uni4]

I get a result that neither ADE nor Calibre interprets as a list.
(Wrapping it in ul /ul doesn't help.)





___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-17 Thread Keith Schultz

 Am 17.02.2015 um 21:16 schrieb Hans Hagen pra...@wxs.nl:
 
 On 2/17/2015 8:24 AM, Keith J. Schultz wrote:
 Hi Axel, All,
 
 
[snip, snip]
 IMHO : ConTeXt should not output XHMTL for epub, but HMTL5.
 Yes, yes, I know XHMTL is part of HMTL5.
 
 And html 5 is just html with some extras (and assuming javascript i guess) 
 ... marketing.
The html 5 standard is far more. For one is makes flash, java and more 
obsolete. Far more than a marketing gag! 
 
 Another question for me is if ConTeXt should also output code for
 the iBooks epub format, (Basicaly epub, but some extras).
 
 Isn't a book supposed to be independent and kind of portable + long term 
 visible? So no way that a context epub will be specific for a device. (I 
 probably can't even get it on / test it on my outdated ipad 1 anyway.)
I was thinking more along the line of the spine.
 
 There are thing you can do in/with ConTeXt that would work with iBooks
 that do not in „ordinary“ epub books.
 
 Then, there is the Kindle format one might want to consider!
 
 Another lock-in device.
 
 Another, question which needs investigation is if the ConTeXt output for
 epub,
 also, implementing the fallbacks for missing features which is required?
 
 Context outputs three varants: regular xml, xhtml, and stupified xhtml with 
 div/class tagging. The last one is supposed to work on all devices as it 
 doesn't demands anything beyond css.
If that is the case it is not very useful for a decent workflow. There 
would be to much to
tweak to make good looking output.

I have not investigated how it handles dimensions, widths, font sizes, 
spacing, etc.
These are important in order to create output that adjust proper to the
devices capabilities. 
One should avoid absolute values.

Of course if we want to emulate the printed output then we could simply
create a pdf or very page as pdf and put in an epub wrapper.


Not asking for anything, just mentioning it.

reagrds
Keith.

___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Epub format Was: Re: Context to epub: itemize

2015-02-17 Thread Aditya Mahajan

On Tue, 17 Feb 2015, Hans Hagen wrote:

Context outputs three varants: regular xml, xhtml, and stupified xhtml 
with div/class tagging. The last one is supposed to work on all devices 
as it doesn't demands anything beyond css.


The XML generated by ConTeXt is very well structured. So, an option is to 
simply provide XLST stylesheets that transform ConTeXT-XML to 
XHTML/HTML5/whatever.


Such XLST transformation will be better than have ConTeXt chase a moving 
target.


Aditya
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___