Re: [NTG-context] "fake" space for better reflow

2016-11-30 Thread Hans Hagen

On 11/30/2016 5:58 PM, Ulrike Fischer wrote:

Am Wed, 30 Nov 2016 12:45:17 +0100 schrieb Hans Hagen:


On 11/30/2016 10:09 AM, Ulrike Fischer wrote:

If I compile a small document

\starttext
\input knuth

\stoptext


and then use in the adobe reader "view->zoom->reflow" I get as
result

Thus,Icametotheconclusionthatthedesignerofanewsystemmustnotonlybetheimplementerandfirstlarge--scaleuser;thedesignershoulda



Cut and paste goes well so I think it's a bug in acrobat then.


I'm not sure. Imho cut and paste use an heurisitic more or less
based on the size of the space (there are quite a number of
questions on tex.SX where the heuristic fails, e.g. in code
listings), while reflow seems to need glyphs. The speech of Ross
Moore on TUG14 seems to indicate that \pdfinterwordspaceon was
introduced in pdftex to get around this problem.

http://river-valley.zeeba.tv/%E2%80%9Cfake-spaces%E2%80%9D-with-pdftex%E2%80%94best-of-both-worlds/


I assume that it just runs over the resulting list and replaces skips by 
spaces. One cannot in an earlier stage use spaces instead of skips 
simply because tex has a glue based model.


So, one can kick in some callback (before shipout) and  replace glue by 
space characters.



I know it is due to the missing space glyph. With pdflatex I would
try to use \pdfinterwordspaceon but this primitive never found its
way into luatex. Is there any solution? (One that could be
translated to lualatex would be best).



One can write a filter that does it before shipout. Typically a case for
callbacks.


Well the main question is, what is the "does it" in this case.
pdftex inserts a space from a dummy.pdf. One use the fake space more
or less like this:

\pdfinterwordspaceon
\pdfmapline{=dummy-space 

Well, just insert char 32 which is in most fonts ... (could even be a 
virtual char). We will not introduce such mechanisms in luatex, after 
all a macro package can decide for other criteria.



But this doesn't sound like the correct way to go in a unicode/open
type world.

(I'm also not quite if shipout is the correct time. Imho one would
probably avoid to add spaces e.g. in math).


One can recognize math. If context can do it (when a user enables it) 
... any macro package can ...


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] "fake" space for better reflow

2016-11-30 Thread Ulrike Fischer
Am Wed, 30 Nov 2016 12:45:17 +0100 schrieb Hans Hagen:

> On 11/30/2016 10:09 AM, Ulrike Fischer wrote:
>> If I compile a small document
>>
>> \starttext
>> \input knuth
>>
>> \stoptext
>>
>>
>> and then use in the adobe reader "view->zoom->reflow" I get as
>> result
>>
>> Thus,Icametotheconclusionthatthedesignerofanewsystemmustnotonlybetheimplementerandfirstlarge--scaleuser;thedesignershoulda
 
> Cut and paste goes well so I think it's a bug in acrobat then.

I'm not sure. Imho cut and paste use an heurisitic more or less
based on the size of the space (there are quite a number of
questions on tex.SX where the heuristic fails, e.g. in code
listings), while reflow seems to need glyphs. The speech of Ross
Moore on TUG14 seems to indicate that \pdfinterwordspaceon was
introduced in pdftex to get around this problem. 

http://river-valley.zeeba.tv/%E2%80%9Cfake-spaces%E2%80%9D-with-pdftex%E2%80%94best-of-both-worlds/

>> I know it is due to the missing space glyph. With pdflatex I would
>> try to use \pdfinterwordspaceon but this primitive never found its
>> way into luatex. Is there any solution? (One that could be
>> translated to lualatex would be best).
 
> One can write a filter that does it before shipout. Typically a case for 
> callbacks.

Well the main question is, what is the "does it" in this case.
pdftex inserts a space from a dummy.pdf. One use the fake space more
or less like this:

\pdfinterwordspaceon
\pdfmapline{=dummy-space http://www.troubleshooting-tex.de/

___
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] "fake" space for better reflow

2016-11-30 Thread Hans Hagen

On 11/30/2016 10:09 AM, Ulrike Fischer wrote:

If I compile a small document

\starttext
\input knuth

\stoptext


and then use in the adobe reader "view->zoom->reflow" I get as
result

Thus,Icametotheconclusionthatthedesignerofanewsystemmustnotonlybetheimplementerandfirstlarge--scaleuser;thedesignershoulda


Cut and paste goes well so I think it's a bug in acrobat then.


I know it is due to the missing space glyph. With pdflatex I would
try to use \pdfinterwordspaceon but this primitive never found its
way into luatex. Is there any solution? (One that could be
translated to lualatex would be best).


One can write a filter that does it before shipout. Typically a case for 
callbacks.


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
___

[NTG-context] "fake" space for better reflow

2016-11-30 Thread Ulrike Fischer
If I compile a small document

\starttext
\input knuth

\stoptext


and then use in the adobe reader "view->zoom->reflow" I get as
result

Thus,Icametotheconclusionthatthedesignerofanewsystemmustnotonlybetheimplementerandfirstlarge--scaleuser;thedesignershoulda

I know it is due to the missing space glyph. With pdflatex I would
try to use \pdfinterwordspaceon but this primitive never found its
way into luatex. Is there any solution? (One that could be
translated to lualatex would be best).

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] bug in xtables with spanning and spacing

2016-11-30 Thread Michael Eidenbenz
the spanned cells should be aligned.

\startxtable[distance=5mm,spaceinbetween=5mm]
\startxrow
\startxcell[ny=2] one + alpha\stopxcell
\startxcell[nx=2] two + three \stopxcell
\stopxrow
\startxrow
\startxcell beta \stopxcell
\startxcell gamma \stopxcell
\stopxrow
\stopxtable
___
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
___