ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Euler with fallback
@ 2013-08-10 16:36 Aditya Mahajan
  2014-02-16 16:51 ` Sanjoy Mahajan
  2014-03-03 11:50 ` Euler with fallback Sanjoy Mahajan
  0 siblings, 2 replies; 16+ messages in thread
From: Aditya Mahajan @ 2013-08-10 16:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

This is to announce that the latest beta supports creating virtual math 
fonts with fallback. The main test case is to use Euler font with missing 
characters taken from Pagella but the mechanism is general and can be used 
to replace a specific set of math glyphs from a font.

This feature is not extensively tested. As such it will be useful if 
everyone interested in math fallback mechanism could test this out and 
report any bugs or inconsistencies.

To use this feature you have to use `pagellaovereuler` as your math font. 
For example, to use Euler with DejaVu fonts, use:


\usetypescriptfile[euler]
\starttypescript[mainface]
 	\definetypeface[mainface][rm][serif][dejavu]          [default]
 	\definetypeface[mainface][ss][sans] [dejavu]          [default]
 	\definetypeface[mainface][tt][mono] [dejavu]          [default]
 	\definetypeface[mainface][mm][math] [pagellaovereuler][default]
\stoptypescript

\setupbodyfont[mainface]

\appendtoks \rm \to \everymathematics
\setupmathematics
        [lcgreek=normal, ucgreek=normal]


There is a built-in typescript `euler-with-pagella` to use 
`pagellaovereuler` as the math font and `pagella` as the text font.

If you are interested in implementing similar fallback mechanisms for 
other fonts, see type-imp-euler.mkiv and euler-math.lfg for details.

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

* Re: Euler with fallback
  2013-08-10 16:36 Euler with fallback Aditya Mahajan
@ 2014-02-16 16:51 ` Sanjoy Mahajan
  2014-02-16 18:29   ` Wolfgang Schuster
  2014-03-03 11:50 ` Euler with fallback Sanjoy Mahajan
  1 sibling, 1 reply; 16+ messages in thread
From: Sanjoy Mahajan @ 2014-02-16 16:51 UTC (permalink / raw)
  To: Aditya Mahajan, mailing list for ConTeXt users

Aditya Mahajan <adityam@umich.edu> writes:

> This is to announce that the latest beta supports creating virtual math 
> fonts with fallback. The main test case is to use Euler font with missing 
> characters taken from Pagella but the mechanism is general and can be used 
> to replace a specific set of math glyphs from a font.
>
> This feature is not extensively tested. As such it will be useful if 
> everyone interested in math fallback mechanism could test this out and 
> report any bugs or inconsistencies.

I would like to test and hopefully use this setup for _Street-Fighting
Science and Engineering_.  It should also give the setup a thorough
workout.  But I can't quite get the preamble right.

The test file below typesets text and math in palatino.

  \usetypescriptfile[euler-with-pagella]
  \definebodyfontenvironment[10.5pt]
  \setupbodyfont[palatino,10.5pt]

  \starttext

  \input knuth

  \placeformula\startformula
  a^2 + b^2 = c^2.
  \stopformula

  \stoptext

If I add

  \appendtoks \rm \to \everymathematics
  \setupmathematics[lcgreek=normal, ucgreek=normal]

just before \starttext, the math is typeset in roman pagella.

What am I doing silly?

Also, one of my reservations about using Euler for math, which readers
complained about in _Street-Fighting Mathematics_, is that v and \nu
(kinematic viscosity) look so similar.  Do you know any way to make them
more distinguishable, e.g. by substituting a different character?

-Sanjoy


> To use this feature you have to use `pagellaovereuler` as your math font. 
> For example, to use Euler with DejaVu fonts, use:
>
>
> \usetypescriptfile[euler]
> \starttypescript[mainface]
>  	\definetypeface[mainface][rm][serif][dejavu]          [default]
>  	\definetypeface[mainface][ss][sans] [dejavu]          [default]
>  	\definetypeface[mainface][tt][mono] [dejavu]          [default]
>  	\definetypeface[mainface][mm][math] [pagellaovereuler][default]
> \stoptypescript
>
> \setupbodyfont[mainface]
>
> \appendtoks \rm \to \everymathematics
> \setupmathematics
>         [lcgreek=normal, ucgreek=normal]
>
>
> There is a built-in typescript `euler-with-pagella` to use 
> `pagellaovereuler` as the math font and `pagella` as the text font.
___________________________________________________________________________________
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] 16+ messages in thread

* Re: Euler with fallback
  2014-02-16 16:51 ` Sanjoy Mahajan
@ 2014-02-16 18:29   ` Wolfgang Schuster
  2014-02-17 14:12     ` Sanjoy Mahajan
  0 siblings, 1 reply; 16+ messages in thread
From: Wolfgang Schuster @ 2014-02-16 18:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 16.02.2014 um 17:51 schrieb Sanjoy Mahajan <sanjoy@olin.edu>:

> Aditya Mahajan <adityam@umich.edu> writes:
> 
>> This is to announce that the latest beta supports creating virtual math 
>> fonts with fallback. The main test case is to use Euler font with missing 
>> characters taken from Pagella but the mechanism is general and can be used 
>> to replace a specific set of math glyphs from a font.
>> 
>> This feature is not extensively tested. As such it will be useful if 
>> everyone interested in math fallback mechanism could test this out and 
>> report any bugs or inconsistencies.
> 
> I would like to test and hopefully use this setup for _Street-Fighting
> Science and Engineering_.  It should also give the setup a thorough
> workout.  But I can't quite get the preamble right.
> 
> The test file below typesets text and math in palatino.
> 
>  \usetypescriptfile[euler-with-pagella]

You have to load the typescript file for euler.

>  \definebodyfontenvironment[10.5pt]
>  \setupbodyfont[palatino,10.5pt]

When you use the palatino typeface context uses only the pagella math fonts.

To use palatino as text font and euler for math you have to create your own typeface collection:

\usetypescriptfile[euler]

\definetypeface [mainface] [rm] [serif] [pagella]          [default]
\definetypeface [mainface] [tt] [mono]  [dejavu]           [default] [rscale=0.9]
\definetypeface [mainface] [mm] [math]  [pagellaovereuler] [default]

\setupbodyfont[mainface,10.5pt]

\appendtoks \rm \to \everymathematics
\setupmathematics[lcgreek=normal, ucgreek=normal]

\starttext

\input knuth

\startplaceformula
  \startformula
    a^2 + b^2 = c^2.
  \stopformula
\stopplaceformula

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

* Re: Euler with fallback
  2014-02-16 18:29   ` Wolfgang Schuster
@ 2014-02-17 14:12     ` Sanjoy Mahajan
  2014-02-17 14:24       ` Wolfgang Schuster
  0 siblings, 1 reply; 16+ messages in thread
From: Sanjoy Mahajan @ 2014-02-17 14:12 UTC (permalink / raw)
  To: Wolfgang Schuster, mailing list for ConTeXt users

Wolfgang,

Thank you for the preamble.  It works well standalone.

For some reason it doesn't work with components.  I think I've seen this
problem before but can't remember the resolution.  Here's a minimal
example (with 2014.02.14 beta).  The text comes out in Euler.  The same
happens putting the font setup in a project file and referring to it
with \project.

\startcomponent test

\usetypescriptfile[euler]

\definetypeface [mainface] [rm] [serif] [pagella]          [default]
\definetypeface [mainface] [tt] [mono]  [dejavu]           [default]
[rscale=0.9]
\definetypeface [mainface] [mm] [math]  [pagellaovereuler] [default]

\setupbodyfont[mainface,10.5pt]

\appendtoks \rm \to \everymathematics
\setupmathematics[lcgreek=normal, ucgreek=normal]


\input knuth

\stopcomponent
___________________________________________________________________________________
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] 16+ messages in thread

* Re: Euler with fallback
  2014-02-17 14:12     ` Sanjoy Mahajan
@ 2014-02-17 14:24       ` Wolfgang Schuster
  2014-02-17 14:29         ` Sanjoy Mahajan
  0 siblings, 1 reply; 16+ messages in thread
From: Wolfgang Schuster @ 2014-02-17 14:24 UTC (permalink / raw)
  To: Sanjoy Mahajan; +Cc: mailing list for ConTeXt users


Am 17.02.2014 um 15:12 schrieb Sanjoy Mahajan <sanjoy@olin.edu>:

> Wolfgang,
> 
> Thank you for the preamble.  It works well standalone.
> 
> For some reason it doesn't work with components.  I think I've seen this
> problem before but can't remember the resolution.  Here's a minimal
> example (with 2014.02.14 beta).  The text comes out in Euler.  The same
> happens putting the font setup in a project file and referring to it
> with \project.

Put you font definitions before \startcomponent or better put them
in a environment file and load this file before \startcomponent.

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

* Re: Euler with fallback
  2014-02-17 14:24       ` Wolfgang Schuster
@ 2014-02-17 14:29         ` Sanjoy Mahajan
  2014-02-17 14:45           ` Wolfgang Schuster
  0 siblings, 1 reply; 16+ messages in thread
From: Sanjoy Mahajan @ 2014-02-17 14:29 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

> Put your font definitions before \startcomponent or better put them
> in a environment file and load this file before \startcomponent.

Sorry, I should have said that I had tried that, but it has the same
problem (Euler font for everything).

\usetypescriptfile[euler]

\definetypeface [mainface] [rm] [serif] [pagella]          [default]
\definetypeface [mainface] [tt] [mono]  [dejavu]           [default]
[rscale=0.9]
\definetypeface [mainface] [mm] [math]  [pagellaovereuler] [default]

\setupbodyfont[mainface,10.5pt]

\appendtoks \rm \to \everymathematics
\setupmathematics[lcgreek=normal, ucgreek=normal]

\startcomponent test

\input knuth

\stopcomponent
___________________________________________________________________________________
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] 16+ messages in thread

* Re: Euler with fallback
  2014-02-17 14:29         ` Sanjoy Mahajan
@ 2014-02-17 14:45           ` Wolfgang Schuster
  2014-02-17 20:07             ` Sanjoy Mahajan
  0 siblings, 1 reply; 16+ messages in thread
From: Wolfgang Schuster @ 2014-02-17 14:45 UTC (permalink / raw)
  To: Sanjoy Mahajan; +Cc: mailing list for ConTeXt users


Am 17.02.2014 um 15:29 schrieb Sanjoy Mahajan <sanjoy@olin.edu>:

>> Put your font definitions before \startcomponent or better put them
>> in a environment file and load this file before \startcomponent.
> 
> Sorry, I should have said that I had tried that, but it has the same
> problem (Euler font for everything).

I can’t reproduce this, when I process your example the text is typeset with the pagella font.

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

* Re: Euler with fallback
  2014-02-17 14:45           ` Wolfgang Schuster
@ 2014-02-17 20:07             ` Sanjoy Mahajan
  2014-02-17 21:04               ` Aditya Mahajan
  2014-02-17 21:08               ` Wolfgang Schuster
  0 siblings, 2 replies; 16+ messages in thread
From: Sanjoy Mahajan @ 2014-02-17 20:07 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

> I can’t reproduce this, when I process your example the text is
> typeset with the pagella font.

You are right.  I am not sure what I had done, but it works as you say.

I also put the font setup in an environment file that is loaded by
testproject.tex, and that also works.

  \project testproject
  \startcomponent test

  \input knuth

  \stopcomponent

Because of font loading, is this recommended way to use components
(rather than the old way of the \project line after \startcomponent)?
If so, I'll make a note on the wiki.

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

* Re: Euler with fallback
  2014-02-17 20:07             ` Sanjoy Mahajan
@ 2014-02-17 21:04               ` Aditya Mahajan
  2014-02-17 21:08               ` Wolfgang Schuster
  1 sibling, 0 replies; 16+ messages in thread
From: Aditya Mahajan @ 2014-02-17 21:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 17 Feb 2014, Sanjoy Mahajan wrote:

>  \project testproject
>  \startcomponent test
>
>  \input knuth
>
>  \stopcomponent
>
> Because of font loading, is this recommended way to use components
> (rather than the old way of the \project line after \startcomponent)?
> If so, I'll make a note on the wiki.

Yes. This is one of the changes from MkII to MkIV. I think that Hans had a 
This Way document on this.

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

* Re: Euler with fallback
  2014-02-17 20:07             ` Sanjoy Mahajan
  2014-02-17 21:04               ` Aditya Mahajan
@ 2014-02-17 21:08               ` Wolfgang Schuster
  2014-02-18  1:05                 ` Sanjoy Mahajan
  1 sibling, 1 reply; 16+ messages in thread
From: Wolfgang Schuster @ 2014-02-17 21:08 UTC (permalink / raw)
  To: Sanjoy Mahajan; +Cc: mailing list for ConTeXt users


Am 17.02.2014 um 21:07 schrieb Sanjoy Mahajan <sanjoy@olin.edu>:

>> I can’t reproduce this, when I process your example the text is
>> typeset with the pagella font.
> 
> You are right.  I am not sure what I had done, but it works as you say.
> 
> I also put the font setup in an environment file that is loaded by
> testproject.tex, and that also works.
> 
>  \project testproject
>  \startcomponent test
> 
>  \input knuth
> 
>  \stopcomponent
> 
> Because of font loading, is this recommended way to use components
> (rather than the old way of the \project line after \startcomponent)?
> If so, I'll make a note on the wiki.

This does not only apply to component etc. but also to normal files because
context sets and resets some values with \starttext etc. and to avoid some
problems it’s better to put all setup commands before it.

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

* Re: Euler with fallback
  2014-02-17 21:08               ` Wolfgang Schuster
@ 2014-02-18  1:05                 ` Sanjoy Mahajan
  2014-02-18 11:29                   ` bug/issue with components and preamble (Re: Euler with fallback) Sanjoy Mahajan
  0 siblings, 1 reply; 16+ messages in thread
From: Sanjoy Mahajan @ 2014-02-18  1:05 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

>> Because of font loading, is this recommended way to use components
>> (rather than the old way of the \project line after \startcomponent)?
>> If so, I'll make a note on the wiki.
>
> This does not only apply to component etc. but also to normal files because
> context sets and resets some values with \starttext etc. and to avoid some
> problems it’s better to put all setup commands before it.

Agreed.  The wiki page for "Project Structure" has always shown setups
(via \project ... ) going after the \startcomponent or \startproduct.
I've edited the examples to have setups before the
\start(product|component).  If I did it wrong, let me know.

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

* bug/issue with components and preamble (Re: Euler with fallback)
  2014-02-18  1:05                 ` Sanjoy Mahajan
@ 2014-02-18 11:29                   ` Sanjoy Mahajan
  0 siblings, 0 replies; 16+ messages in thread
From: Sanjoy Mahajan @ 2014-02-18 11:29 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

Sanjoy Mahajan <sanjoy@olin.edu> writes:

> The wiki page for "Project Structure" has always shown setups (via
> \project ... ) going after the \startcomponent or \startproduct.  I've
> edited the examples to have setups before the
> \start(product|component).  If I did it wrong, let me know.

My change doesn't work, because of how components handle project files
(which also turns out to explain why I was seeing the Euler font when
you didn't).  The problem is that context doesn't generate a pdf file if
the \project line comes before the \startcomponent.  Thus, I was seeing
a pdf file from a previous version of the test file (where the font
setup came after the \startcomponent).

Here are the two test files (testproject2.tex and test6.tex):

==== testproject2.tex ============
\startproject testproject
\stopproject
==================================

(If testproject2.tex is empty, then the problem does not occur.)

========== test6.tex =============
\project testproject2
\startcomponent test

\input knuth

\placeformula\startformula
a^2 + b^2 = c^2
\stopformula

\stopcomponent
==================================

Here is the log file.  It says 'result saved in test6.pdf' but no pdf
file is actually saved.

(/home/sanjoy/context/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2014.02.14 17:07 MKIV beta  fmt: 2014.2.15  int: english/english

system          > 'cont-new.mkiv' loaded
(/home/sanjoy/context/tex/texmf-context/tex/context/base/cont-new.mkiv)
system          > files > jobname 'test6', input './test6', result 'test6'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
(/home/sanjoy/sfse/test6.tex (testproject2.tex{/home/sanjoy/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
{/home/sanjoy/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/home/sanjoy/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts           > 'fallback modern rm 12pt' is loaded
 ) ) )

system          > structure > start used structure

used structure  > text: test6
used structure  >   project: testproject

system          > structure > stop used structure


system          > files > start used files

used file       >    1: filename=cont-yes.mkiv filetype=tex foundname=/home/sanjoy/context/tex/texmf-context/tex/context/base/cont-yes.mkiv usedmethod=otherwise
used file       >    2: filename=cont-new.mkiv filetype=tex foundname=/home/sanjoy/context/tex/texmf-context/tex/context/base/cont-new.mkiv usedmethod=otherwise
used file       >    3: filename=lang-us.lua filetype=scripts foundname=/home/sanjoy/context/tex/texmf-context/tex/context/patterns/lang-us.lua usedmethod=otherwise
used file       >    4: filename=/home/sanjoy/sfse/test6.tex foundname=/home/sanjoy/sfse/test6.tex usedmethod=direct
used file       >    5: filename=testproject2.tex foundname=testproject2.tex usedmethod=direct
used file       >    6: filename=mkiv-base.map filetype=map format=map foundname=/home/sanjoy/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map usedmethod=database
used file       >    7: filename=lm.lfg filetype=tex foundname=/home/sanjoy/context/tex/texmf-context/tex/context/fonts/lm.lfg usedmethod=otherwise
used file       >    8: filename=lm-math.lfg filetype=tex foundname=/home/sanjoy/context/tex/texmf-context/tex/context/fonts/lm-math.lfg usedmethod=otherwise
used file       >    9: filename=lm-math.map filetype=map format=map foundname=/home/sanjoy/context/tex/texmf/fonts/map/dvips/lm/lm-math.map usedmethod=database
used file       >   10: filename=lm-rm.map filetype=map format=map foundname=/home/sanjoy/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map usedmethod=database
used file       >   11: filename=lmroman12-regular filetype=otf format=otf foundname=/home/sanjoy/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf usedmethod=database
used file       >   12: filename=latinmodern-math.otf filetype=opentypefonts foundname=/home/sanjoy/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
used file       >   13: filename=latinmodern-math.otf filetype=otf format=otf foundname=/home/sanjoy/context/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database

system          > files > stop used files


system          > options > start commandline options

used option     > currentrun="2"
used option     > fulljobname="./test6.tex"
used option     > input="./test6.tex"
used option     > kindofrun="2"
used option     > maxnofruns="8"
used option     > no-parse-first-line="true"
used option     > nonstopmode="true"
used option     > passon="-file-line-error -recorder -interaction nonstopmode"

system          > options > stop commandline options

system          > options > start commandline files

used file       >    1: ./test6.tex

system          > options > stop commandline files


publications    > start used btx commands


publications    > stop used btxcommands



mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: /home/sanjoy/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.012 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 13 found files, scanned paths: <none>
mkiv lua stats  > stored bytecode data: 347 modules (0.240 sec), 69 tables (0.000 sec), 416 chunks (0.240 sec)
mkiv lua stats  > running in nuts mode: yes
mkiv lua stats  > cleaned up reserved nodes: 39 nodes, 443 lists of 442
mkiv lua stats  > node memory usage: 2 glue, 2 penalty, 6 attribute, 19 glue_spec, 2 attribute_list, 2 temp
mkiv lua stats  > node list callback tasks: 6 unique task lists, 2 instances (re)created, 3 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: 49 direct, 181 indirect, 230 total
mkiv lua stats  > randomizer: resumed with value 0.21033152621721
mkiv lua stats  > result saved in file: test6.pdf, compresslevel 3, objectcompreslevel 3
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, lmroman12-regular.otf
mkiv lua stats  > fonts load time: 0.531 seconds for 4 fonts, 2 shared in backend, 2 common vectors, 0 common hashes
mkiv lua stats  > used platform: linux, type: unix, binary subtree: texmf-linux, symbol mask: utf (τεχ)
mkiv lua stats  > luatex banner: this is luatex, version beta-0.78.2 (tex live 2014/dev) (rev 4746)
mkiv lua stats  > control sequences: 38223 of 65536 + 100000
mkiv lua stats  > current memory usage: 31 MB (ctx: 31 MB)
mkiv lua stats  > runtime: 0.853 seconds

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

* Re: Euler with fallback
  2013-08-10 16:36 Euler with fallback Aditya Mahajan
  2014-02-16 16:51 ` Sanjoy Mahajan
@ 2014-03-03 11:50 ` Sanjoy Mahajan
  2014-03-03 15:07   ` Aditya Mahajan
  1 sibling, 1 reply; 16+ messages in thread
From: Sanjoy Mahajan @ 2014-03-03 11:50 UTC (permalink / raw)
  To: Aditya Mahajan, mailing list for ConTeXt users

Aditya Mahajan <adityam@umich.edu> writes:

> This is to announce that the latest beta supports creating virtual math 
> fonts with fallback. The main test case is to use Euler font with missing 
> characters taken from Pagella but the mechanism is general and can be used 
> to replace a specific set of math glyphs from a font.
>
> This feature is not extensively tested. As such it will be useful if 
> everyone interested in math fallback mechanism could test this out and 
> report any bugs or inconsistencies.

One inconsistency or maybe bug is that text subscripts come out in Euler
instead of Palatino.  

Here's an example (using 2014.02.14 beta).  The "Sun" subscript using
_{\tf Sun} or _{\rm Sun} was in Palatino in the corresponding MkII
setup, but is in Euler now.  The workaround of an hbox with \tfxx or
\tfx doesn't get quite the right size.

\usetypescriptfile[euler]

\definetypeface [mainface] [rm] [serif] [pagella]          [default]
\definetypeface [mainface] [tt] [mono]  [dejavu]           [default]
[rscale=0.9]
\definetypeface [mainface] [mm] [math]  [pagellaovereuler] [default]

\setupbodyfont[mainface]

\appendtoks \rm \to \everymathematics
\setupmathematics[lcgreek=normal, ucgreek=normal]

\starttext

\placeformula\startformula
M_{\rm Sun}\quad M_{\hbox{\tfx Sun}} \quad M_{\hbox{\tfxx Sun}} \quad M_{\tf Sun}
\stopformula

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

* Re: Euler with fallback
  2014-03-03 11:50 ` Euler with fallback Sanjoy Mahajan
@ 2014-03-03 15:07   ` Aditya Mahajan
  2014-03-03 15:24     ` Sanjoy Mahajan
  0 siblings, 1 reply; 16+ messages in thread
From: Aditya Mahajan @ 2014-03-03 15:07 UTC (permalink / raw)
  To: Sanjoy Mahajan; +Cc: mailing list for ConTeXt users

On Mon, 3 Mar 2014, Sanjoy Mahajan wrote:

> Aditya Mahajan <adityam@umich.edu> writes:
>
>> This is to announce that the latest beta supports creating virtual math
>> fonts with fallback. The main test case is to use Euler font with missing
>> characters taken from Pagella but the mechanism is general and can be used
>> to replace a specific set of math glyphs from a font.
>>
>> This feature is not extensively tested. As such it will be useful if
>> everyone interested in math fallback mechanism could test this out and
>> report any bugs or inconsistencies.
>
> One inconsistency or maybe bug is that text subscripts come out in Euler
> instead of Palatino.
>
> Here's an example (using 2014.02.14 beta).  The "Sun" subscript using
> _{\tf Sun} or _{\rm Sun} was in Palatino in the corresponding MkII
> setup, but is in Euler now.  The workaround of an hbox with \tfxx or
> \tfx doesn't get quite the right size.

That is because in math mode, \rm is symonym with \mathrm etc. The 
standard way to write this is _{\text{Sun}}.

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

* Re: Euler with fallback
  2014-03-03 15:07   ` Aditya Mahajan
@ 2014-03-03 15:24     ` Sanjoy Mahajan
  0 siblings, 0 replies; 16+ messages in thread
From: Sanjoy Mahajan @ 2014-03-03 15:24 UTC (permalink / raw)
  To: Aditya Mahajan; +Cc: mailing list for ConTeXt users

Aditya,

>> Here's an example (using 2014.02.14 beta).  The "Sun" subscript using
>> _{\tf Sun} or _{\rm Sun} was in Palatino in the corresponding MkII
>> setup, but is in Euler now.  The workaround of an hbox with \tfxx or
>> \tfx doesn't get quite the right size.
>
> That is because in math mode, \rm is symonym with \mathrm etc. The 
> standard way to write this is _{\text{Sun}}.

I agree about \rm.  However, _{\tf blah} once (in MkII) selected the
text font.  e.g.

\starttext
\placeformula\startformula
M_{\tf Sun}
\stopformula
\stoptext

Is the II->IV change in \tf semantics intended?  It's not hard to adjust
for by using 'sed'.  I raise the issue only in case the change is not
intended.

Actually, the example just as above (i.e. using modern fonts) works fine
works in MkII and MkIV.  It also works if "\setupbodyfont[palatino]" is
inserted as the first line.

It's fails only when using Palatino with Euler (at least, in the way
that I did it).

That data doesn't say what the right behavior is.  But it may help you
decide.

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

* Re: Euler with fallback
       [not found] <mailman.310.1392661733.2494.ntg-context@ntg.nl>
@ 2014-02-17 22:51 ` Jeong Dal
  0 siblings, 0 replies; 16+ messages in thread
From: Jeong Dal @ 2014-02-17 22:51 UTC (permalink / raw)
  To: list ntg-context@ntg.nl ntg-context@ntg.nl ntg-context@ntg.nl
	ntg-context@ntg.nl


> 
> Am 17.02.2014 um 15:29 schrieb Sanjoy Mahajan <sanjoy@olin.edu>:
> 
>>> Put your font definitions before \startcomponent or better put them
>>> in a environment file and load this file before \startcomponent.
>> 
>> Sorry, I should have said that I had tried that, but it has the same
>> problem (Euler font for everything).
> 
> I can?t reproduce this, when I process your example the text is typeset with the pagella font.
> 
> Wolfgang

I run the sample code and got the correct output( patella for text and euler for math).
My ConTeXt version is 

ConTeXt  ver: 2013.12.20 23:45 MKIV beta  fmt: 2013.12.22  int: english/english

best regards,

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

end of thread, other threads:[~2014-03-03 15:24 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-10 16:36 Euler with fallback Aditya Mahajan
2014-02-16 16:51 ` Sanjoy Mahajan
2014-02-16 18:29   ` Wolfgang Schuster
2014-02-17 14:12     ` Sanjoy Mahajan
2014-02-17 14:24       ` Wolfgang Schuster
2014-02-17 14:29         ` Sanjoy Mahajan
2014-02-17 14:45           ` Wolfgang Schuster
2014-02-17 20:07             ` Sanjoy Mahajan
2014-02-17 21:04               ` Aditya Mahajan
2014-02-17 21:08               ` Wolfgang Schuster
2014-02-18  1:05                 ` Sanjoy Mahajan
2014-02-18 11:29                   ` bug/issue with components and preamble (Re: Euler with fallback) Sanjoy Mahajan
2014-03-03 11:50 ` Euler with fallback Sanjoy Mahajan
2014-03-03 15:07   ` Aditya Mahajan
2014-03-03 15:24     ` Sanjoy Mahajan
     [not found] <mailman.310.1392661733.2494.ntg-context@ntg.nl>
2014-02-17 22:51 ` Jeong Dal

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