ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Context to epub: itemize
@ 2015-02-16 16:17 Axel Kielhorn
  2015-02-16 18:55 ` Hans Hagen
  0 siblings, 1 reply; 14+ messages in thread
From: Axel Kielhorn @ 2015-02-16 16:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

Hi,

I'm trying to generate epub from ConTeXt and I couldn't get the itemize environment to work.

I follow http://wiki.contextgarden.net/ePub and get the structure described but when I look into the xhtml, there is no itemize environment. (At least no with Safari, Firefox or Calibre.) When use vi I see something that looks like my items in a very complex form.

I was expecting something like

<ul>
  <li>   </li>
  <li>   </li>
</ul>

but i see

<div class="itemgroup itemize level-1 symbol-1">
  <div class="item">
    <div class="itemtag"><m:math display="inline" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>•</m:mo></m:math></div>
    <div class="itemcontent">Listenpunkt 1</div>
  </div>
  <div class="item">
    <div class="itemtag"><m:math display="inline" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>•</m:mo></m:math></div>
    <div class="itemcontent">Listenpunkt 2 
      <div class="itemgroup itemize level-2 symbol-2">
      <div class="item">
      <div class="itemtag"><m:math display="inline" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>−</m:mo></m:math></div>
    <div class="itemcontent">Listenpunkt 2.1</div></div> 
    <div class="item">
    <div class="itemtag"><m:math display="inline" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>−</m:mo></m:math></div>
    <div class="itemcontent">Listenpunkt 2.2</div></div></div></div>
    </div>

Shouldn't the itemtag definition come from the default.css instead of using MathML?

itemgroup[symbol="1"], div.itemgroup.symbol-1 { list-style-type : disc ; }

I’m using: mtx-context     | current version: 2015.02.03 23:55

and

context --script epub --make epub_mwe

to create the epub.

Axel


[-- Attachment #2: epub_mwe.tex --]
[-- Type: application/octet-stream, Size: 1758 bytes --]

% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = ConTeXt (LuaTeX beta)

\setupbackend[export=yes,xhtml=yes]

\setupexport
   [title={Beispieldokument},
    author={Axel Kielhorn},
   ]

\settaggedmetadata[
	% here you can set as many metadata entries as you like
	title={Beispieldokument},
	author={Axel Kielhorn},
	subtitle={},
]

\mainlanguage[de]
\setuppapersize [A4][A4]
\setuplayout    [width=middle,  backspace=1.5in, cutspace=1.5in,
                 height=middle, topspace=0.75in, bottomspace=0.75in]

\starttext


\startsection[
  reference=auflistungen,
  title={Auflistungen}
  ]

\startparagraph
Hier folgt eine einfach Liste, die als Auflistung dient. Die Liste wird
auch noch dreifach verschachtelt.
\stopparagraph

\startitemize
  \startitem Listenpunkt 1 \stopitem
  \startitem Listenpunkt 2 \stopitem

  \startitemize
    \startitem Listenpunkt 2.1 \stopitem
    \startitem Listenpunkt 2.2 \stopitem
  \stopitemize

\startitem Listenpunkt 3 \stopitem
\startitem Listenpunkt 4 \stopitem

  \startitemize
    \startitem Listenpunkt 4.1 \stopitem
    \startitem Listenpunkt 4.2 \stopitem

    \startitemize
      \startitem Listenpunkt 4.2.1 \stopitem
      \startitem Listenpunkt 4.2.2 \stopitem
    \stopitemize
  \stopitemize
\stopitemize

\startparagraph
Es folgt noch eine Liste, bei der der Listenpunkt mit
überschrieben wurde. Dazu definiert man ein neues Symbol mit \type{\definesymbol} und verwendet es durch den \type{setupitemgroup} Befehl.
\stopparagraph

{
\definesymbol[itemneu][{$\diamond$}]
\setupitemgroup[symbol=itemneu]
\startitemize
  \startitem Listenpunkt 1 \stopitem
  \startitem Listenpunkt 2 \stopitem
\stopitemize
}
\stopsection

\stoptext

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





[-- Attachment #4: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Context to epub: itemize
  2015-02-16 16:17 Context to epub: itemize Axel Kielhorn
@ 2015-02-16 18:55 ` Hans Hagen
  2015-02-17  6:11   ` Axel Kielhorn
  0 siblings, 1 reply; 14+ messages in thread
From: Hans Hagen @ 2015-02-16 18:55 UTC (permalink / raw)
  To: ntg-context

On 2/16/2015 5:17 PM, Axel Kielhorn wrote:
> Hi,
>
> I'm trying to generate epub from ConTeXt and I couldn't get the itemize environment to work.
>
> I follow http://wiki.contextgarden.net/ePub and get the structure described but when I look into the xhtml, there is no itemize environment. (At least no with Safari, Firefox or Calibre.) When use vi I see something that looks like my items in a very complex form.
>
> I was expecting something like
>
> <ul>
>    <li>   </li>
>    <li>   </li>
> </ul>
>
> but i see
>
> <div class="itemgroup itemize level-1 symbol-1">
>    <div class="item">
>      <div class="itemtag"><m:math display="inline" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>•</m:mo></m:math></div>
>      <div class="itemcontent">Listenpunkt 1</div>
>    </div>
>    <div class="item">
>      <div class="itemtag"><m:math display="inline" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>•</m:mo></m:math></div>
>      <div class="itemcontent">Listenpunkt 2
>        <div class="itemgroup itemize level-2 symbol-2">
>        <div class="item">
>        <div class="itemtag"><m:math display="inline" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>−</m:mo></m:math></div>
>      <div class="itemcontent">Listenpunkt 2.1</div></div>
>      <div class="item">
>      <div class="itemtag"><m:math display="inline" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>−</m:mo></m:math></div>
>      <div class="itemcontent">Listenpunkt 2.2</div></div></div></div>
>      </div>
>
> Shouldn't the itemtag definition come from the default.css instead of using MathML?
>
> itemgroup[symbol="1"], div.itemgroup.symbol-1 { list-style-type : disc ; }
>
> I’m using: mtx-context     | current version: 2015.02.03 23:55
>
> and
>
> context --script epub --make epub_mwe
>
> to create the epub.

the bullets come from math fonts (currently, awaiting additional symbols 
in the text fonts)

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
___________________________________________________________________________________

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

* Re: Context to epub: itemize
  2015-02-16 18:55 ` Hans Hagen
@ 2015-02-17  6:11   ` Axel Kielhorn
  2015-02-17  7:24     ` Epub format Was: " Keith J. Schultz
  0 siblings, 1 reply; 14+ messages in thread
From: Axel Kielhorn @ 2015-02-17  6:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 16.02.2015 um 19:55 schrieb Hans Hagen <pragma@wxs.nl>:

> On 2/16/2015 5:17 PM, Axel Kielhorn wrote:
>> Hi,
>> 
>> I'm trying to generate epub from ConTeXt and I couldn't get the itemize environment to work.
>> 
>> I follow http://wiki.contextgarden.net/ePub and get the structure described but when I look into the xhtml, there is no itemize environment. (At least no with Safari, Firefox or Calibre.) When use vi I see something that looks like my items in a very complex form.
>> 
>> I was expecting something like
>> 
>> <ul>
>>   <li>   </li>
>>   <li>   </li>
>> </ul>
>> 
>> but i see
>> 
>> <div class="itemgroup itemize level-1 symbol-1">
>>   <div class="item">
>>     <div class="itemtag"><m:math display="inline" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>•</m:mo></m:math></div>
>>     <div class="itemcontent">Listenpunkt 1</div>
>>   </div>
>>   <div class="item">
>>     <div class="itemtag"><m:math display="inline" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>•</m:mo></m:math></div>
>>     <div class="itemcontent">Listenpunkt 2
>>       <div class="itemgroup itemize level-2 symbol-2">
>>       <div class="item">
>>       <div class="itemtag"><m:math display="inline" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>−</m:mo></m:math></div>
>>     <div class="itemcontent">Listenpunkt 2.1</div></div>
>>     <div class="item">
>>     <div class="itemtag"><m:math display="inline" xmlns:m="http://www.w3.org/1998/Math/MathML"><m:mo>−</m:mo></m:math></div>
>>     <div class="itemcontent">Listenpunkt 2.2</div></div></div></div>
>>     </div>
>> 
>> Shouldn't the itemtag definition come from the default.css instead of using MathML?
>> 
>> itemgroup[symbol="1"], div.itemgroup.symbol-1 { list-style-type : disc ; }
>> 
>> I’m using: mtx-context     | current version: 2015.02.03 23:55
>> 
>> and
>> 
>> context --script epub --make epub_mwe
>> 
>> to create the epub.
> 
> the bullets come from math fonts (currently, awaiting additional symbols in the text fonts)


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

Axel

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Epub format Was: Re:  Context to epub: itemize
  2015-02-17  6:11   ` Axel Kielhorn
@ 2015-02-17  7:24     ` Keith J. Schultz
  2015-02-17 20:16       ` Hans Hagen
  0 siblings, 1 reply; 14+ messages in thread
From: Keith J. Schultz @ 2015-02-17  7:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

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.

Another question for me is if ConTeXt should also output code for
the iBooks epub format, (Basicaly epub, but some extras).
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, question which needs investigation is if the ConTeXt output for epub,
also, implementing the fallbacks for missing features which is required?

Just some added thoughts.

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

regards
	Keith.

> Am 17.02.2015 um 07:11 schrieb Axel Kielhorn <tex@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.) 
> 


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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Epub format Was: Re:  Context to epub: itemize
  2015-02-17  7:24     ` Epub format Was: " Keith J. Schultz
@ 2015-02-17 20:16       ` Hans Hagen
  2015-02-17 21:01         ` Keith Schultz
  2015-02-17 22:37         ` Aditya Mahajan
  0 siblings, 2 replies; 14+ messages in thread
From: Hans Hagen @ 2015-02-17 20:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 <tex@axelkielhorn.de
>> <mailto:tex@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
___________________________________________________________________________________

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

* Re: Epub format Was: Re:  Context to epub: itemize
  2015-02-17 20:16       ` Hans Hagen
@ 2015-02-17 21:01         ` Keith Schultz
  2015-02-18 16:54           ` Hans Hagen
  2015-02-17 22:37         ` Aditya Mahajan
  1 sibling, 1 reply; 14+ messages in thread
From: Keith Schultz @ 2015-02-17 21:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


> Am 17.02.2015 um 21:16 schrieb Hans Hagen <pragma@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.


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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Epub format Was: Re: Context to epub: itemize
  2015-02-17 20:16       ` Hans Hagen
  2015-02-17 21:01         ` Keith Schultz
@ 2015-02-17 22:37         ` Aditya Mahajan
  2015-02-18  8:14           ` Henning Hraban Ramm
  2015-02-18 16:55           ` Hans Hagen
  1 sibling, 2 replies; 14+ messages in thread
From: Aditya Mahajan @ 2015-02-17 22:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

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

* Re: Epub format Was: Re: Context to epub: itemize
  2015-02-17 22:37         ` Aditya Mahajan
@ 2015-02-18  8:14           ` Henning Hraban Ramm
  2015-02-18 14:10             ` Keith J. Schultz
  2015-02-18 16:55           ` Hans Hagen
  1 sibling, 1 reply; 14+ messages in thread
From: Henning Hraban Ramm @ 2015-02-18  8:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 2015-02-18 um 04:37 schrieb Aditya Mahajan <adityam@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
___________________________________________________________________________________

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

* Re: Epub format Was: Re: Context to epub: itemize
  2015-02-18  8:14           ` Henning Hraban Ramm
@ 2015-02-18 14:10             ` Keith J. Schultz
  2015-02-18 14:21               ` Henning Hraban Ramm
  2015-02-18 16:44               ` Hans Hagen
  0 siblings, 2 replies; 14+ messages in thread
From: Keith J. Schultz @ 2015-02-18 14:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 <texml@fiee.net>:
> 
> 
> Am 2015-02-18 um 04:37 schrieb Aditya Mahajan <adityam@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
___________________________________________________________________________________

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

* Re: Epub format Was: Re: Context to epub: itemize
  2015-02-18 14:10             ` Keith J. Schultz
@ 2015-02-18 14:21               ` Henning Hraban Ramm
  2015-02-18 16:44               ` Hans Hagen
  1 sibling, 0 replies; 14+ messages in thread
From: Henning Hraban Ramm @ 2015-02-18 14:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 2015-02-18 um 20:10 schrieb Keith J. Schultz <keithjschultz@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
___________________________________________________________________________________

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

* Re: Epub format Was: Re: Context to epub: itemize
  2015-02-18 14:10             ` Keith J. Schultz
  2015-02-18 14:21               ` Henning Hraban Ramm
@ 2015-02-18 16:44               ` Hans Hagen
  1 sibling, 0 replies; 14+ messages in thread
From: Hans Hagen @ 2015-02-18 16:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 <texml@fiee.net>:
>>
>>
>> Am 2015-02-18 um 04:37 schrieb Aditya Mahajan <adityam@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
___________________________________________________________________________________

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

* Re: Epub format Was: Re:  Context to epub: itemize
  2015-02-17 21:01         ` Keith Schultz
@ 2015-02-18 16:54           ` Hans Hagen
  2015-02-19  9:27             ` Keith Schultz
  0 siblings, 1 reply; 14+ messages in thread
From: Hans Hagen @ 2015-02-18 16:54 UTC (permalink / raw)
  To: ntg-context

On 2/17/2015 10:01 PM, Keith Schultz wrote:
>
>> Am 17.02.2015 um 21:16 schrieb Hans Hagen <pragma@wxs.nl
>> <mailto:pragma@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
___________________________________________________________________________________

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

* Re: Epub format Was: Re: Context to epub: itemize
  2015-02-17 22:37         ` Aditya Mahajan
  2015-02-18  8:14           ` Henning Hraban Ramm
@ 2015-02-18 16:55           ` Hans Hagen
  1 sibling, 0 replies; 14+ messages in thread
From: Hans Hagen @ 2015-02-18 16:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

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

* Re: Epub format Was: Re:  Context to epub: itemize
  2015-02-18 16:54           ` Hans Hagen
@ 2015-02-19  9:27             ` Keith Schultz
  0 siblings, 0 replies; 14+ messages in thread
From: Keith Schultz @ 2015-02-19  9:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 <pragma@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
___________________________________________________________________________________

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

end of thread, other threads:[~2015-02-19  9:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-16 16:17 Context to epub: itemize Axel Kielhorn
2015-02-16 18:55 ` Hans Hagen
2015-02-17  6:11   ` Axel Kielhorn
2015-02-17  7:24     ` Epub format Was: " Keith J. Schultz
2015-02-17 20:16       ` Hans Hagen
2015-02-17 21:01         ` Keith Schultz
2015-02-18 16:54           ` Hans Hagen
2015-02-19  9:27             ` Keith Schultz
2015-02-17 22:37         ` Aditya Mahajan
2015-02-18  8:14           ` Henning Hraban Ramm
2015-02-18 14:10             ` Keith J. Schultz
2015-02-18 14:21               ` Henning Hraban Ramm
2015-02-18 16:44               ` Hans Hagen
2015-02-18 16:55           ` 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).