Re: [NTG-context] Ebooks with ConTeXt?

2019-12-11 Thread Rik Kabel


On 12/11/2019 10:45, Henning Hraban Ramm wrote:

Am 2019-12-11 um 16:17 schrieb Rik Kabel :

On 12/11/2019 01:10, Jan U. Hasecke wrote:

Ebooks are xhtml so styles are limited to the capabilities of css. I
fear that initials has to be left flowing images.


Sorry, but if I understand what you mean by initials, that is not the case. 
Consider

.lettrine>p::first-letter {
 font-size: 3rem ;
 line-height  : 0 ;
}

This might be the right CSS instruction, but when I tried that last year, only 
one reader interpreted it correctly.

and ::* are badly supported.

Best, Hraban

Works fine with Calibre, I have not used any other readers. Is this an 
epub 2/3 issue?


--
Rik

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

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


Re: [NTG-context] Ebooks with ConTeXt?

2019-12-11 Thread Henning Hraban Ramm

> Am 2019-12-11 um 16:17 schrieb Rik Kabel :
> 
> On 12/11/2019 01:10, Jan U. Hasecke wrote:
>> Ebooks are xhtml so styles are limited to the capabilities of css. I
>> fear that initials has to be left flowing images.
>> 
> Sorry, but if I understand what you mean by initials, that is not the case. 
> Consider
> 
> .lettrine>p::first-letter {
> font-size: 3rem ;
> line-height  : 0 ;
> }

This might be the right CSS instruction, but when I tried that last year, only 
one reader interpreted it correctly.
> and ::* are badly supported.

Best, Hraban

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

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


Re: [NTG-context] Ebooks with ConTeXt?

2019-12-11 Thread Rik Kabel


On 12/11/2019 01:10, Jan U. Hasecke wrote:

Ebooks are xhtml so styles are limited to the capabilities of css. I
fear that initials has to be left flowing images.


Sorry, but if I understand what you mean by initials, that is not the case. 
Consider

   .lettrine>p::first-letter {
    font-size    : 3rem ;
    line-height  : 0 ;
   }

This produces a raised large character at the beginning of a paragraph. It does 
not automatically accommodate leading quotation marks and such, so some tuning 
may be needed, and of course you have to tag the paragraph with the appropriate 
class.

Similarly, you can set the first line of a paragraph to smallcap.

--
Rik

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

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


Re: [NTG-context] Ebooks with ConTeXt?

2019-12-11 Thread Hans Hagen

On 12/11/2019 7:10 AM, Jan U. Hasecke wrote:


What I can say about epub generally is: It's better to avoid fancy
styling at all and use the default fonts and styles of the ebook devices.
indeed, and when you come from context export, just process the file in 
1pt bodyfont on a very large page .. no page breaks, margin mess, floats 
moving then ...


(btw, it's a pitty that pdf viewers can't handle very high pages well 
because having a book with every chapter one page would be nice ... no 
float issue then; i tried that but the problem is that viewers don't 
remember the vertical positions when you go backward)


Hans

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

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


Re: [NTG-context] Ebooks with ConTeXt?

2019-12-10 Thread Jan U. Hasecke
Am 10.12.19 um 20:38 schrieb Nicola:
> As for ConTeXt, I have tried the latest beta with:
> 
> context mybook.tex
> mtxrun --script epub --make mybook
> 
> This, among the rest, creates an .epub file, which unfortunately the
> above mentioned tools do not like (maybe, that output is still
> experimental?). 

From time to time I publish an ebook either created with Pandoc or with
the pythonic Sphinx documentation tool. In most cases Pandoc epubs
validate fine. Sphinx only lately produces epub that validates without
errors. But I had issues with Apple when I tried to publish a valid epub
on their platform.

You can validate epubs with epubcheck:
https://github.com/w3c/epubcheck

I don't know if ConTeXt produces epub2 or epub3.
http://idpf.org/epub/30/

HTH
juh

-- 
Das ZEN von Pandoc
Bücher und E-Books einfach und professionell produzieren
http://www.amazon.de/Das-ZEN-von-Pandoc-professionell/dp/1505218799/
Paperback (232 Seiten) und E-Book
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Ebooks with ConTeXt?

2019-12-10 Thread Jan U. Hasecke
Am 10.12.19 um 08:50 schrieb Nicola:
> On 2019-12-10, Jan U. Hasecke  wrote:

> Thanks, I didn't think of Pandoc, I'll give it a try. In the past,
> I have tried to create some simple content (slides) with Markdown, but
> my conclusion was that if you know TeX, it doesn't make sense to use
> Markdown :)
> 
> Perhaps this is a silly question (excuse my ignorance about the topic):
> what if you want to add some stylistic touches to your ebooks, such as
> initials? Or Non-breaking spaces? How about adding, say, a text box with
> a different background and a smaller font?

Ebooks are xhtml so styles are limited to the capabilities of css. I
fear that initials has to be left flowing images.

>***
> 
> Or fine control page numbering, headers, footnotes, ligatures, or the
> spacing between paragraphs, or center a separator as above? Do you need
> to modify the generated CSS for that, or would ConTeXt (or Pandoc)
> allow you to take care of (some of) those things?

No page numbers in E-Books and I would avoid headers. Footnotes are
endnotes. Ligatures might be possible if directly inserted, sorry never
tried this in an ebook.

You can modify the css to achieve what is possible in xhtml, though.

I have to confess that I never managed to create an ebook with context
right aways. AFAIK, please correct me Hans, you end up with an epub
folder not the compressed epub itself. I would guess that it is a good
thing if you want to postprocess the book manually by editing content
files or css.

What I can say about epub generally is: It's better to avoid fancy
styling at all and use the default fonts and styles of the ebook devices.

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

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


Re: [NTG-context] Ebooks with ConTeXt?

2019-12-10 Thread Nicola
On 2019-12-10, Hans Hagen  wrote:
> On 12/9/2019 10:13 PM, Nicola wrote:
>> What is the current status of epub support in ConTeXt?
>> 
>> I have never followed ConTeXt's development on the XML front too
>> closely, but recently I have been asked to help format a text-only
>> manuscript for publishing on platforms such as Kindle or Apple Books
>> Store. Can ConTeXt be used (or perhaps even recommended) for that? Or
>> would I have better luck with the proprietary tools (Kindle Create,
>> iBooks Author)?
> context has an xml export (a few variants) and one can start from that 
> ... in the end it all boils down to some css (depends on the book i 
> guess) and tagged content (one can use the divs and spans output or 
> transform the xml to whatever wanted) ... for more complex setups i 
> think there are no generic solutions (unless all books should look 
> alike)

Ok, I imagined that things were like that, but I wasn't sure. Thanks for
confirming my impression.

Nicola

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

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


Re: [NTG-context] Ebooks with ConTeXt?

2019-12-10 Thread Nicola
On 2019-12-10, Henning Hraban Ramm  wrote:
>
>> Am 2019-12-10 um 16:53 schrieb Denis Maier :
>>> 
>>> Perhaps this is a silly question (excuse my ignorance about the
>>> topic): what if you want to add some stylistic touches to your
>>> ebooks, such as initials? Or Non-breaking spaces? How about adding,
>>> say, a text box with a different background and a smaller font?
>>> 
>>> Or fine control page numbering, headers, footnotes, ligatures, or
>>> the spacing between paragraphs, or center a separator as above? Do
>>> you need to modify the generated CSS for that, or would ConTeXt (or
>>> Pandoc) allow you to take care of (some of) those things?
>>> 
>>> Nicola
>> 
>> For Pandoc: Some things can be tweaked with pandoc, but for anything
>> that is a bit more advanced you'll probably need a custom CSS. For
>> special content you can use spans and divs. In your custom CSS you
>> can define how those elements should be rendered. Sounds pretty
>> similar to what Hans wrote in his response. Probably the main
>> questions are if you prefer to work with pandoc markdown or with
>> ConTeXt sources, and if you need additional output formats.

The current need is only for epub. In any case, I'd like to have
a single source of truth for the content. I have experimented a bit with
Pandoc and, in fact, it can generate an .epub file that can be imported
by iBooks Author and converted with kindlegen. As for the style, it
seems that modifying the CSS gives the most control and can't be avoided
for advanced tweaks, even if I'd use ConTeXt.

As for ConTeXt, I have tried the latest beta with:

context mybook.tex
mtxrun --script epub --make mybook

This, among the rest, creates an .epub file, which unfortunately the
above mentioned tools do not like (maybe, that output is still
experimental?). I'll try to follow the more complex steps at
https://wiki.contextgarden.net/Epub_Sample.

> The problem is that custom CSS must be tuned for every single ePub
> reader (app or device), it’s like the browser wars. Most readers
> interprete only a strange subset of CSS2, it’s completely unreliable
> in my (limited) experience.

That's... sad.

> Have a look at https://wiki.contextgarden.net/ePub WRT ePub ot of
> ConTeXt, also at the old docs; unfortunately I never finished writing
> these pages, but I must review my ePub workflow soon-ish.

Thanks, I'll give it a shot!

Nicola


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

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


Re: [NTG-context] Ebooks with ConTeXt?

2019-12-10 Thread Henning Hraban Ramm

> Am 2019-12-10 um 16:53 schrieb Denis Maier :
>> 
>> Perhaps this is a silly question (excuse my ignorance about the topic):
>> what if you want to add some stylistic touches to your ebooks, such as
>> initials? Or Non-breaking spaces? How about adding, say, a text box with
>> a different background and a smaller font?
>> 
>> Or fine control page numbering, headers, footnotes, ligatures, or the
>> spacing between paragraphs, or center a separator as above? Do you need
>> to modify the generated CSS for that, or would ConTeXt (or Pandoc)
>> allow you to take care of (some of) those things?
>> 
>> Nicola
> 
> For Pandoc: Some things can be tweaked with pandoc, but for anything that is 
> a bit more advanced you'll probably need a custom CSS. For special content 
> you can use spans and divs. In your custom CSS you can define how those 
> elements should be rendered. Sounds pretty similar to what Hans wrote in his 
> response. Probably the main questions are if you prefer to work with pandoc 
> markdown or with ConTeXt sources, and if you need additional output formats.

The problem is that custom CSS must be tuned for every single ePub reader (app 
or device), it’s like the browser wars. Most readers interprete only a strange 
subset of CSS2, it’s completely unreliable in my (limited) experience.

Have a look at https://wiki.contextgarden.net/ePub WRT ePub ot of ConTeXt, also 
at the old docs; unfortunately I never finished writing these pages, but I must 
review my ePub workflow soon-ish.


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

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

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


Re: [NTG-context] Ebooks with ConTeXt?

2019-12-10 Thread Denis Maier



Sorry, no info concerning ConTeXT.

You don't have to use proprietary tools. An easy way to create ebooks
from Markdown files (or other sources) is Pandoc. https://pandoc.org/

I produce all of my ebooks in this way. In most cases they validate
without errors. If there are some errors though I use Calibre to fix
them manually.

Thanks, I didn't think of Pandoc, I'll give it a try. In the past,
I have tried to create some simple content (slides) with Markdown, but
my conclusion was that if you know TeX, it doesn't make sense to use
Markdown :)

Perhaps this is a silly question (excuse my ignorance about the topic):
what if you want to add some stylistic touches to your ebooks, such as
initials? Or Non-breaking spaces? How about adding, say, a text box with
a different background and a smaller font?

***

Or fine control page numbering, headers, footnotes, ligatures, or the
spacing between paragraphs, or center a separator as above? Do you need
to modify the generated CSS for that, or would ConTeXt (or Pandoc)
allow you to take care of (some of) those things?

Nicola


For Pandoc: Some things can be tweaked with pandoc, but for anything 
that is a bit more advanced you'll probably need a custom CSS. For 
special content you can use spans and divs. In your custom CSS you can 
define how those elements should be rendered. Sounds pretty similar to 
what Hans wrote in his response. Probably the main questions are if you 
prefer to work with pandoc markdown or with ConTeXt sources, and if you 
need additional output formats.


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

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


Re: [NTG-context] Ebooks with ConTeXt?

2019-12-10 Thread Hans Hagen

On 12/9/2019 10:13 PM, Nicola wrote:

What is the current status of epub support in ConTeXt?

I have never followed ConTeXt's development on the XML front too
closely, but recently I have been asked to help format a text-only
manuscript for publishing on platforms such as Kindle or Apple Books
Store. Can ConTeXt be used (or perhaps even recommended) for that? Or
would I have better luck with the proprietary tools (Kindle Create,
iBooks Author)?
context has an xml export (a few variants) and one can start from that 
... in the end it all boils down to some css (depends on the book i 
guess) and tagged content (one can use the divs and spans output or 
transform the xml to whatever wanted) ... for more complex setups i 
think there are no generic solutions (unless all books should look 
alike) ... of course for 'proze, itemize, simple table, simple 
sectioning' not much is needed


(i gave away my ebook device so i can't check what's the fashion right 
now but as color e-ink seems to be on it's way ...)


Hans

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

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


Re: [NTG-context] Ebooks with ConTeXt?

2019-12-09 Thread Nicola
On 2019-12-10, Jan U. Hasecke  wrote:
> Am 09.12.19 um 22:13 schrieb Nicola:
>> What is the current status of epub support in ConTeXt?
>> 
>> I have never followed ConTeXt's development on the XML front too
>> closely, but recently I have been asked to help format a text-only
>> manuscript for publishing on platforms such as Kindle or Apple Books
>> Store. Can ConTeXt be used (or perhaps even recommended) for that? Or
>> would I have better luck with the proprietary tools (Kindle Create,
>> iBooks Author)?
>
> Sorry, no info concerning ConTeXT.
>
> You don't have to use proprietary tools. An easy way to create ebooks
> from Markdown files (or other sources) is Pandoc. https://pandoc.org/
>
> I produce all of my ebooks in this way. In most cases they validate
> without errors. If there are some errors though I use Calibre to fix
> them manually.

Thanks, I didn't think of Pandoc, I'll give it a try. In the past,
I have tried to create some simple content (slides) with Markdown, but
my conclusion was that if you know TeX, it doesn't make sense to use
Markdown :)

Perhaps this is a silly question (excuse my ignorance about the topic):
what if you want to add some stylistic touches to your ebooks, such as
initials? Or Non-breaking spaces? How about adding, say, a text box with
a different background and a smaller font?

   ***

Or fine control page numbering, headers, footnotes, ligatures, or the
spacing between paragraphs, or center a separator as above? Do you need
to modify the generated CSS for that, or would ConTeXt (or Pandoc)
allow you to take care of (some of) those things?

Nicola


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

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


Re: [NTG-context] Ebooks with ConTeXt?

2019-12-09 Thread Jan U. Hasecke
Am 09.12.19 um 22:13 schrieb Nicola:
> What is the current status of epub support in ConTeXt?
> 
> I have never followed ConTeXt's development on the XML front too
> closely, but recently I have been asked to help format a text-only
> manuscript for publishing on platforms such as Kindle or Apple Books
> Store. Can ConTeXt be used (or perhaps even recommended) for that? Or
> would I have better luck with the proprietary tools (Kindle Create,
> iBooks Author)?

Sorry, no info concerning ConTeXT.

You don't have to use proprietary tools. An easy way to create ebooks
from Markdown files (or other sources) is Pandoc. https://pandoc.org/

I produce all of my ebooks in this way. In most cases they validate
without errors. If there are some errors though I use Calibre to fix
them manually.

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

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


[NTG-context] Ebooks with ConTeXt?

2019-12-09 Thread Nicola
What is the current status of epub support in ConTeXt?

I have never followed ConTeXt's development on the XML front too
closely, but recently I have been asked to help format a text-only
manuscript for publishing on platforms such as Kindle or Apple Books
Store. Can ConTeXt be used (or perhaps even recommended) for that? Or
would I have better luck with the proprietary tools (Kindle Create,
iBooks Author)?

Nicola

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

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