ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: ConTeXt epub workflow
@ 2014-07-03  4:15 Andres Conrado
  0 siblings, 0 replies; 11+ messages in thread
From: Andres Conrado @ 2014-07-03  4:15 UTC (permalink / raw)
  To: ntg-context


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

I've been using a workflow to generate epub + PDF for several books so far,
and in my experience, using Markdown base files is very good: you can
include images, links, etc., and then you can use pandoc (
http://johnmacfarlane.net/pandoc/) to generate both epub and context
source, also you can customize the templates used by pandoc to generate the
context source; that way you can handle the pdf layout; however, you must
remember that epub can't handle mathml; you must include equations as
images, if you have them, and you won't have any real presentational
features: epub is as simple as it can be. Like HTML in the early 90s. But
this way works for me.

Andrés Conrado Montoya

[-- Attachment #1.2: Type: text/html, Size: 841 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] 11+ messages in thread

* Re: ConTeXt epub workflow
  2014-07-02 21:12 Idris Samawi Hamid ادريس   سماوي حامد
                   ` (4 preceding siblings ...)
  2014-07-03  8:45 ` Hans Hagen
@ 2014-07-03 18:51 ` Jan Tosovsky
  5 siblings, 0 replies; 11+ messages in thread
From: Jan Tosovsky @ 2014-07-03 18:51 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

On 2014-07-02 Idris Samawi Hamid ادريس   سماوي حامد wrote:
> 
> I have an urgent project that needs three outputs: pdf, epub, and
> kindle. The formatting needs are pretty basic. 
> 
> What is the recommended, more efficient workflow for this sort of
> thing?

For multichannel publishing it is a must to keep your data in semantically
rich form. I strongly recommend switching from non structural macros to
self-validating XML markup (DocBook, DITA). This 'Single Source Publishing'
approach opens new possibilities. Besides ePUB (you can convert/degrade it
to MOBI in Calibre) and PDF you can get a lot of other outputs
out-of-the-box (Webhelp, CHM, JavaHelp, LaTeX, ConTeXt, ...).

But to be honest, both setting up and customizing the workflow require a
specific skill set so it is IMHO not well suited for 'urgent' projects...

Btw, there is a special user group with many related topics on linked.in:
https://www.linkedin.com/groups/Ebooks-Elearning-Epub-3-HTML5-2414597?gid=24
14597

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

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

* Re: ConTeXt epub workflow
  2014-07-02 21:18 ` Idris Samawi Hamid ادريس   سماوي حامد
@ 2014-07-03  8:48   ` Hans Hagen
  0 siblings, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2014-07-03  8:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 7/2/2014 11:18 PM, Idris Samawi Hamid ادريس   سماوي حامد wrote:
> On Wed, 02 Jul 2014 15:12:10 -0600, Idris Samawi Hamid ادريس   سماوي
> حامد <ishamid@colostate.edu> wrote:
>
>> What is the recommended, more efficient workflow for this sort of
>> thing? Should I start with markdown and then generate context and epub
>> (then convert epub=>kindle I presume)? Or does one context file with
>> pdf and epub outputs work well? Many years ago I did some documents in
>> ConTeXt with both print and screen pdfs from a single source. Can we
>> do the latter in ConTeXt now?
> ^^^^^^^^
>
> Er, Can we do the *former* in ConTeXt? Viz., generate both pdf and epub
> from a single source.

you can generate a pdf + export in xml from the same source; if you know 
what epub you want (and how it should look like) you can use a 
combination of transformation and css

the main boundary condition is that you tag wisely (and i think this is 
not an issue in your case as you always tag); there is some deduction 
built in with respect to where paragraphs begin and end so often it 
helps to tag paragraphs too (depends on the document)

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] 11+ messages in thread

* Re: ConTeXt epub workflow
  2014-07-02 21:12 Idris Samawi Hamid ادريس   سماوي حامد
                   ` (3 preceding siblings ...)
  2014-07-03  7:41 ` Keith McKay
@ 2014-07-03  8:45 ` Hans Hagen
  2014-07-03 18:51 ` Jan Tosovsky
  5 siblings, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2014-07-03  8:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 7/2/2014 11:12 PM, Idris Samawi Hamid ادريس   سماوي حامد wrote:
> Dear gang,
>
> I have an urgent project that needs three outputs: pdf, epub, and
> kindle. The formatting needs are pretty basic. In your experience:
>
> What is the recommended, more efficient workflow for this sort of thing?
> Should I start with markdown and then generate context and epub (then
> convert epub=>kindle I presume)? Or does one context file with pdf and
> epub outputs work well? Many years ago I did some documents in ConTeXt
> with both print and screen pdfs from a single source. Can we do the
> latter in ConTeXt now? Does anyone have any examples?

the export is xml reflecting the structure etc and as the whole idea of 
xml is that it can be transformed one can map that to anything needed

there is mtx-epub but i need to look into that again as one problem with 
epub is that all these substandards and devices differ a bit

context can produce xhtml which then with a css can be viewed in full 
blown browsers (i used mozilla) although for some constructs (like 
hyperlinks) html like thingies have to be used (not part of css)

as xhtml is not becoming the standard it should be, i'm considering a 
variant output where everything is a <div> or <span> which then even 
more moves things to css (outputting html tags makes no sense as we then 
would end up in tag abuse due to the limited number of tags)

> According to
>
> http://wiki.contextgarden.net/epub
>
> There is no support for graphics in ConTeXt epub output. Are there
> workarounds?

all relevant info is embedded and output (with a css mapping to graphics 
that one can supply as png/jpg/whatever)

> In any case, all advice for an efficient workflow for this project will
> be greatly appreciated!

(luigi is working on some stuff that transforms the export into wiki 
pages for the garden, e.g. the new publications manual)

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] 11+ messages in thread

* Re: ConTeXt epub workflow
  2014-07-03  7:14   ` Gour
@ 2014-07-03  8:23     ` Hans Hagen
  0 siblings, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2014-07-03  8:23 UTC (permalink / raw)
  To: ntg-context

On 7/3/2014 9:14 AM, Gour wrote:
> Aditya Mahajan <adityam@umich.edu> writes:
>
>> In the long run, I think that the "easiest" way to generate multiple
>> output formats for non-trivial input text is to use XML as your input
>> format.
>
> Although I do not like XML-based format as input for writing, I wonder
> how is ConTeXt handling XML format *today* ?

there are manuals (mkiv) and examples in in the test suite

mkvi xml support is completely different (tree based filtering) from 
mkii (sequential, streaming)

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] 11+ messages in thread

* Re: ConTeXt epub workflow
  2014-07-02 21:12 Idris Samawi Hamid ادريس   سماوي حامد
                   ` (2 preceding siblings ...)
  2014-07-03  3:42 ` Aditya Mahajan
@ 2014-07-03  7:41 ` Keith McKay
  2014-07-03  8:45 ` Hans Hagen
  2014-07-03 18:51 ` Jan Tosovsky
  5 siblings, 0 replies; 11+ messages in thread
From: Keith McKay @ 2014-07-03  7:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Idris

If your document is simple I would consider the following workflow. I 
use this method for simple novels to produce both ePubs and Kindle 
output relatively quickly from a word docs which authors send me.

Load the word doc into OpenOffice and save in OpenOffice format (.odt). 
Using the Writer2ePub extension in OpenOffice convert to ePub. You will 
get a reasonable looking ePub if you have taken a little care to style 
the document beforehand. Load the ePub into Sigil and tidy up the ePub. 
I Usually split the ePub into Chapters, embed fonts and add any images 
where I want them to go at this point. Once you are happy with the ePub 
you should test it on the various eReaders to make sure it looks as 
expected, don't be surprised to see differences and you may have to 
create different ePubs for the different eReaders. I have to do that for 
iBooks and Kobo eReaders. The idpf have an online ePub validator for 
ePubs which you should use to check for ePub standard compliance. Adobe 
Digital Editions is a useful tool here. You can now convert it into 
Kindle format using Kindle Previewer. If it requires changes, do that in 
Sigil and then run through Kindle Previewer again.

To get pdf output I have been experimenting with pandoc quite recently 
with some success. I take the ePub and rename as a zip file and open it 
to expose its directory structure. Using pandoc I convert it to ConText 
code and tidy up a wee bit but, on the whole, Pandoc gives a not bad 
conversion even if images are present. Again you will probably have to 
tidy up the Context code and play about with fonts etc.

This workflow looks a wee bit complicated but it does work well once you 
get the hang of it. I had originally tried using the Context to ePub but 
as previous correspondents have intimated you only get xml output rather 
than xhtml which is what eReaders require.

If you need help feel free to email me privately.

Best Wishes
Keith McKay
Hamilton, Scotland

On 02/07/2014 22:12, Idris Samawi Hamid ادريس سماوي حامد wrote:
> Dear gang,
>
> I have an urgent project that needs three outputs: pdf, epub, and 
> kindle. The formatting needs are pretty basic. In your experience:
>
> What is the recommended, more efficient workflow for this sort of 
> thing? Should I start with markdown and then generate context and epub 
> (then convert epub=>kindle I presume)? Or does one context file with 
> pdf and epub outputs work well? Many years ago I did some documents in 
> ConTeXt with both print and screen pdfs from a single source. Can we 
> do the latter in ConTeXt now? Does anyone have any examples?
>
> According to
>
> http://wiki.contextgarden.net/epub
>
> There is no support for graphics in ConTeXt epub output. Are there 
> workarounds?
>
> In any case, all advice for an efficient workflow for this project 
> will be greatly appreciated!
>
> Best wishes
> Idris

___________________________________________________________________________________
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] 11+ messages in thread

* Re: ConTeXt epub workflow
  2014-07-03  3:42 ` Aditya Mahajan
@ 2014-07-03  7:14   ` Gour
  2014-07-03  8:23     ` Hans Hagen
  0 siblings, 1 reply; 11+ messages in thread
From: Gour @ 2014-07-03  7:14 UTC (permalink / raw)
  To: ntg-context

Aditya Mahajan <adityam@umich.edu> writes:

> In the long run, I think that the "easiest" way to generate multiple
> output formats for non-trivial input text is to use XML as your input
> format.

Although I do not like XML-based format as input for writing, I wonder
how is ConTeXt handling XML format *today* ?


Sincerely,
Gour

-- 
He who is satisfied with gain which comes of its own accord, who 
is free from duality and does not envy, who is steady in both 
success and failure, is never entangled, although performing actions.

___________________________________________________________________________________
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] 11+ messages in thread

* Re: ConTeXt epub workflow
  2014-07-02 21:12 Idris Samawi Hamid ادريس   سماوي حامد
  2014-07-02 21:18 ` Idris Samawi Hamid ادريس   سماوي حامد
  2014-07-03  3:13 ` Henning Hraban Ramm
@ 2014-07-03  3:42 ` Aditya Mahajan
  2014-07-03  7:14   ` Gour
  2014-07-03  7:41 ` Keith McKay
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Aditya Mahajan @ 2014-07-03  3:42 UTC (permalink / raw)
  To: Idris Samawi Hamid ادريس  
	سماوي حامد
  Cc: ntg-context

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1736 bytes --]

On Wed, 2 Jul 2014, Idris Samawi Hamid ادريس   سماوي حامد wrote:

> Dear gang,
>
> I have an urgent project that needs three outputs: pdf, epub, and kindle. The 
> formatting needs are pretty basic. In your experience:
>
> What is the recommended, more efficient workflow for this sort of thing? 
> Should I start with markdown and then generate context and epub (then convert 
> epub=>kindle I presume)? Or does one context file with pdf and epub outputs 
> work well?

If you are short on time and your formatting needs are basic, I would 
suggest that you start with markdown as your input format and use pandoc 
to convert it to epub and context. There are various tools to do epub to 
kindle conversion.

Markdown in a very primitive input format. For anything non-trivial 
(multiple types of floats, multiple types of emphasis, etc.) you have to 
resort to some sort of pre-processing of input.

Pandoc is the only tool that does Markdown to ConTeXt conversion. There 
are more tools for Markdown to LaTeX conversion. The ConTeXt markup 
generated by pandoc is not ideal (\bf, \em, etc instead of semantic 
markup); it is possible to change the output, but you need to learn how to 
program in Haskell.

You can start with ConTeXt and generate epub. However, ConTeXt generates 
XML+CSS rather than "pure" XHTML. Most browsers can handle XML+CSS, but 
most (all?) epub readers cannot. So, the output is not usable without some 
post-processing (this might have changed, I haven't tested ConTeXt epub in 
a year or so).

In the long run, I think that the "easiest" way to generate multiple 
output formats for non-trivial input text is to use XML as your input 
format.

Aditya


[-- 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] 11+ messages in thread

* Re: ConTeXt epub workflow
  2014-07-02 21:12 Idris Samawi Hamid ادريس   سماوي حامد
  2014-07-02 21:18 ` Idris Samawi Hamid ادريس   سماوي حامد
@ 2014-07-03  3:13 ` Henning Hraban Ramm
  2014-07-03  3:42 ` Aditya Mahajan
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Henning Hraban Ramm @ 2014-07-03  3:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 2014-07-03 um 03:12 schrieb Idris Samawi Hamid ادريس سماوي حامد <ishamid@colostate.edu>:

> What is the recommended, more efficient workflow for this sort of thing? Should I start with markdown and then generate context and epub (then convert epub=>kindle I presume)? Or does one context file with pdf and epub outputs work well? Many years ago I did some documents in ConTeXt with both print and screen pdfs from a single source. Can we do the latter in ConTeXt now? Does anyone have any examples?
> 

ConTeXt’s ePub output is not usable without conversion (to XHTML). Its XML output is even corrupt if you try with a project structure. You have to mark every structure like \start/\stopparagraph - very tedious!
Some other workflow is probably more efficient.

That said, I recently completed an ePub from a ConTeXt source, but I can’t recommend it, there was a lot of manual tweaking involved.


Greetlings, Hraban
---
http://www.fiee.net/texnique/
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] 11+ messages in thread

* Re: ConTeXt epub workflow
  2014-07-02 21:12 Idris Samawi Hamid ادريس   سماوي حامد
@ 2014-07-02 21:18 ` Idris Samawi Hamid ادريس   سماوي حامد
  2014-07-03  8:48   ` Hans Hagen
  2014-07-03  3:13 ` Henning Hraban Ramm
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Idris Samawi Hamid ادريس   سماوي حامد @ 2014-07-02 21:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 02 Jul 2014 15:12:10 -0600, Idris Samawi Hamid ادريس   سماوي حامد  
<ishamid@colostate.edu> wrote:

> What is the recommended, more efficient workflow for this sort of thing?  
> Should I start with markdown and then generate context and epub (then  
> convert epub=>kindle I presume)? Or does one context file with pdf and  
> epub outputs work well? Many years ago I did some documents in ConTeXt  
> with both print and screen pdfs from a single source. Can we do the  
> latter in ConTeXt now?
^^^^^^^^

Er, Can we do the *former* in ConTeXt? Viz., generate both pdf and epub  
 from a single source.

Best wishes
Idris
-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___________________________________________________________________________________
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] 11+ messages in thread

* ConTeXt epub workflow
@ 2014-07-02 21:12 Idris Samawi Hamid ادريس   سماوي حامد
  2014-07-02 21:18 ` Idris Samawi Hamid ادريس   سماوي حامد
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Idris Samawi Hamid ادريس   سماوي حامد @ 2014-07-02 21:12 UTC (permalink / raw)
  To: ntg-context

Dear gang,

I have an urgent project that needs three outputs: pdf, epub, and kindle.  
The formatting needs are pretty basic. In your experience:

What is the recommended, more efficient workflow for this sort of thing?  
Should I start with markdown and then generate context and epub (then  
convert epub=>kindle I presume)? Or does one context file with pdf and  
epub outputs work well? Many years ago I did some documents in ConTeXt  
with both print and screen pdfs from a single source. Can we do the latter  
in ConTeXt now? Does anyone have any examples?

According to

http://wiki.contextgarden.net/epub

There is no support for graphics in ConTeXt epub output. Are there  
workarounds?

In any case, all advice for an efficient workflow for this project will be  
greatly appreciated!

Best wishes
Idris
-- 
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___________________________________________________________________________________
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] 11+ messages in thread

end of thread, other threads:[~2014-07-03 18:51 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-03  4:15 ConTeXt epub workflow Andres Conrado
  -- strict thread matches above, loose matches on Subject: below --
2014-07-02 21:12 Idris Samawi Hamid ادريس   سماوي حامد
2014-07-02 21:18 ` Idris Samawi Hamid ادريس   سماوي حامد
2014-07-03  8:48   ` Hans Hagen
2014-07-03  3:13 ` Henning Hraban Ramm
2014-07-03  3:42 ` Aditya Mahajan
2014-07-03  7:14   ` Gour
2014-07-03  8:23     ` Hans Hagen
2014-07-03  7:41 ` Keith McKay
2014-07-03  8:45 ` Hans Hagen
2014-07-03 18:51 ` Jan Tosovsky

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