ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* extra line after switchtobodyfont
@ 2013-05-02 10:38 Meer, H. van der
  2013-05-02 10:40 ` Meer, H. van der
  2013-05-02 10:48 ` Marco Patzer
  0 siblings, 2 replies; 20+ messages in thread
From: Meer, H. van der @ 2013-05-02 10:38 UTC (permalink / raw)
  To: NTG ConTeXt

A call to \switchtobodyfont introduces extra vertical spacing as can be seen in the example.
Is this intentional or is it something like a % missing somewhere in a macro?

Hans van der Meer


\setuppapersize[A6][A6]
\setupbodyfont[lucidaot]
\starttext
First line.\crlf
\start
\switchtobodyfont[euler]
Font switch here.\crlf
\stop
Last line.
\hairline
First line.\crlf
\start
Font switch here.\crlf
\stop
Last line.
\stoptext


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

* Re: extra line after switchtobodyfont
  2013-05-02 10:38 extra line after switchtobodyfont Meer, H. van der
@ 2013-05-02 10:40 ` Meer, H. van der
  2013-05-02 21:17   ` Wolfgang Schuster
  2013-05-02 10:48 ` Marco Patzer
  1 sibling, 1 reply; 20+ messages in thread
From: Meer, H. van der @ 2013-05-02 10:40 UTC (permalink / raw)
  To: NTG ConTeXt

[-- Attachment #1: Type: text/plain, Size: 518 bytes --]

A call to \switchtobodyfont introduces extra vertical spacing as can be seen in the example.
Is this intentional or is it something like a % missing somewhere in a macro?

Hans van der Meer

Sorry, flew accidentally to early away. Here the attached output.

\setuppapersize[A6][A6]
\setupbodyfont[lucidaot]
\starttext
First line.\crlf
\start
\switchtobodyfont[euler]
Font switch here.\crlf
\stop
Last line.
\hairline
First line.\crlf
\start
Font switch here.\crlf
\stop
Last line.
\stoptext



[-- Attachment #2: fontswitch.pdf --]
[-- Type: application/pdf, Size: 9048 bytes --]

[-- Attachment #3: 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] 20+ messages in thread

* Re: extra line after switchtobodyfont
  2013-05-02 10:38 extra line after switchtobodyfont Meer, H. van der
  2013-05-02 10:40 ` Meer, H. van der
@ 2013-05-02 10:48 ` Marco Patzer
  2013-05-02 11:00   ` Meer, H. van der
  2013-05-02 12:09   ` Meer, H. van der
  1 sibling, 2 replies; 20+ messages in thread
From: Marco Patzer @ 2013-05-02 10:48 UTC (permalink / raw)
  To: ntg-context


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

On 2013–05–02 Meer, H. van der wrote:

> A call to \switchtobodyfont introduces extra vertical spacing as can be seen in the example.
> Is this intentional or is it something like a % missing somewhere in a macro?

Loading the typescript in the setup area should get rid of the
space.

See http://www.ntg.nl/pipermail/ntg-context/2013/072892.html

Marco

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 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] 20+ messages in thread

* Re: extra line after switchtobodyfont
  2013-05-02 10:48 ` Marco Patzer
@ 2013-05-02 11:00   ` Meer, H. van der
  2013-05-02 12:09   ` Meer, H. van der
  1 sibling, 0 replies; 20+ messages in thread
From: Meer, H. van der @ 2013-05-02 11:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I see. But that means I have to load various typescript files beforehand and then switch at a later moment. It is possible of course, but unexpected and a pain in the ass - if I may say so. Could it be solved once and for all by going through the typescript files? If I can find time for it, I will look into the matter too.

Hans van der Meer



On 2 May 2013, at 12:48 PM, Marco Patzer <homerow@lavabit.com>
 wrote:

> On 2013–05–02 Meer, H. van der wrote:
> 
>> A call to \switchtobodyfont introduces extra vertical spacing as can be seen in the example.
>> Is this intentional or is it something like a % missing somewhere in a macro?
> 
> Loading the typescript in the setup area should get rid of the
> space.
> 
> See http://www.ntg.nl/pipermail/ntg-context/2013/072892.html
> 

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

* Re: extra line after switchtobodyfont
  2013-05-02 10:48 ` Marco Patzer
  2013-05-02 11:00   ` Meer, H. van der
@ 2013-05-02 12:09   ` Meer, H. van der
  1 sibling, 0 replies; 20+ messages in thread
From: Meer, H. van der @ 2013-05-02 12:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Indeed, adding \usetypescriptfile[euler]\usetypescript[euler] before \starttext makes the extra vertical spacing go away in a simple test file. But that doesn't solve my problem, because I am typesetting xml data wherein a font change can be dictated from the inside. See the example code (supporting modules not included):

\startbuffer[font]
<?xml version="1.0" encoding="UTF-8"?>
<root>
First line.<br/>
<fontswitch family="euler">
Font switch here.
</fontswitch><br/>
Last line.
</root>
\stopbuffer
\xmlprocessbuffer{root}{font}{}

There is no way to have the typescript loaded before the \starttext, because it is not known what fonts will be called up by the xml. And loading it from within the data processed is too late.
I therefore conclude that this typescript problem should be fundamentally solved, instead of resorting to a subterfuge as loading things beforehand to avoid - what seems to me - coding mistakes.

Hans van der Meer



On 2 May 2013, at 12:48 PM, Marco Patzer <homerow@lavabit.com> wrote:

> On 2013–05–02 Meer, H. van der wrote:
> 
>> A call to \switchtobodyfont introduces extra vertical spacing as can be seen in the example.
>> Is this intentional or is it something like a % missing somewhere in a macro?
> 
> Loading the typescript in the setup area should get rid of the
> space.
> 
> See http://www.ntg.nl/pipermail/ntg-context/2013/072892.html
> 
> Marco
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

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

* Re: extra line after switchtobodyfont
  2013-05-02 10:40 ` Meer, H. van der
@ 2013-05-02 21:17   ` Wolfgang Schuster
  2013-05-03  7:34     ` Meer, H. van der
  0 siblings, 1 reply; 20+ messages in thread
From: Wolfgang Schuster @ 2013-05-02 21:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 02.05.2013 um 12:40 schrieb "Meer, H. van der" <H.vanderMeer@uva.nl>:

> A call to \switchtobodyfont introduces extra vertical spacing as can be seen in the example.
> Is this intentional or is it something like a % missing somewhere in a macro?
> 
> Hans van der Meer
> 
> Sorry, flew accidentally to early away. Here the attached output.
> 
> \setuppapersize[A6][A6]
> \setupbodyfont[lucidaot]
> \starttext
> First line.\crlf
> \start
> \switchtobodyfont[euler]
> Font switch here.\crlf
> \stop
> Last line.
> \hairline
> First line.\crlf
> \start
> Font switch here.\crlf
> \stop
> Last line.
> \stoptext

Is there a reason why you use \crlf to end the lines?

When you would end the paragraph after each line the additional line wouldn't appear.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: extra line after switchtobodyfont
  2013-05-02 21:17   ` Wolfgang Schuster
@ 2013-05-03  7:34     ` Meer, H. van der
  2013-05-03  7:43       ` Wolfgang Schuster
  2013-05-03  7:57       ` Wolfgang Schuster
  0 siblings, 2 replies; 20+ messages in thread
From: Meer, H. van der @ 2013-05-03  7:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1.1: Type: text/plain, Size: 1808 bytes --]

There is more to it then a preference for \crlf, typescript loading introduces a lot of spurious white, that not always can be made to disappear. I tracked it down to a macro in type-ini.mkvi:

\def\font_typescript_process_typescript_file_and_store
  {*\expandafter\let\expandafter\t_font_typescripts\csname\??typescriptfiles\currenttypefile\endcsname
   A\ifx\t_font_typescripts\relax
     B\font_typescript_process_typescript_store_indeed
   C\fi
   D\the\t_font_typescripts}

The ABCD*'s were added to see what happens. See the screen shot from one of my tests (<br/> results in \crlf but does not sit between text and fontswitch \switchtobodyfont). My guess is that the token register \t_font_typescripts is the source of the spaces, but I am not further than that. I have already mailed Hans Hagen about these findings.

[cid:AE3D66B6-9CD5-4377-B68D-AED490D0487E@fritz.box]

Hans van der Meer

On 2 May 2013, at 11:17 PM, Wolfgang Schuster <schuster.wolfgang@gmail.com<mailto:schuster.wolfgang@gmail.com>>
 wrote:


Am 02.05.2013 um 12:40 schrieb "Meer, H. van der" <H.vanderMeer@uva.nl<mailto:H.vanderMeer@uva.nl>>:

A call to \switchtobodyfont introduces extra vertical spacing as can be seen in the example.
Is this intentional or is it something like a % missing somewhere in a macro?

Hans van der Meer

Sorry, flew accidentally to early away. Here the attached output.

\setuppapersize[A6][A6]
\setupbodyfont[lucidaot]
\starttext
First line.\crlf
\start
\switchtobodyfont[euler]
Font switch here.\crlf
\stop
Last line.
\hairline
First line.\crlf
\start
Font switch here.\crlf
\stop
Last line.
\stoptext

Is there a reason why you use \crlf to end the lines?

When you would end the paragraph after each line the additional line wouldn't appear.



[-- Attachment #1.1.2: Type: text/html, Size: 2799 bytes --]

[-- Attachment #1.2: fontswitch.jpg --]
[-- Type: image/jpg, Size: 14050 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] 20+ messages in thread

* Re: extra line after switchtobodyfont
  2013-05-03  7:34     ` Meer, H. van der
@ 2013-05-03  7:43       ` Wolfgang Schuster
  2013-05-03  9:19         ` Meer, H. van der
  2013-05-03 14:06         ` Meer, H. van der
  2013-05-03  7:57       ` Wolfgang Schuster
  1 sibling, 2 replies; 20+ messages in thread
From: Wolfgang Schuster @ 2013-05-03  7:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 03.05.2013 um 09:34 schrieb "Meer, H. van der" <H.vanderMeer@uva.nl>:

> There is more to it then a preference for \crlf, typescript loading introduces a lot of spurious white, that not always can be made to disappear. I tracked it down to a macro in type-ini.mkvi:
> 
> \def\font_typescript_process_typescript_file_and_store
>   {*\expandafter\let\expandafter\t_font_typescripts\csname\??typescriptfiles\currenttypefile\endcsname
>    A\ifx\t_font_typescripts\relax
>      B\font_typescript_process_typescript_store_indeed
>    C\fi
>    D\the\t_font_typescripts}
> 
> The ABCD*'s were added to see what happens. See the screen shot from one of my tests (<br/> results in \crlf but does not sit between text and fontswitch \switchtobodyfont). My guess is that the token register \t_font_typescripts is the source of the spaces, but I am not further than that. I have already mailed Hans Hagen about these findings.

The spaces in the output come from the line ending after the \definefontsynonym entry in the typescript and extra line in your other example from the empty lines between the typescript blocks and not from the macro above.

\starttext
A\crlf

B\crlf
\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: extra line after switchtobodyfont
  2013-05-03  7:34     ` Meer, H. van der
  2013-05-03  7:43       ` Wolfgang Schuster
@ 2013-05-03  7:57       ` Wolfgang Schuster
  1 sibling, 0 replies; 20+ messages in thread
From: Wolfgang Schuster @ 2013-05-03  7:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 03.05.2013 um 09:34 schrieb "Meer, H. van der" <H.vanderMeer@uva.nl>:

> There is more to it then a preference for \crlf […]


\setupwhitespace[line]

\starttext

\subject{Regular paragraphs}

Line 1\par
\start \switchtobodyfont[termes]
Line 2\par
\stop
Line 3

\subject{Packed paragraphs}

\startpacked
Line 4\par 
\start \switchtobodyfont[pagella]
Line 5 \par
\stop
Line 6
\stoppacked

\subject{Line breaks with \tex{crlf}}

Line 7 \crlf
\start \switchtobodyfont[euler]
Line 8 \crlf
\stop
Line 9

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: extra line after switchtobodyfont
  2013-05-03  7:43       ` Wolfgang Schuster
@ 2013-05-03  9:19         ` Meer, H. van der
  2013-05-03 10:28           ` Wolfgang Schuster
  2013-05-03 14:06         ` Meer, H. van der
  1 sibling, 1 reply; 20+ messages in thread
From: Meer, H. van der @ 2013-05-03  9:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1.1: Type: text/plain, Size: 4285 bytes --]

I did some more experiments. In the macro below delete ABC and replace D by ! then the output of the test will match.
example1 is made with the type-imp-euler.mkiv as given below. I removed every space in it, ended every ] with a % and commented [texgyre] out. In the log can be seen that --as far as I am aware-- just that euler file is loaded and processed.
For further testing I added a blank line before the starttypescript[euler]% line and the example2 results. There is indeed an effect from the intervening newline.
Also removed space from type-imp-latinmodern.mkiv and type-imp-lmnames.mkiv.
But I still cannot explain where the remaining spaces do come from. There are a few places in type-ini.mkvi with space after an } in a macro, but I have patched these in my system.
Any idea how further? More from \loadfontgoodies[lm]? To what file does that resolve?
I am willing to clean up the existing typescript files and sending them where they can be incorporated. But if that is not al…

Hans van der Meer

Minimal Tex code:
\setuppapersize[A5][A5]
%\usetypescriptfile[euler]\usetypescript[euler]
\tracetypescriptstrue
\setupbodyfont[lmodern,10pt]
\starttext Before\writestatus{++++++++}{}\switchtobodyfont[euler,10pt]\writestatus{--------}{}Fontswitch\stoptext

Sample from type-imp-euler.mkiv
%\loadtypescriptfile[texgyre]%
\starttypescriptcollection[pagella-euler]%
\starttypescript[\s!math][euler]%
\definefontsynonym[EulerMath][\s!file:euler.otf]%
\stoptypescript
\starttypescript[\s!math][euler][\s!name]%

Relevant part of the log:
++++++++        >
fonts           > request: [euler] [] []
fonts           > auto load typescript file 1: [euler]
fonts           > request: [euler] [] []
(/Users/hansm/TeX/texmf/tex/context/base/type-imp-euler.mkiv)
fonts           > match: [euler]
fonts           > define: [euler] [rm] [serif] [euler]
fonts           > request: [serif] [euler] [name]
fonts           > match: [serif] [euler] [name]
fonts           > request: [serif] [default] [size]
fonts           > match: [serif] [default] [size]
fonts           > define: [euler] [tt] [mono] [modern]
fonts           > request: [mono] [modern] [name]
fonts           > match: [mono] [modern,latin-modern-designsize,latin-modern] [name]
fonts           > match: [mono] [modern,latin-modern,modern-variable,latin-modern-variable,modern-condensed,latin-modern-condensed]
fonts           > request: [mono] [default] [size]
fonts           > match: [mono] [default] [size]
fonts           > define: [euler] [mm] [math] [euler]
fonts           > request: [math] [euler] [name]
fonts           > match: [math] [euler]
fonts           > match: [math] [euler] [name]
fonts           > request: [math] [default] [size]
fonts           > match: [math] [default] [size]
--------     [cid:70BCE0AE-8EE4-4E82-B545-913CB0DE816F@fritz.box]    >

[cid:58DBF4D7-539A-4FE8-A799-2BEAED31F7DE@fritz.box]


On 3 May 2013, at 9:43 AM, Wolfgang Schuster <schuster.wolfgang@gmail.com<mailto:schuster.wolfgang@gmail.com>> wrote:


Am 03.05.2013 um 09:34 schrieb "Meer, H. van der" <H.vanderMeer@uva.nl<mailto:H.vanderMeer@uva.nl>>:

There is more to it then a preference for \crlf, typescript loading introduces a lot of spurious white, that not always can be made to disappear. I tracked it down to a macro in type-ini.mkvi:

\def\font_typescript_process_typescript_file_and_store
 {*\expandafter\let\expandafter\t_font_typescripts\csname\??typescriptfiles\currenttypefile\endcsname
  A\ifx\t_font_typescripts\relax
    B\font_typescript_process_typescript_store_indeed
  C\fi
  D\the\t_font_typescripts}

The ABCD*'s were added to see what happens. See the screen shot from one of my tests (<br/> results in \crlf but does not sit between text and fontswitch \switchtobodyfont). My guess is that the token register \t_font_typescripts is the source of the spaces, but I am not further than that. I have already mailed Hans Hagen about these findings.

The spaces in the output come from the line ending after the \definefontsynonym entry in the typescript and extra line in your other example from the empty lines between the typescript blocks and not from the macro above.

\starttext
A\crlf

B\crlf
\stoptext

Wolfgang



[-- Attachment #1.1.2: Type: text/html, Size: 8143 bytes --]

[-- Attachment #1.2: example1.jpg --]
[-- Type: image/jpg, Size: 4754 bytes --]

[-- Attachment #1.3: example2.jpg --]
[-- Type: image/jpg, Size: 4575 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] 20+ messages in thread

* Re: extra line after switchtobodyfont
  2013-05-03  9:19         ` Meer, H. van der
@ 2013-05-03 10:28           ` Wolfgang Schuster
  2013-05-03 11:06             ` Meer, H. van der
  0 siblings, 1 reply; 20+ messages in thread
From: Wolfgang Schuster @ 2013-05-03 10:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 03.05.2013 um 11:19 schrieb "Meer, H. van der" <H.vanderMeer@uva.nl>:

> I did some more experiments. In the macro below delete ABC and replace D by ! then the output of the test will match.
> example1 is made with the type-imp-euler.mkiv as given below. I removed every space in it, ended every ] with a % and commented [texgyre] out. In the log can be seen that --as far as I am aware-- just that euler file is loaded and processed.
> For further testing I added a blank line before the starttypescript[euler]% line and the example2 results. There is indeed an effect from the intervening newline.
> Also removed space from type-imp-latinmodern.mkiv and type-imp-lmnames.mkiv.
> But I still cannot explain where the remaining spaces do come from. There are a few places in type-ini.mkvi with space after an } in a macro, but I have patched these in my system.

Do you mean the missing % after \doifsomething etc.? These lines don’t need a % because TeX gobbles the spaces between the arguments.

> Any idea how further? More from \loadfontgoodies[lm]? To what file does that resolve? 

The commands loads lm.lfg

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: extra line after switchtobodyfont
  2013-05-03 10:28           ` Wolfgang Schuster
@ 2013-05-03 11:06             ` Meer, H. van der
  2013-05-03 11:40               ` Meer, H. van der
  0 siblings, 1 reply; 20+ messages in thread
From: Meer, H. van der @ 2013-05-03 11:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On 3 May 2013, at 12:28 PM, Wolfgang Schuster <schuster.wolfgang@gmail.com>
 wrote:
> Do you mean the missing % after \doifsomething etc.? These lines don’t need a % because TeX gobbles the spaces between the arguments.

I wasn't aware of that, but will remember.
> 
>> Any idea how further? More from \loadfontgoodies[lm]? To what file does that resolve? 
> 
> The commands loads lm.lfg
> 

The somewhat simpleminded idea of adding \ignorespaces at the end of the \definetypeface macro and friends, will not work I am afraid.
Is there a possibilty to remove all whitespace from the tokens in \t_font_typescripts or prevent them from entering? Perhaps in the lua end?
Or is it possible to assign to all whitespace characters (space, tab, newline) a category code 9 when reading/processing the typescript definitions?

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: extra line after switchtobodyfont
  2013-05-03 11:06             ` Meer, H. van der
@ 2013-05-03 11:40               ` Meer, H. van der
  0 siblings, 0 replies; 20+ messages in thread
From: Meer, H. van der @ 2013-05-03 11:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

This might be interesting. The example I gave before was now typeset with type-imp-euler.mkiv cannibalized to \endinput in the very first line. Then there are no spurious spaces and 5 executions of the recursive loop from \t_font_typescripts.
Thus, even though in type-imp-euler.mkiv all empty lines were removed, all intermediate spaces removed, all macros ended in ]% en texgyre not loaded, there is still spurious space. From the log I see that there are requests for [mono][modern] etc.

In order to locate these I have reduced the euler file to one define:
\starttypescript[euler]%
\definetypeface[euler][\s!mm][\s!math][euler][\s!default]%
\quittypescriptscanning
\stoptypescript

Now I get one  or possibly two spurious spaces. But I cannot easily find which typescript file is involved. Do you know this? Exerpt from the log:

++++++++        >
fonts           > request: [euler] [] []
fonts           > auto load typescript file 1: [euler]
fonts           > request: [euler] [] []
(/Users/hansm/TeX/texmf/tex/context/base/type-imp-euler.mkiv)
fonts           > match: [euler]
fonts           > define: [euler] [mm] [math] [euler]
fonts           > request: [math] [euler] [name]
fonts           > auto load typescript file 2: [euler]
fonts           > request: [math] [euler] [name]
fonts           > request: [math] [default] [size]
fonts           > match: [math] [default] [size]
fonts           > defining > font with asked name 'unknown' is not found using lookup 'file'
fonts           > defining > unknown font 'unknown', loading aborted
fonts           > defining > unable to define 'unknown' as 'euler-10pt-mm-mb--3'
fonts           > defining > font with asked name 'unknown' is not found using lookup 'file'
fonts           > defining > unknown font 'unknown', loading aborted
fonts           > defining > unable to define 'unknown' as 'euler-10pt-mm-mb--2'
fonts           > defining > font with asked name 'unknown' is not found using lookup 'file'
fonts           > defining > unknown font 'unknown', loading aborted
fonts           > defining > unable to define 'unknown' as 'euler-10pt-mm-mb--1'
--------        >


By the way. Is it correct that alone \definetypeface, \definefontsynonym, \starttypescriptcollection must be closed by ]% while for example \starttypescript[] seems to do no harm?

Hans van der Meer



On 3 May 2013, at 1:06 PM, "Meer, H. van der" <H.vanderMeer@uva.nl<mailto:H.vanderMeer@uva.nl>> wrote:


On 3 May 2013, at 12:28 PM, Wolfgang Schuster <schuster.wolfgang@gmail.com<mailto:schuster.wolfgang@gmail.com>>
wrote:
Do you mean the missing % after \doifsomething etc.? These lines don’t need a % because TeX gobbles the spaces between the arguments.

I wasn't aware of that, but will remember.

Any idea how further? More from \loadfontgoodies[lm]? To what file does that resolve?

The commands loads lm.lfg


The somewhat simpleminded idea of adding \ignorespaces at the end of the \definetypeface macro and friends, will not work I am afraid.
Is there a possibilty to remove all whitespace from the tokens in \t_font_typescripts or prevent them from entering? Perhaps in the lua end?
Or is it possible to assign to all whitespace characters (space, tab, newline) a category code 9 when reading/processing the typescript definitions?

Hans van der Meer




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

* Re: extra line after switchtobodyfont
  2013-05-03  7:43       ` Wolfgang Schuster
  2013-05-03  9:19         ` Meer, H. van der
@ 2013-05-03 14:06         ` Meer, H. van der
  2013-05-04  7:21           ` Aditya Mahajan
  1 sibling, 1 reply; 20+ messages in thread
From: Meer, H. van der @ 2013-05-03 14:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Seems finally solved (sigh). I cleaned out all files loading typescripts on the fly. 
- typescript macros ending in ] at the end of a line have now ]% at the end of the line
- empty lines have been removed for clarity
- all files now have \endinput at the end.

The files changed fit in a 54KB zip and I can send them if Hans/Wolfgang/.. wants to incorporate them in the next beta.

Hans van der Meer


On 3 May 2013, at 9:43 AM, Wolfgang Schuster <schuster.wolfgang@gmail.com>
 wrote:

> The spaces in the output come from the line ending after the \definefontsynonym entry in the typescript and extra line in your other example from the empty lines between the typescript blocks and not from the macro above.
> 

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

* Re: extra line after switchtobodyfont
  2013-05-03 14:06         ` Meer, H. van der
@ 2013-05-04  7:21           ` Aditya Mahajan
  2013-05-04  9:20             ` Meer, H. van der
  2013-05-04 16:59             ` Wolfgang Schuster
  0 siblings, 2 replies; 20+ messages in thread
From: Aditya Mahajan @ 2013-05-04  7:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 2013-05-03, at 7:36 PM, "Meer, H. van der" <H.vanderMeer@uva.nl> wrote:

> Seems finally solved (sigh). I cleaned out all files loading typescripts on the fly. 
> - typescript macros ending in ] at the end of a line have now ]% at the end of the line
> - empty lines have been removed for clarity
> - all files now have \endinput at the end.
> 
> The files changed fit in a 54KB zip and I can send them if Hans/Wolfgang/.. wants to incorporate them in the next beta.

I haven't followed this thread in detail, but an alternative is to redefine \starttypescript etc. to use a different catcode regime so that new lines and spaces are ignores (similar to \starttexdefinition, etc)

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

* Re: extra line after switchtobodyfont
  2013-05-04  7:21           ` Aditya Mahajan
@ 2013-05-04  9:20             ` Meer, H. van der
  2013-05-04 11:09               ` Sietse Brouwer
  2013-05-04 16:59             ` Wolfgang Schuster
  1 sibling, 1 reply; 20+ messages in thread
From: Meer, H. van der @ 2013-05-04  9:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users



On 4 May 2013, at 9:21 AM, Aditya Mahajan <adityam@umich.edu> wrote:

> On 2013-05-03, at 7:36 PM, "Meer, H. van der" <H.vanderMeer@uva.nl> wrote:
> 
>> Seems finally solved (sigh). I cleaned out all files loading typescripts on the fly. 
>> - typescript macros ending in ] at the end of a line have now ]% at the end of the line
>> - empty lines have been removed for clarity
>> - all files now have \endinput at the end.
>> 
>> The files changed fit in a 54KB zip and I can send them if Hans/Wolfgang/.. wants to incorporate them in the next beta.
> 

> I haven't followed this thread in detail, but an alternative is to redefine \starttypescript etc. to use a different catcode regime so that new lines and spaces are ignores (similar to \starttexdefinition, etc)

Would be nice. But doing this is left to other people than me, I feel not qualified to tinker with that code. You would like to challenge Hans Hagen?

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: extra line after switchtobodyfont
  2013-05-04  9:20             ` Meer, H. van der
@ 2013-05-04 11:09               ` Sietse Brouwer
  0 siblings, 0 replies; 20+ messages in thread
From: Sietse Brouwer @ 2013-05-04 11:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Hans, everybody,

Hans van der Meer wrote:
> Would be nice. But doing this is left to other
> people than me, I feel not qualified to tinker
> with that code. You would like to challenge Hans
> Hagen?

Last week's thread about ligatures got unpleasantly close to flaming
at times; so, just in case, I'd like to ask that this one stays calm.
That last sentence sounded a bit more antagonistic than you intended,
perhaps. Aditya was simply making a suggestion, not ‘challenging’ Hans
(either of the Hanses ^_^).

Also: thank you for the work you put into removing/commenting out all
spaces in typescript files; a 54 kB zip is nothing to sneeze at.

My best wishes to everybody in Bachotek / at BachoTeX — I hope the
weather is as fine there as it is here in Leiden.

Cheers,
Sietse
___________________________________________________________________________________
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] 20+ messages in thread

* Re: extra line after switchtobodyfont
  2013-05-04  7:21           ` Aditya Mahajan
  2013-05-04  9:20             ` Meer, H. van der
@ 2013-05-04 16:59             ` Wolfgang Schuster
  2013-05-07 20:11               ` Hans Hagen
  1 sibling, 1 reply; 20+ messages in thread
From: Wolfgang Schuster @ 2013-05-04 16:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Aditya Mahajan


Am 04.05.2013 um 09:21 schrieb Aditya Mahajan <adityam@umich.edu>:

> On 2013-05-03, at 7:36 PM, "Meer, H. van der" <H.vanderMeer@uva.nl> wrote:
> 
>> Seems finally solved (sigh). I cleaned out all files loading typescripts on the fly. 
>> - typescript macros ending in ] at the end of a line have now ]% at the end of the line
>> - empty lines have been removed for clarity
>> - all files now have \endinput at the end.
>> 
>> The files changed fit in a 54KB zip and I can send them if Hans/Wolfgang/.. wants to incorporate them in the next beta.
> 
> I haven't followed this thread in detail, but an alternative is to redefine \starttypescript etc. to use a different catcode regime so that new lines and spaces are ignores (similar to \starttexdefinition, etc)


A better method is to ignore the endlinechar when typescript files are loaded.

\newcount\savedendlinechar

\starttext

Line 1\crlf
\savedendlinechar\endlinechar \endlinechar\minusone
\switchtobodyfont[pagella]
\endlinechar\savedendlinechar
Line 2

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: extra line after switchtobodyfont
  2013-05-04 16:59             ` Wolfgang Schuster
@ 2013-05-07 20:11               ` Hans Hagen
  2013-05-07 23:29                 ` Hans Hagen
  0 siblings, 1 reply; 20+ messages in thread
From: Hans Hagen @ 2013-05-07 20:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 5/4/2013 6:59 PM, Wolfgang Schuster wrote:
>
> Am 04.05.2013 um 09:21 schrieb Aditya Mahajan <adityam@umich.edu>:
>
>> On 2013-05-03, at 7:36 PM, "Meer, H. van der" <H.vanderMeer@uva.nl> wrote:
>>
>>> Seems finally solved (sigh). I cleaned out all files loading typescripts on the fly.
>>> - typescript macros ending in ] at the end of a line have now ]% at the end of the line
>>> - empty lines have been removed for clarity
>>> - all files now have \endinput at the end.
>>>
>>> The files changed fit in a 54KB zip and I can send them if Hans/Wolfgang/.. wants to incorporate them in the next beta.
>>
>> I haven't followed this thread in detail, but an alternative is to redefine \starttypescript etc. to use a different catcode regime so that new lines and spaces are ignores (similar to \starttexdefinition, etc)
>
>
> A better method is to ignore the endlinechar when typescript files are loaded.
>
> \newcount\savedendlinechar
>
> \starttext
>
> Line 1\crlf
> \savedendlinechar\endlinechar \endlinechar\minusone
> \switchtobodyfont[pagella]
> \endlinechar\savedendlinechar
> Line 2
>
> \stoptext

in fact, that should happen automatically but maybe i messed up something

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

* Re: extra line after switchtobodyfont
  2013-05-07 20:11               ` Hans Hagen
@ 2013-05-07 23:29                 ` Hans Hagen
  0 siblings, 0 replies; 20+ messages in thread
From: Hans Hagen @ 2013-05-07 23:29 UTC (permalink / raw)
  To: ntg-context

On 5/7/2013 10:11 PM, Hans Hagen wrote:
> On 5/4/2013 6:59 PM, Wolfgang Schuster wrote:
>>
>> Am 04.05.2013 um 09:21 schrieb Aditya Mahajan <adityam@umich.edu>:
>>
>>> On 2013-05-03, at 7:36 PM, "Meer, H. van der" <H.vanderMeer@uva.nl>
>>> wrote:
>>>
>>>> Seems finally solved (sigh). I cleaned out all files loading
>>>> typescripts on the fly.
>>>> - typescript macros ending in ] at the end of a line have now ]% at
>>>> the end of the line
>>>> - empty lines have been removed for clarity
>>>> - all files now have \endinput at the end.
>>>>
>>>> The files changed fit in a 54KB zip and I can send them if
>>>> Hans/Wolfgang/.. wants to incorporate them in the next beta.
>>>
>>> I haven't followed this thread in detail, but an alternative is to
>>> redefine \starttypescript etc. to use a different catcode regime so
>>> that new lines and spaces are ignores (similar to
>>> \starttexdefinition, etc)
>>
>>
>> A better method is to ignore the endlinechar when typescript files are
>> loaded.
>>
>> \newcount\savedendlinechar
>>
>> \starttext
>>
>> Line 1\crlf
>> \savedendlinechar\endlinechar \endlinechar\minusone
>> \switchtobodyfont[pagella]
>> \endlinechar\savedendlinechar
>> Line 2
>>
>> \stoptext
>
> in fact, that should happen automatically but maybe i messed up something

(1) i adapted \loadfoundtypescriptfile (order of things, more robust)
(2) i adapted type-imp-pagella (had series of two defs per line which 
introduced the spaces)


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

end of thread, other threads:[~2013-05-07 23:29 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-02 10:38 extra line after switchtobodyfont Meer, H. van der
2013-05-02 10:40 ` Meer, H. van der
2013-05-02 21:17   ` Wolfgang Schuster
2013-05-03  7:34     ` Meer, H. van der
2013-05-03  7:43       ` Wolfgang Schuster
2013-05-03  9:19         ` Meer, H. van der
2013-05-03 10:28           ` Wolfgang Schuster
2013-05-03 11:06             ` Meer, H. van der
2013-05-03 11:40               ` Meer, H. van der
2013-05-03 14:06         ` Meer, H. van der
2013-05-04  7:21           ` Aditya Mahajan
2013-05-04  9:20             ` Meer, H. van der
2013-05-04 11:09               ` Sietse Brouwer
2013-05-04 16:59             ` Wolfgang Schuster
2013-05-07 20:11               ` Hans Hagen
2013-05-07 23:29                 ` Hans Hagen
2013-05-03  7:57       ` Wolfgang Schuster
2013-05-02 10:48 ` Marco Patzer
2013-05-02 11:00   ` Meer, H. van der
2013-05-02 12:09   ` Meer, H. van der

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