ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Meer, H. van der" <H.vanderMeer@uva.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: extra line after switchtobodyfont
Date: Fri, 3 May 2013 09:19:52 +0000	[thread overview]
Message-ID: <17C6830E-0E52-4775-B34E-00157E110BF5@uva.nl> (raw)
In-Reply-To: <05F640D1-3776-48FA-BBD9-95BA99812649@gmail.com>


[-- 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
___________________________________________________________________________________

  reply	other threads:[~2013-05-03  9:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02 10:38 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17C6830E-0E52-4775-B34E-00157E110BF5@uva.nl \
    --to=h.vandermeer@uva.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).