Re: [NTG-context] EPUB woes

2013-11-20 Thread Keith J. Schultz
Hi Mica,

Am 19.11.2013 um 22:39 schrieb Mica Semrick paperdig...@gmail.com:

 Keith,
 
 Maybe you should explore an XML format that can be transformed directly to 
 epub. You'd also be able to write a style sheet with ConTeXt that would out 
 put a PDF as well. I think TEI-Lite is a good starting point.
While XML is one approach and using XML-Styles and DocBook I could even 
do without ConTeXt completely. Yet, from a general
user standpoint this way of marking up ebooks is tedious. XML has 
become the standard for storing all kinds of data. A a storage
format it is great and allows for conversion to other formats for ages 
to come. YET, one has to know what XML is how to use it
how to make tools to process it. That is something that I would not 
like to enforce on the average author. 
 
 Since you can make your own commands in ConTeXt, it will never be able to 
 intelligently map all commands on to simple HTML.
How true. That is the problem with any system that is and can handle 
more complex structures than a simpler system.
That is why any module geared to creating ebooks has to only allow what 
is needed and can be done in any EREADER, 
(notice I wrote reader not / Book or EPub!)

My Idea is to use the Lua capabilities of ConTeXt to get the job done.
I will try to exemplify.

suggest MWE:
\usemodule[ebook]

\setupcss[…]{…}% see comment #1

\setupmapping[…]{…} % used for when author has his/her own ideas #2

%normal ConTeXt sets see comment #3

% possibly set a mode or set externally

\starttext
\startebook
\chapter… %see comment #4
\startparagraph{leftmargin=20%, …] % see 
comment #5
% text
\stopparagraph
\starttable…
\stoptable
…
\stopebook
\stoptext

OK, this pretty much looks like standard ConTeXt
Comments:
1) Here is where the author can define the CSS he wants
It will integrated into the CSS used for the ebook

2) The author can setup how the ebook commands are mapped to
 ConTeXt commands

3) Here are setups for the  NORMAL ConTeXt commands for producing PDFs

4)  if mode is PDF command is mapped to normal ConTeXt injected into 
stream
 if mode ebook, gather information for spine, etc, start a new file 
for the chapter
 start writing to this file as HTML 

5)  if in mode PDF map to ConTeXt command, whereby the leftmargin is 
used as the
 basis for the calculation .2\textwidth or if you wish

This approach is ebook centric. Allows for rapid prototyping and proofing of 
the ebook using a PDF
This approach alleviates the need to attempt to dumb down ConTeXt markup. 
Through the use mappings te author has the possibility of producing a higher 
quality PDF if wanted.
The system could be designed to produce a file with the ConTeXt commands that 
can be edited for even
higher quality PDFs of printed versions. 

There could be even XML or whatever mode in the ebook module.

Another advantage would be is that we are a module that will produce HTML out 
of a ConTeXt styled syntax
that can be directly converted to a PDF directly, without worrying about lose 
of formatting or using tools over
which features are supported or not. This is a straight forward approach.

True, enough, ConTeXt is not designed to be a  HTML editor. 

It is a matter of design policy! The philosophy of going from TeX/ConTeXt 
centric to HTML is IMHO far inferior than
going from HTML/ebook centric to ConTeXt. One can always make things more 
intricate/complicated and taking something
complicated and morphing onto a less sophisticated system.

What one has to keep in mind is that ConTeXt renders to PDF and that is what 
is not needed when producing a ebook.
The rendering is done by the ereader. ConTeXt does have any information about 
screen size or  orientation. ConTeXt is built upon 
a page morphology. ebooks are not! So any decent approach has to keep this in 
mind.

regards
Keith.

 
 
 On Mon, Nov 18, 2013 at 10:12 AM, Keith J. Schultz schul...@uni-trier.de 
 wrote:
 
 Am 18.11.2013 um 16:33 schrieb Hans Hagen pra...@wxs.nl:
 
 On 11/18/2013 4:11 PM, Keith J. Schultz wrote:
 Hi Hans,
 
 
 Am 18.11.2013 um 13:21 schrieb Hans Hagen pra...@wxs.nl:
 
 On 11/18/2013 10:00 AM, Keith J. Schultz wrote:
 
   2) Now, what a EPub-READER must implement to handle is very
little. There are HARDLY ANY provisions that a certified 
 EPuB-READER has
  to implement any particular engine or features therein to 
 display/render
the information contain in the EPub-file/wrapper.
 
 right, and I'm not going to waste time on it 

Re: [NTG-context] EPUB woes

2013-11-20 Thread Aditya Mahajan

On Wed, 20 Nov 2013, Keith J. Schultz wrote:


\usemodule[ebook]

\setupcss[…]{…}% see comment #1

\setupmapping[…]{…} % used for when author has his/her own ideas #2

%normal ConTeXt sets see comment #3

% possibly set a mode or set externally

\starttext
\startebook
\chapter… %see comment #4
\startparagraph{leftmargin=20%, …] % see 
comment #5
% text
\stopparagraph
\starttable…
\stoptable
…
   \stopebook
\stoptext


To me, the biggest advantage of a TeX based system is the ease of 
extensibility. If you want to restrict to a specific subset, then might as 
well use XML:


document
book
chapter
paragraph leftmargin=20%
 text
/paragraph
/book
/document

or using one of the existing XML schemas rather than inventing your own 
(perhaps even HTML5).


As far as ConTeXt is concerned, you can process the above XML quite 
easily. Come to think of it, it may be a useful to provide a module that

maps HTML5 to PDF.

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
___

Re: [NTG-context] EPUB woes

2013-11-20 Thread Bill Meahan

On 11/20/2013 8:59 AM, Aditya Mahajan wrote:


As far as ConTeXt is concerned, you can process the above XML quite 
easily. Come to think of it, it may be a useful to provide a module that

maps HTML5 to PDF.

Aditya


I would vote for that approach. It is pretty much analogous to what I 
have decided to do. I'm doing my actual writing in HTML. creating CSS 
for ebooks and ConTeXt environment files for PDF. I'll probably hack the 
html2latex Perl script to do the mapping. Pandoc will /not/ meet my 
needs because Markdown does not distinguish between emphasized text and 
italic text and Pandoc compels all other input markup to behave like 
Markdown. Textile would be perfect but only outputs HTML well. The 
RedCloth implementation does output LaTeX but ignores CSS-style classes 
applied to paragraphs et. al.


My needs are much simpler than the majority of people on this list. I 
have no need for math, no need for indexes, no need for bibliographies, 
footnotes or citations. BUT I want really top-notch visual output 
whether in PDF or printed on dead trees. The latter is usually the 
result of giving the printer process PDF files anyway so for the visuals 
I want, PDF is the common denominator and TeX (whether LaTeX or ConTeXt) 
is the most reasonable path, InDesign is not for poverty-stricken 
wretches like me.


Unfortunately (for many reasons) the market for the stuff I write is 
hell-bent to replace printed books and even replace high-quality 
electronic presentation with formats in which the reader chooses almost 
everything, regardless of whether it compliments the text or not. EPUB 
(especially EPUB3) does appear to /want/ to provide 
author/designer-determined presentation but it can still be ignored or 
overridden by the reader. I don't want to  even imagine the visual 
discordance of reading something like /Jane Eyre/ with double-spaced 
Comic Sans but if the e-reader allows it


I'll crawl back under my rock, now.

--
Bill Meahan, Westland, Michigan

 
 


___
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 woes

2013-11-20 Thread Keith J. Schultz
Hi,

You do not understand my point. I one uses XML why use ConTeXt.
Yet, I one wants to use ConTeXt and do ebooks and they have experience why 
force them
to XML. 

As I stated the idea use ConTeXt to do the markup with commands that will 
ensure proper input of
HTML5  for making ebooks that will render well on MOST ereaders and at the same 
time be typeset
by ConTeXt to good quality PDF! 

ereaders need the html code to adhere to special guidelines in order to create 
a high quality display for the ebook.
That is why special commands are needed to restirct the features available! 

regards
Keith.

Am 20.11.2013 um 14:59 schrieb Aditya Mahajan adit...@umich.edu:

[snip, snip]
 
 To me, the biggest advantage of a TeX based system is the ease of 
 extensibility. If you want to restrict to a specific subset, then might as 
 well use XML:
 
 document
 book
 chapter
 paragraph leftmargin=20%
 text
 /paragraph
 /book
 /document
 
 or using one of the existing XML schemas rather than inventing your own 
 (perhaps even HTML5).
 
 As far as ConTeXt is concerned, you can process the above XML quite easily. 
 Come to think of it, it may be a useful to provide a module that
 maps HTML5 to PDF.
 
 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
 ___

___
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 woes

2013-11-20 Thread Jan Tosovsky
On 2013-11-20 Bill Meahan wrote:
 On 11/20/2013 8:59 AM, Aditya Mahajan wrote:
 
  As far as ConTeXt is concerned, you can process the above XML quite
  easily. Come to think of it, it may be a useful to provide a module
  that maps HTML5 to PDF.
 
 
 I would vote for that approach. It is pretty much analogous to what I
 have decided to do. I'm doing my actual writing in HTML. creating CSS
 for ebooks and ConTeXt environment files for PDF.
 ...
 
 My needs are much simpler than the majority of people on this list. I
 have no need for math, no need for indexes, no need for bibliographies,
 footnotes or citations. BUT I want really top-notch visual output
 whether in PDF or printed on dead trees. 

This is exactly my situation ;-)

Two outputs ideally from the same data. But thanks to my XML background and
experience in the single source publishing it was clear from the very
beginning that I need a well structured and also semantically rich
vocabulary like DocBook.

Generating ePub3 outputs is very straighforward (things gets complicated
when you need customize it). It is same for PDF outputs. These outputs are
generated using XSL-FO processors. But to be honest, outputs are not so
visually appealing as they lack many microtypographic features (expansion,
hanging punctuation etc).

This is the reason why I do a noise here in this forum.

There is a db-context tool (set of XSLT stylesheets):
http://dblatex.sourceforge.net/releases/download.html

It can convert DocBook XML into the ConTeXt source. I do some direct (local)
changes into it to avoid manual post-processing (which gets lost with every
generating - I still do some corrections in my source).

This solution requires some experience in XML processing, but I encourage
anybody who need multiple outputs from a single data to investigate it a
bit. It is so powerfull ;-)

Jan



___
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 woes

2013-11-19 Thread Mica Semrick
Keith,

Maybe you should explore an XML format that can be transformed directly to
epub. You'd also be able to write a style sheet with ConTeXt that would out
put a PDF as well. I think TEI-Lite is a good starting point.

Since you can make your own commands in ConTeXt, it will never be able to
intelligently map all commands on to simple HTML.


On Mon, Nov 18, 2013 at 10:12 AM, Keith J. Schultz schul...@uni-trier.dewrote:


 Am 18.11.2013 um 16:33 schrieb Hans Hagen pra...@wxs.nl:

 On 11/18/2013 4:11 PM, Keith J. Schultz wrote:

 Hi Hans,


 Am 18.11.2013 um 13:21 schrieb Hans Hagen pra...@wxs.nl:

 On 11/18/2013 10:00 AM, Keith J. Schultz wrote:

 2) Now, what a EPub-READER must implement to handle is very
  little. There are HARDLY ANY provisions that a certified EPuB-READER
 has
  to implement any particular engine or features therein to
 display/render
  the information contain in the EPub-file/wrapper.


 right, and I'm not going to waste time on it till i have a decent ebook
 reader that behaves well

 The point you are missing is that the ereaders are behaving well. They are
 following the epub
  standard, and that to the letter of the standard. The problem is
 that the standard does not
 enforce any particular implementation. If you look at the slow progress of
 the standard that
 actually requires a full implementation of the HTML5 standard. That  wait
 will very long.


 sure, and every time i see an epub novel i realize that for something like
 that one really can stick to rather dumb html ... the point is that one
 cannot expect context to output simple everywhere accepted html from
 complex rendered input ...

 I agree fully. But, Since there are those that wish to produce epubs aka
 ebooks, they should not be doing complex
 layout. One can always go from simple to complicated in needed, if there
 were commands dedicated to epub/ebooks/html.
 As I had pointed out in my last post below.


 Furthermore, ereaders are made by companies more interested in profits
 than spending a few Euros
 more to put decent HTML engines into their readers. Why they do not do
 that is beyond me!


 3. Modify the way in which ConTeXt generates the XML files. Ideally, I
 should be able to write something like

 Would be nice if there where commands in ConTeXt or a module for defining
 what should go into the CSS and a
 mode epub where the ConTeXt commands are converted to suitible HTML5
 structures that are suitiable for
 most ereaders.
  Features:
1) margins in percentages
2) font sizes based on em
3) a new file for every chapter optional for sections user
 defined
 Just a few. Lots more can be found in any decent documentation on writing
 ebooks.


 context outputs xml and as a bonus provides a css too ... one can always
 convert that xml to his/her ebooks liking .. maybe at some point the
 mtx-epub script will do that


 I always to like to look at programming as modular and would think that a
 epub/ebook module would be nice that maps
 there are commands for layingout ebooks. these commands can then be mapped
 back to standard context commands.


 in that case code in xml and either processit by context or transform it
 into something ebooks can render

 For some interested in producing a epub then can use the conventions for
 producing ebooks and ConTeXt can provide the
 math conversions to regular page dimensions used in PDFs for proofing or
 creating a printed version. It would also make the
 creation of EPubs from ConTeXt a simple parsing exercise.


 so far i had no projects where epub was needes so it has a low priority
 and i still read paper books (or when i would have ebooks i wouldn't need
 to render them) ... pdfs views quite well on e.g. nexus 7 devices and i
 assume the upcoming sony high res ebook will also do pdf well

 Well I did start the discussion. Just offer my 2 Euro cents worth.
 Especially, since it comes up every now and then.
 Furthermore, I there was a simple way to create epubs/books with ConTeXt
 more would use this feature.
  I have used up enough of or time.

 regards
 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

 ___

___
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  : 

Re: [NTG-context] EPUB woes

2013-11-18 Thread Keith J. Schultz

Am 16.11.2013 um 17:51 schrieb Bill Meahan subscribed_li...@meahan.net:

 On 11/16/2013 11:00 AM, Keith J. Schultz wrote:
 Hi Bill,
 
 Using a PDF as a basis for creating an Epub ebook is actually a lost cause.
 EPUB is a container format that just wraps around your PDF. I do not know of 
 any
 ereader that can actually adjust the formatting/layout of a pdf in any 
 significantly
 useful way. You are stuck with the formatting in the PDF.
 
 For a EPUB-ebook to adjust properly you need to use HTML5 and CSS. Producing 
 PDF an sticking it into a
 EPUB or MOBI wrapper just does not make sense.
 
 regards
  Keith.
 
 You are totally misreading what I wrote!
Sorry.  But, from your original statement:
I have followed the steps on the wiki to the letter, using the export-example 
file provided with the standalone distribution. A PDF generated from the file 
is exactly what I would expect from an example. The generated epub, however, is 
useless - all the text is jammed together into one continuous block with no 
formatting whatsoever.

I assumed that the PDF was be put in the EPub- wrapper! According to the 
EPub standard this can be done!
I have to admit that I have not been following the progress done in ConTeXt 
for creating EPubs/eBooks.

Others have answered, and explain what you need to do to get a possibly 
working EPub.
See my comments in my replies to their posts.

regards
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 woes

2013-11-18 Thread Keith J. Schultz
Hi All,

I find that the ConTeXt approach to creating the EPub is flawed is a 
fundemental way!

NOT TECHNICALLY.

The EPub Standard is a big mess and if you really look at not a true standard 
in a
true sense.

Let me explain. 
1) The file structure is well documented and properly defines
 the way a EPub file MUST contain and how file therein must
 be structure and listed. (notice that I use the word MUST)

2) Now, what a EPub-READER must implement to handle is very
 little. There are HARDLY ANY provisions that a certified 
EPuB-READER has
 to implement any particular engine or features therein to 
display/render
 the information contain in the EPub-file/wrapper.

In other words it is simply a wrapper file format. and truly nothing more.
There is NO REQUIREMENT in the standard that perfectly valid xhtml or
HTML5 will be  properly displayed in a certified EPub Reader!

The standard has become more strict in recent years, yet still lacking.


Am 16.11.2013 um 18:37 schrieb Aditya Mahajan adit...@umich.edu:

[snip, snip]

 When you run `mtxrun --script epub --make test`, it just takes the files 
 specificied in the files field, and zips them in as a epub file.
 
 Now, in principle, any epub reader should support the any XHTML file; in 
 practice, they only support the default XHTML tags. The XML+CSS file that 
 ConTeXt generates are not handled correctly by most (all?) EPUB readers.
Here is where my critic of ConTeXt approach grabs. What good is if one 
produces a perfectly correct EPub, yet hardly any EPub reader can
handle. 
I remember correctly, an EPub Reader need not implement the handling of 
xhtml inorder to be certified or, if you wish, adhere to the standard.
The basic reason why xhtml is handled is because most html renders 
handle xhtml. 
Yet, the standard only requires that very basic html features be 
implemented and the author is required to offer fallbacks incase features are 
not
 supported.

 So there are three options:
 
 1. Wait until the EPUB readers catch up. It took almost 10-15 years for the 
 browsers to catch up with the HTML standards, and I don't have much hope for 
 EPUB readers here. Last I checked, none of them supported even MATHML-2.
Like I mentioned above a EPub reader is not REQUIRED to support it!
 
 2. Write a script (either using xmlproc, or using you favorite XML parser in 
 your favorite language) that converts the XML generated by ConTeXt into a 
 standard XHTML file. This is the easiest and the least time consuming 
 alternative.
AGAIN, as mentioned above there is no guarantee that it will be 
displayed properly.
Support/export of HTML5 would seem to me to be a better option, but 
then the HTML5 standard is not
complete and not fully supported by most newer ereaders, also.
 
 3. Modify the way in which ConTeXt generates the XML files. Ideally, I should 
 be able to write something like
Would be nice if there where commands in ConTeXt or a module for 
defining what should go into the CSS and a 
mode epub where the ConTeXt commands are converted to suitible HTML5 
structures that are suitiable for
most ereaders. 
Features: 
   1) margins in percentages
   2) font sizes based on em
   3) a new file for every chapter optional for sections 
user defined
Just a few. Lots more can be found in any decent documentation on 
writing ebooks.


regards
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 woes

2013-11-18 Thread Hans Hagen

On 11/18/2013 10:00 AM, Keith J. Schultz wrote:


2) Now, what a EPub-READER must implement to handle is very
 little. There are HARDLY ANY provisions that a certified 
EPuB-READER has
  to implement any particular engine or features therein to 
display/render
 the information contain in the EPub-file/wrapper.


right, and I'm not going to waste time on it till i have a decent ebook 
reader that behaves well



3. Modify the way in which ConTeXt generates the XML files. Ideally, I should 
be able to write something like

Would be nice if there where commands in ConTeXt or a module for 
defining what should go into the CSS and a
mode epub where the ConTeXt commands are converted to suitible HTML5 
structures that are suitiable for
most ereaders.
Features:
1) margins in percentages
2) font sizes based on em
   3) a new file for every chapter optional for sections 
user defined
Just a few. Lots more can be found in any decent documentation on 
writing ebooks.


context outputs xml and as a bonus provides a css too ... one can always 
convert that xml to his/her ebooks liking .. maybe at some point the 
mtx-epub script will do that


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 woes

2013-11-18 Thread Keith J. Schultz
Hi Hans,


Am 18.11.2013 um 13:21 schrieb Hans Hagen pra...@wxs.nl:

 On 11/18/2013 10:00 AM, Keith J. Schultz wrote:
 
  2) Now, what a EPub-READER must implement to handle is very
   little. There are HARDLY ANY provisions that a certified 
 EPuB-READER has
  to implement any particular engine or features therein to 
 display/render
   the information contain in the EPub-file/wrapper.
 
 right, and I'm not going to waste time on it till i have a decent ebook 
 reader that behaves well
The point you are missing is that the ereaders are behaving well. They 
are following the epub 
 standard, and that to the letter of the standard. The problem is that 
the standard does not 
enforce any particular implementation. If you look at the slow progress 
of the standard that 
actually requires a full implementation of the HTML5 standard. That  
wait will very long.

Furthermore, ereaders are made by companies more interested in profits 
than spending a few Euros
more to put decent HTML engines into their readers. Why they do not do 
that is beyond me!
 
 3. Modify the way in which ConTeXt generates the XML files. Ideally, I 
 should be able to write something like
  Would be nice if there where commands in ConTeXt or a module for 
 defining what should go into the CSS and a
  mode epub where the ConTeXt commands are converted to suitible HTML5 
 structures that are suitiable for
  most ereaders.
  Features:
1) margins in percentages
2) font sizes based on em
 3) a new file for every chapter optional for sections 
 user defined
  Just a few. Lots more can be found in any decent documentation on 
 writing ebooks.
 
 context outputs xml and as a bonus provides a css too ... one can always 
 convert that xml to his/her ebooks liking .. maybe at some point the mtx-epub 
 script will do that

I always to like to look at programming as modular and would think that 
a epub/ebook module would be nice that maps
there are commands for layingout ebooks. these commands can then be 
mapped back to standard context commands.
For some interested in producing a epub then can use the conventions 
for producing ebooks and ConTeXt can provide the
math conversions to regular page dimensions used in PDFs for proofing 
or creating a printed version. It would also make the
creation of EPubs from ConTeXt a simple parsing exercise.   

regards
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 woes

2013-11-18 Thread Hans Hagen

On 11/18/2013 4:11 PM, Keith J. Schultz wrote:

Hi Hans,


Am 18.11.2013 um 13:21 schrieb Hans Hagen pra...@wxs.nl:


On 11/18/2013 10:00 AM, Keith J. Schultz wrote:


2) Now, what a EPub-READER must implement to handle is very
 little. There are HARDLY ANY provisions that a certified 
EPuB-READER has
  to implement any particular engine or features therein to 
display/render
 the information contain in the EPub-file/wrapper.


right, and I'm not going to waste time on it till i have a decent ebook reader 
that behaves well

The point you are missing is that the ereaders are behaving well. They 
are following the epub
  standard, and that to the letter of the standard. The problem is that 
the standard does not
enforce any particular implementation. If you look at the slow progress 
of the standard that
actually requires a full implementation of the HTML5 standard. That  
wait will very long.


sure, and every time i see an epub novel i realize that for something 
like that one really can stick to rather dumb html ... the point is that 
one cannot expect context to output simple everywhere accepted html from 
complex rendered input ...



Furthermore, ereaders are made by companies more interested in profits 
than spending a few Euros
more to put decent HTML engines into their readers. Why they do not do 
that is beyond me!



3. Modify the way in which ConTeXt generates the XML files. Ideally, I should 
be able to write something like

Would be nice if there where commands in ConTeXt or a module for 
defining what should go into the CSS and a
mode epub where the ConTeXt commands are converted to suitible HTML5 
structures that are suitiable for
most ereaders.
Features:
1) margins in percentages
2) font sizes based on em
   3) a new file for every chapter optional for sections 
user defined
Just a few. Lots more can be found in any decent documentation on 
writing ebooks.


context outputs xml and as a bonus provides a css too ... one can always 
convert that xml to his/her ebooks liking .. maybe at some point the mtx-epub 
script will do that


I always to like to look at programming as modular and would think that 
a epub/ebook module would be nice that maps
there are commands for layingout ebooks. these commands can then be 
mapped back to standard context commands.


in that case code in xml and either processit by context or transform it 
into something ebooks can render



For some interested in producing a epub then can use the conventions 
for producing ebooks and ConTeXt can provide the
math conversions to regular page dimensions used in PDFs for proofing 
or creating a printed version. It would also make the
creation of EPubs from ConTeXt a simple parsing exercise.


so far i had no projects where epub was needes so it has a low priority 
and i still read paper books (or when i would have ebooks i wouldn't 
need to render them) ... pdfs views quite well on e.g. nexus 7 devices 
and i assume the upcoming sony high res ebook will also do pdf well


concerning modular: you can consider the context export to be modular .. 
convertable


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 woes

2013-11-18 Thread Keith J. Schultz

Am 18.11.2013 um 16:33 schrieb Hans Hagen pra...@wxs.nl:

 On 11/18/2013 4:11 PM, Keith J. Schultz wrote:
 Hi Hans,
 
 
 Am 18.11.2013 um 13:21 schrieb Hans Hagen pra...@wxs.nl:
 
 On 11/18/2013 10:00 AM, Keith J. Schultz wrote:
 
2) Now, what a EPub-READER must implement to handle is very
 little. There are HARDLY ANY provisions that a certified 
 EPuB-READER has
  to implement any particular engine or features therein to 
 display/render
 the information contain in the EPub-file/wrapper.
 
 right, and I'm not going to waste time on it till i have a decent ebook 
 reader that behaves well
  The point you are missing is that the ereaders are behaving well. They 
 are following the epub
  standard, and that to the letter of the standard. The problem is 
 that the standard does not
  enforce any particular implementation. If you look at the slow progress 
 of the standard that
  actually requires a full implementation of the HTML5 standard. That  
 wait will very long.
 
 sure, and every time i see an epub novel i realize that for something like 
 that one really can stick to rather dumb html ... the point is that one 
 cannot expect context to output simple everywhere accepted html from complex 
 rendered input ...
I agree fully. But, Since there are those that wish to produce epubs 
aka ebooks, they should not be doing complex
layout. One can always go from simple to complicated in needed, if 
there were commands dedicated to epub/ebooks/html.
As I had pointed out in my last post below.
 
  Furthermore, ereaders are made by companies more interested in profits 
 than spending a few Euros
  more to put decent HTML engines into their readers. Why they do not do 
 that is beyond me!
 
 3. Modify the way in which ConTeXt generates the XML files. Ideally, I 
 should be able to write something like
Would be nice if there where commands in ConTeXt or a module for 
 defining what should go into the CSS and a
mode epub where the ConTeXt commands are converted to suitible HTML5 
 structures that are suitiable for
most ereaders.
Features:
1) margins in percentages
2) font sizes based on em
   3) a new file for every chapter optional for sections 
 user defined
Just a few. Lots more can be found in any decent documentation on 
 writing ebooks.
 
 context outputs xml and as a bonus provides a css too ... one can always 
 convert that xml to his/her ebooks liking .. maybe at some point the 
 mtx-epub script will do that
 
  I always to like to look at programming as modular and would think that 
 a epub/ebook module would be nice that maps
  there are commands for layingout ebooks. these commands can then be 
 mapped back to standard context commands.
 
 in that case code in xml and either processit by context or transform it into 
 something ebooks can render
 
  For some interested in producing a epub then can use the conventions 
 for producing ebooks and ConTeXt can provide the
  math conversions to regular page dimensions used in PDFs for proofing 
 or creating a printed version. It would also make the
  creation of EPubs from ConTeXt a simple parsing exercise.
 
 so far i had no projects where epub was needes so it has a low priority and i 
 still read paper books (or when i would have ebooks i wouldn't need to render 
 them) ... pdfs views quite well on e.g. nexus 7 devices and i assume the 
 upcoming sony high res ebook will also do pdf well
Well I did start the discussion. Just offer my 2 Euro cents worth. 
Especially, since it comes up every now and then.
Furthermore, I there was a simple way to create epubs/books with 
ConTeXt more would use this feature. 

I have used up enough of or time.

regards
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 woes

2013-11-16 Thread Keith J. Schultz
Hi Bill,

Using a PDF as a basis for creating an Epub ebook is actually a lost cause.
EPUB is a container format that just wraps around your PDF. I do not know of 
any 
ereader that can actually adjust the formatting/layout of a pdf in any 
significantly
useful way. You are stuck with the formatting in the PDF. 

For a EPUB-ebook to adjust properly you need to use HTML5 and CSS. Producing 
PDF an sticking it into a 
EPUB or MOBI wrapper just does not make sense. 

regards
Keith.


Am 16.11.2013 um 16:16 schrieb Bill Meahan subscribed_li...@meahan.net:

 I have been trying for a very long time to generate an epub document via 
 context without success.
 
 I have followed the steps on the wiki to the letter, using the export-example 
 file provided with the standalone distribution. A PDF generated from the file 
 is exactly what I would expect from an example. The generated epub, however, 
 is useless - all the text is jammed together into one continuous block with 
 no formatting whatsoever.
 
 Adobe Digital Editions 2.0 crashes trying to open it. Sumatra and Sigil get 
 it open but the results are as described above. Obviously I am missing a step 
 or doing something wrong but I cannot see what.
 
 Context Standalone from a couple of days ago. Windows 7-64 (Home Premium) but 
 I got the same results several months ago on a Linux system so I do not think 
 it is OS-related.
 
 Sign me, Frustrated!
 
 -- 
 Bill Meahan, Westland, Michigan
 
   “Writing is like getting married. One should never
   commit oneself until one is amazed at one's luck.”
 
   —Iris Murdoch
 
 ___
 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 woes

2013-11-16 Thread Wolfgang Schuster

Am 16.11.2013 um 16:16 schrieb Bill Meahan subscribed_li...@meahan.net:

 I have been trying for a very long time to generate an epub document via 
 context without success.
 
 I have followed the steps on the wiki to the letter, using the export-example 
 file provided with the standalone distribution. A PDF generated from the file 
 is exactly what I would expect from an example. The generated epub, however, 
 is useless - all the text is jammed together into one continuous block with 
 no formatting whatsoever.
 
 Adobe Digital Editions 2.0 crashes trying to open it. Sumatra and Sigil get 
 it open but the results are as described above. Obviously I am missing a step 
 or doing something wrong but I cannot see what.
 
 Context Standalone from a couple of days ago. Windows 7-64 (Home Premium) but 
 I got the same results several months ago on a Linux system so I do not think 
 it is OS-related.

When you use the export option context creates a xml file from your document. 
When you call not the epub script context creates epub file which contains this 
xml file which uses a custom format and not xhtml as you would expect. 

To get a epub file which can be used with most reader (a few programs on 
windows/mac/linux can read contexts output) you have to convert context xml 
file into valid xhtml.

What you have to do as well in your document to get proper tagged paragraphs is 
to add \startparagraph and \stopparagraph at the begin and end of each 
paragraph, otherwise context adds AFAIR br/ between them.

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


Re: [NTG-context] EPUB woes

2013-11-16 Thread Bill Meahan

On 11/16/2013 11:00 AM, Keith J. Schultz wrote:

Hi Bill,

Using a PDF as a basis for creating an Epub ebook is actually a lost cause.
EPUB is a container format that just wraps around your PDF. I do not know of any
ereader that can actually adjust the formatting/layout of a pdf in any 
significantly
useful way. You are stuck with the formatting in the PDF.

For a EPUB-ebook to adjust properly you need to use HTML5 and CSS. Producing 
PDF an sticking it into a
EPUB or MOBI wrapper just does not make sense.

regards
Keith.


You are totally misreading what I wrote!

I know there is no direct PDF - EPUB route and it's a fool's errand to 
think there is. However, with appropriate headers, ConTeXt is supposed 
to create either a PDF or and EPUB from a common source file marked up 
for ConTeXt. Hence, if I run


wwm$ context options export-example.tex

I expect to get a PDF *but* if I run

wwm$ mtxrun --script epub --make export-example.tex  - the same 
export-example.tex as above


I would /expect/ to get a valid EPUB file, or so I'm lead to believe.

At the moment, I'm simply trying it out using Hans' export-example.tex 
file that comes as part of the standard ConTeXt distribution, either 
Standalone or part of one of the other distributions. I haven't even 
opened the export-example.tex file in an editor (yet) in this round of 
trials and I've even run the script against it right in the /base/ 
directory where it is found in the distribution so I don't understand 
why it is not producing a valid EPUB. Once I've got that sorted out, I 
can try applying the lessons learned to my own documents.


--
Bill Meahan, Westland, Michigan

 
  “Writing is like getting married. One should never

   commit oneself until one is amazed at one's luck.”

   —Iris Murdoch

___
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 woes

2013-11-16 Thread Aditya Mahajan

On Sat, 16 Nov 2013, Bill Meahan wrote:


I would /expect/ to get a valid EPUB file, or so I'm lead to believe.

At the moment, I'm simply trying it out using Hans' export-example.tex file 
that comes as part of the standard ConTeXt distribution, either Standalone or 
part of one of the other distributions. I haven't even opened the 
export-example.tex file in an editor (yet) in this round of trials and I've 
even run the script against it right in the /base/ directory where it is 
found in the distribution so I don't understand why it is not producing a 
valid EPUB. Once I've got that sorted out, I can try applying the lessons 
learned to my own documents.


ConTeXt provides two types of exports. The first is an XML export. 
Consider a sample file:


~~~ {test.tex}
\setupbackend[export=yes]

\starttext
\startsection[title={This is a test}]
  \startparagraph
Some random text
\startitemize
  \item First
  \item Second
\stopitemize
  \stopparagraph
\stopsection

\stoptext
~~~

Running `context test.tex` generates a `test.export` file that looks as 
follows:


~~~ {test.export}
?xml version='1.0' encoding='UTF-8' standalone='yes' ?

!-- input filename   : test  --
!-- processing date  : Sat Nov 16 12:19:59 2013 --
!-- context version  : 2013.11.01 15:02  --
!-- exporter version : 0.30  --


 document language=en file=test date=Sat Nov 16 12:19:59 2013 
context=2013.11.01 15:02 version=0.30 
xmlns:m=http://www.w3.org/1998/Math/MathML;

  section detail=section location='aut:1'
sectionnumber1/sectionnumber
   sectiontitleThis is a test/sectiontitle
   sectioncontent
  paragraphSome random text itemgroup detail=itemize 
symbol=1itemitemtagm:math display=inline!-- begin m:mrow 
--m:mo•/m:mo!-- end m:mrow 
--/m:math/itemtagitemcontentFirst/itemcontent/item 
itemitemtagm:math display=inline!-- begin m:mrow 
--m:mo•/m:mo!-- end m:mrow 
--/m:math/itemtagitemcontentSecond/itemcontent/item/itemgroup/paragraph

   /sectioncontent
  /section
 /document
~~~

which is simply an XML representation of the document.

In prinicple, if one adds an appropriate CSS file with that XML, any 
recent browser will be able to display it. So, if you change the first 
line of `test.tex` to


~~~
\setupbackend[export=yes, xhtml=yes, css=yes]
~~~

and run `context test.tex`, you will get four additional files: 
`test.xhtml`, `test-styles.css`, `test-images.css`, and 
`test.specification`.


The `test.xhtml` file look as follows:

~~~{test.xhtml}
?xml version='1.0' encoding='UTF-8' standalone='yes' ?

!-- input filename   : test  --
!-- processing date  : Sat Nov 16 12:22:58 2013 --
!-- context version  : 2013.11.01 15:02  --
!-- exporter version : 0.30  --

?xml-stylesheet type=text/css href=test-styles.css?
?xml-stylesheet type=text/css href=test-images.css?
?xml-stylesheet type=text/css href=export-example.css?

 document language=en version=0.30 file=test 
xmlns:xhtml=http://www.w3.org/1999/xhtml; 
xmlns:m=http://www.w3.org/1998/Math/MathML; date=Sat Nov 16 12:22:58 
2013 context=2013.11.01 15:02

  xhtml:a name=aut_1section location=aut:1 detail=section
sectionnumber1/sectionnumber
   sectiontitleThis is a test/sectiontitle
   sectioncontent
  paragraphSome random text itemgroup symbol=1 
detail=itemizeitemitemtagm:math display=inline!-- begin m:mrow 
--m:mo•/m:mo!-- end m:mrow 
--/m:math/itemtagitemcontentFirst/itemcontent/item 
itemitemtagm:math display=inline!-- begin m:mrow 
--m:mo•/m:mo!-- end m:mrow 
--/m:math/itemtagitemcontentSecond/itemcontent/item/itemgroup/paragraph

   /sectioncontent
  /section/xhtml:a
 /document
~~~

Notice that apart from the three lines specifying the CSS files, the rest 
of the document is the same as in XML export. The two css files, 
`test-styles.css` and `test-images.css` include the relevant code for the 
style modifications and images in the document. The css file 
`export-example.css` comes with the ConTeXt distribution and has the 
default values for most ConTeXt elements.


If you open the `test.xhtml` file in any browser, it will work correctly 
(because an XHTML markup is extensible and can use any XML tags as long as 
the behavior of the tag is specified in a CSS file). This is, however, not 
a XHTML file that includes the default XHTML markup (h1, p, ul, 
etc.)


Now, lets come back to the last file generated by the export: 
`test.specification`. This is a lua file that contains:


~~~{test.specification}
return {
 [files]={ test-styles.css, test-images.css, export-example.css, 
test.xhtml },

 [identifier]=e6a91a13-4e08-9494-3817-bfffe872be2c,
 [images]={},
 [language]=en,
 [name]=test,
 [root]=test.xhtml,
}


When you run `mtxrun --script epub --make test`, it just takes the files 
specificied in the files field, and zips them in as a epub file.


Now, in principle, any epub reader should support the any XHTML file; in 
practice, they only support the default XHTML tags. The XML+CSS file that 

Re: [NTG-context] EPUB woes

2013-11-16 Thread Bill Meahan

On 11/16/2013 12:37 PM, Aditya Mahajan wrote:

On Sat, 16 Nov 2013, Bill Meahan wrote:


I would /expect/ to get a valid EPUB file, or so I'm lead to believe.



1. Wait until the EPUB readers catch up. It took almost 10-15 years 
for the browsers to catch up with the HTML standards, and I don't have 
much hope for EPUB readers here. Last I checked, none of them 
supported even MATHML-2.


2. Write a script (either using xmlproc, or using you favorite XML 
parser in your favorite language) that converts the XML generated by 
ConTeXt into a standard XHTML file. This is the easiest and the 
least time consuming alternative.


3. Modify the way in which ConTeXt generates the XML files. Ideally, I 
should be able to write something like


~~~
\setupparagraph[tag=p, class=default]
~~~

to tell context that \startparagraph ... \stopparagraph should 
translate to `p class=default ... /p. Last I checked the code 
that generates the XML file, there was no easy way to change the tags 
and classes.


I hope that the above description clarifies the situation.

Aditya


Thanks for the clarification.

--
Bill Meahan, Westland, Michigan

 
  “Writing is like getting married. One should never

   commit oneself until one is amazed at one's luck.”

   —Iris Murdoch

This message is digitally signed with an X.509 certificate
to prove it is from me and has not been altered since it was sent.

___
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 woes

2012-11-17 Thread Alan BRASLAU
On Sat, 17 Nov 2012 08:08:56 +0100
luigi scarso luigi.sca...@gmail.com wrote:

 ( IPDF is the output of the new iTEX from Knuth, see
 http://tug.org/TUGboat/tb31-2/tb98knut.pdf)

(The beginning sounds a bit like a description of ConTeXt!)

Earlier, I believe you shared the video with us!

Alan
___
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 woes

2012-11-17 Thread Bill Meahan

On 11/17/2012 02:08 AM, luigi scarso wrote:

IDPF'reference
( IPDF is the output of the new iTEX from Knuth, see 
http://tug.org/TUGboat/tb31-2/tb98knut.pdf)







TYPO ALERT!  TYPO ALERT!  TYPO ALERT!


That should have been *IDPF* (International Digital Publishing Forum) 
which is the group that defines the epub standard.


Some day I'm goint to learn how to tpye.  ;)

--
Bill Meahan
Westland, Michigan USA

___
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 woes

2012-11-17 Thread luigi scarso
On Sat, Nov 17, 2012 at 5:48 PM, Bill Meahan subscribed_li...@meahan.netwrote:

 On 11/17/2012 02:08 AM, luigi scarso wrote:

 IDPF'reference
 ( IPDF is the output of the new iTEX from Knuth, see
 http://tug.org/TUGboat/tb31-2/**tb98knut.pdfhttp://tug.org/TUGboat/tb31-2/tb98knut.pdf
 )





 TYPO ALERT!  TYPO ALERT!  TYPO ALERT!


 That should have been *IDPF* (International Digital Publishing Forum)
 which is the group that defines the epub standard.

 Some day I'm goint to learn how to tpye.  ;)

 :-)
Anyway thank for the link.
___
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 woes

2012-11-16 Thread Keith J. Schultz
Hi All,

First off, I do not work with ConTexT, but with Lu(La)TeX.
I follow this list looking for pointers.

The way I understand how ConTexT produces output for
epubs is that it just creates HTML.

If ConTexT (or LuaTex) is to produce output for use in epubs
it should map the ConTexT structures to html and the epub format.

That is, it should produce separate files for each chapter.
Furthermore, it should be able to create files for the spine, ncx, css,
and cover page, etc automatically.  This with reduce the amount of 
postprocessing Considerable.

Furthermore, the method could be design to not only epub, but a 
mobi format.

I have just started out on my own ideas for a Lau(La)Tex way of using
it for the creation of ebooks and pdfs from the same source.

Just my two cents, worth. 

Sorry, if I am creating noise here.

regards
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 woes

2012-11-16 Thread Bill Meahan

On 11/15/2012 11:17 PM, Aditya Mahajan wrote:


Pandoc does generate ConTeXt output as well, which you can then 
process the usual way to generate pdf.


The advantage of pandoc is that **in addition** to latex/context 
output, you can generate docbook/epub/html/doc/troff/ and other output 
formats as well.


Aditya


I'm installing pandoc now. Looks pretty interesting. I suppose it's time 
I learned (extended) Markdown anyway. Thank goodness emacs has a mode 
for that. :)


Thanks for the info!

--
Bill Meahan
Westland, Michigan USA

___
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 woes

2012-11-16 Thread Aditya Mahajan

On Fri, 16 Nov 2012, Bill Meahan wrote:


On 11/15/2012 11:17 PM, Aditya Mahajan wrote:


Pandoc does generate ConTeXt output as well, which you can then process the 
usual way to generate pdf.


The advantage of pandoc is that **in addition** to latex/context output, 
you can generate docbook/epub/html/doc/troff/ and other output formats as 
well.


Aditya


I'm installing pandoc now. Looks pretty interesting. I suppose it's time I 
learned (extended) Markdown anyway. Thank goodness emacs has a mode for 
that. :)


If you are using emacs, keep an eye for the org mode reader in pandoc.
https://github.com/jgm/pandoc/issues/476

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
___


Re: [NTG-context] Epub woes

2012-11-16 Thread Zenlima

 Is there any reader able to read mathml ?

Try lucifox (is a part of lucifox addon for firefox)

___
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 woes

2012-11-16 Thread Zenlima
 Try lucifox (is a part of lucifox addon for firefox)

arg.. to late.. try lucidor as a part of lucifox... :-D
___
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 woes

2012-11-16 Thread Bill Meahan

On 11/16/2012 02:13 AM, luigi scarso wrote:


I just started working on the epub output of my lecture notes
again, since there were no readers able to output math until 2
weeks ago.

Is there any reader able to read mathml ?

--
luigi




If you use Google Chrome (Chromium), you can get Readium from the Google 
Web Store. It's the IPDF's reference implementation of the epub3 
standard including MathML


--
Bill Meahan
Westland, Michigan USA

___
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 woes

2012-11-16 Thread luigi scarso
On Sat, Nov 17, 2012 at 12:41 AM, Bill Meahan
subscribed_li...@meahan.netwrote:

 On 11/16/2012 02:13 AM, luigi scarso wrote:


 I just started working on the epub output of my lecture notes
 again, since there were no readers able to output math until 2
 weeks ago.

 Is there any reader able to read mathml ?

 --
 luigi



 If you use Google Chrome (Chromium), you can get Readium from the Google
 Web Store. It's the IPDF's reference implementation of the epub3 standard
 including MathML

 IDPF'reference
( IPDF is the output of the new iTEX from Knuth, see
http://tug.org/TUGboat/tb31-2/tb98knut.pdf)
___
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 woes

2012-11-15 Thread Wolfgang Schuster

Am 15.11.2012 um 19:58 schrieb Bill Meahan subscribed_li...@meahan.net:

 I tried to generate an epub document using ConTeXt following the recipe on 
 the wiki. Didn't work. So, I tried running the export-example.tex file that 
 comes with the distribution, unmodified. Same bad results.
 
Cover is not generated
TOC is not generated (though it is noted this might be the state of the 
 export)
Sectioning doesn't happen.
Paragraphing doesn't happen.
The resultant epub file cannot even be opened with FBReader.
 
 Importing the epub into Sigil shows one big blob of text, with only the 
 between word spacing that's present in the source file. The \quotation{} 
 markup did get turned into quotation marks, chapter numbers were generated 
 and the rest of the markup was stripped out.
 
 Same behavior with both the TeXLive 2012 version of ConTeXt and a quite 
 recent beta.
 
 Up-to-date Ubuntu 12.04
 
 Linux Escherton 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:32:50 UTC 2012 
 i686 i686 i386 GNU/Linux
 
 What am I doing wrong?

You have to tag paragraphs with

\startparagraph
…
\stopparagraph

which are converted to p and /p otherwise you get br/ between paragraphs.

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


Re: [NTG-context] Epub woes

2012-11-15 Thread Bill Meahan

On 11/15/2012 02:24 PM, Wolfgang Schuster wrote:

You have to tag paragraphs with

\startparagraph
…
\stopparagraph

which are converted to p and /p otherwise you get br/ between paragraphs.

Wolfgang



Oh, my! I'll have to go back and change hundreds of paragraphs! :(

What about the chapter headings, mucked up metadata c? I am using 
\startchapter..\stopchapter already.


--
Bill Meahan
Westland, Michigan USA

___
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 woes

2012-11-15 Thread Marcin Borkowski
Dnia 2012-11-15, o godz. 13:58:29
Bill Meahan subscribed_li...@meahan.net napisał(a):

 I tried to generate an epub document using ConTeXt following the
 recipe on the wiki. Didn't work. So, I tried running the
 export-example.tex file that comes with the distribution, unmodified.
 Same bad results.
 
  Cover is not generated
  TOC is not generated (though it is noted this might be the state
 of the export)
  Sectioning doesn't happen.
  Paragraphing doesn't happen.
  The resultant epub file cannot even be opened with FBReader.
 
 Importing the epub into Sigil shows one big blob of text, with only
 the between word spacing that's present in the source file. The
 \quotation{} markup did get turned into quotation marks, chapter
 numbers were generated and the rest of the markup was stripped out.
 
 Same behavior with both the TeXLive 2012 version of ConTeXt and a
 quite recent beta.
 
 Up-to-date Ubuntu 12.04
 
 Linux Escherton 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:32:50
 UTC 2012 i686 i686 i386 GNU/Linux
 
 What am I doing wrong?
 

http://archive.contextgarden.net/message/20120809.130943.604f5b22.en.html

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University
___
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 woes

2012-11-15 Thread Aditya Mahajan

On Thu, 15 Nov 2012, Bill Meahan wrote:

I tried to generate an epub document using ConTeXt following the recipe on 
the wiki. Didn't work. So, I tried running the export-example.tex file that 
comes with the distribution, unmodified. Same bad results.


   Cover is not generated
   TOC is not generated (though it is noted this might be the state of the 
export)

   Sectioning doesn't happen.
   Paragraphing doesn't happen.
   The resultant epub file cannot even be opened with FBReader.

Importing the epub into Sigil shows one big blob of text, with only the 
between word spacing that's present in the source file. The \quotation{} 
markup did get turned into quotation marks, chapter numbers were generated 
and the rest of the markup was stripped out.


Same behavior with both the TeXLive 2012 version of ConTeXt and a quite 
recent beta.


What am I doing wrong?


Have you considered using pandoc to generate epub?

If your text is relatively simple (no multiline math, no fancy image 
scaling, no complicated tables, etc.), then Markdown is a reasonable input 
format. You can use pandoc to translate the text to multiple output 
formats (including ConTeXt).


In general, I have found pandoc's XHTML export to be more predictable than 
that of ConTeXt. I have used pandoc's epub export only for short articles, 
but from what I remember, it does handle cover images and toc correctly.


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
___


Re: [NTG-context] Epub woes

2012-11-15 Thread Bill Meahan

On 11/15/2012 07:13 PM, Aditya Mahajan wrote:


Have you considered using pandoc to generate epub?

If your text is relatively simple (no multiline math, no fancy image 
scaling, no complicated tables, etc.), then Markdown is a reasonable 
input format. You can use pandoc to translate the text to multiple 
output formats (including ConTeXt).


In general, I have found pandoc's XHTML export to be more predictable 
than that of ConTeXt. I have used pandoc's epub export only for short 
articles, but from what I remember, it does handle cover images and 
toc correctly.


Aditya
__

Nice idea Aditya but in this particular case it won't suffice.

I'm working on a rather long novel, not a technical document, and my 
/primary/ target electronic format is PDF. That PDF can be distributed 
electronically or submitted directly to a printer. In the current 
market, however, so many people want to read books on their smartphone, 
dedicated ebook reader or tablet an author really limits their market if 
they don't distribute an ebook version.


Of course, the two primary ebook formats (in terms of market) are epub 
and Kindle which is easy to generate from an epub. Sticking to ConTeXt 
allows me to generate PDF, Process PDF and epub from a single source. I 
can easily touch up the epub in Sigil if I need to.


For this kind of document, typography and excellent typesetting are 
extremely important (in the printed/PDF version, anyway). ConTeXt gives 
me that.


I'll keep pandoc in mind for some other documents, though. Thanks for 
the lead.


--
Bill Meahan
Westland, Michigan USA

___
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 woes

2012-11-15 Thread Aditya Mahajan

On Thu, 15 Nov 2012, Bill Meahan wrote:


On 11/15/2012 07:13 PM, Aditya Mahajan wrote:


Have you considered using pandoc to generate epub?

If your text is relatively simple (no multiline math, no fancy image 
scaling, no complicated tables, etc.), then Markdown is a reasonable input 
format. You can use pandoc to translate the text to multiple output formats 
(including ConTeXt).


In general, I have found pandoc's XHTML export to be more predictable than 
that of ConTeXt. I have used pandoc's epub export only for short articles, 
but from what I remember, it does handle cover images and toc correctly.


Aditya
__

Nice idea Aditya but in this particular case it won't suffice.

I'm working on a rather long novel, not a technical document, and my 
/primary/ target electronic format is PDF. That PDF can be distributed 
electronically or submitted directly to a printer. In the current market, 
however, so many people want to read books on their smartphone, dedicated 
ebook reader or tablet an author really limits their market if they don't 
distribute an ebook version.


Of course, the two primary ebook formats (in terms of market) are epub and 
Kindle which is easy to generate from an epub. Sticking to ConTeXt allows me 
to generate PDF, Process PDF and epub from a single source. I can easily 
touch up the epub in Sigil if I need to.


For this kind of document, typography and excellent typesetting are 
extremely important (in the printed/PDF version, anyway). ConTeXt gives me 
that.


Pandoc does generate ConTeXt output as well, which you can then process 
the usual way to generate pdf.


The advantage of pandoc is that **in addition** to latex/context output, 
you can generate docbook/epub/html/doc/troff/ and other output formats as 
well.


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
___


Re: [NTG-context] Epub woes

2012-11-15 Thread Andy Thomas
Please try the following example:

-- start code --

\setupbackend[export=yes,xhtml=test_00.xhtml]

\mainlanguage[de]
\language[de]

\setupexport
   [title={A nice book},
author={Andy Tom},
firstpage={huhn.jpg},
   ]



\starttext
Hello world!
\stoptext


-- end code --

The firstpage export value (huhn.jpg) is your cover image. Please put huhn.jpg 
or something else in the same directory as your tex file. I named the tex=file 
test_00.tex in my case.

After compiling with the latest context, you can run 'mtxrun --script epub 
--make test_00.specification' to generate the epub file.

Please note two more things: 
(1) The mtx-epub script was broken a couple of days ago. Well not actually 
broken, but somehow an old version sneaked in. If the author names and such do 
not get exported into the epub, this might as well be the case for you. The 
latest one (ver: 2012.11.14 11:37 MKIV  fmt: 2012.11.16) works fine again. 
(2) Calibre and other readers as well as e.g. the ipad have some nasty caching 
feature. In case you change little things and try to reload the same book in 
your reader, it might still show the old one from the cache. I found, that 
deleting the 'old' book first works most of the times.

I just started working on the epub output of my lecture notes again, since 
there were no readers able to output math until 2 weeks ago.

If I find some time later, I will update the epub page in the wiki.

I hope that helps.
 
Andy

On Nov 15, 2012, at 7:58 PM, Bill Meahan wrote:

 I tried to generate an epub document using ConTeXt following the recipe on 
 the wiki. Didn't work. So, I tried running the export-example.tex file that 
 comes with the distribution, unmodified. Same bad results.
 
Cover is not generated
TOC is not generated (though it is noted this might be the state of the 
 export)
Sectioning doesn't happen.
Paragraphing doesn't happen.
The resultant epub file cannot even be opened with FBReader.
 
 Importing the epub into Sigil shows one big blob of text, with only the 
 between word spacing that's present in the source file. The \quotation{} 
 markup did get turned into quotation marks, chapter numbers were generated 
 and the rest of the markup was stripped out.
 
 Same behavior with both the TeXLive 2012 version of ConTeXt and a quite 
 recent beta.
 
 Up-to-date Ubuntu 12.04
 
 Linux Escherton 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:32:50 UTC 2012 
 i686 i686 i386 GNU/Linux
 
 What am I doing wrong?
 
 -- 
 Bill Meahan
 Westland, Michigan USA
 
 ___
 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 woes

2012-11-15 Thread luigi scarso
On Fri, Nov 16, 2012 at 7:49 AM, Andy Thomas andytho...@web.de wrote:




 I just started working on the epub output of my lecture notes again, since
 there were no readers able to output math until 2 weeks ago.

Is there any reader able to read mathml ?

-- 
luigi
___
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 woes

2012-11-15 Thread Andy Thomas
Supposedly. I did not try it yet.

http://support.apple.com/kb/HT5321

Andy

On Nov 16, 2012, at 8:13 AM, luigi scarso wrote:

 
 
 
 On Fri, Nov 16, 2012 at 7:49 AM, Andy Thomas andytho...@web.de wrote:
 
 
 
 I just started working on the epub output of my lecture notes again, since 
 there were no readers able to output math until 2 weeks ago.
 Is there any reader able to read mathml ?
 
 -- 
 luigi
 
 ___
 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
___