I'm trying to follow http://wiki.contextgarden.net/rsfs to get a script L in math mode (to denote Laplace Transform) but to no avail. I followed the code in the first section, but I get the following compilation error. Any help is appreciated. Troy --- context foo.tex MTXrun | run 1: luatex --fmt="/opt/context-minimals/tex/texmf-cache/luatex-cache/context/ccfefc91ec3ed68af1aeed1f470fef4d/formats/cont-en" --lua="/opt/context-minimals/tex/texmf-cache/luatex-cache/context/ccfefc91ec3ed68af1aeed1f470fef4d/formats/cont-en.lui" --backend=pdf "./foo.tex" This is LuaTeX, Version beta-0.52.0-2010031622 \write18 enabled. (/home/thenders/classes/2010/spring/ma304/foo.tex ConTeXt ver: 2010.03.30 18:56 MKIV fmt: 2010.3.31 int: english/english system : cont-new loaded (/opt/context-minimals/tex/texmf-context/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (/opt/context-minimals/tex/texmf-context/tex/context/base/cont-new.mkiv)) system : cont-fil loaded (/opt/context-minimals/tex/texmf-context/tex/context/base/cont-fil.tex loading : ConTeXt File Synonyms ) system : cont-sys loaded (/opt/context-minimals/tex/texmf-local/tex/context/user/cont-sys.tex (/opt/context-minimals/tex/texmf-context/tex/context/base/type-def.mkiv) (/opt/context-minimals/tex/texmf-context/tex/context/base/type-lua.tex) (/opt/context-minimals/tex/texmf-context/tex/context/base/type-siz.tex (/opt/context-minimals/tex/texmf-context/tex/context/base/type-siz.mkiv)) (/opt/context-minimals/tex/texmf-context/tex/context/base/type-otf.tex (/opt/context-minimals/tex/texmf-context/tex/context/base/type-otf.mkiv))) system : foo.top loaded (foo.top) fonts : preloading latin modern fonts (/opt/context-minimals/tex/texmf-local/tex/context/luc/type-luc.tex){/opt/context-minimals/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/opt/context-minimals/tex/texmf/fonts/map/dvips/lm/lm-rm.map} bodyfont : 12pt rm is loaded language : language en is active {/opt/context-minimals/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map} systems : begin file foo.tex at line 16 ! Undefined control sequence. \scr ->\fam \purefamily {scriptfamily} l.18 ${\scr ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ ?
On 13 avr. 2010, at 04:13, Troy Henderson wrote:
I'm trying to follow
http://wiki.contextgarden.net/rsfs
to get a script L in math mode (to denote Laplace Transform) but to no avail. I followed the code in the first section, but I get the following compilation error. Any help is appreciated.
Troy
Hi Troy, The following works fine for me in mkii, but not in mkiv since, as you observe, the command \purefamily seems to have disappeared from mkiv: %%%%%%%%%%% \starttypescript [math] [modern,computer-modern,latin-modern,ams,palatino] [size] \definebodyfont [17.3pt,14.4pt,12pt,11pt,10pt,9pt][mm][mc=rsfs10 sa 1] \definebodyfont [8pt,7pt] [mm] [mc=rsfs7 sa 1] \definebodyfont [6pt,5pt,4pt] [mm] [mc=rsfs5 sa 1] \stoptypescript \definefamilysynonym [default] [scriptfamily] [mc] \def\scr{\fam\purefamily{scriptfamily}} % To use ${\scr ABC}$ \def\script#1{{\scr#1}} % To use $\script{ABC}$ \definetypeface [modern] [mm] [math] [modern] [ams] [encoding=texnansi] \setupbodyfont[reset,modern,14.4pt] \starttext \input knuth ${\scr ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ $\sum_{\scr ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \startformula \sum_{j \in \scr M} {\scr L}_{j} = {\scr P}. \stopformula \stoptext %%%%%%%%%%% Best regards: OK
---
context foo.tex MTXrun | run 1: luatex --fmt="/opt/context-minimals/tex/texmf-cache/luatex-cache/context/ccfefc91ec3ed68af1aeed1f470fef4d/formats/cont-en" --lua="/opt/context-minimals/tex/texmf-cache/luatex-cache/context/ccfefc91ec3ed68af1aeed1f470fef4d/formats/cont-en.lui" --backend=pdf "./foo.tex" This is LuaTeX, Version beta-0.52.0-2010031622 \write18 enabled. (/home/thenders/classes/2010/spring/ma304/foo.tex
ConTeXt ver: 2010.03.30 18:56 MKIV fmt: 2010.3.31 int: english/english
system : cont-new loaded (/opt/context-minimals/tex/texmf-context/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex (/opt/context-minimals/tex/texmf-context/tex/context/base/cont-new.mkiv)) system : cont-fil loaded (/opt/context-minimals/tex/texmf-context/tex/context/base/cont-fil.tex loading : ConTeXt File Synonyms ) system : cont-sys loaded (/opt/context-minimals/tex/texmf-local/tex/context/user/cont-sys.tex (/opt/context-minimals/tex/texmf-context/tex/context/base/type-def.mkiv) (/opt/context-minimals/tex/texmf-context/tex/context/base/type-lua.tex) (/opt/context-minimals/tex/texmf-context/tex/context/base/type-siz.tex (/opt/context-minimals/tex/texmf-context/tex/context/base/type-siz.mkiv)) (/opt/context-minimals/tex/texmf-context/tex/context/base/type-otf.tex (/opt/context-minimals/tex/texmf-context/tex/context/base/type-otf.mkiv))) system : foo.top loaded (foo.top) fonts : preloading latin modern fonts (/opt/context-minimals/tex/texmf-local/tex/context/luc/type-luc.tex){/opt/context-minimals/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/opt/context-minimals/tex/texmf/fonts/map/dvips/lm/lm-rm.map} bodyfont : 12pt rm is loaded language : language en is active {/opt/context-minimals/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map} systems : begin file foo.tex at line 16 ! Undefined control sequence. \scr ->\fam \purefamily {scriptfamily} l.18 ${\scr ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ ? ___________________________________________________________________________________ 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 ___________________________________________________________________________________
%%%%%%%%%%%%%%%%%% Otared Kavian Département de Mathématiques Université de Versailles Saint-Quentin Bâtiment Fermat 45 aveue des Etats Unis 78035 Versailles cedex Téléphone: +33 1 39 25 46 42 Secrétariat: +33 1 39 25 46 44 Secrétariat: +33 1 39 25 46 46 e-mail: Otared.Kavian@math.uvsq.fr
On 13-4-2010 12:41, Otared Kavian wrote:
On 13 avr. 2010, at 04:13, Troy Henderson wrote:
I'm trying to follow
http://wiki.contextgarden.net/rsfs
to get a script L in math mode (to denote Laplace Transform) but to no avail. I followed the code in the first section, but I get the following compilation error. Any help is appreciated.
Troy
Hi Troy,
The following works fine for me in mkii, but not in mkiv since, as you observe, the command \purefamily seems to have disappeared from mkiv:
Sure, as we have a complete different model now as in mkiv we take complete freedom to divert from the regular tex approach of families. Anyhow, the following shoudl work out ok. You need the beta that i just uploaded as some extra checks were needed because these are non typical fonts. This is just a test. In order to have a nice solution we'd have to define a proper virtual setup (so in fact symbol then becomes a collection of alternatives; of course we can consider adding them the base lm set instead) \unprotect \chardef\msfam\plustwo % math symbol \def\c!ms{ms} \unexpanded\def\ms{\ifmmode\fam\plustwo\else\setcurrentfontalternative\c!ms\fi} \chardef\symbolmathmode\zerocount \def\enablesymbolmath {\chardef\symbolmathmode\plusone } \def\disablesymbolmath{\chardef\symbolmathmode\zerocount} \appendtoks \ifcase\symbolmathmode\or\dosetmathfamily\msfam\c!ms\fi \to \mathstrategies \enablesymbolmath \protect \starttypescript [math] [modern,computer-modern,latin-modern] \definefontsynonym[MathSymbol][MathSymbol-Regular@symbol-math] \loadfontgoodies[symbol-math] \stoptypescript \starttypescript [math] [modern,computer-modern,latin-modern] [size] % extras on top of regular and bold \definebodyfont [4pt,5pt,6pt,7pt,8pt,9pt,10pt, 11pt,12pt,14.4pt,17.3pt,20.7pt] [mm] [ms=MathSymbol sa 1] \stoptypescript \usetypescript[modern] \setupbodyfont[modern,10pt] \def\scr {\ms} \def\script#1{{\scr#1}} \enableboldmath \enablesymbolmath \setupbodyfont[10pt] \starttext \input knuth ${\scr ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ $\sum_{\scr ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ $\sum_{\mb ABCDEFGHIJKLMNOPQRSTUVWXYZ}$ \startformula \sum_{j \in \scr M} {\scr L}_{j} = {\scr P}. \stopformula \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans, I updated my ConTeXt (by rerunning first-setup.sh and remaking the format files), but I get the following error when compiling your code. Troy LuaTeX warning: lua-loaded font [72] (MathSymbol-Regular) has no characters! ! LuaTeX error ...mals/tex/texmf-context/tex/context/base/font-def.lua:539: attempt to index field 'parameters' (a nil value) stack traceback: ...mals/tex/texmf-context/tex/context/base/font-def.lua:539: in function 'register' ...mals/tex/texmf-context/tex/context/base/font-ctx.lua:386: in function 'command_2' <main ctx instance>:1: in main chunk. \lowleveldefinefont ...lax , "\relativefontid " )} \edef \somefontspec {at \s... \xxdododefinefont ...efont {#4}\newfontidentifier \fi \csname \newfontidenti... \dodosetmathfamily ...\currentmathsize \endcsname \else \ifcsname \fontclass... \dosetmathfamily ...athfamily \scriptscriptfont #1 \let \currentmathsize \!!p... <inserted text> ... \dosetmathfamily \msfam \c!ms \fi \synchronizemath ...athfonts \the \mathstrategies \fi ... l.39 ...script[modern] \setupbodyfont[modern,10pt] ?
Hi Troy, Did you try the following: %%%%%%%%%%%% file rsfs-mkiv.tex % first comes the patch sent by Hans: \unprotect \chardef\msfam\plustwo % math symbol \def\c!ms{ms} \unexpanded\def\ms{\ifmmode\fam\plustwo\else\setcurrentfontalternative\c!ms\fi} \chardef\symbolmathmode\zerocount \def\enablesymbolmath {\chardef\symbolmathmode\plusone } \def\disablesymbolmath{\chardef\symbolmathmode\zerocount} \appendtoks \ifcase\symbolmathmode\or\dosetmathfamily\msfam\c!ms\fi \to \mathstrategies \enablesymbolmath \protect % end of patch \starttypescript [math] [modern,computer-modern,latin-modern] \definefontsynonym[MathSymbol][MathSymbol-Regular@symbol-math] \loadfontgoodies[symbol-math] \stoptypescript \starttypescript [math] [modern,computer-modern,latin-modern] [size] % extras on top of regular and bold \definebodyfont [4pt,5pt,6pt,7pt,8pt,9pt,10pt, 11pt,12pt,14.4pt,17.3pt,20.7pt] [mm] % [ms=MathSymbol sa 1] % I commented out this [ms=rsfs10 sa 1] % I replaced the above line by this \stoptypescript \usetypescript[modern] \setupbodyfont[modern,10pt] \def\scr {\ms} \def\script#1{{\scr#1}} \enableboldmath \enablesymbolmath \setupbodyfont[10pt] \starttext Recall that since ${\scr D}({\Bbb R}^n)\subset {\scr S}({\Bbb R}^n)$, and is dense, then we have \startformula {\scr S}'({\Bbb R}^n)\subset {\scr D}'({\Bbb R}^n) \stopformula This file has been typeset on \currentdate{} at \currenttime, with \doifmodeelse{mkiv} {mkiv, LuaTeX version \the\luatexversion, LuaTeX revision \luatexrevision, (LuaTeX date stamp \luatexdatestamp), } {mkii, } ConTeXt version \contextversion. \stoptext %%%%%%%%%%%% On my machine the rsfs font is shown under mkiv, but there a few issues with spacing of some characters as you may see in the resulting PDF. Hans gave a mission to Aditya, Mojca (and very remotely to me, given my more than limited skills…) to track down some of th eissues with math in mkiv. Aditya is right now travelling, so without an easy access the internet, beside being busy with his thesis. I am sure he will return soon and we will have some insights frm him and Hans. Best regards: OK On 14 avr. 2010, at 14:08, Troy Henderson wrote:
Hans,
I updated my ConTeXt (by rerunning first-setup.sh and remaking the format files), but I get the following error when compiling your code.
Troy
LuaTeX warning: lua-loaded font [72] (MathSymbol-Regular) has no characters! ! LuaTeX error ...mals/tex/texmf-context/tex/context/base/font-def.lua:539: attempt to index field 'parameters' (a nil value) stack traceback: ...mals/tex/texmf-context/tex/context/base/font-def.lua:539: in function 'register' ...mals/tex/texmf-context/tex/context/base/font-ctx.lua:386: in function 'command_2' <main ctx instance>:1: in main chunk. \lowleveldefinefont ...lax , "\relativefontid " )} \edef \somefontspec {at \s... \xxdododefinefont ...efont {#4}\newfontidentifier \fi \csname \newfontidenti... \dodosetmathfamily ...\currentmathsize \endcsname \else \ifcsname \fontclass... \dosetmathfamily ...athfamily \scriptscriptfont #1 \let \currentmathsize \!!p... <inserted text> ... \dosetmathfamily \msfam \c!ms \fi \synchronizemath ...athfonts \the \mathstrategies \fi ... l.39 ...script[modern] \setupbodyfont[modern,10pt]
? ___________________________________________________________________________________ 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 ___________________________________________________________________________________
participants (3)
-
Hans Hagen
-
Otared Kavian
-
Troy Henderson