### [NTG-context] Bug with lmtx and color in table

\binom{n-1}{k-1}} \stopxcell \startxcell[width=fit] \m{+} \stopxcell \startxcell \m{\displaystyle\binom{n-1}{k}} \stopxcell \stopxrow \startxrow \startxcell \stopxcell

### Re: [NTG-context] Code lua in a table

}]}] \starttabulate [|p|r|] \NC\NC #2 \NC\NR \NC #1 \NC\NC\NR \stoptabulate } \starttext \startluacode function Binom(n,k) if k > n then return "" elseif (n == 0 or k == 0) then return 1 else return

### Re: [NTG-context] Code lua in a table

. Best regards, Dalyoung > 2020. 7. 20. 오후 5:36, Hans Hagen 작성: > > On 7/20/2020 7:56 AM, Jeong Dal wrote: >> Dear Fabrice, >> You may split Binom(n,k) function into two functions as following: > > see original mail > > >> Dalyoung > Best stay in a

### Re: [NTG-context] Code lua in a table

Dal wrote: > > Dear Fabrice, > > > > You may split Binom(n,k) function into two functions as following: > > > > see original mail > > > > Dalyoung > Best stay in a protected namespace ... > > \startluacode > > local function fact (n) >

### Re: [NTG-context] Code lua in a table

Dear Fabrice, You may split Binom(n,k) function into two functions as following: * \startluacode P={} combi = P function P.fact (n) if n <= 0 then return 1 else return n * P.fact(n-1) end end function P.ncr(n,r) return P.fact(n)/(P.fact(r)*P.fact(n-r)) end co

### Re: [NTG-context] Code lua in a table

On 7/20/2020 7:56 AM, Jeong Dal wrote: Dear Fabrice, You may split Binom(n,k) function into two functions as following: > see original mail > Dalyoung Best stay in a protected namespace ... \startluacode local function fact (n) if n <= 0 then return 1

### Re: [NTG-context] Code lua in a table

to use context(...) here? >> How not to display the .0 ? Or even better, you can return an integer in your Binom function: return math.round((n*Binom(n-1,k-1))/k) Best regards: Otared ___ If your qu

### Re: [NTG-context] Code lua in a table

ggested, ou can also use context(math.round(Binom(i,j))) to have integers instead of real numbers. Best regards: Otared ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : n

### Re: [NTG-context] Code lua in a table

Fabrice Couvreur schrieb am 18.07.2020 um 22:25: Hi Wolfgang, It works but why did you ask this question since I finally use context ? Are you sure you want to use context(...) here? In your first version you used the context function in the loop to print the output of the Binom

### Re: [NTG-context] Code lua in a table

Small correction : \starttext \startluacode function Binom(n,k) if k > n then return 0 elseif (n == 0 or k == 0) then return 1 else return (n*Binom(n-1,k-1))/k end end context.startxtable({"align={mid

### Re: [NTG-context] Code lua in a table

abrice Couvreur schrieb am 18.07.2020 um 22:09: > > Hi, > > I improved the code to be able to display the grid but I cannot display > > the coefficients. > > Thank you > > Fabrice > > > > \starttext > > > > \startluacode > >

### Re: [NTG-context] Code lua in a table

Fabrice Couvreur schrieb am 18.07.2020 um 22:09: Hi, I improved the code to be able to display the grid but I cannot display the coefficients. Thank you Fabrice \starttext \startluacode      function Binom(n,k)        if k > n then              return 0        elseif (n == 0 or k =

### Re: [NTG-context] Code lua in a table

Hi, I improved the code to be able to display the grid but I cannot display the coefficients. Thank you Fabrice \starttext \startluacode function Binom(n,k) if k > n then return 0 elseif (n == 0 or k == 0) then return 1 else ret

### Re: [NTG-context] Code lua in a table

Fabrice Couvreur schrieb am 18.07.2020 um 20:05: Hello, I want to display the values of Pascal's triangle in a table. Unfortunately my knowledge of Lua is not sufficient to run this code. Thank you. Fabrice \starttext \startluacode      function Binom(n,k)      if k >

### [NTG-context] Code lua in a table

Hello, I want to display the values of Pascal's triangle in a table. Unfortunately my knowledge of Lua is not sufficient to run this code. Thank you. Fabrice \starttext \startluacode function Binom(n,k) if k > n then return 0 elseif (n == 0 or k =

### Re: [NTG-context] The binomial coefficients do not look optimal

big) \par \type{\binom{n}{k}}: $\binom{n}{k}$ (looks fine to me)\par \type{\dbinom{n}{k}}: $\dbinom{n}{k}$ (does not look good, too big parenthesis, even for displayed formulas).\par \stopTEXpage \stoptext %%% End of test file I think something should be changed to get the binomial coefficients

### [NTG-context] The binomial coefficients do not look optimal

Hi, I stumbled upon this (see the attached file for the result): %%% Test file \setupbodyfont[10pt] \starttext \startTEXpage[offset=10pt] \type{\tbinom{n}{k}}: $\tbinom{n}{k}$, (does not look good, the vertical space between $n$ and $k$ is too big) \par \type{\binom{n}{k}}: $\binom{n}{k}$ (looks

can use \binom which is the recommended way in context. The \dbinom command sets the content in display style while \tbinom use textstyle. \starttext Using \tex{binom} in text $\binom{n}{\frac{n}{2}}$. Using \tex{dbinom} in text $\dbinom{n}{\frac{n}{2}}$. Using \tex{tbinom} in text $\tbinom{n ### Re: [NTG-context] [solved] Fractions and binomial inlined in text ($n \choose \frac{n}2$): Parentheses not scaled limitation and therefore expected? Instead if \choose you can use \binom which is the recommended way in context. The \dbinom command sets the content in display style while \tbinom use textstyle. \starttext Using \tex{binom} in text$\binom{n}{\frac{n}{2}}$. Using \tex{dbinom ### [NTG-context] \environment before vs. after \startproduct Hi, here is another problem regarding \environments. % \setupbodyfont[palatino] % OK \starttext \setupbodyfont[palatino] % not OK \startformula \binom{n}{0} \stopformula \stoptext To avoid it, I'd have to use something like the following? \environment font-setups \startproduct ### Re: [NTG-context] \environment before vs. after \startproduct Am 16.07.2011 um 15:00 schrieb Andreas Harder: Hi, here is another problem regarding \environments. % \setupbodyfont[palatino] % OK \starttext \setupbodyfont[palatino] % not OK \startformula \binom{n}{0} \stopformula \stoptext To avoid it, I'd have to use something like ### Re: [NTG-context] Simplefonts, latest beta and binoms Math? No but you can use my calluna typescripts: \usetypescriptfile[type-calluna] \definetypeface[mainface][rm][serif][calluna][default] \definetypeface[mainface][mm][math] [modern] [computer-modern] \setupbodyfont[mainface] \starttext Calluna and Latin Modern Math \startformula \binom{1}{2 ### [NTG-context] Simplefonts, latest beta and binoms the math font doesn't help either. \usemodule[simplefonts] \setmainfont[Calluna]% could be Latin Modern Roman %\setmathfont[Latin Modern Math]% as in t-simplefonts.tex \starttext \startformula \binom{1}{2} \stopformula \stoptext Regards. -- Cédric simplefonts-error.tex Description: TeX ### Re: [NTG-context] Simplefonts, latest beta and binoms fonts which are used when you use the simplefonts module: \definetypeface[mainface][rm][serif][modern] \definetypeface[mainface][mm][math] [modern] \setupbodyfont[mainface] \starttext \startformula \binom{1}{2} \stopformula \stoptext Wolfgang ### Re: [NTG-context] Simplefonts, latest beta and binoms ][mm][math] [modern] \setupbodyfont[mainface] \starttext \startformula \binom{1}{2} \stopformula \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry ### Re: [NTG-context] Simplefonts, latest beta and binoms the fault of the OpenType version of the LM Math fonts which are used when you use the simplefonts module: \definetypeface[mainface][rm][serif][modern] \definetypeface[mainface][mm][math] [modern] \setupbodyfont[mainface] \starttext \startformula \binom{1}{2} \stopformula \stoptext If I don't ### Re: [NTG-context] Simplefonts, latest beta and binoms [mainface] \starttext \startformula \binom{1}{2} \stopformula \stoptext After perusing the log file, here are the font files that are loaded: /DATA/context-minimals/tex/texmf/fonts/opentype/public/lm/lmmath.otf /DATA/context-minimals/tex/texmf/fonts/opentype/public/lm/lmroman10 ### Re: [NTG-context] Simplefonts, latest beta and binoms or LuaTeX because it does only appear with OpenType math fonts: Input: \usemodule[simplefonts] \setmainfont[Calluna] \startbuffer[example] \input ward\par \startformula c^2=a^2+b^2 \quad \binom{1}{2} \stopformula \stopbuffer \starttext \getbuffer[example] \setmathfont[palatino]\getbuffer ### Re: [NTG-context] Simplefonts, latest beta and binoms [example] \input ward\par \startformula c^2=a^2+b^2 \quad \binom{1}{2} \stopformula \stopbuffer \starttext \getbuffer[example] \setmathfont[palatino]\getbuffer[example] \setmathfont[euler]\getbuffer[example] \setmathfont[times]\getbuffer[example] \setmathfont[cambria]\getbuffer[example ### [NTG-context] beta (asana goodies) Hi Hans, with the latest beta asana-math.lfg don't seem to have any influence of the output. \setupbodyfont[asana] \startTEXpage[offset=1ex]$\binom{n}{k}\quad \dbinom{n}{k}$\stopTEXpage It used to work with the experimental two or three days ago. Greeting Andreas ### Re: [NTG-context]$n\choose k\$-issue with OpenType math fonts

and relax these primitives I'm fine with \binom{x}{y} etc. aditya: shouldn't we merge the m-newmath code into the core? +1 I can add some configurability to lfg files so that one can tune fonts but even then the value are debatable I don't know the best value either, but et least one could

### [NTG-context] Problem: Arrows in math mode etc.

stoptext In fact, it seems atopwithdelims() isn't working because the problem can be fixed by adding delimiterfactor=1001 defbinom#1#2{left(#1 atop #2right)} starttext startformula binom{a}{b} stopformula stoptext The second problem is much more bothering to me because I can't typeset limits

### [NTG-context] Nath bugs?

I've been trying to make some notes on typesetting math in ConTeXt, and using nath seems the way to go. An odd thing about using \binom with nath: in displayed equations, it works fine, in inline equations, \binom{1}{2} will typeset 1(2) (with a raised 2). I suppose it's known that \startalign

### [NTG-context] Re: Re: Re: nath catcode issues

\next\relax [EMAIL PROTECTED] \def\atop{% [EMAIL PROTECTED] command \string\atop } {No more a valid command. Use array instead.}% \let\next\relax [EMAIL PROTECTED] \def\choose{% [EMAIL PROTECTED] command \string\choose } {No more a valid command. Replace {A \choose B} with \binom

### Re: [NTG-context] nath catcode issues

.}} [EMAIL PROTECTED] command \string\atop } {No more a valid command. Use array instead.}} [EMAIL PROTECTED] command \string\choose } {No more a valid command. Replace {A \choose B} with \binom A B.}} also messes up stuff in core-ref.tex for example: AHA! Good point. Try this fix: [EMAIL

### [NTG-context] Re: nath catcode issues

} with \frac A [EMAIL PROTECTED] [EMAIL PROTECTED] command \string\atop } {No more a valid command. Use array [EMAIL PROTECTED] [EMAIL PROTECTED] command \string\choose } {No more a valid command. Replace {A \choose B} with \binom A [EMAIL PROTECTED] Ah, of course... nikolai -- ::: name

### [NTG-context] Re: Re: nath catcode issues

} {No more a valid command. Replace {A \over B} with \frac A [EMAIL PROTECTED] [EMAIL PROTECTED] command \string\atop } {No more a valid command. Use array [EMAIL PROTECTED] [EMAIL PROTECTED] command \string\choose } {No more a valid command. Replace {A \choose B} with \binom

### Re: Re: [NTG-context] Known nath bugs?

I'm having all kinds of issues with nath (even without any preamble at all), like \binom{\frac 12}{a} not working, \to, \ot and \otto arrows not adjusting to the lengths of their subscripts, etc... and I can hardly imagine that all of these are nath bugs, so maybe something's wrong with my TeX