Re: [NTG-context] Quick question about dual output pdf and epub

2020-03-03 Thread Jan U. Hasecke
Am 03.03.20 um 22:04 schrieb Rik Kabel:
> Instructions for creating the .epub from the export are contained in the
> log file.

Has anyone ever got an epub that validates?

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] ePub issues: XML structure

2020-03-03 Thread Henning Hraban Ramm
Not only Hans van der Meer is producing (or trying to produce) ePubs at the 
moment; I reviewed my XSLT workflow 
(https://wiki.contextgarden.net/Epub_Sample) since my publisher colleagues and 
our distributor aren’t happy about just publishing PDFs as eBooks.

While the first book in a series of four is now ready with a lot of manual 
corrections, in the second one the XML structure is messed up: the chapter 
title structure comes only after the chapter content, and index entry tags are 
empty with the actual entry behind like this:

Ein sentimentales Rührstück ist Rico, Oskar 
und die Tieferschatten dennoch nicht. Die beiden Hauptdarsteller 
Anton 
Petzold (Rico) und Juri Winkler (Oskar) füllen ihre Rollen ganz 
wunderbar aus...

In ConTeXt code I marked the actors with
\def\NPers#1#2{\index{#2, #1}#1 #2}
as \NPers{Anton}{Petzold}.

But since that just uses \index, the XML tag should catch the contents, don’t 
you think?

I’ll come up with a MWE; don’t know if I’ll manage to reproduce the 
title/contents mixup though. The other book’s export is ok within the same 
project. It uses the same environment, but a slightly differing chapter setup. 
Any hints which setting could cause the re-ordering? (And I use \startchapter … 
\stopchapter of course.)

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
___


[NTG-context] unwanted with epub

2020-03-03 Thread Hans van der Meer
In producing epub s are appearing (on the -raw.xml file) that are 
unwanted and seem spurious to me. For example aftersome macro's. 
Can someone tell me what triggers a ? In the pdf output such breaks are 
absent.

dr. Hans van der Meer


___
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] Why mode not recognized?

2020-03-03 Thread Hans van der Meer

> On 3 Mar 2020, at 22:21, Wolfgang Schuster 
>  wrote:
> 
> On Tue, 3 Mar 2020 22:07:51 +0100
> Hans van der Meer  wrote:
> 
>> Calling ConTeXt with:
>> 
>> mtxrun --autogenerate --mode=epub --script context "$1"
>> 
>> and in the tex-file called:
>> \starttext
>> \startmode[epub]
>>  Producing EPUB\crlf
>> \stopmode
>> \startnotmode[epub]
>>  Not producing EPUB\crlf
>> \stopnotmode
>> \stoptext
>> 
>> This produces "Not producing EPUB" Why?
> 
> I guess parameters which are passed to the context script have to come after 
> you call the script, e.g.
> 
> mtxrun --autogenerate --script context --mode=epub "$1"
> 
> Wolfgang

Indeed. That sets the mode. Thanks.

Hans van der Meer

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

___
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] Why mode not recognized?

2020-03-03 Thread Wolfgang Schuster
On Tue, 3 Mar 2020 22:07:51 +0100
Hans van der Meer  wrote:

> Calling ConTeXt with:
> 
> mtxrun --autogenerate --mode=epub --script context "$1"
> 
> and in the tex-file called:
> \starttext
> \startmode[epub]
>   Producing EPUB\crlf
> \stopmode
> \startnotmode[epub]
>   Not producing EPUB\crlf
> \stopnotmode
> \stoptext
> 
> This produces "Not producing EPUB" Why?

I guess parameters which are passed to the context script have to come after 
you call the script, e.g.

mtxrun --autogenerate --script context --mode=epub "$1"

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Why mode not recognized?

2020-03-03 Thread Hans van der Meer
Calling ConTeXt with:

mtxrun --autogenerate --mode=epub --script context "$1"

and in the tex-file called:
\starttext
\startmode[epub]
Producing EPUB\crlf
\stopmode
\startnotmode[epub]
Not producing EPUB\crlf
\stopnotmode
\stoptext

This produces "Not producing EPUB" Why?

dr. Hans van der Meer


___
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] Quick question about dual output pdf and epub

2020-03-03 Thread Rik Kabel
Instructions for creating the .epub from the export are contained in the 
log file.


On 3/3/2020 15:58, Hans van der Meer wrote:

I followed your advice and added the setup:


You need
  \setupbackend[export=yes]
in your document.

This, however, does not result in an .epub file but an export directory 
containing an html and xhtml file (only partially conformant to the equivalent 
pdf).

Can I get the output as an .epub file? Some more changes needed?


On Tue, 3 Mar 2020 19:37:47 +0100
Hans van der Meer  wrote:


and then run with --mode=epub

I am running with:
mtxrun --autogenerate --mode=epub --script context "$1"
but no epub document is generated, just the same result.pdf I get without that 
mode.

You need

  \setupbackend[export=yes]

in your document. When you put the setup above in a "epub"
mode you create a epub-document only when you enable the mode
which is recommended because it can have side effects for
the normal PDF.

To avoid these side effects make an extra ConTeXt run
by enabling the mode to get the epub file.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Quick question about dual output pdf and epub

2020-03-03 Thread Wolfgang Schuster
On Tue, 3 Mar 2020 21:58:16 +0100
Hans van der Meer  wrote:

> I followed your advice and added the setup:
> 
> > You need
> >  \setupbackend[export=yes]
> > in your document. 
> 
> This, however, does not result in an .epub file but an export directory 
> containing an html and xhtml file (only partially conformant to the 
> equivalent pdf).
> 
> Can I get the output as an .epub file? Some more changes needed?

Your log file should have a line like this when you put the \setupbackend 
setting in your document:

backend > export > create epub with: mtxrun --script epub --make "test" 
[--purge --rename --svgmath]

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Problem with shading when using rotation (Metapost)

2020-03-03 Thread Fabrice Couvreur
Hi,
No idea ?
Thanks
Fabrice

Le sam. 29 févr. 2020 à 11:01, Fabrice Couvreur 
a écrit :

> Hi,
> Sorry to come back with my match problem. In fact, I do not understand
> why a rotation of 90 influences the degraded color of the ends of the
> matches.
> Thank you.
> Fabrice
>
> \starttext
> \startMPcode
>
>   def match (expr alpha, pos) =
> numeric l;
> l = 4.6cm;
> picture pic;
> pic = image (
> fill unitsquare xscaled 4cm  yscaled 0.2cm  withcolor yellow ;
> fill origin -- (4cm,0) -- (4.1cm,-0.05cm) --  (0.1cm,-0.05cm) --
> cycle withcolor(.6yellow + black);
> draw origin -- (0,0.2cm) -- (4cm,0.2cm) -- (4cm,0) -- (4.1cm,-0.05cm)
> -- (0.1cm,-0.05cm) -- cycle ;
> fill fullcircle xyscaled (0.5cm,0.44cm) shifted (4.125cm,0.1cm) shaded
> withshademethod "circular"
> withshadefactor 0.75
> withshadecolors (white,red););
> draw (fullcircle xyscaled (0.5cm,0.44cm) shifted (4.125cm,0.1cm));
> draw pic rotated alpha shifted pos;
> enddef;
>
> picture house ;
> house = image (
> match(90,(0,0));
> match(0,(0,0));
> match(90,(l,0));
> match(120,(l,l));
> match(60,(0,l)););
>
> draw house;
>
> \stopMPcode
>
___
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] Quick question about dual output pdf and epub

2020-03-03 Thread Hans van der Meer
I followed your advice and added the setup:

> You need
>  \setupbackend[export=yes]
> in your document. 

This, however, does not result in an .epub file but an export directory 
containing an html and xhtml file (only partially conformant to the equivalent 
pdf).

Can I get the output as an .epub file? Some more changes needed?

> 
> On Tue, 3 Mar 2020 19:37:47 +0100
> Hans van der Meer  wrote:
> 
>>> 
>>> and then run with --mode=epub
>> 
>> I am running with:
>>mtxrun --autogenerate --mode=epub --script context "$1"
>> but no epub document is generated, just the same result.pdf I get without 
>> that mode.
> 
> You need
> 
>  \setupbackend[export=yes]
> 
> in your document. When you put the setup above in a "epub"
> mode you create a epub-document only when you enable the mode
> which is recommended because it can have side effects for
> the normal PDF.
> 
> To avoid these side effects make an extra ConTeXt run
> by enabling the mode to get the epub file.
> 
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Quick question about dual output pdf and epub

2020-03-03 Thread Wolfgang Schuster
On Tue, 3 Mar 2020 19:37:47 +0100
Hans van der Meer  wrote:

> > 
> > and then run with --mode=epub
> 
> I am running with:
> mtxrun --autogenerate --mode=epub --script context "$1"
> but no epub document is generated, just the same result.pdf I get without 
> that mode.

You need

  \setupbackend[export=yes]

in your document. When you put the setup above in a "epub"
mode you create a epub-document only when you enable the mode
which is recommended because it can have side effects for
the normal PDF.

To avoid these side effects make an extra ConTeXt run
by enabling the mode to get the epub file.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Quick question about dual output pdf and epub

2020-03-03 Thread Hans van der Meer
> 
> and then run with --mode=epub

I am running with:
mtxrun --autogenerate --mode=epub --script context "$1"
but no epub document is generated, just the same result.pdf I get without that 
mode.

In .bashrc using:
# The current version of the ConTeXt luametatex in use:
CONTEXTLMTX=$HOME/TeX/context-lmtx ; export CONTEXTLMTX
CONTEXTCURRENT=$CONTEXTLMTX ; export CONTEXTCURRENT
MYTEXMFHOME=$HOME/TeX/texmf ; export MYTEXMFHOME
TEXMF=$MYTEXMFHOME:$CONTEXTCURRENT/tex ; export TEXMF
PATH=$CONTEXTCURRENT/tex/texmf-osx-64/bin:$PATH ; export PATH

Log shows: ConTeXt  ver: 2019.10.02 12:53 MKIV beta  fmt: 2019.10.2

I am doing something wrong here?

dr. Hans van der Meer


> On 28 Feb 2020, at 12:07, Hans Hagen  wrote:
> 
> On 2/28/2020 11:48 AM, Christoph Hintermüller wrote:
>> Hi
>> Hust not to miss something or mess up every thing.
>> Can i setup my document preamble such that i can without any switching
>> create pdf and epub output at the same time.
>> Want to provide my lecture notes in pdf and epub format.
>> In other words does it have any side effects on pdf output, if i put
>> \setuptoutput command preparing document for xhtml/epub output in my
>> document preamble/main document?
>> Or would i have to enclose this in some \ifelse conditional block? If
>> is there a possibility to control condition from mtxrun command line?
> Currently it is created at the same time but it runs slower. Indeed using 
> some mode makes sense because you might also want to have a different layout 
> (the simpler, the less possible side effects, actually when doing epub or 
> export using some very large page also makes sense as then there can be less 
> interference of page breaks and so).
> 
> \startmode [epub]
>  
> \stopmode
> 
> and then run with --mode=epub
> 
> 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
> ___

___
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] Documentation/tutorial for xml.collected, xml.first etc.?

2020-03-03 Thread Gerben Wierda
I am trying to find documentation for the xml interface in lua. 
Explanation/tutorial for the use of functions like xml.first, the ‘.’ 
interface, etc. I see examples of their use but not everything is immediately 
clear to me.

Gerben Wierda
Chess and the Art of Enterprise Architecture 
Mastering ArchiMate 
Architecture for Real Enterprises 
 at InfoWorld
On Slippery Ice  at EAPJ

___
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] bidi + protrusion issue in LMTX

2020-03-03 Thread Hans Hagen

On 3/2/2020 8:30 PM, Joseph wrote:

Hi,

I found that in some cases bidi text seems to inhibit protrusion feature 
in text typesetting in LMTX (works fine with luatex 1.10).


MWE below (difference is in first paragraph, second is for comparison 
and is same in both):


\language[fr]

\mainlanguage[fr]

\definefontfamily[mainfont][serif][EBGaramond][features={protrusion=quality, 
expansion=quality}]

you best can do this if you also want kerns:

\definefontfeature[mydefault][default][protrusion=quality,expansion=quality]

\definefontfamily[mainfont][serif][EBGaramond][features=mydefault]

anyway, i'll look at it

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
___