Re: [NTG-context] Issues with vertical spacing in simple case

2018-07-18 Thread Joseph Canedo
Thanks.
The problem happens in a case where there are no paragraph split between 2 
pages. All pars are entirely either in page 1 or page 2 (these numbers are not 
actual page numbers, but it’s for clarity). 

I am trying to create a MWE but it’s not trivial. The situation as far as I 
understand it is like the following :

I’ve added tracers for vspacing.synchronizepage function.
When page 1 ships, there are 2 paragraphs (1 + 3 lines) still pending because 
they do not fit in page 1 so they will be shipped in page 2 (I think that what 
is in texlists.page_head variable). Hence tex.prevgraf which was 0 is set to 4 
(see this from traces in output log).

vspacing> page 4, prevdepth 2.56577pt => 2.56577pt, prevgraf 0 => 4
vspacing> list glue:topskip hlist:line penalty:userpenalty 
penalty:userpenalty glue:baselineskip hlist:line penalty:linebreakpenalty 
glue:baselineskip hlist:line penalty:linebreakpenalty glue:baselineskip 
hlist:line glue:userskip

Next paragraph after the 2 pending pars I refer to above has a non zero 
\hangindent and \hangafter (set to -1) and when it starts being processed (in 
horizontal mode) prevgraf is already 4 so I think this cancels out that hanging 
(that’s the effect I see in output, there is no indent in 1st line of 3rd par), 
as IIRC TEX considers par has already 4 lines but in actuality it has 0. If I 
read correctly the TeXBook, prevgraf value has some impact on \hangafter / 
\hangindent

The value of \prevgraf affects line breaking only when TEX
is dealing with nonstandard \parshape or \hangindent.

Joseph

De : Hans Hagen
Envoyé le :jeudi 19 juillet 2018 00:00
À : Joseph Canedo; mailing list for ConTeXt users
Objet :Re: [NTG-context] Issues with vertical spacing in simple case

On 7/18/2018 10:33 PM, Joseph Canedo wrote:
> Thanks Hans.
> 
> Picked up today beta and some code I have relying on value of 
> tex.prevgraf starts breaking. This is lettrine related code that sets 
> hangafter for 1st paragraph and eventually subsequent if lettrine is 
> larger than 1st par.
> 
> I see the function vspacing.synchronizepage() sets prevgraf value I 
> guess to avoid bleeding also paragraph lines.
> 
> Is there any possibility to get original unchanged tex.prevgraf value, 
> possibly using some callback or some other tex. ?
you cannot rely on prevgraf crossing pages (so you get e.g. 8 at the top 
of a page with 5 lines

where/how does it fail

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] Spurious blank line inside paragraph

2018-07-18 Thread Henri Menke

On 19/07/18 15:52, Marcus Vinicius Mesquita wrote:

Dear list,

In the MWE below, ConTeXt generates a spurious blank line inside the 
paragraph in the pdf output.


Accented characters like Á are too high for the line, so the gridding 
algorithm will insert vertical space.  Just make the line a little higher.


\setupinterlinespace[line=3ex]



\setuplayout[grid=yes]
\mainlanguage[pt]
\starttext
Poderíamos perguntar-nos: O mundo que percebemos é uma ilusão?
A percepção que tenho do mundo parece objetiva, pois sou consciente disso.
Mas também averiguo que existem muitas situações totalmente estranhas 
para mim:
o estado de consciência de um esquizofrênico, a experiência mística de 
uma Teresa de Ávila,
a capacidade, cabalmente comprovada, que muitas pessoas têm de fazer 
predições,
a percepção de um daltônico que vê o mundo em duas cores, as 
experiências extracorpóreas que milhares de pessoas conhecem,

a inflência a que se submete uma pessoa sob os efeitos da hipnose, etc.
\stoptext


My ConTeXt version: 2018.07.18 17:33


Marcus Vinicius
​​



___
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] Spurious blank line inside paragraph

2018-07-18 Thread Marcus Vinicius Mesquita
Dear list,

In the MWE below, ConTeXt generates a spurious blank line inside the
paragraph in the pdf output.

\setuplayout[grid=yes]
\mainlanguage[pt]
\starttext
Poderíamos perguntar-nos: O mundo que percebemos é uma ilusão?
A percepção que tenho do mundo parece objetiva, pois sou consciente disso.
Mas também averiguo que existem muitas situações totalmente estranhas para
mim:
o estado de consciência de um esquizofrênico, a experiência mística de uma
Teresa de Ávila,
a capacidade, cabalmente comprovada, que muitas pessoas têm de fazer
predições,
a percepção de um daltônico que vê o mundo em duas cores, as experiências
extracorpóreas que milhares de pessoas conhecem,
a inflência a que se submete uma pessoa sob os efeitos da hipnose, etc.
\stoptext


My ConTeXt version: 2018.07.18 17:33


Marcus Vinicius
​​


mwe.tex
Description: TeX document


mwe.pdf
Description: Adobe PDF document
___
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] Issues with vertical spacing in simple case

2018-07-18 Thread Hans Hagen

On 7/18/2018 10:33 PM, Joseph Canedo wrote:

Thanks Hans.

Picked up today beta and some code I have relying on value of 
tex.prevgraf starts breaking. This is lettrine related code that sets 
hangafter for 1st paragraph and eventually subsequent if lettrine is 
larger than 1st par.


I see the function vspacing.synchronizepage() sets prevgraf value I 
guess to avoid bleeding also paragraph lines.


Is there any possibility to get original unchanged tex.prevgraf value, 
possibly using some callback or some other tex. ?
you cannot rely on prevgraf crossing pages (so you get e.g. 8 at the top 
of a page with 5 lines


where/how does it fail

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] Issues with vertical spacing in simple case

2018-07-18 Thread Joseph Canedo
Thanks Hans.

Picked up today beta and some code I have relying on value of tex.prevgraf 
starts breaking. This is lettrine related code that sets hangafter for 1st 
paragraph and eventually subsequent if lettrine is larger than 1st par.
I see the function vspacing.synchronizepage() sets prevgraf value I guess to 
avoid bleeding also paragraph lines.

Is there any possibility to get original unchanged tex.prevgraf value, possibly 
using some callback or some other tex. ? 

Thanks

Joseph

De : Hans Hagen
Envoyé le :mercredi 18 juillet 2018 11:11
À : mailing list for ConTeXt users; Joseph Canedo
Objet :Re: [NTG-context] Issues with vertical spacing in simple case

On 7/17/2018 11:35 PM, Joseph Canedo wrote:
> Dear list,
> 
> Trying to build a MWE for a problem with unexpected page break (near a 
> \blank[line, samepage]) I could not yet reproduce yet, I came up with 
> strange output.
> 
> With latest beta
> 
> mtx-context | current version: 2018.07.17 17:25
> 
> MWE :
> 
> \starttext
> 
> \dorecurse{5}{
> 
> \input knuth
> 
> \blank[line, samepage]Second.
> 
> \input zapf
> 
> \blank[line, samepage]Second maybe vertically wrong align?
> 
> }
> 
> \stoptext
> 
> Please see in page 2, the line printing : Second maybe vertically wrong 
> align? (topskip related?)
> 
> Seems very close to next line for an unknown reason to me.

The next beta will have a fix. The problem is that tex's prevdepth 
bleeds over into a next page so i try to deal with that ... it's 
sometimes hard to take all into accoutn that needs to (esp when there is 
interferences).

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] Finding lua file for module using \registerctxluafile

2018-07-18 Thread Hans Hagen

On 7/18/2018 7:07 PM, Stanislav Sokolenko wrote:

Dear list,

I've recently written a small module p-mymod.tex which uses lua code in 
p-mymod.lua. In order to load this lua code, I use 
\registerctxluafile{p-mymod}{1.001} (copying the example of 
m-database.mkiv). However, it seems like the search path for lua files 
isn't the same as for context module files.


When a context file that uses p-mymod through \usemodule[mymod] is 
placed in a subdirectory, it finds p-mymod, but not the lua portion:


p-mymod.tex
p-mymod.lua
subdir/test.tex

Placing the lua file inside the subdirectory resolves this problem:

p-mymod.tex
subdir/p-mymod.lua
subdir/test.tex

What is the suggested method to change the lua search path? Ideally, I'd 
like to avoid placing the files in 
$TEXMF/tex/context/third// as this module is quite 
intimately tied to the specific project and it doesn't make much sense 
to separate the files too much.

normally i put those in texmf-project/tex/context/...


-
  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] page ranges in \markpage

2018-07-18 Thread Pablo Rodriguez
On 07/18/2018 09:08 PM, Wolfgang Schuster wrote:
>> Sorry, but how do I apply that with to imposed pages with \insertpages?
>>
>> I know that \filterpages is there, but I need to have the complete
>> document to print only some of the pages.
> 
> You can get the number of pages of the included file with
> \getfiguredimensions.
> 
> Afterwards you can use a loop where you add the markpage commands at
> the begin and end of the range, below is a simple example but it’s easy
> to write a better loop with Lua.
I see that not having a way to specify ranges in \markpages makes
complex to specify many ranges in a document.

Sorry, I understood the solution (I used a Lua loop for to impose pages
in a new PDF document some time ago), but I cannot stop thinking why the
approach to get page ranges looks so complex to me.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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] page ranges in \markpage

2018-07-18 Thread Wolfgang Schuster




Pablo Rodriguez 
18. Juli 2018 um 18:19
Hans,

would it be possible that \markpage could have page ranges as in the
following sample?

\setuplayout
[backspace=0pt,
topspace=0pt,
width=middle,
height=middle,
location=middle,
header=0pt,
footer=0pt]
\setupinteraction[state=start]
\setupinteractionscreen[option={portrait, paper}, print=pages]
\markpage[pages][100-300]
\starttext
\insertpages[i-context.pdf][width=0pt]
\stoptext

Many thanks for your help,

Pablo
Wolfgang Schuster 
18. Juli 2018 um 19:40


Pablo Rodriguez 
18. Juli 2018 um 18:19
Hans,

would it be possible that \markpage could have page ranges as in the
following sample?

\setuplayout
[backspace=0pt,
topspace=0pt,
width=middle,
height=middle,
location=middle,
header=0pt,
footer=0pt]


\setuplayout[page]


\setupinteraction[state=start]
\setupinteractionscreen[option={portrait, paper}, print=pages]
\markpage[pages][100-300]
\starttext
\insertpages[i-context.pdf][width=0pt]
\stoptext


\startmarkpages[page]
...
\stopmarkpages


Wolfgang
Pablo Rodriguez 
18. Juli 2018 um 20:44
On 07/18/2018 07:40 PM, Wolfgang Schuster wrote:

Pablo Rodriguez 18. Juli 2018 um 18:19
Hans,

would it be possible that \markpage could have page ranges as in the
following sample?

\setuplayout
[backspace=0pt,
topspace=0pt,
width=middle,
height=middle,
location=middle,
header=0pt,
footer=0pt]

\setuplayout[page]


Many thanks for your reply, Wolfgang.

I didn’t know the already defined layout. In which source file is it
defined? (I would like to know whether there are more already defined
layouts.)


page-lay.mkiv


\insertpages[i-context.pdf][width=0pt]
[...]

\startmarkpages[page]
...
\stopmarkpages


Sorry, but how do I apply that with to imposed pages with \insertpages?

I know that \filterpages is there, but I need to have the complete
document to print only some of the pages.


You can get the number of pages of the included file with 
\getfiguredimensions.


Afterwards you can use a loop where you add the markpage commands at
the begin and end of the range, below is a simple example but it’s easy 
to write

a better loop with Lua.


\setuplayout[page]

\setupinteraction[state=start]

\setupinteractionscreen[option={portrait, paper}, print=pages]

\starttext

\getfiguredimensions[i-context.pdf]

\dostepwiserecurse{1}{99}{1}{\externalfigure[i-context.pdf][height=\textheight,page=\recurselevel]}
\startmarkpages[page]
\dostepwiserecurse{100}{300}{1}{\externalfigure[i-context.pdf][height=\textheight,page=\recurselevel]}
\stopmarkpages
\dostepwiserecurse{301}{\noffigurepages}{1}{\externalfigure[i-context.pdf][height=\textheight,page=\recurselevel]}

\stoptext


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] page ranges in \markpage

2018-07-18 Thread Pablo Rodriguez
On 07/18/2018 07:40 PM, Wolfgang Schuster wrote:
> 
>> Pablo Rodriguez 18. Juli 2018 um 18:19
>> Hans,
>>
>> would it be possible that \markpage could have page ranges as in the
>> following sample?
>>
>> \setuplayout
>> [backspace=0pt,
>> topspace=0pt,
>> width=middle,
>> height=middle,
>> location=middle,
>> header=0pt,
>> footer=0pt]
> 
> \setuplayout[page]

Many thanks for your reply, Wolfgang.

I didn’t know the already defined layout. In which source file is it
defined? (I would like to know whether there are more already defined
layouts.)

>> \insertpages[i-context.pdf][width=0pt]
>> [...]
> \startmarkpages[page]
> ...
> \stopmarkpages

Sorry, but how do I apply that with to imposed pages with \insertpages?

I know that \filterpages is there, but I need to have the complete
document to print only some of the pages.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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] page ranges in \markpage

2018-07-18 Thread Wolfgang Schuster



Pablo Rodriguez 
18. Juli 2018 um 18:19
Hans,

would it be possible that \markpage could have page ranges as in the
following sample?

\setuplayout
[backspace=0pt,
topspace=0pt,
width=middle,
height=middle,
location=middle,
header=0pt,
footer=0pt]


\setuplayout[page]


\setupinteraction[state=start]
\setupinteractionscreen[option={portrait, paper}, print=pages]
\markpage[pages][100-300]
\starttext
\insertpages[i-context.pdf][width=0pt]
\stoptext


\startmarkpages[page]
...
\stopmarkpages


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] Finding lua file for module using \registerctxluafile

2018-07-18 Thread Stanislav Sokolenko

Dear list,

I've recently written a small module p-mymod.tex which uses lua code in 
p-mymod.lua. In order to load this lua code, I use 
\registerctxluafile{p-mymod}{1.001} (copying the example of 
m-database.mkiv). However, it seems like the search path for lua files 
isn't the same as for context module files.


When a context file that uses p-mymod through \usemodule[mymod] is 
placed in a subdirectory, it finds p-mymod, but not the lua portion:


p-mymod.tex
p-mymod.lua
subdir/test.tex

Placing the lua file inside the subdirectory resolves this problem:

p-mymod.tex
subdir/p-mymod.lua
subdir/test.tex

What is the suggested method to change the lua search path? Ideally, I'd 
like to avoid placing the files in 
$TEXMF/tex/context/third// as this module is quite 
intimately tied to the specific project and it doesn't make much sense 
to separate the files too much.


Thanks,

Stan



___
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] page ranges in \markpage

2018-07-18 Thread Pablo Rodriguez
Hans,

would it be possible that \markpage could have page ranges as in the
following sample?

\setuplayout
  [backspace=0pt,
topspace=0pt,
   width=middle,
  height=middle,
location=middle,
  header=0pt,
  footer=0pt]
\setupinteraction[state=start]
\setupinteractionscreen[option={portrait, paper}, print=pages]
\markpage[pages][100-300]
\starttext
\insertpages[i-context.pdf][width=0pt]
\stoptext

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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] More spurious problems in exports

2018-07-18 Thread Rik Kabel

On 7/18/2018 10:56, Hans Hagen wrote:

On 7/18/2018 4:59 AM, Rik Kabel wrote:

List,

Another oddity with  elements in XML / xhtml / html export:

With a defined highlight, a break is inserted if the highlight is the 
first item in an environment. If it is not the first item in the 
environment, no break is inserted.


Most of the other odd breaks can be dealt with in css. These are more 
difficult to tame -- for example, in the startlines environment in 
the example below, there is not enough information preserved to know 
if the tagged item is supposed to be a single line or not.


(Tests using 2018-07-17 beta on Win64.)


You get this, with the numbers representing the paragraph number:

\starttext
% foo

\startparagraph
  \emIt{x 1} a 1
\stopparagraph

\startparagraph
  {\emIt x 2} a unset
\stopparagraph

\stoptext

of this:

\starttext
foo 1

\startparagraph
  \emIt{x 2} a 2
\stopparagraph

\startparagraph
  {\emIt x 3} a 1
\stopparagraph

\stoptext

so, when the par number is effectively set inside a group you end up 
with bad tags which will force that break because it's a different 
paragraph .. no way to intercept or chaneg that


The best I can do is issue a warning like

export > fuzzy paragraph: a (U+00061) [space] - (U+0002D) 2 (U+00032) 
1 (U+00031) 4 (U+00034) 7 (U+00037) 4 (U+00034) 8 (U+00038) 3 
(U+00033) 6 (U+00036) 4 (U+00034) 7 (U+00037)

backend > x

so that one can fix the source.


Changing from a font switch ­– {\emIt text} – to a command – \emit{text} 
– resolves the issue for these cases. I will add a note to the wiki 
that, when changing from font switches to highlighting, one should 
change the syntax.


--
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] More spurious problems in exports

2018-07-18 Thread Hans Hagen

On 7/18/2018 4:59 AM, Rik Kabel wrote:

List,

Another oddity with  elements in XML / xhtml / html export:

With a defined highlight, a break is inserted if the highlight is the 
first item in an environment. If it is not the first item in the 
environment, no break is inserted.


Most of the other odd breaks can be dealt with in css. These are more 
difficult to tame -- for example, in the startlines environment in the 
example below, there is not enough information preserved to know if the 
tagged item is supposed to be a single line or not.


(Tests using 2018-07-17 beta on Win64.)


You get this, with the numbers representing the paragraph number:

\starttext
% foo

\startparagraph
  \emIt{x 1} a 1
\stopparagraph

\startparagraph
  {\emIt x 2} a unset
\stopparagraph

\stoptext

of this:

\starttext
foo 1

\startparagraph
  \emIt{x 2} a 2
\stopparagraph

\startparagraph
  {\emIt x 3} a 1
\stopparagraph

\stoptext

so, when the par number is effectively set inside a group you end up 
with bad tags which will force that break because it's a different 
paragraph .. no way to intercept or chaneg that


The best I can do is issue a warning like

export > fuzzy paragraph: a (U+00061) [space] - (U+0002D) 2 (U+00032) 1 
(U+00031) 4 (U+00034) 7 (U+00037) 4 (U+00034) 8 (U+00038) 3 (U+00033) 6 
(U+00036) 4 (U+00034) 7 (U+00037)

backend > x

so that one can fix the source.

Has anyone dealt with this before? Is there a way to control the 
insertion of the breaks?


MWE:

\setupbackend [export=yes]
\definehighlight  [emIt]
   [style=italic]
\starttext
\startparagraph
   {\emIt Taa} aaa aa a aa aaa  aa aa
   aa. Taa  a, a  aa a  a.
\stopparagraph
\startparagraph
   Taa {\emIt aaa} aa a aa aaa  aa aa
   aa. Taa  a, a  aa a  a.
\stopparagraph
\startlines
   {\emIt Xyz} abcdefg
   Xyz {\emIt abcdefg}
\stoplines
\stoptext

XML output snip:

http://www.w3.org/1998/Math/MathML";>
  
  
  Taa  
aaa aa a aa aaa  aa aa aa. Taa  
a, a  aa a  a.
  Taa aaa aa a 
aa aaa  aa aa aa. Taa  a, a  aa a  
a.
  
   Xyz   
abcdefg
   Xyz abcdefg
  


Rendered in Firefox:

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




--

-
  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] More spurious problems in exports

2018-07-18 Thread Hans Hagen

On 7/18/2018 4:59 AM, Rik Kabel wrote:

List,

Another oddity with  elements in XML / xhtml / html export:

With a defined highlight, a break is inserted if the highlight is the 
first item in an environment. If it is not the first item in the 
environment, no break is inserted.


Most of the other odd breaks can be dealt with in css. These are more 
difficult to tame -- for example, in the startlines environment in the 
example below, there is not enough information preserved to know if the 
tagged item is supposed to be a single line or not.


(Tests using 2018-07-17 beta on Win64.)

Has anyone dealt with this before? Is there a way to control the 
insertion of the breaks?


MWE:

\setupbackend [export=yes]
\definehighlight  [emIt]
   [style=italic]
\starttext
\startparagraph
   {\emIt Taa} aaa aa a aa aaa  aa aa
   aa. Taa  a, a  aa a  a.


\emIt{Taa}


\stopparagraph
\startparagraph
   Taa {\emIt aaa} aa a aa aaa  aa aa
   aa. Taa  a, a  aa a  a.
\stopparagraph
\startlines
   {\emIt Xyz} abcdefg
   Xyz {\emIt abcdefg}
\stoplines
\stoptext

XML output snip:

http://www.w3.org/1998/Math/MathML";>
  
  
  Taa  
aaa aa a aa aaa  aa aa aa. Taa  
a, a  aa a  a.
  Taa aaa aa a 
aa aaa  aa aa aa. Taa  a, a  aa a  
a.
  
   Xyz   
abcdefg
   Xyz abcdefg
  


Rendered in Firefox:

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




--

-
  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] Issues with vertical spacing in simple case

2018-07-18 Thread Hans Hagen

On 7/17/2018 11:35 PM, Joseph Canedo wrote:

Dear list,

Trying to build a MWE for a problem with unexpected page break (near a 
\blank[line, samepage]) I could not yet reproduce yet, I came up with 
strange output.


With latest beta

mtx-context | current version: 2018.07.17 17:25

MWE :

\starttext

\dorecurse{5}{

\input knuth

\blank[line, samepage]Second.

\input zapf

\blank[line, samepage]Second maybe vertically wrong align?

}

\stoptext

Please see in page 2, the line printing : Second maybe vertically wrong 
align? (topskip related?)


Seems very close to next line for an unknown reason to me.


The next beta will have a fix. The problem is that tex's prevdepth 
bleeds over into a next page so i try to deal with that ... it's 
sometimes hard to take all into accoutn that needs to (esp when there is 
interferences).


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] Compilation problem with the latest version of standalone context(Metafun)

2018-07-18 Thread Fabrice Couvreur
Hello,
I just compiled the file with gvim and the expected result is the right one
; the problem is Emacs or my ~/.emacs file.
Fabrice

2018-07-17 23:00 GMT+02:00 Alan Braslau :

> \startusableMPgraphic ?
>
> > On 17 Jul 2018, at 14:46, Rik Kabel  wrote:
> >
> > On 7/17/2018 16:40, Hans Hagen wrote:
> >> On 7/17/2018 10:30 PM, Rik wrote:
> >>> On 7/16/2018 10:24, Fabrice Couvreur wrote:
>  % macros=mkvi
> 
>  \setuppagenumbering[location=footer]
> 
>  \startusableMPgraphic{NumberHead}
>   draw outlinetext.f
>   ("\bf\namedheadnumber{chapter}")
>   (withcolor "lightgray")
>   ysized 50pt ;
>  \stopusableMPgraphic
> 
> 
>  \unexpanded\def\processMPheadnumber#1%
>    {\useMPgraphic{NumberHead}}
> 
>  \setuphead
> [chapter]
> [command=\HeadTitle,
>  headstyle=\ss,
>  numbercommand=\processMPheadnumber]
> 
> 
>  \unexpanded\def\HeadTitle#1#2%
>    {\framed
>  [frame=off,
>  bottomframe=on,
>  width=broad,
>  align={broad,nothyphenated,left}]
>  {#1\blank[nowhite]#2}}
> 
>  \starttext
> 
>  \dorecurse{6}{\startchapter
>    [title={Fist chapter}]
>    \input knuth
>  \stopchapter}
> 
>  \stoptext
> >>>
> >>> Using TL18 on Win64 it produces a large chapter number on the right
> side above the chapter name -- I do not know what it should look like, so I
> won't say it works. It clearly fails with the 2018-07-13 beta, producing an
> odd graphic where the MP-generated digit should be:
> >>>
> >>> and fails in the same manner with the 2018-07-17 beta.
> >> define 'fails' ... a crash? can someone confirm it?
> > By failure, I meant that it produces the graphic I posted, a bold
> outline around a small square in the area in which the enlarged digit is
> expected. Not a crash.
> >
> > --
> > 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
> > 
> ___
>
> 
> ___
> 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
___