Re: [NTG-context] math problems in last beta (cont-en and cont-xp)
Hi all, 2009/3/23 Hans Hagen pra...@wxs.nl Lutz Haseloff wrote: Lucida lacks greek and some operators. I found no embedded LucidaNewMath fonts in the resulting pdf. not defined at all (yet) (see end of math-vfu for how to do that; you can give lucida a try) I tried that, but it seems not enough to define: mathematics.make_font ( lucida-math, { { name = lucidabright, features = virtualmath, main = true }, { name = lucidanewmathroman, vector = traditional-mr } , { name = lucidanewmathitalic, vector = traditional-mi, skewchar=0x7F }, { name = lucidanewmathsymbol, vector = traditional-sy, skewchar=0x30, parameters = true } , { name = lucidanewmathextension, vector = traditional-ex, extension = true } , { name = msam10, vector = traditional-ma }, { name = msbm10, vector = traditional-mb }, } ) (I don't know in which of the lucida fontfiles the symbols a and b are located.) I would be glad to test math for the good old LucidaBright fonts. I'm not smart enough to prepare this myself. Cambria has a very ugly spacing. hm, do you have the latest cambria? there might be problems with some otf math parameters but we need examples before we can act on that I had an old version of cambria cached in C:\contextminimal\texmf-cache\luatex-cache\context\...\fonts After deleting them spacing is ok. But the \bigotimes operator from my example file now disappeared. btw. in the wiki is described a ConTeXt command \showmathcharacters. This seems not to work anymore. The related file math-run.tex is not input at the time of format generation. in mkiv we wil use modules for that ... s-fnt-25 is for math Should I send the output of: \usetypescript[cambria] \setupbodyfont[cambria] \usemodule[fnt-25] \starttext \showmathfontcharacters \stoptext to somebody? (130 pages, 458 kB) P.S. will the key [texnansi] (or [ec]) remain necessary to switch to LucidaBright? no - 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 - ___ 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] math problems in last beta (cont-en and cont-xp)
Hi Hans, hi Taco, hi all, testing math with the latest ConTeXt beta i found some problems. My test file is: \usetypescriptfile[type-buy] \def\currentfontname {\ctxlua{tex.print(font.getfont(font.current()).fullname)}} \starttext \startbuffer[mathbuffer] \currentfontname $a^2 + b^2 = c^2$ $E = mc^2 \bigotimes \sum$ $α^2 + β^2 = γ^2$ \blank[big] \stopbuffer \getbuffer[mathbuffer] \usetypescript[lucida][texnansi] \setupbodyfont[lucida] \getbuffer[mathbuffer] \usetypescript[cambria] \switchtotypeface[cambria] \getbuffer[mathbuffer] \usetypescript[palatino] \switchtotypeface[palatino] \getbuffer[mathbuffer] \stoptext Latin Modern and Palatino/px work very fine. Lucida lacks greek and some operators. I found no embedded LucidaNewMath fonts in the resulting pdf. Cambria has a very ugly spacing. btw. in the wiki is described a ConTeXt command \showmathcharacters. This seems not to work anymore. The related file math-run.tex is not input at the time of format generation. Greetings Lutz P.S. will the key [texnansi] (or [ec]) remain necessary to switch to LucidaBright? ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] math problems in last beta (cont-en and cont-xp)
On Mon, 23 Mar 2009, Lutz Haseloff wrote: Hi Hans, hi Taco, hi all, testing math with the latest ConTeXt beta i found some problems. My test file is: \usetypescriptfile[type-buy] \def\currentfontname {\ctxlua{tex.print(font.getfont(font.current()).fullname)}} \starttext \startbuffer[mathbuffer] \currentfontname $a^2 + b^2 = c^2$ $E = mc^2 \bigotimes \sum$ $α^2 + β^2 = γ^2$ \blank[big] \stopbuffer \getbuffer[mathbuffer] \usetypescript[lucida][texnansi] \setupbodyfont[lucida] \getbuffer[mathbuffer] \usetypescript[cambria] \switchtotypeface[cambria] \getbuffer[mathbuffer] \usetypescript[palatino] \switchtotypeface[palatino] \getbuffer[mathbuffer] \stoptext For using old type-1 math fonts, you need to create virtual fonts. Latin Modern and Palatino/px work very fine. For LM, Palatino, and Times, the virtual fonts are created in math-vfu.lua Lucida lacks greek and some operators. I found no embedded LucidaNewMath fonts in the resulting pdf. There are no virtual fonts for Lucida math. In principle, one just needs to translate math-lbr to lua syntax. I will try to do that, but I need someone to test the results, since I do not have Lucida fonts myself. Cambria has a very ugly spacing. Luatex does not do kerning for utf math right now. This will be handled correcrly in the future. btw. in the wiki is described a ConTeXt command \showmathcharacters. This seems not to work anymore. The related file math-run.tex is not input at the time of format generation. \ShowCompleteFont{name:Cambria-Math}{10pt}{1} P.S. will the key [texnansi] (or [ec]) remain necessary to switch to LucidaBright? For text fonts, yes. Normally math fonts use an independent encoding. 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] math problems in last beta (cont-en and cont-xp)
Lutz Haseloff wrote: Lucida lacks greek and some operators. I found no embedded LucidaNewMath fonts in the resulting pdf. not defined at all (yet) (see end of math-vfu for how to do that; you can give lucida a try) Cambria has a very ugly spacing. hm, do you have the latest cambria? there might be problems with some otf math parameters but we need examples before we can act on that btw. in the wiki is described a ConTeXt command \showmathcharacters. This seems not to work anymore. The related file math-run.tex is not input at the time of format generation. in mkiv we wil use modules for that ... s-fnt-25 is for math P.S. will the key [texnansi] (or [ec]) remain necessary to switch to LucidaBright? no - 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 - ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] math problems
Aditya Mahajan wrote: On Sun, 15 Mar 2009, Mohamed Bana wrote: hi guys, i generally use this file to test if math is working, with the recent update i get a lot of errors such as; Add \let\blackboard\mathblackboard \let\fraktur\mathfraktur \let\gothic\mathfraktur ok, i added it to math-ini.mkiv - 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 - ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] math problems
fairly recently as in, say, 2 months ago, i could typeset that file without changing anything, that is, it worked with luatex and pdftex from the minimals and pdtex from texlive 2008. is this because of the recent addition of the math stuff? Mohamed Aditya Mahajan wrote: On Sun, 15 Mar 2009, Mohamed Bana wrote: hi guys, i generally use this file to test if math is working, with the recent update i get a lot of errors such as; Add \let\blackboard\mathblackboard \let\fraktur\mathfraktur \let\gothic\mathfraktur in your preamble. 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 : https://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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] math problems
hi guys, i generally use this file to test if math is working, with the recent update i get a lot of errors such as; ! Missing number, treated as zero. to be read again $ \@@dobig ...o #1\bodyfontsize {}\right @space $ }} \...@mt@defaultBigl ...\puremathcomm {open}{\Big {#1} } l.99 \pauli = \dirac^2 = \Bigl( \sum_{j=1}^2 \sigma_j\big(-i\PD{}{x^j}-a_j\bi... ? with texlive 2008 it works just fine, i've attached the output of the TL2008. i'm certain that the same file was compiling just fine with (i think) luatex 0.31 (or pre 0.31). the content is from Mikael Persson's thesis. Mohamed \usemodule[bib] \def\mathbb#1{{\blackboard #1}} \def\pauli{\mathfrak{P}} \def\mathfrak#1{{\fraktur #1}} % Matriser av olika typ. % Paranthesis \definemathmatrix [pmatrix] [left={\left(\,},right={\,\right)}] % Brackets \definemathmatrix [bmatrix] [left={\left[\,},right={\,\right]}] % Curly braces \definemathmatrix [Bmatrix] [left={\left\{\,},right={\,\right\}}] % vertical bars \definemathmatrix [vmatrix] [left={\left\vert\,},right={\,\right\vert}] % double vertical bars \definemathmatrix [Vmatrix] [left={\left\Vert\,},right={\,\right\Vert}] \def\PD#1#2{\frac{\partial #1}{\partial #2}} \def\ann{\mathscr{Q}^{\vphantom{*}}} \def\mathscr#1{{\gothic #1}} \def\cre{\mathscr{Q}^*} \def\dirac{{\mathfrak{D}}} \def\pform{\mathfrak{p}} \def\ed{\mfunction{\,d}} \definemathcommand [dom] [nolop] {\mfunction{Dom}} \def\bz{\bar{z}} \def\psip{{\psi_+}} \def\psim{{\psi_-}} % \eqref \definereferenceformat[eqref][left=(,right=)] \defineenumeration[problem] [text=Problem, location=serried, width=fit, indenting=first, distance=0.5em, way=bysection, ] \subsubsection[ksec:paulitvad]{The Pauli operator in $\mathbb{R}^2$} A charged spin $1/2$ particle is described by the Pauli Hamiltonian, which acts in $L_2(\mathbb{R}^2)\otimes \mathbb{C}^2$, and is formally defined as \placeformula[keq:pauli] \startformula \pauli = \startpmatrix \NC H-\frac{g}{2}B \NC 0 \NR \NC 0 \NC H+\frac{g}{2}B\NR \stoppmatrix. \stopformula Here $H$ is the two-dimensional Schrödinger Hamiltonian $H=(-i\nabla -\vec{a})^2$, $B$ is the magnetic field (In two dimensions we identify the two-form and the coefficient function), and $g$ is the {\em gyromagnetic ratio}. We identify the real point $(x^1,x^2)$ with the complex number $z=x^1+ix^2$, and denote a scalar potential of $B$ by $W$, \startformula -\Delta W = B. \stopformula We set $\Pi_j = -i\PD{}{x^j}-a_j$ and \startformula \ann = \Pi_1 - i \Pi_2,\quad \cre = \Pi_1 + i\Pi_2, \stopformula and note that \placeformula[keq:komm] \startformula \ann\cre=\cre\ann+2B,\quad H=\cre\ann+B=\ann\cre-B. \stopformula From~\eqref[keq:pauli] and~\eqref[keq:komm] we get \placeformula[keq:paulig] \startformula \pauli = \startpmatrix \NC \cre\ann-\frac{g-2}{2}B \NC 0 \NR \NC 0 \NC \ann\cre+\frac{g-2}{2}B\NR \stoppmatrix. \stopformula The number $\frac{g-2}{2}$ is called the {\em anomaly factor} of the magnetic moment. Experiments give an anomaly factor of $0.00159$ for the electron~\cite[bovo]. We assume that $g=2$, which is the simplest case. Thus, the Pauli Hamiltonian we study in this thesis is formally defined by \placeformula[keq:pauliw] \startformula \pauli = \startpmatrix \NC \cre\ann \NC 0 \NR \NC 0 \NC \ann\cre\NR \stoppmatrix. \stopformula The Pauli operator can be written as the square of the Dirac operator \placeformula[keq:paulia] \startformula \pauli = \dirac^2 = \Bigl(\sum_{j=1}^2 \sigma_j\big(-i\PD{}{x^j}-a_j\big)\Bigr)^2 = \startpmatrix \NC 0 \NC \cre \NR \NC \ann \NC 0\NR \stoppmatrix^2 \stopformula from which it follows that it is a non-negative operator. Now let us be more precise about the domains. As in the case of the Schrödinger Hamiltonian there is a problem in defining the Pauli Hamiltonian if the magnetic field is too singular. The quadratic form corresponding to $\pauli$ is given by \placeformula[keq:pform] \startformula \pform(\psi,\psi)= \int_{\mathbb{R}^2} \Big|\sum_{j=1}^2 \sigma_j\big(-i\PD{}{x^j}-a_j\big)\psi\Big|^2\ed m(x). \stopformula If $\vec{a}\in L_{2,\text{loc}}(\mathbb{R}^2)\otimes \mathbb{R}^2$ then $\pform(\psi,\psi)$ makes sense for $\psi\in C_0^\infty(\mathbb{R}^2)\otimes \mathbb{C}^2$. We define the {\em minimal} Pauli form $\pform_{\text{min}}$ as \startformula \startalign \NC \dom(\pform_{\text{min}}) \NC = C_0^\infty(\mathbb{R}^2)\otimes \mathbb{C}^2;\NR \NC \pform_{\text{min}}(\psi,\psi) \NC = \pform(\psi,\psi),\quad \psi\in\dom(\pform_{\text{min}}).\NR \stopalign \stopformula It is closable and thus a self-adjoint operator $\pauli_{\text{min}}$ can be defined. We also define the {\em maximal} Pauli form $\pform_{\text{max}}$ as \placeformula \startformula \startalign \NC \dom(\pform_{\text{max}}) \NC = \bigl\{\,\psi\in L_2(\mathbb{R}^2)\otimes \mathbb{C}^2\bigm|
Re: [NTG-context] math problems
On Sun, 15 Mar 2009, Mohamed Bana wrote: hi guys, i generally use this file to test if math is working, with the recent update i get a lot of errors such as; Add \let\blackboard\mathblackboard \let\fraktur\mathfraktur \let\gothic\mathfraktur in your preamble. 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___