Re: [NTG-context] MetaPost Animations

2012-12-30 Thread Jeong Dal
in PDF output directly. Here is my trial. I modified it as following and got an animation. But it is only good for a few step animation. % \startbuffer[base] N:=64;%\N; u:=136; pair f; c:=2/(1+sqrt(5));%\c; if c1: f:=(1+-+c,0); v:=u/2; else: f:=(0,1+-+(1/c)); v:=u/c/2; fi; % Focus f

[NTG-context] \abovedisplayskip and \belowdisplayskip

2012-09-06 Thread Troy Henderson
-1)=1\] \vskip0.5ex \[x^2-x=1\] \vskip0.5ex \[x^2-x-1=0\] \vskip0.5ex \[x=\frac{1+\sqrt{5}}{2},\frac{1-\sqrt{5}}{2}\] } \begin{document} \pagestyle{empty} \fontsize{20}{24}\selectfont \adjustdisplay{0} \foo \clearpage \foo\vskip0.5ex \[\phi = \frac{x}{1} = x =\frac{1+\sqrt{5}}{2

[NTG-context] A strange problem, probably with \startitemize[columns]

2012-07-28 Thread Marcin Borkowski
. \math{n} zanieczyszczeń jest związane z~zarobieniem \math{n^2}, \math{\sqrt{n}} lub inną ilością pieniędzy. \stopitem \stopitemize \stopanswer \stopitem \stopexercises \stopsubject \stopchapter \startnotmode[nauczyciel

Re: [NTG-context] beta

2012-01-24 Thread Otared Kavian
: \placeformula[eq:Euler] \startformula {\rm e}^{{\rm i}\pi} + 1 = 0, \qquad \mbox{where}\; {\rm i} := \sqrt{-1}. \stopformula By the way, $\int_{0}^{2\pi} \sin(x)dx = 0$. \stoptext and the error message, concerning \placeformula, points to: argument \doconvertedstructurecounter

Re: [NTG-context] ∫ and $\intop$ is not displayed correctly compared to $\int$.

2011-12-11 Thread Philipp A.
↔{\xleftrightarrow} \catcode`√=\active \def√{\sqrt} PS: i recently posted two questions to this list which i got no replies to:“simplefonts: math in headers” and“headers: numberconversion=something or \definestructureconversionset” do you see them or did they get lost in transmission

Re: [NTG-context] ∫ and $\intop$ is not displayed correctly compared to $\int$.

2011-12-11 Thread Paul Menzel
and mathematical documents: \catcode`→=\active \def→{\xrightarrow} \catcode`↔=\active \def↔{\xleftrightarrow} \catcode`√=\active \def√{\sqrt} Sorry for being a noob. I thought for the first three that is somehow done already. If not, such a mechanism would indeed be useful. PS: i recently posted

Re: [NTG-context] ∫ and $\intop$ is not displayed correctly compared to $\int$.

2011-12-11 Thread Aditya Mahajan
→{\xrightarrow} \catcode`↔=\active \def↔{\xleftrightarrow} \catcode`√=\active \def√{\sqrt} Have a look at char-def.lua. All the symbol mappings are defined there. Please feel free to complete the table (it is a boring and time consuming process, and I have only managed to cover about half of the table

[NTG-context] math: root sign an square brackets set too closely

2011-12-07 Thread Paul Menzel
Dear ConTeXt folks, using the root sign √ `\sqrt` and the square brackets [] the distance does not seem to be optimal. \starttext \type{$\left[ \sqrt{x} \right]$}: $\left[ \sqrt{x} \right]$ Without \type{\left} and \type{\right}: $[\sqrt{x

[NTG-context] custom command \myframedsection does not always work. Bug?

2011-10-30 Thread Curiouslearn
difference between the results in two studies. However, this is not true. The estimate of difference in the effects is 15 with standard error of $ \sqrt{10^{2} + 10^{2}} = 14 $. This is not even close to being statistically significant at 1\% level. \stopitemize \stoptext

[NTG-context] Wrong radical with euler.otf and texlive 2011.

2011-07-26 Thread Eythan Weg
Hi, I use euler.otf with texlive 2011. The expression $1\over\sqrt{{1\over b^2}+{1\over a^2}}$ is typeset with a wrong radical. Here: $$1\over\sqrt{{1\over b^2}+{1\over a^2}}$$ it seems correct. Beta also exhibits the same behavior. Is the font or the format, or, perhaps

[NTG-context] metapost question (bug?)

2011-07-21 Thread Alan Braslau
; draw p0 withcolor blue ; pickup pensquare yscaled 2u xscaled 5u rotated 45 ; draw p0 withcolor yellow ; pickup pencircle scaled .1u ; draw p0 ; \stopMPcode \stopTEXpage \startTEXpage \startMPcode p1 := ((0,0)--(sqrt(2),0)) rotated -30 scaled 20u

Re: [NTG-context] metapost question (bug?)

2011-07-21 Thread luigi scarso
\startTEXpage \startMPcode        p1 := ((0,0)--(sqrt(2),0)) rotated -30 scaled 20u                shifted point infinity of p0 ;        p2 := p0--p1 ;        pickup pensquare scaled 10u rotated 45 ;        draw p2 withcolor blue ;        pickup pensquare yscaled 2u xscaled 5u rotated 45 ;        draw

Re: [NTG-context] metapost question (bug?)

2011-07-21 Thread Peter Rolf
; \stopMPcode \stopTEXpage \startTEXpage \startMPcode p1 := ((0,0)--(sqrt(2),0)) rotated -30 scaled 20u shifted point infinity of p0 ; p2 := p0--p1 ; use p2 := p0 p1; the reason for the 'unexpected' output is, that point 1 and 2 of the path p2 are equal

Re: [NTG-context] Trouble making basic MetaPost graphics using ConTeXt Minimals

2011-07-15 Thread Mojca Miklavec
] (Please type a command or say `end') [2] (Please type a command or say `end') ! You can only use `btex' or `verbatimtex' in a file. * label.lrt(btex $\sqrt x$ etex, (3,sqrt 3)*u); ! Missing `,' has been inserted. to be read again sqrt * label.lrt(btex

Re: [NTG-context] Trouble making basic MetaPost graphics using ConTeXt Minimals

2011-07-15 Thread luigi scarso
pdftex.map Warning: cannot open font map file lm-math.map (Please type a command or say `end') [1] (Please type a command or say `end') [2] (Please type a command or say `end') ! You can only use `btex' or `verbatimtex' in a file. *   label.lrt(btex                     $\sqrt x$ etex, (3

Re: [NTG-context] Trouble making basic MetaPost graphics using ConTeXt Minimals

2011-07-15 Thread Kevin D. Robbins
On Thu, Jul 14, 2011 at 7:04 PM, luigi scarso luigi.sca...@gmail.com wrote: This is one of the preferrred way to deal with metapost in mkiv \starttext \startMPpage numeric u;  u = 1cm;  draw (0,2u)--(0,0)--(4u,0);  pickup pencircle scaled 1pt;  draw (0,0){up}   for i=1 upto 8: ..(i/2,sqrt

[NTG-context] Trouble making basic MetaPost graphics using ConTeXt Minimals

2011-07-14 Thread Kevin D. Robbins
) ; fill fullcircle scaled 5cm withcolor red ; endfig ; beginfig(3); numeric u; u = 1cm; draw (0,2u)--(0,0)--(4u,0); pickup pencircle scaled 1pt; draw (0,0){up} for i=1 upto 8: ..(i/2,sqrt(i/2))*u endfor; label.lrt(btex $\sqrt x$ etex, (3,sqrt 3)*u); label.bot(btex $x$ etex, (2u,0

Re: [NTG-context] Trouble making basic MetaPost graphics using ConTeXt Minimals

2011-07-14 Thread luigi scarso
fontmapfile =lm-math.map ; beginfig(1)  draw fullcircle scaled 3cm ; endfig ; beginfig(2) ;  fill fullcircle scaled 5cm withcolor red ; endfig ; beginfig(3);  numeric u;  u = 1cm;  draw (0,2u)--(0,0)--(4u,0);  pickup pencircle scaled 1pt;  draw (0,0){up}    for i=1 upto 8: ..(i/2,sqrt(i/2

[NTG-context] beta

2011-06-27 Thread Hans Hagen
Hi, I uploaded a new beta. There are some changes in the math font handling: (1) bold: % \setupbodyfont[lucidanova] % \setupbodyfont[palatino] % \setupbodyfont[libertine] % \setupbodyfont[xits] \setuphead[chapter][style=\bfd] \starttext \chapter{Test \m{a=b^{2c}} and \m{\sqrt{x^2

[NTG-context] dejavu math fallback?

2011-06-15 Thread Reviczky, Adam
59 60 \startformula 61 e = mc^2 62 \stopformula 63 64 \startparagraph 65 Okay, it's somewhat boring to always use the same formula, so how about 66 $\sqrt{4} = 2$ or traveling at \unit{120 km/h} instead of $\unit{110 km/h}$. 67 \stopparagraph 68 69

Re: [NTG-context] Grid typesetting and inline math

2011-04-21 Thread Christoph Redecker
=on, I get a different result, but it's not better. Code: Testing inline math: \gform{x_2 = \sqrt{\frac{a}{b_2}}}. The following line should be seperated from this one with half a line, but it isn't. In this case, there is no space and the root sign reaches deeply into the following line. Regards

Re: [NTG-context] Grid typesetting and inline math

2011-04-20 Thread Christoph Redecker
Thanks for the suggestion! With grid=on, I get a different result, but it's not better. Code: Testing inline math: \gform{x_2 = \sqrt{\frac{a}{b_2}}}. The following line should be seperated from this one with half a line, but it isn't. In this case, there is no space and the root sign reaches

[NTG-context] font error?

2011-03-28 Thread Hans van der Meer
Just experimenting somewhat with fonts. Could the following be a font problem? Or is it just not possible in this typeface (taken from fonts in context page 70) Example: \def\thetypeface{asana} \setupbodyfont[\thetypeface] \starttext [\thetypeface]\quad Hello world!\space$c = \sqrt{a^2+b^2

Re: [NTG-context] font error?

2011-03-28 Thread Hans van der Meer
[\thetypeface]\quad Hello world!\space$c = \sqrt{a^2+b^2}$ \stoptext 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

Re: [NTG-context] font error?

2011-03-28 Thread Hans van der Meer
test.tex: Math error: parameter \Umathquad\displaystyle is not set ... How can this be? Any idea? Input was: \def\thetypeface{asana} % lucida loopt vast \setupbodyfont[\thetypeface] \starttext [\thetypeface]\quad Hello world!\space$c = \sqrt{a^2+b^2}$ \stoptext Hans van der

Re: [NTG-context] missing colon in lucida mkii

2011-03-12 Thread Mojca Miklavec
example I get a dot instead of colon: \usetypescript[lucida][ec] \setupbodyfont[lucida] \starttext \startformula a := b \stopformula \stoptext The particular example in MKIV works fine ... ... except when it doesn't (\sqrt enters ifinite loop, but many other commands seem to be problematic

[NTG-context] missing colon in lucida mkii

2011-03-11 Thread Mojca Miklavec
Hello, With the following example I get a dot instead of colon: \usetypescript[lucida][ec] \setupbodyfont[lucida] \starttext \startformula a := b \stopformula \stoptext The particular example in MKIV works fine ... ... except when it doesn't (\sqrt enters ifinite loop, but many other commands

Re: [NTG-context] Math and bold font

2010-12-03 Thread Vladimir Lomov
Hi. ** Procházka Lukáš Ing. - Pontex s. r. o. [2010-12-03 08:51:41 +0100]: Hello all, I'd to explain some effects in the .pdf from the code bellow. It was copied from co-font.pdf, pg. 19-20; just Abc was added to try something. --- \enableregime[cp1250] \starttext $Abc\sqrt{625

[NTG-context] Math and bold font

2010-12-02 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello all, I'd to explain some effects in the .pdf from the code bellow. It was copied from co-font.pdf, pg. 19-20; just Abc was added to try something. --- \enableregime[cp1250] \starttext $Abc\sqrt{625}=5\alpha$ $\bf Abc\sqrt{625}=5\alpha$ $Abc\sqrt{625}=\bf5\alpha$ $\bfmath Abc

Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Mojca Miklavec
element takes the color of the preceding key symbol. Minimal example:  set terminal lua tikz fulldoc size 15cm,7cm context  set output 'plot.tex'  set xrange [ 0 : 13 ]  f1(x)=sqrt(x)  f2(x)=sqrt(x*0.8)-3  plot f1(x) lc rgb 'blue', f2(x) Confirmed. I had the problems with that in my terminal

Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-22 Thread Ethan Merritt
afraid. But feedback goes here: 1) The label text of the following key element takes the color of the preceding key symbol. Minimal example: set terminal lua tikz fulldoc size 15cm,7cm context set output 'plot.tex' set xrange [ 0 : 13 ] f1(x)=sqrt(x) f2(x)=sqrt(x*0.8)-3 plot

Re: [NTG-context] Gnuplot module: Patching of Gnuplot binary still needed?

2010-11-18 Thread Florian Wobbe
welcome! No patches I'm afraid. But feedback goes here: 1) The label text of the following key element takes the color of the preceding key symbol. Minimal example: set terminal lua tikz fulldoc size 15cm,7cm context set output 'plot.tex' set xrange [ 0 : 13 ] f1(x)=sqrt(x) f2(x)=sqrt(x*0.8)-3

Re: [NTG-context] rotated (landscape) pages in portrait document

2010-10-03 Thread Mojca Miklavec
{lm}\NR \NC 0 \NC\NC 0\NC\NC s \NC \frac{1}{2}\sqrt{\frac{ 1}{π}} \NR \NC 1 \NC\NC 0\NC\NC p_z \NC \frac{1}{2}\sqrt{\frac{ 3}{π}}\frac{z}{r} \NR \NC 1 \NC\NC \pm1 \NC\NC p_x \NC \frac{1}{2}\sqrt{\frac{ 3}{π}}\frac{x}{r} \NR \NC

[NTG-context] rotated (landscape) pages in portrait document

2010-10-01 Thread Mojca Miklavec
,left,left}] \NC l \NC\hbox to 1em{}\NC m_l \NC\hbox to 1em{}\NC \text{orb.}\hbox to 2em{} \NC Y_{lm}\NR \NC 0 \NC\NC 0\NC\NC s \NC \frac{1}{2}\sqrt{\frac{ 1}{π}} \NR \NC 1 \NC\NC 0\NC\NC p_z \NC \frac{1}{2}\sqrt{\frac{ 3}{π}}\frac{z}{r} \NR \NC

Re: [NTG-context] rotated (landscape) pages in portrait document

2010-10-01 Thread Wolfgang Schuster
,middle,left,left}] \NC l \NC\hbox to 1em{}\NC m_l \NC\hbox to 1em{}\NC \text{orb.}\hbox to 2em{} \NC Y_{lm}\NR \NC 0 \NC\NC 0\NC\NC s \NC \frac{1}{2}\sqrt{\frac{ 1}{π}} \NR \NC 1 \NC\NC 0\NC\NC p_z \NC \frac{1}{2}\sqrt{\frac{ 3}{π}}\frac{z}{r

[NTG-context] New beta 2010-09-22 and xits fonts

2010-09-22 Thread Otared Kavian
MKIV fmt: 2010.9.22 int: english/english, on Mac OS X 10.6.3): Best regards: OK %%% begin bug-xits-sqrt.tex \setupbodyfont[xits] \starttext Note that $\int_{0}^{2\pi} \sin(x)dx = 0$, while \startformula \int_{0}^{2\pi} \sin^2(x)dx = \pi \qquad \mbox{and}\qquad \sqrt{4}= 2. \stopformula

Re: [NTG-context] New beta 2010-09-22 and xits fonts

2010-09-22 Thread Hans Hagen
On 22-9-2010 2:06, Otared Kavian wrote: \setupbodyfont[xits] \starttext Note that $\int_{0}^{2\pi} \sin(x)dx = 0$, while \startformula \int_{0}^{2\pi} \sin^2(x)dx = \pi \qquad \mbox{and}\qquad \sqrt{4}= 2. \stopformula \stoptext Afaik nothing was changed so I'll wait for Taco's comments

[NTG-context] \centercolon and friends with PX-fonts

2010-09-18 Thread Andreas Harder
Hi all, because \left(…\right) and \sqrt{…} is broken with OpenType math fonts I had to switch to the PX-fonts but there the colon is eaten if one uses the \centercolon commands. \setupbodyfont[palatino] % \setupbodyfont[euler] % OK % \setupbodyfont[cambria] % OK % \setupbodyfont[asana

Re: [NTG-context] [xits] \sqrt not work properly

2010-09-17 Thread views63
Hi Hongwen Qiu, It was the same others opentype math fonts example: \usetypescript[cambria] \switchtobodyfont[cambria,10pt] \starttext \startformula \sqrt{abcde} \stopformula \stoptext \usetypescript[euler] \switchtobodyfont[euler,10pt] \starttext \startformula \sqrt{abcde} \stopformula

[NTG-context] [xits] \sqrt not work properly

2010-09-13 Thread Hongwen Qiu
The \sqrt is not work properly in Mkiv. The following is the minimal example, and the result is attached \setupbodyfont[xits] \starttext \startformula \sqrt{abcde} \stopformula \stoptext math.pdf Description: Adobe PDF document

Re: [NTG-context] Passing info from MetaPost to TeX

2010-08-01 Thread Taco Hoekwater
such an auxiliary file in TeX? I've never done any sort of that programming before... You don't have to worry about parsing, just write something like this in the metapost code: write \string\def\string\MathAxis{ decimal (sqrt(3)*u/3) } to info.tex; Then \input info. Best wishes, Taco

Re: [NTG-context] Passing info from MetaPost to TeX

2010-07-30 Thread Oliver Buerschaper
: --- \startuseMPgraphic{diagram} u := StrutHeight; draw origin--(2u,0)--(u,sqrt(3)*u)--cycle; % MathAxis at y-coordinate sqrt(3)*u/3 \stopuseMPgraphic \starttext \startformula A\useMPgraphic{diagram} =B \stopformula \stoptext --- It would be great if the comment could be turned

Re: [NTG-context] Passing info from MetaPost to TeX

2010-07-30 Thread Taco Hoekwater
offhand). \startuseMPgraphic{diagram2} u := StrutHeight; draw origin--(2u,0)--(u,sqrt(3)*u)--cycle; currentpicture := currentpicture shifted (0,-(sqrt(3)*u/3)); setbounds currentpicture to (origin--(2u,0)--(u,sqrt(3)*u)--cycle); \stopuseMPgraphic \starttext \startformula A\raise

Re: [NTG-context] Passing info from MetaPost to TeX

2010-07-24 Thread Oliver Buerschaper
to a lua table); currently you have to use a file or interpret the log (use show to print out values). OK. What I have in mind is to vertically align a diagram with the math axis... something like: --- \startuseMPgraphic{diagram} u := StrutHeight; draw origin--(2u,0)--(u,sqrt(3)*u

Re: [NTG-context] Context 2010.05.08 - 3D annotations

2010-05-13 Thread Michail Vidiassov
2010-04-14 14:24:28.0 +0400 @@ -17,6 +17,7 @@ local cos, sin, sqrt, pi, atan2, abs = math.cos, math.sin, math.sqrt, math.pi, math.atan2, math.abs local pdfconstant = lpdf.constant +local pdfnumber = lpdf.number local pdfboolean= lpdf.boolean local pdfunicode

[NTG-context] 10+ reasons why I still use MKII

2010-05-12 Thread Mojca Miklavec
on page: \starttext \startformula a+b \stopformula \stoptext 10.) Different square root shape/variant used: $\frac{1}{\sqrt{2πσ_i^2}}$ Original formula: \startformula \startcases \NC ρ_0, \NC for $i=0$, \NR \NC ρ_i\,\frac{1}{\sqrt{2πσ_i^2}}\exp\biggl(-\frac{\left(x_j-μ_i\right)^2}{2σ_i^2}\biggr

Re: [NTG-context] 10+ reasons why I still use MKII

2010-05-12 Thread Hans Hagen
.) Note the big difference of when the formula starts vertically on page: \starttext \startformula a+b \stopformula \stoptext interesting, i need to look into that 10.) Different square root shape/variant used: $\frac{1}{\sqrt{2πσ_i^2}}$ Original formula: \startformula \startcases \NC ρ_0, \NC

Re: [NTG-context] 10+ reasons why I still use MKII

2010-05-12 Thread Aditya Mahajan
$\boldsymbol{\theta}$ \stoptext 9.) Note the big difference of when the formula starts vertically on page: \starttext \startformula a+b \stopformula \stoptext 10.) Different square root shape/variant used: $\frac{1}{\sqrt{2πσ_i^2}}$ Original formula: \startformula \startcases \NC ρ_0, \NC for $i

Re: [NTG-context] 10+ reasons why I still use MKII

2010-05-12 Thread Taco Hoekwater
Aditya Mahajan wrote: 10.) Different square root shape/variant used: $\frac{1}{\sqrt{2πσ_i^2}}$ Original formula: \startformula \startcases \NC ρ_0, \NC for $i=0$, \NR \NC ρ_i\,\frac{1}{\sqrt{2πσ_i^2}} \exp\biggl(-\frac{\left(x_j-μ_i\right)^2}{2σ_i^2}\biggr), \NC for $i\in\left\{1,2\right

Re: [NTG-context] 10+ reasons why I still use MKII

2010-05-12 Thread Aditya Mahajan
On Wed, 12 May 2010, Taco Hoekwater wrote: Aditya Mahajan wrote: 10.) Different square root shape/variant used: $\frac{1}{\sqrt{2πσ_i^2}}$ Original formula: \startformula \startcases \NC ρ_0, \NC for $i=0$, \NR \NC ρ_i\,\frac{1}{\sqrt{2πσ_i^2}} \exp\biggl(-\frac{\left(x_j-μ_i\right)^2

Re: [NTG-context] 10+ reasons why I still use MKII

2010-05-12 Thread Taco Hoekwater
Aditya Mahajan wrote: On Wed, 12 May 2010, Taco Hoekwater wrote: Aditya Mahajan wrote: 10.) Different square root shape/variant used: $\frac{1}{\sqrt{2πσ_i^2}}$ Original formula: \startformula \startcases \NC ρ_0, \NC for $i=0$, \NR \NC ρ_i\,\frac{1}{\sqrt{2πσ_i^2}} \exp\biggl(-\frac

Re: [NTG-context] 3D annotations

2010-04-17 Thread Michail Vidiassov
+0300 +++ lpdf-u3d.lua2010-04-14 14:24:28.0 +0400 @@ -17,6 +17,7 @@ local cos, sin, sqrt, pi, atan2, abs = math.cos, math.sin, math.sqrt, math.pi, math.atan2, math.abs local pdfconstant = lpdf.constant +local pdfnumber = lpdf.number local pdfboolean= lpdf.boolean local

Re: [NTG-context] Formatting numbers in LuaTeX

2010-02-15 Thread Peter Münster
On Sun, Feb 14 2010, Hans Hagen wrote: sqrt = math.sqrt pi = math.pi function my_equation(s, r) beware, this creates (and possibly overloads) sqrt, pi and my_equation as gobals Indeed... The following hack was *not* so quick, but there is a bug somewhere (a digit is added

Re: [NTG-context] Formatting numbers in LuaTeX

2010-02-15 Thread Andreas Harder
Am 15.02.2010 um 20:35 schrieb Peter Münster: On Sun, Feb 14 2010, Hans Hagen wrote: sqrt = math.sqrt pi = math.pi function my_equation(s, r) beware, this creates (and possibly overloads) sqrt, pi and my_equation as gobals Indeed... The following hack was *not* so quick

[NTG-context] Formatting numbers in LuaTeX

2010-02-14 Thread Andreas Harder
Hi all! I played a little bit with LuaTeX in ConTeXt and two questions have arisen. \usemodule[calcmath] \starttext \def\calculate#1{\calcmath{#1=\ctxlua{tex.print(#1)}}} \calculate{1+2} \par \calculate{3/2-1}\par % the output should be 0,5 \calculate{3*2}\par % \calculate{sqrt(2)} \calculate{2

Re: [NTG-context] Formatting numbers in LuaTeX

2010-02-14 Thread luigi scarso
/2-1}\par % the output should be 0,5 \calculate{3*2}\par % \calculate{sqrt(2)} \calculate{2*π} % 2*\pi \stoptext 1) Is it possible to have a comma as decimal separator? string.format ? -- luigi ___ If your question

Re: [NTG-context] Formatting numbers in LuaTeX

2010-02-14 Thread Peter Münster
examples? Hello Andreas, Just a quick hack: \usemodule[calcmath] \startluacode sqrt = math.sqrt pi = math.pi function my_equation(s, r) r = tostring(r) tex.print(s:gsub(*, ×) .. = .. r:gsub(%., ,)) end \stopluacode \def\calculate#1{\calcmath{\ctxlua{my_equation(#1, #1)}}} \starttext

Re: [NTG-context] Formatting numbers in LuaTeX

2010-02-14 Thread Andreas Harder
with a multiplication or even with the last two examples? Hello Andreas, Just a quick hack: \usemodule[calcmath] \startluacode sqrt = math.sqrt pi = math.pi function my_equation(s, r) r = tostring(r) tex.print(s:gsub(*, ×) .. = .. r:gsub(%., ,)) end \stopluacode \def

Re: [NTG-context] Formatting numbers in LuaTeX

2010-02-14 Thread Hans Hagen
On 14-2-2010 14:10, Andreas Harder wrote: \startluacode local floor = math.floor local round = function(n) return floor(1000*n+0.5)/1000 end sqrt = math.sqrt pi = math.pi function my_equation(s, r) r = round(r) r = tostring(r) tex.print(s:gsub

[NTG-context] Simplefonts and math fonts

2009-11-24 Thread Khaled Hosny
Though there is a \setmathfont command, it doesn't seem to work. The following example still typeset in LM. \usemodule[simplefonts] \setmathfont[Asana Math] \starttext $\sqrt{x+y}=z$ \stoptext Any idea? Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free

Re: [NTG-context] Simplefonts and math fonts

2009-11-24 Thread Wolfgang Schuster
Am 24.11.2009 um 14:39 schrieb Khaled Hosny: Though there is a \setmathfont command, it doesn't seem to work. The following example still typeset in LM. \usemodule[simplefonts] \setmathfont[Asana Math] \starttext $\sqrt{x+y}=z$ \stoptext Any idea? For math fonts only typescripts

[NTG-context] first-setup.sh on MacOSX problem...

2009-11-24 Thread Bernhard Rosensteiner
: Am 24.11.2009 um 14:39 schrieb Khaled Hosny: Though there is a \setmathfont command, it doesn't seem to work. The following example still typeset in LM. \usemodule[simplefonts] \setmathfont[Asana Math] \starttext $\sqrt{x+y}=z$ \stoptext Any idea? For math fonts only

Re: [NTG-context] format float numbers in luatex

2009-10-26 Thread Otared Kavian
) Best regards: OK On 24 oct. 2009, at 18:59, batela wrote: Dear Sirs, I'm looking a way to format float numbers. For example \ctxlua {text.print(sqrt(2))} give me 1.41421356237309504880 but i want 1.414. Is there a way to format real numbers. Note: I had tried \ctxlua{a = sqrt(a) ; aformat

Re: [NTG-context] format float numbers in luatex

2009-10-25 Thread Wolfgang Schuster
Am 24.10.2009 um 18:59 schrieb batela: Dear Sirs, I'm looking a way to format float numbers. For example \ctxlua {text.print(sqrt(2))} give me 1.41421356237309504880 but i want 1.414. Is there a way to format real numbers. Note: I had tried \ctxlua{a = sqrt(a) ; aformat = string.format

Re: [NTG-context] Some symbols of mathematical calculus missing?

2009-04-21 Thread Aditya Mahajan
] = 0x6F, -- wr [0x0221A] = 0x70, -- sqrt. AM: Check surd?? [0x02A3F] = 0x71, -- amalg -[0x02207] = 0x72, -- nabla +[0x1D6FB] = 0x72, -- nabla -- [0x0222B] = 0x73, -- smallint (TODO: what about intop?) [0x02294] = 0x74, -- sqcup [0x02293] = 0x75, -- sqcap What

Re: [NTG-context] Some symbols of mathematical calculus missing?

2009-04-21 Thread Tomas Kisela
here. nabla Change the following in math-vfu diff --git a/math-vfu.lua b/math-vfu.lua index 386175d..7c30c37 100644 --- a/math-vfu.lua +++ b/math-vfu.lua @@ -929,7 +929,7 @@ fonts.enc.math[traditional-sy] = { [0x02240] = 0x6F, -- wr [0x0221A] = 0x70, -- sqrt. AM: Check surd

Re: [NTG-context] Height of square root

2009-04-18 Thread Taco Hoekwater
Tomas Kisela wrote: Hi everybody, There's my issue: If I switch a size of body font, the height of square root doesn't adapt well for letters exceeding a baseline (in my example y). Here is my code: \starttext \startformula \sqrt{x^2+y^2} \sqrt{x^2+a^2} \stopformula \switchtobodyfont[17pt

Re: [NTG-context] Height of square root

2009-04-18 Thread Hans Hagen
Taco Hoekwater wrote: Tomas Kisela wrote: Hi everybody, There's my issue: If I switch a size of body font, the height of square root doesn't adapt well for letters exceeding a baseline (in my example y). Here is my code: \starttext \startformula \sqrt{x^2+y^2} \sqrt{x^2+a^2} \stopformula

Re: [NTG-context] Height of square root

2009-04-18 Thread Tomas Kisela
: If I switch a size of body font, the height of square root doesn't adapt well for letters exceeding a baseline (in my example y). Here is my code: starttext startformula sqrt{x^2+y^2} sqrt{x^2+a^2} stopformula switchtobodyfont[17pt] startformula sqrt{x^2+y^2} sqrt{x^2+a^2} stopformula

[NTG-context] Height of square root

2009-04-17 Thread Tomas Kisela
Hi everybody, There's my issue: If I switch a size of body font, the height of square root doesn't adapt well for letters exceeding a baseline (in my example y). Here is my code: \starttext \startformula \sqrt{x^2+y^2} \sqrt{x^2+a^2} \stopformula \switchtobodyfont[17pt] \startformula \sqrt

Re: [NTG-context] bug: \bot and \top in markiv

2008-11-20 Thread Aditya Mahajan
, 0x70, ex, 0x70 }, -- sqrt. AM: Check surd?? -- ... [0x221D] = { sy, 0x2F }, -- propto [0x221E] = { sy, 0x31 }, -- infty [0x2225] = { sy, 0x6B }, -- parallel [0x2227] = { sy, 0x5E }, -- wedge [0x2228] = { sy, 0x5F }, -- vee [0x2229] = { sy, 0x5C }, -- cap [0x222A] = { sy

Re: [NTG-context] [OS X TeX] Default rule thickness

2008-08-06 Thread Wolfgang Schuster
in math mode … The short story: 0.4 pt. The long story: LaTeX defines \frac in terms of the TeX primitive \over, and \sqrt in terms of the TeX primitive \radical (a primitive being a command defined in the source code of TeX itself). Hence the only way to get an answer for sure would

Re: [NTG-context] MetaPost graphics within formulas

2008-07-26 Thread Oliver Buerschaper
The bounding box of the graphic is set on the base line. So you have to add some artificial depth to the graphic. \starttext \startreusableMPgraphic{tetrahedral} begingroup u := 10pt; draw (0,0)--(2u,0)--(u,sqrt(3)*u)--cycle; draw boundingbox

Re: [NTG-context] MetaPost graphics within formulas

2008-07-26 Thread Peter Rolf
Oliver Buerschaper schrieb: The bounding box of the graphic is set on the base line. So you have to add some artificial depth to the graphic. \starttext \startreusableMPgraphic{tetrahedral} begingroup save u; u := 10pt; draw (0,0)--(2u,0)--(u,sqrt(3)*u

[NTG-context] MetaPost graphics within formulas

2008-07-25 Thread Oliver Buerschaper
this: --- \starttext \startuseMPgraphic{tetrahedral} u := 10pt; draw (0,0)--(2u,0)--(u,sqrt(3)*u)--cycle; \stopuseMPgraphic \startformula \Phi(\useMPgraphic{tetrahedral})=F_{kln}^{ijm}\,v_iv_jv_kv_l\, \delta_{j^*nk^*}\,\delta_{l^*n^*i^*}\,\Phi(\emptyset) \stopformula \stoptext

Re: [NTG-context] MetaPost graphics within formulas

2008-07-25 Thread Peter Rolf
up with so far is something like this: --- \starttext \startuseMPgraphic{tetrahedral} u := 10pt; draw (0,0)--(2u,0)--(u,sqrt(3)*u)--cycle; \stopuseMPgraphic The bounding box of the graphic is set on the base line. So you have to add some artificial depth to the graphic

[NTG-context] Problem with TSV tables

2008-06-10 Thread Jan-Erik Hägglöf
per sekund $ \frac{d\nu}{dt} $ Absolut fel $ \delta \nu'=\sqrt{\nu} $ a b c d \stopTSV \processseparatedfile[TSV][sndfall.dat] \eTABLE \stoptext TeXExec | processing document 'tsvmall.tex' TeXExec | no ctx file found TeXExec | tex processing method: context TeXExec | TeX run 1 TeXExec | writing

Re: [NTG-context] Unable to generate luatex formats

2008-04-15 Thread John Devereux
: \ctxlua{tex.print($\string\\sqrt{2} = .. math.sqrt(2) .. $)} \stoptext and run it with texexec --lua filename.tex -- John Devereux ___ If your question is of interest to others as well, please add

Re: [NTG-context] luatexing

2008-04-13 Thread Taco Hoekwater
demonstrates why you should post minimal examples, instead of out-of-context questions). I tried: % engine=luatex \starttext \directlua0 {tex.print('$\\sqrt{2}=1.4142135623731$')} \ctxlua{tex.print('$\\sqrt{2}=1.4142135623731$')} \startluacode tex.print('$\\sqrt{2

Re: [NTG-context] luatexing

2008-04-13 Thread Hans Hagen
Wolfgang Werners-Lucchini wrote: On 12 Apr 2008 at 9:39, [EMAIL PROTECTED] wrote: I have a few silly questions about tex.print() To produce $\sqrt{2}=1.4142135623731$ it should be enough to write tex.print($\\sqrt{2}= .. math.sqrt(2) .. $) this is because \\ can mean anything

Re: [NTG-context] luatexing

2008-04-12 Thread Hans Hagen
Wolfgang Werners-Lucchini wrote: Hallo, I have a few silly questions about tex.print() To produce $\sqrt{2}=1.4142135623731$ it should be enough to write tex.print($\\sqrt{2}= .. math.sqrt(2) .. $) this is because \\ can mean anything, for instance it may expand to \par

Re: [NTG-context] luatexing

2008-04-12 Thread Wolfgang Werners-Lucchini
On 12 Apr 2008 at 9:39, [EMAIL PROTECTED] wrote: I have a few silly questions about tex.print() To produce $\sqrt{2}=1.4142135623731$ it should be enough to write tex.print($\\sqrt{2}= .. math.sqrt(2) .. $) this is because \\ can mean anything, for instance

[NTG-context] luatexing

2008-04-11 Thread Wolfgang Werners-Lucchini
Hallo, I have a few silly questions about tex.print() To produce $\sqrt{2}=1.4142135623731$ it should be enough to write tex.print($\\sqrt{2}= .. math.sqrt(2) .. $) or better tex.print([[$\sqrt{2}=]] .. math.sqrt(2) .. $) but that's both not working. The following instead does

Re: [NTG-context] first steps

2008-04-08 Thread Mojca Miklavec
On Mon, Apr 7, 2008 at 4:41 PM, Wolfgang Werners-Lucchini wrote: hallo, I tried to make my first luatex-steps with the following wiki-example - \usetypescript[palatino] \setupbodyfont[palatino,12pt] effe fietsen 2: \input tufte $\sqrt{2}$ \eogonek

[NTG-context] first steps

2008-04-07 Thread Wolfgang Werners-Lucchini
hallo, I tried to make my first luatex-steps with the following wiki-example - \usetypescript[palatino] \setupbodyfont[palatino,12pt] effe fietsen 2: \input tufte $\sqrt{2}$ \eogonek \sc effe fietsen 2: \input tufte $\sqrt{2}$ \eogonek

Re: [NTG-context] first steps

2008-04-07 Thread Taco Hoekwater
Wolfgang Werners-Lucchini wrote: hallo, I tried to make my first luatex-steps with the following wiki-example - \usetypescript[palatino] \setupbodyfont[palatino,12pt] effe fietsen 2: \input tufte $\sqrt{2}$ \eogonek \sc effe fietsen 2: \input tufte

Re: [NTG-context] first steps

2008-04-07 Thread Wolfgang Werners-Lucchini
On 7 Apr 2008 at 20:22, [EMAIL PROTECTED] wrote: I tried to make my first luatex-steps with the following wiki-example - \usetypescript[palatino] \setupbodyfont[palatino,12pt] effe fietsen 2: \input tufte $\sqrt{2}$ \eogonek \sc effe fietsen 2

[NTG-context] !pdfTeX error: pdftex (file lmmi12): Font lmmi12 at 600 not found

2008-02-07 Thread Mojca Miklavec
Hello, I don't quite understand why, but my distribution became broken at some random time point (I do not remember doing anything special in the meantime). I have installed ConTeXt from scratch, but the same problem persists: systems : begin file sqrt at line 1 fonts : needs

Re: [NTG-context] itemize and math

2007-10-30 Thread Wolfgang Werners-Lucchini
Sorry, I don't understand what the problem is! I have a problem with \startitemize[columns,a] \item $a_n=2+\frac{1}{n+1}$ \item $a_n=\frac{(-1)^n}{\sqrt{n}}-3$ \stopitemize Hi, this did not wotk because the second formula is than the first

Re: [NTG-context] itemize and math

2007-10-30 Thread Wolfgang Schuster
2007/10/30, Wolfgang Werners-Lucchini [EMAIL PROTECTED]: Sorry, I don't understand what the problem is! It is related to ConTeXt's multicolumn Output Routine. I have a problem with \startitemize[columns,a] \item $a_n=2+\frac{1}{n+1}$ \item $a_n=\frac{(-1)^n}{\sqrt{n}}-3

Re: [NTG-context] itemize and math

2007-10-30 Thread Wolfgang Werners-Lucchini
I have a problem with \startitemize[columns,a] \item $a_n=2+\frac{1}{n+1}$ \item $a_n=\frac{(-1)^n}{\sqrt{n}}-3$ \stopitemize Hi, this did not wotk because the second formula is than the first and -^ (what

[NTG-context] itemize and math

2007-10-29 Thread Wolfgang Werners-Lucchini
Hallo, I have a problem with \startitemize[columns,a] \item $a_n=2+\frac{1}{n+1}$ \item $a_n=\frac{(-1)^n}{\sqrt{n}}-3$ \stopitemize which is NOT in columns. \startitemize[columns,a] \item one \item two \stopitemize works! How can I solve this? Wolfgang

Re: [NTG-context] itemize and math

2007-10-29 Thread Wolfgang Schuster
2007/10/29, Wolfgang Werners-Lucchini [EMAIL PROTECTED]: Hallo, I have a problem with \startitemize[columns,a] \item $a_n=2+\frac{1}{n+1}$ \item $a_n=\frac{(-1)^n}{\sqrt{n}}-3$ \stopitemize which is NOT in columns. \startitemize[columns,a] \item one \item two \stopitemize works

[NTG-context] 'TeX capacity exceeded' problem

2007-10-11 Thread Jeong Dalyoung
\starttext some texts \startlua a = 1.5 b = 1.8 c = a*b tex.print(c) \stoplua \stoptext and it was working nicely. But when I tested a sample file in the wiki, \usetypescript[palatino] \setupbodyfont[palatino,12pt] \starttext effe fietsen 2: \input tufte $\sqrt{2}$ \eogonek \sc effe fietsen 2

[NTG-context] Re :luatex:first steps

2007-09-14 Thread Wolfgang Werners-Lucchini
Hi Wolfgang, I have installed the newest windows standalone context package. My first try was with this snippet, found as 'test-2' at luatex.org: %% \lua {tex.print($\string\\sqrt{2} = .. math.sqrt(2) .. $)} \luatex {tex.print($\string\\sqrt{2

Re: [NTG-context] luatex:first steps

2007-09-13 Thread Wolfgang Schuster
2007/9/12, Wolfgang Werners-Lucchini [EMAIL PROTECTED]: Hallo, I have installed the newest windows standalone context package. My first try was with this snippet, found as 'test-2' at luatex.org: %% \lua {tex.print($\string\\sqrt{2} = .. math.sqrt(2

[NTG-context] luatex:first steps

2007-09-12 Thread Wolfgang Werners-Lucchini
Hallo, I have installed the newest windows standalone context package. My first try was with this snippet, found as 'test-2' at luatex.org: %% \lua {tex.print($\string\\sqrt{2} = .. math.sqrt(2) .. $)} \luatex {tex.print($\string\\sqrt{2} = .. math.sqrt(2

Re: [NTG-context] setupindening and formulas

2007-06-06 Thread Stepan Roucka
{\rm e}}\right)-1\right]+I_{\rm i1}-I_{\rm i2} \stopalign\stopformula \placeformula[eq:debye] \startformula\startalign[n=1] \lambda_{\rm D} = \sqrt{\epsilon_0 k_{\rm B}T_{\rm e}\over nq_{\rm e}^2} \stopalign\stopformula \stoptext On 05/06/07, Aditya Mahajan [EMAIL PROTECTED] wrote: On Tue, 5 Jun

Re: [NTG-context] setupindening and formulas

2007-06-06 Thread Stepan Roucka
] \lambda_{\rm D} = \sqrt{\epsilon_0 k_{\rm B}T_{\rm e}\over nq_{\rm e}^2} \stopalign\stopformula \stoptext What I meant was \setupoutput[pdftex] \enableregime[utf] \setupindenting[yes,medium] \starttext \placeformula \startformula\startalign[n=1] \NC 2I_{\rm d} = I_{\rm e}^0

Re: [NTG-context] setupindening and formulas

2007-06-05 Thread Aditya Mahajan
{\rm e}^0 \left[\exp\left({-qU\over k_{\rm B}T_{\rm e}}\right)-1\right]+I_{\rm i1}-I_{\rm i2} \stopalign\stopformula \placeformula[eq:debye] \startformula\startalign[n=1] \lambda_{\rm D} = \sqrt{\epsilon_0 k_{\rm B}T_{\rm e}\over nq_{\rm e}^2} \stopalign\stopformula \stoptext What I

<    1   2   3   4   >