[NTG-context] Re: Fractions (was \placefigure[location=here...] problem)
On 12/9/2023 4:33 PM, Aditya Mahajan wrote: On Sat, 9 Dec 2023, Wolfgang Schuster wrote: \starttext \startlines \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} \stoplines \stoptext Or, for inline math, $\sqrt{1/3}$. radicals are somewhat special to deal with: - multidimensional delimiter - vertical spacing inside - horizontal spacing oustside - anchoring degrees - left and right radicals - more consistent rules (char based) - size dependent additional spacing (avoid clash) - normalize size across formula - lack of granularity in variants sizes by now we have dealt with all of that (some not in the current release), think of additional control in the engine, compensation for insufficient opentype math features, companion fonts with more sizes there will always be suboptimal cases but the average is ok (we put radical - character kerning on hold because it is a lot of definitions) and we don't want to add hard to fight heuristics so to inline: in most cases the solution that Adirya suggests will work out okay with respect toline spacing Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Fractions (was \placefigure[location=here...] problem)
On Sat, 9 Dec 2023, Wolfgang Schuster wrote: > \starttext > > \startlines > \type{\frac{1}{3}}: \m{\frac{1}{3}} > \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} > \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} > \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} > \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} > \type{\frac{1}{3}}: \m{\frac{1}{3}} > \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} > \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} > \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} > \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} > \stoplines > > \stoptext Or, for inline math, $\sqrt{1/3}$. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Fractions (was \placefigure[location=here...] problem)
Fabrice Couvreur schrieb am 09.12.2023 um 16:13: Hi Wolfgang, I'm reading this thread and I'm interested because I type a lot of text with mathematical formulas. In fact, I find that \dfrac{} creates unsightly leading space and that \frac{} is too small. What is the difference between \frac{} and \tfrac{} ? \frac switches the math style while \tfrac (textstyle), \dfrac (displaystyle) and \sfrac (scriptstyle) enforce a certain style. begin example \startbuffer[frac] \frac{1}{2} + \dfrac{1}{2} - \tfrac{1}{2} + \sfrac{1}{2} \stopbuffer \starttext \startformula \getbuffer[frac] \stopformula \m{\getbuffer[frac]} \startformula \frac {\getbuffer[frac]} {\getbuffer[frac]} \stopformula \m{\frac {\getbuffer[frac]} {\getbuffer[frac]}} \stoptext end example Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Fractions (was \placefigure[location=here...] problem)
Hi Wolfgang, I'm reading this thread and I'm interested because I type a lot of text with mathematical formulas. In fact, I find that \dfrac{} creates unsightly leading space and that \frac{} is too small. What is the difference between \frac{} and \tfrac{} ? Fabrice Le sam. 9 déc. 2023 à 14:00, Henning Hraban Ramm a écrit : > Am 09.12.23 um 14:43 schrieb Wolfgang Schuster: > > anton.chig...@mail.com schrieb am 09.12.2023 um 14:15: > > \startlines > > \type{\frac{1}{3}}: \m{\frac{1}{3}} > > \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} > > \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} > > \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} > > \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} > > \type{\frac{1}{3}}: \m{\frac{1}{3}} > > \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} > > \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} > > \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} > > \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} > > \stoplines > > There’s also \vulgarfraction{1}{3} (but probably not suitable for your > application). > > Hraban > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Fractions (was \placefigure[location=here...] problem)
Am 09.12.23 um 14:43 schrieb Wolfgang Schuster: anton.chig...@mail.com schrieb am 09.12.2023 um 14:15: \startlines \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} \stoplines There’s also \vulgarfraction{1}{3} (but probably not suitable for your application). Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Fractions (was \placefigure[location=here...] problem)
anton.chig...@mail.com schrieb am 09.12.2023 um 14:15: I worked, ;-), thanks. Let me ask you another thing, how can I avoid messing up the line spacing by using \sqrt and \frac, the line that follows these has increased line spacing in the pdf output code: Find the normal and shearing stresses on an oblique plane defined by $l=\sqrt{\frac{3}{13}}$, $m=\sqrt{\frac{1}{13}}$, and $n=\sqrt{\frac{9}{13}}$. Complete working minimal examples are preferred over code snippets. To avoid single lines with different spacing you can either increase the line spacing for all lines with \setupinterlinespace or you use a different fraction command which uses smaller numbers or creates inline fractions. \starttext \startlines \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} \stoplines \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Nested itemize
It seems that displaystyle fractions insert extra vertical space before the main item. With textstyle fractions, the code works fine. \blank[back,overlay] can get rid of the gap above the first row, but not the space inserted by \dfrac. \defineitemgroup[alex] \setupitemgroup [alex] [each] [a,two] [ margin=2cm, before={\blank[overlay,-depth]}, after={\blank[nowhite]}, stopper=) ] %\showboxes \autofences \starttext \samplefile{ward} \startitemize[n][style=\bf,before={\blank[back,overlay]},after={\blank[medium]}] \startitem \startalextable \startitem \m{6(x - \frac{5}{12})^2 - \frac{1}{24}} \stopitem \startitem \m{-3(x - \frac{1}{3})^2 + \frac{1}{3}} \stopitem \startitem \m{7(x + \frac{5}{14})^2 + \frac{199}{28}} \stopitem \startitem \m{-\frac{1}{2}(x + 2)^2 + \frac{9}{2}} \stopitem \stopalextable \stopitem \stopitemize \samplefile{ward} \stoptext Alexandre Christe 於 2023年8月22日 週二 下午5:48寫道: > Hi Mikael, > > That looks very attractive. However, with the following code, I end up > with a large gap above the first row. > > \defineitemgroup[alex] > > \setupitemgroup > [alex] > [each] > [a,two] > [ > margin=2cm, > before=\blank[overlay,-depth], > stopper=) > ] > > \showboxes > \autofences > > \starttext > \samplefile{ward} > > \startitemize[n][style=\bf] > \startitem > \startalextable > \startitem $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ \stopitem > \startitem $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ \stopitem > \startitem $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ \stopitem > \startitem $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ \stopitem > \stopalextable > \stopitem > \stopitemize > > \samplefile{ward} > \stoptext > > A. Christe > Le 22 août 2023 à 07:12 +0200, Alexandre Christe , > a écrit : > > It’s true that \vtop{…} does the job for a single line of items, but it > doesn’t in the case there’re multiple (\vtop{}) aligns with the bottom. > > Here’s a modified MWE > > \startitemize[n][style=\bf] > \item \godown[-\lineheight] \startitemize > [a,columns,two,packed,broad][stopper=),before={\blank[nowhite]}] > \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ > \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ > \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ > \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ > \stopitemize > \stopitemize > > A. Christe > Le 22 août 2023 à 04:08 +0200, fv leung , a écrit : > > I'd do it this way: > > \starttext > \startitemize[n][style=\bf] > \item\vtop{% > \startitemize[a,horizontal,four][stopper=\)] > \startitem > $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ > \stopitem > \startitem > $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ > \stopitem > \startitem > $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ > \stopitem > \startitem > $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ > \stopitem > \stopitemize > } > \stopitemize > > \stoptext > > Alexandre Christe 於 2023年8月22日 週二 上午2:58寫道: > >> Dear ConTeXt users, >> >> Time goes by but I haven't yet found a nice solution to this issue. When >> having mathematics, I'd not like to adjust by hand the factor of \linewidth >> for the \godown command. >> >> Here's a MWE >> >> \starttext >> >> \startitemize[n][style=\bf] >> \item \godown[-\lineheight] \startitemize >> [a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}] >> \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ >> \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ >> \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ >> \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ >> \stopitemize >> \stopitemize >> >> \stoptext >> >> Thanks in advance. >> >> Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context < >> ntg-context@ntg.nl> a écrit : >> >>> >>> \starttext >>> >>> \startitemize[n] >>> \item\godown[-\lineheight] >>> >>> \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=] >>> \item bla >>> \item bla >>> \item bla >>> \item bla >>> \stopitemize >>> \item\godown[-\lineheight] >>> >>> \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=] >>> \item bla >>> \item bla >>> \item bla >>> \item bla >>> \item bla >>> \item bla >>> \stopitemize >>> \item\godown[-\lineheight] >>> >>> \star
[NTG-context] Re: Nested itemize
Hi Mikael, That looks very attractive. However, with the following code, I end up with a large gap above the first row. \defineitemgroup[alex] \setupitemgroup [alex] [each] [a,two] [ margin=2cm, before=\blank[overlay,-depth], stopper=) ] \showboxes \autofences \starttext \samplefile{ward} \startitemize[n][style=\bf] \startitem \startalextable \startitem $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ \stopitem \startitem $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ \stopitem \startitem $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ \stopitem \startitem $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ \stopitem \stopalextable \stopitem \stopitemize \samplefile{ward} \stoptext A. Christe Le 22 août 2023 à 07:12 +0200, Alexandre Christe , a écrit : > It’s true that \vtop{…} does the job for a single line of items, but it > doesn’t in the case there’re multiple (\vtop{}) aligns with the bottom. > > Here’s a modified MWE > > \startitemize[n][style=\bf] > \item \godown[-\lineheight] \startitemize > [a,columns,two,packed,broad][stopper=),before={\blank[nowhite]}] > \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ > \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ > \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ > \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ > \stopitemize > \stopitemize > > A. Christe > Le 22 août 2023 à 04:08 +0200, fv leung , a écrit : > > I'd do it this way: > > > > \starttext > > \startitemize[n][style=\bf] > > \item\vtop{% > > \startitemize[a,horizontal,four][stopper=\)] > > \startitem > > $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ > > \stopitem > > \startitem > > $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ > > \stopitem > > \startitem > > $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ > > \stopitem > > \startitem > > $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ > > \stopitem > > \stopitemize > > } > > \stopitemize > > > > \stoptext > > > > > Alexandre Christe 於 2023年8月22日 週二 上午2:58寫道: > > > > Dear ConTeXt users, > > > > > > > > Time goes by but I haven't yet found a nice solution to this issue. > > > > When having mathematics, I'd not like to adjust by hand the factor of > > > > \linewidth for the \godown command. > > > > > > > > Here's a MWE > > > > > > > > \starttext > > > > > > > > \startitemize[n][style=\bf] > > > > \item \godown[-\lineheight] \startitemize > > > > [a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}] > > > > \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ > > > > \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ > > > > \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ > > > > \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ > > > > \stopitemize > > > > \stopitemize > > > > > > > > \stoptext > > > > > > > > Thanks in advance. > > > > > > > > > Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context > > > > > a écrit : > > > > > > > > > > > > \starttext > > > > > > > > > > > > \startitemize[n] > > > > > > \item\godown[-\lineheight] > > > > > > > > > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=] > > > > > > \item bla > > > > > > \item bla > > > > > > \item bla > > > > > > \item bla > > > > > > \stopitemize > > > > > > \item\godown[-\lineheight] > > > > > > > > > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=] > > > > > > \item bla > > > > > > \item bla > > > > > > \item bla > > > > > > \item bla > > > > > > \item bla > > > > > > \item bla > > > > > > \stopitemize > > > > > > \item\godown[-\lineheight] > > > > > > > > > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=] > > > > > > \item bla > > > > > > \item bla > > > > > > \item bla > > > > > > \item bla > > > > > > \item bla > > > > > > \item bla > > > > > > \item bla > > > > >
[NTG-context] Re: Nested itemize
Hi, On Tue, Aug 22, 2023 at 7:16 AM Alexandre Christe wrote: > > It’s true that \vtop{…} does the job for a single line of items, but it > doesn’t in the case there’re multiple (\vtop{}) aligns with the bottom. > > Here’s a modified MWE > > \startitemize[n][style=\bf] > \item \godown[-\lineheight] \startitemize > [a,columns,two,packed,broad][stopper=),before={\blank[nowhite]}] > \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ > \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ > \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ > \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ > \stopitemize > \stopitemize > > A. Christe > Le 22 août 2023 à 04:08 +0200, fv leung , a écrit : > > I'd do it this way: > > \starttext > \startitemize[n][style=\bf] > \item\vtop{% > \startitemize[a,horizontal,four][stopper=\)] > \startitem > $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ > \stopitem > \startitem > $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ > \stopitem > \startitem > $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ > \stopitem > \startitem > $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ > \stopitem > \stopitemize > } > \stopitemize > > \stoptext > > Alexandre Christe 於 2023年8月22日 週二 上午2:58寫道: >> >> Dear ConTeXt users, >> >> Time goes by but I haven't yet found a nice solution to this issue. When >> having mathematics, I'd not like to adjust by hand the factor of \linewidth >> for the \godown command. >> >> Here's a MWE >> >> \starttext >> >> \startitemize[n][style=\bf] >> \item \godown[-\lineheight] \startitemize >> [a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}] >> \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ >> \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ >> \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ >> \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ >> \stopitemize >> \stopitemize >> >> \stoptext >> >> Thanks in advance. >> >> Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context >> a écrit : >>> >>> >>> \starttext >>> >>> \startitemize[n] >>> \item\godown[-\lineheight] >>> >>> \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=] >>> \item bla >>> \item bla >>> \item bla >>> \item bla >>> \stopitemize >>> \item\godown[-\lineheight] >>> >>> \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=] >>> \item bla >>> \item bla >>> \item bla >>> \item bla >>> \item bla >>> \item bla >>> \stopitemize >>> \item\godown[-\lineheight] >>> >>> \startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=] >>> \item bla >>> \item bla >>> \item bla >>> \item bla >>> \item bla >>> \item bla >>> \item bla >>> \item bla >>> \stopitemize >>> \stopitemize >>> >>> \stoptext >>> >>> Alexandre Christe via ntg-context 於 2022年9月2日 週五 >>> 下午5:08寫道: >>>> >>>> Dear all, >>>> >>>> I'm struggling to setup a nested itemize with no blank line and several >>>> columns. >>>> >>>> What I mean is something like >>>> 1. a) bla c) bla >>>> b) bla d) bla >>>> >>>> The following MWE is my starting point >>>> >>>> \starttext >>>> \startitemize[n] >>>> \item \blank[-line] >>>> \startitemize[a,horizontal,two] [margin=2cm] >>>> \item First >>>> \item Second >>>> \item Third >>>> \item Fourth >>>> \stopitemize >>>> \item \blank[-line] >>>> \startitemize[a,horizontal,columns,two] >>>> \item First >>>> \item Second >>>> \item Third >>>> \item Fourth >>>> \stopitemize >>>> \stopitemize >>>> \stoptext >>>> >>>> Thanks in advance Not really tested, but \blank[overlay,-depth] seems to work OK (thanks Hans!). I also take the opportunity to push a bit for the new itemtable mechanism: \defineitemgroup[alex] \setupitemgroup [alex] [each] [a,two] [margin=2cm, before=\blank[overlay,-depth]] \showboxes \starttext \startitemize[n] \startitem \startalextable \startitem First \stopitem \startitem Second \stopitem \startitem Third \stopitem \startitem Fourth \stopitem \stopalextable \stopitem \stopitemize \stoptext Please test for a larger document to see if it works well. /Mikael ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Nested itemize
It’s true that \vtop{…} does the job for a single line of items, but it doesn’t in the case there’re multiple (\vtop{}) aligns with the bottom. Here’s a modified MWE \startitemize[n][style=\bf] \item \godown[-\lineheight] \startitemize [a,columns,two,packed,broad][stopper=),before={\blank[nowhite]}] \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ \stopitemize \stopitemize A. Christe Le 22 août 2023 à 04:08 +0200, fv leung , a écrit : > I'd do it this way: > > \starttext > \startitemize[n][style=\bf] > \item\vtop{% > \startitemize[a,horizontal,four][stopper=\)] > \startitem > $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ > \stopitem > \startitem > $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ > \stopitem > \startitem > $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ > \stopitem > \startitem > $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ > \stopitem > \stopitemize > } > \stopitemize > > \stoptext > > > Alexandre Christe 於 2023年8月22日 週二 上午2:58寫道: > > > Dear ConTeXt users, > > > > > > Time goes by but I haven't yet found a nice solution to this issue. When > > > having mathematics, I'd not like to adjust by hand the factor of > > > \linewidth for the \godown command. > > > > > > Here's a MWE > > > > > > \starttext > > > > > > \startitemize[n][style=\bf] > > > \item \godown[-\lineheight] \startitemize > > > [a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}] > > > \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ > > > \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ > > > \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ > > > \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ > > > \stopitemize > > > \stopitemize > > > > > > \stoptext > > > > > > Thanks in advance. > > > > > > > Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context > > > > a écrit : > > > > > > > > > > \starttext > > > > > > > > > > \startitemize[n] > > > > > \item\godown[-\lineheight] > > > > > > > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=] > > > > > \item bla > > > > > \item bla > > > > > \item bla > > > > > \item bla > > > > > \stopitemize > > > > > \item\godown[-\lineheight] > > > > > > > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=] > > > > > \item bla > > > > > \item bla > > > > > \item bla > > > > > \item bla > > > > > \item bla > > > > > \item bla > > > > > \stopitemize > > > > > \item\godown[-\lineheight] > > > > > > > > > > \startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=] > > > > > \item bla > > > > > \item bla > > > > > \item bla > > > > > \item bla > > > > > \item bla > > > > > \item bla > > > > > \item bla > > > > > \item bla > > > > > \stopitemize > > > > > \stopitemize > > > > > > > > > > \stoptext > > > > > > > > > > > Alexandre Christe via ntg-context 於 2022年9月2日 > > > > > > 週五 下午5:08寫道: > > > > > > > Dear all, > > > > > > > > > > > > > > I'm struggling to setup a nested itemize with no blank line and > > > > > > > several columns. > > > > > > > > > > > > > > What I mean is something like > > > > > > > 1. a) bla c) bla > > > > > > > b) bla d) bla > > > > > > > > > > > > > > The following MWE is my starting point > > > > > > > > > > > > > > \starttext > > > > > > > \startitemize[n] > > > > > > > \item \blank[-line] > > > > > > > \startitemize[a,horizontal,two] [margin=2cm] > > > > > > > \item First > > > > > > > \item Second > > > > > > > \item T
[NTG-context] Re: Nested itemize
I'd do it this way: \starttext \startitemize[n][style=\bf] \item\vtop{% \startitemize[a,horizontal,four][stopper=\)] \startitem $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ \stopitem \startitem $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ \stopitem \startitem $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ \stopitem \startitem $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ \stopitem \stopitemize } \stopitemize \stoptext Alexandre Christe 於 2023年8月22日 週二 上午2:58寫道: > Dear ConTeXt users, > > Time goes by but I haven't yet found a nice solution to this issue. When > having mathematics, I'd not like to adjust by hand the factor of \linewidth > for the \godown command. > > Here's a MWE > > \starttext > > \startitemize[n][style=\bf] > \item \godown[-\lineheight] \startitemize > [a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}] > \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ > \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ > \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ > \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ > \stopitemize > \stopitemize > > \stoptext > > Thanks in advance. > > Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context > a écrit : > >> >> \starttext >> >> \startitemize[n] >> \item\godown[-\lineheight] >> >> \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=] >> \item bla >> \item bla >> \item bla >> \item bla >> \stopitemize >> \item\godown[-\lineheight] >> >> \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=] >> \item bla >> \item bla >> \item bla >> \item bla >> \item bla >> \item bla >> \stopitemize >> \item\godown[-\lineheight] >> >> \startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=] >> \item bla >> \item bla >> \item bla >> \item bla >> \item bla >> \item bla >> \item bla >> \item bla >> \stopitemize >> \stopitemize >> >> \stoptext >> >> Alexandre Christe via ntg-context 於 2022年9月2日 週五 >> 下午5:08寫道: >> >>> Dear all, >>> >>> I'm struggling to setup a nested itemize with no blank line and several >>> columns. >>> >>> What I mean is something like >>> 1. a) bla c) bla >>> b) bla d) bla >>> >>> The following MWE is my starting point >>> >>> \starttext >>> \startitemize[n] >>> \item \blank[-line] >>> \startitemize[a,horizontal,two] [margin=2cm] >>> \item First >>> \item Second >>> \item Third >>> \item Fourth >>> \stopitemize >>> \item \blank[-line] >>> \startitemize[a,horizontal,columns,two] >>> \item First >>> \item Second >>> \item Third >>> \item Fourth >>> \stopitemize >>> \stopitemize >>> \stoptext >>> >>> Thanks in advance >>> >>> ___ >>> If your question is of interest to others as well, please add an entry >>> to the Wiki! >>> >>> maillist : ntg-context@ntg.nl / >>> https://www.ntg.nl/mailman/listinfo/ntg-context >>> webpage : https://www.pragma-ade.nl / http://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> wiki : https://contextgarden.net >>> >>> ___ >>> >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : https://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : https://contextgarden.net >> >> ___ >> > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Nested itemize
Dear ConTeXt users, Time goes by but I haven't yet found a nice solution to this issue. When having mathematics, I'd not like to adjust by hand the factor of \linewidth for the \godown command. Here's a MWE \starttext \startitemize[n][style=\bf] \item \godown[-\lineheight] \startitemize [a,columns,four,packed,broad][stopper=),before={\blank[nowhite]}] \item $6(x - \dfrac{5}{12})^2 - \dfrac{1}{24}$ \item $-3(x - \dfrac{1}{3})^2 + \dfrac{1}{3}$ \item $7(x + \dfrac{5}{14})^2 + \dfrac{199}{28}$ \item $-\dfrac{1}{2}(x + 2)^2 + \dfrac{9}{2}$ \stopitemize \stopitemize \stoptext Thanks in advance. Le ven. 2 sept. 2022 à 11:24, fv leung via ntg-context a écrit : > > \starttext > > \startitemize[n] > \item\godown[-\lineheight] > > \startitemize[a,columns,packed][before={\blank[nowhite]},right=\),stopper=] > \item bla > \item bla > \item bla > \item bla > \stopitemize > \item\godown[-\lineheight] > > \startitemize[a,columns,packed][before={\blank[nowhite]},n=3,right=\),stopper=] > \item bla > \item bla > \item bla > \item bla > \item bla > \item bla > \stopitemize > \item\godown[-\lineheight] > > \startitemize[a,columns,packed][before={\blank[nowhite]},n=4,right=\),stopper=] > \item bla > \item bla > \item bla > \item bla > \item bla > \item bla > \item bla > \item bla > \stopitemize > \stopitemize > > \stoptext > > Alexandre Christe via ntg-context 於 2022年9月2日 週五 > 下午5:08寫道: > >> Dear all, >> >> I'm struggling to setup a nested itemize with no blank line and several >> columns. >> >> What I mean is something like >> 1. a) bla c) bla >> b) bla d) bla >> >> The following MWE is my starting point >> >> \starttext >> \startitemize[n] >> \item \blank[-line] >> \startitemize[a,horizontal,two] [margin=2cm] >> \item First >> \item Second >> \item Third >> \item Fourth >> \stopitemize >> \item \blank[-line] >> \startitemize[a,horizontal,columns,two] >> \item First >> \item Second >> \item Third >> \item Fourth >> \stopitemize >> \stopitemize >> \stoptext >> >> Thanks in advance >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> https://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : https://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : https://contextgarden.net >> >> ___ >> > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Problems with itemize with several columns
It seems that putting \column before itemize of 'c', forces 'c' together with this content. Repeating this step produces what I want: \startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i divisió} Opereu: \startitemize[a, columns, three] \item \startformula 3 \cdot \frac{5}{3} \stopformula \item \startformula \frac{3}{4} \cdot \frac{2}{5} \stopformula \column \item \startformula \frac{1}{3} \cdot \frac{3}{4} \div \frac{1}{5} \stopformula \item \startformula 5 \div \frac{7}{10} \cdot 7 \div \frac{2}{5} \stopformula \column \item \startformula \frac{1}{2} \cdot \frac{1}{2} \stopformula \item \startformula \frac{3}{2} \div \frac{2}{3} \div \frac{5}{4} \stopformula \column \item \startformula \frac{2}{3} \colon \frac{2}{5} \stopformula \item \startformula \frac{3}{4} \colon \frac{1}{2} \cdot 6 \stopformula \item \startformula \frac{2}{3} \colon \frac{3}{4} \cdot \frac{1}{2} \stopformula \stopitemize \stopexercici @fv leung said I have to replace frac for dfrac, but it mess up the following content in my book. Thanks all, On Thu, 24 Feb 2022 23:04:43 + Bruce Horrocks ha escrit: > > > > On 24 Feb 2022, at 22:10, Xavier B. via ntg-context > > wrote: > > > > Even if I change > > \startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i > > divisió} Opereu: > > \startitemize[a, columns, three] > > > > > > for > > > > \startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i > > divisió} Opereu: > > \startitemize[a, columns] > > > > > > the 'c' jumps. > > > > Isn't ConTeXt capable of handle that? > > Please see the attached PDF. > > The green line shows how much space is needed to fully print item (b). Item > (c) will need the same amount of space, shown by the red line. However, this > would take you into the footer area (shown by the blue arrows), so item (c) > is split: the item label fits into the space at the bottom of the column and > so is printed there; the fraction doesn't fit and so is moved to the next > column. > > The solution to your problem would be some way of forcing the item body to > stay with the label. I don't know what that command is - hopefully someone > here does know. > > — > Bruce Horrocks > Hampshire, UK ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problems with itemize with several columns
Avoid using \startformula \stopformula in itemize. Use \dfrac to get display style fraction. \defineenumeration [exercici] [alternative=serried, before={\blank[medium]\testpage[1]}, text={Exercici}, stopper={.\space}, width=fit, headstyle=\ss, distance=0.25em, width=fit, headcolor=exercici_color, title=yes, titlestyle=\ss, titledistance=0em, left={\bgroup\bf}, right={\egroup}, after={\blank[big]}, prefix=yes, prefixsegments=section, way=section] \starttext \section{Operacions amb fraccions} \subject{Preguntes} \startexercici[exercici:operacions-amb-fraccions-1]{suma i resta} Opereu: \startitemize[a, columns, three] \item\m{\dfrac{2}{7} + \dfrac{6}{7} - \dfrac{1}{7}} \item\m{\dfrac{5}{8} + \dfrac{9}{8}} \item\m{\dfrac{1}{4} + 5 - \dfrac{1}{4}} \item\m{\dfrac{3}{5} - \dfrac{2}{5} + \dfrac{11}{5}} \item\m{\dfrac{2}{3} + \dfrac{1}{4}} \item\m{5 + \dfrac{4}{5}} \item\m{\dfrac{2}{3} + \dfrac{5}{8} - \dfrac{1}{9}} \item\m{10 - \dfrac{1}{6} + \dfrac{6}{8}} \item\m{\dfrac{3}{10} + \dfrac{7}{12}} \stopitemize \stopexercici \startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i divisió} Opereu: \startitemize[a, columns, three] \item\m{3 \cdot \dfrac{5}{3}} \item\m{\dfrac{3}{4} \cdot \dfrac{2}{5}} \item\m{\dfrac{1}{3} \cdot \dfrac{3}{4} \div \dfrac{1}{5}} %\column \item\m{5 \div \dfrac{7}{10} \cdot 7 \div \dfrac{2}{5}} \item\m{\dfrac{1}{2} \cdot \dfrac{1}{2}} \item\m{\dfrac{3}{2} \div \dfrac{2}{3} \div \dfrac{5}{4}} %\column \item\m{\dfrac{2}{3} \colon \dfrac{2}{5}} \item\m{\dfrac{3}{4} \colon \dfrac{1}{2} \cdot 6} \item\m{\dfrac{2}{3} \colon \dfrac{3}{4} \cdot \dfrac{1}{2}} \stopitemize \stopexercici \startexercici[exercici:operacions-amb-fraccions-3]{operacions combinades} \startitemize[a, columns, three] \item\m{\dfrac{3}{4} + \dfrac{2}{5} \cdot \dfrac{1}{2}} \item\m{\dfrac{2}{5} \div \dfrac{3}{5} - \dfrac{1}{4}} \item\m{\left( 2 + \dfrac{3}{5} \right) \div \dfrac{4}{3}} \item\m{\dfrac{2}{3} - \dfrac{5}{6}\cdot 8} \item\m{4 + \dfrac{3}{5} - \left(2 - \dfrac{1}{2}\right)} \item\m{4 \cdot \left(\dfrac{5}{6} - \dfrac{1}{4} + \dfrac{4}{9}\right)} \item\m{\dfrac{5}{6} - \left(\dfrac{1}{5} + \dfrac{1}{3}\right)} \item\m{\dfrac{5}{6} \div \left( \dfrac{2}{5} - \dfrac{1}{10}\right)} \item\m{4 \cdot \dfrac{2}{3} \cdot \left(\dfrac{2}{4} \div \dfrac{8}{10}\right)} \item\m{\dfrac{3}{4} + \dfrac{1}{2} \cdot \dfrac{4}{10}} \item\m{\dfrac{10}{12} - \left(\dfrac{1}{10} + \dfrac{3}{8}\right)} \item\m{\left(\dfrac{1}{2} + 2\right) \cdot \left(2 - \dfrac{1}{4}\right)} \item\m{\left(\dfrac{3}{4} + \dfrac{1}{4}\right) \div \left(\dfrac{5}{6} - \dfrac{1}{3}\right)} \item\m{5 + 10 - \dfrac{1}{10} + 25} \item\m{\dfrac{1}{3} + \dfrac{1}{2} - \dfrac{2}{5}} \item\m{\left(\dfrac{1}{2} + \dfrac{2}{10}\right) \cdot \dfrac{2}{6}} \item\m{5 + \dfrac{1}{3} \cdot \dfrac{5}{3}} \item\m{\left( 5 + \dfrac{1}{3} \right) \cdot \dfrac{5}{3}} \stopitemize \stopexercici \stoptext Xavier B. via ntg-context 於 2022年2月25日 週五 上午6:10寫道: > Even if I change > \startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i > divisió} Opereu: > \startitemize[a, columns, three] > > > for > > \startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i > divisió} Opereu: > \startitemize[a, columns] > > > the 'c' jumps. > > Isn't ConTeXt capable of handle that? > > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Typo in m-tikz
On Mon, 13 Dec 2021, Hans Hagen wrote: > On 12/13/2021 7:19 PM, Aditya Mahajan via ntg-context wrote: > > On Mon, 13 Dec 2021, Aditya Mahajan via ntg-context wrote: > > > > > Hi, > > > > > > There is a typo in m-tikz.mkxl (possibly a carry-over from t-tikz.tex). > > > The module ends with a spurious `\stopmodule`: > > > > > > https://github.com/contextgarden/context-mirror/blob/fe714093ebb95e4a870282782e2124cff2e546e5/tex/context/modules/mkxl/m-tikz.mkxl#L113 > > > > > > (Or rather, the corresponding `\startmodule` is missing). > > > [...] > > > And since tikz is a latex module, in the true LaTeX spirit, the error goes > > > away (for obvious reasons) if I move the \usemodule[tikz] to after the > > > font definitions. It took quite a while to figure out what is happening. > > > > Actually, the missing \startmodule is not a culprit for this error. Even > > after fixing that, something goes wrong. Here is a minimal example: > > > > \permanent\protected\def\starttikzinput > >{\pushoverloadmode > > \pushcatcodetable > > \setcatcodetable\texcatcodes > > \unprotect > > \catcode`\@=11 > > \catcode`\|=12 > > \catcode`\!=12 > > \autoparagraphmode\zerocount} > > > > \permanent\protected\def\stoptikzinput > >{\autoparagraphmode\plusone > > \protect > > \popcatcodetable > > \popoverloadmode} > > > > \starttikzinput > > \input t-pgf > > \stoptikzinput > > > > > > \usetypescriptfile[euler] > > \definetypeface[mainfont][rm][serif][pagella][default] > > \definetypeface[mainfont][mm][math] [pagellaovereuler][default] > > \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, > > features=none] > > \setupbodyfont[mainfont,11pt] > > > > \starttext > > $\dfrac{1}{2}$ > > \stoptext > > > > which gives the same error: parameter 'fractionrule' in style 2 is not set > > > > Not sure what is happening here. > > can you test with the \protect \unprotect removed from these definitions? That fixes the issue, both in the test file and in my bigger document. Thanks, 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Typo in m-tikz
On 12/13/2021 7:19 PM, Aditya Mahajan via ntg-context wrote: On Mon, 13 Dec 2021, Aditya Mahajan via ntg-context wrote: Hi, There is a typo in m-tikz.mkxl (possibly a carry-over from t-tikz.tex). The module ends with a spurious `\stopmodule`: https://github.com/contextgarden/context-mirror/blob/fe714093ebb95e4a870282782e2124cff2e546e5/tex/context/modules/mkxl/m-tikz.mkxl#L113 (Or rather, the corresponding `\startmodule` is missing). [...] And since tikz is a latex module, in the true LaTeX spirit, the error goes away (for obvious reasons) if I move the \usemodule[tikz] to after the font definitions. It took quite a while to figure out what is happening. Actually, the missing \startmodule is not a culprit for this error. Even after fixing that, something goes wrong. Here is a minimal example: \permanent\protected\def\starttikzinput {\pushoverloadmode \pushcatcodetable \setcatcodetable\texcatcodes \unprotect \catcode`\@=11 \catcode`\|=12 \catcode`\!=12 \autoparagraphmode\zerocount} \permanent\protected\def\stoptikzinput {\autoparagraphmode\plusone \protect \popcatcodetable \popoverloadmode} \starttikzinput \input t-pgf \stoptikzinput \usetypescriptfile[euler] \definetypeface[mainfont][rm][serif][pagella][default] \definetypeface[mainfont][mm][math] [pagellaovereuler][default] \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, features=none] \setupbodyfont[mainfont,11pt] \starttext $\dfrac{1}{2}$ \stoptext which gives the same error: parameter 'fractionrule' in style 2 is not set Not sure what is happening here. can you test with the \protect \unprotect removed from these definitions? -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Typo in m-tikz
On Mon, 13 Dec 2021, Aditya Mahajan via ntg-context wrote: > Hi, > > There is a typo in m-tikz.mkxl (possibly a carry-over from t-tikz.tex). The > module ends with a spurious `\stopmodule`: > > https://github.com/contextgarden/context-mirror/blob/fe714093ebb95e4a870282782e2124cff2e546e5/tex/context/modules/mkxl/m-tikz.mkxl#L113 > > (Or rather, the corresponding `\startmodule` is missing). > [...] > And since tikz is a latex module, in the true LaTeX spirit, the error goes > away (for obvious reasons) if I move the \usemodule[tikz] to after the font > definitions. It took quite a while to figure out what is happening. Actually, the missing \startmodule is not a culprit for this error. Even after fixing that, something goes wrong. Here is a minimal example: \permanent\protected\def\starttikzinput {\pushoverloadmode \pushcatcodetable \setcatcodetable\texcatcodes \unprotect \catcode`\@=11 \catcode`\|=12 \catcode`\!=12 \autoparagraphmode\zerocount} \permanent\protected\def\stoptikzinput {\autoparagraphmode\plusone \protect \popcatcodetable \popoverloadmode} \starttikzinput \input t-pgf \stoptikzinput \usetypescriptfile[euler] \definetypeface[mainfont][rm][serif][pagella][default] \definetypeface[mainfont][mm][math] [pagellaovereuler][default] \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, features=none] \setupbodyfont[mainfont,11pt] \starttext $\dfrac{1}{2}$ \stoptext which gives the same error: parameter 'fractionrule' in style 2 is not set Not sure what is happening here. 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Typo in m-tikz
Hi, There is a typo in m-tikz.mkxl (possibly a carry-over from t-tikz.tex). The module ends with a spurious `\stopmodule`: https://github.com/contextgarden/context-mirror/blob/fe714093ebb95e4a870282782e2124cff2e546e5/tex/context/modules/mkxl/m-tikz.mkxl#L113 (Or rather, the corresponding `\startmodule` is missing). This causes an interesting error message on the following test file: \usemodule[tikz] \usetypescriptfile[euler] \definetypeface[mainfont][rm][serif][pagella][default] \definetypeface[mainfont][mm][math] [pagellaovereuler][default] \definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, features=none] \setupbodyfont[mainfont,11pt] \starttext $\dfrac{1}{2}$ \stoptext which gives: system > module wrapping error in 'tikz' close source> level 2, order 67, name '/opt/luametatex/texmf-context/tex/context/modules/mkxl/m-tikz.mkxl' open source > level 2, order 68, name '/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-euler.mkiv' open source > level 3, order 69, name '/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 3, order 69, name '/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' open source > level 3, order 70, name '/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-dejavu.mkiv' close source> level 3, order 70, name '/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-dejavu.mkiv' suggestion > use \withcedilla instead of \c suggestion > use \withcaron instead of \v close source> level 2, order 70, name '/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-euler.mkiv' open source > level 2, order 71, name '/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' close source> level 2, order 71, name '/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' fonts > typescripts > unknown library 'pagellaovereuler' open source > level 2, order 72, name '/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-dejavu.mkiv' close source> level 2, order 72, name '/opt/luametatex/texmf-context/tex/context/fonts/mkiv/type-imp-dejavu.mkiv' fonts > defining > font with asked name 'unknown' is not found using lookup 'file' fonts > defining > unable to define 'unknown' as 'mainfont-11pt-rm-tf-0--0' fonts > defining > unable to define 'unknown' as 'mainfont-11pt-mm-mr--3' fonts > defining > unable to define 'unknown' as 'mainfont-11pt-mm-mr--2' fonts > defining > unable to define 'unknown' as 'mainfont-11pt-mm-mr--1' fonts > defining > unable to define 'unknown' as 'mainfont-11pt-mm-mb--3' fonts > defining > unable to define 'unknown' as 'mainfont-11pt-mm-mb--2' fonts > defining > unable to define 'unknown' as 'mainfont-11pt-mm-mb--1' tex error > tex error on line 10 in file ./test.tex: Math error: parameter 'fractionrule' in style 2 is not set $\dfrac{1}{2}$ And since tikz is a latex module, in the true LaTeX spirit, the error goes away (for obvious reasons) if I move the \usemodule[tikz] to after the font definitions. It took quite a while to figure out what is happening. 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Adjust the length of a frame
-- Forwarded message - De : Fabrice Couvreur Date: lun. 26 juil. 2021 à 13:13 Subject: Texte source 30 / 5000 Résultats de traduction Adjust the length of a frame To: mailing list for ConTeXt users Hello, Following on from my previous questions for writing my book (thanks again Wolfgang), I have to create a solution environment like the attached image. My problem is adjusting the length of the frame. Thank you. Fabrice \setupbodyfont[newcomputermodern-book,11pt] \defineframed [ACFRAME] [frame=off, width=fit, align=flushleft, location=low, background=color, backgroundcolor=lightgray, foregroundcolor=, foregroundstyle=] \setupenumerations [before={\blank}, after={\blank}, alternative=top, title=yes, titleleft={}, titleright={}, titlestyle=bold, width=broad] \defineenumeration [exercice] [text=Exercice, number=yes, numbercommand=\groupedcommand{}{.}, style=italic] \defineenumeration [solution] [text=Solution, headcommand=\ACFRAME, number=no, numbercommand=\groupedcommand{}{}, style=normal] \starttext \startexercice{Le nombre d'or est irrationnel} Le nombre d'or, noté \m{\phi}, est tel que \m{\phi=\dfrac{1+\sqrt{5}}{2}}. Montrer que \m{\phi} est irrationnel. \stopexercice \startsolution Nous raisonnons par l'absurde en supposant que \m{\phi} est rationnel. \stopsolution \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Adjust the length of a frame
Le lun. 26 juil. 2021 à 13:13, Fabrice Couvreur a écrit : > Hello, > Following on from my previous questions for writing my book (thanks again > Wolfgang), I have to create a solution environment like the attached image. > My problem is adjusting the length of the frame. > Thank you. > Fabrice > > \setupbodyfont[newcomputermodern-book,11pt] > > \defineframed >[ACFRAME] >[frame=off, > width=fit, > align=flushleft, > location=low, > background=color, > backgroundcolor=lightgray, > foregroundcolor=, > foregroundstyle=] > > > \setupenumerations > [before={\blank}, >after={\blank}, >alternative=top, >title=yes, >titleleft={}, >titleright={}, >titlestyle=bold, >width=broad] > > \defineenumeration >[exercice] >[text=Exercice, > number=yes, > numbercommand=\groupedcommand{}{.}, > style=italic] > > \defineenumeration >[solution] >[text=Solution, > headcommand=\ACFRAME, > number=no, > numbercommand=\groupedcommand{}{}, > style=normal] > > \starttext > > \startexercice{Le nombre d'or est irrationnel} > Le nombre d'or, noté \m{\phi}, est tel que > \m{\phi=\dfrac{1+\sqrt{5}}{2}}. Montrer que \m{\phi} est irrationnel. > \stopexercice > > \startsolution > Nous raisonnons par l'absurde en supposant que \m{\phi} est rationnel. > \stopsolution > > \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Texte source 30 / 5000 Résultats de traduction Adjust the length of a frame
Hello, Following on from my previous questions for writing my book (thanks again Wolfgang), I have to create a solution environment like the attached image. My problem is adjusting the length of the frame. Thank you. Fabrice \setupbodyfont[newcomputermodern-book,11pt] \defineframed [ACFRAME] [frame=off, width=fit, align=flushleft, location=low, background=color, backgroundcolor=lightgray, foregroundcolor=, foregroundstyle=] \setupenumerations [before={\blank}, after={\blank}, alternative=top, title=yes, titleleft={}, titleright={}, titlestyle=bold, width=broad] \defineenumeration [exercice] [text=Exercice, number=yes, numbercommand=\groupedcommand{}{.}, style=italic] \defineenumeration [solution] [text=Solution, headcommand=\ACFRAME, number=no, numbercommand=\groupedcommand{}{}, style=normal] \starttext \startexercice{Le nombre d'or est irrationnel} Le nombre d'or, noté \m{\phi}, est tel que \m{\phi=\dfrac{1+\sqrt{5}}{2}}. Montrer que \m{\phi} est irrationnel. \stopexercice \startsolution Nous raisonnons par l'absurde en supposant que \m{\phi} est rationnel. \stopsolution \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with \dfrac{}{} with lmtx updated
On 12/24/2020 4:37 PM, Fabrice Couvreur wrote: Hi, I just updated lmtx and I don't understand the error that occurs with the \dfrac{}{}. Thank you. Fabrice # \starttext \m{f(x)=\dfrac{a + b\ln(x)}{x}} \stoptext # tex error > tex error on line 2 in file ./hans_21.tex: Math error: parameter 'fractionnumup' in style 2 is not set \math_m_nop #1->\relax \ifmmode #1\else \normalstartimath #1\normalstopimath \fi \m{f(x)=\dfrac{a + b\ln(x)}{x}} 1 \starttext 2 >> \m{f(x)=\dfrac{a + b\ln(x)}{x}} 3 \stoptext Sorry, but I can't typeset math unless various parameters have been set. This is normally done by loading special math fonts into the math family slots. Your font set is lacking at least the parameter mentioned earlier. strange .. it works here ... i'll remake bins on the compile farm, maybe something went wrong Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Problem with \dfrac{}{} with lmtx updated
Hi, I just updated lmtx and I don't understand the error that occurs with the \dfrac{}{}. Thank you. Fabrice # \starttext \m{f(x)=\dfrac{a + b\ln(x)}{x}} \stoptext # tex error > tex error on line 2 in file ./hans_21.tex: Math error: parameter 'fractionnumup' in style 2 is not set \math_m_nop #1->\relax \ifmmode #1\else \normalstartimath #1\normalstopimath \fi \m{f(x)=\dfrac{a + b\ln(x)}{x}} 1 \starttext 2 >> \m{f(x)=\dfrac{a + b\ln(x)}{x}} 3 \stoptext Sorry, but I can't typeset math unless various parameters have been set. This is normally done by loading special math fonts into the math family slots. Your font set is lacking at least the parameter mentioned earlier. mtx-context | fatal error: return code: 256 TeX Output exited abnormally with code 1 at Thu Dec 24 16:30:13 ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Fwd: Continued fractions in ConTeXt
I've just tested it and it looks w a y better than before (thanks!). Btw, where could I read about key-value pairs for ConTeXt fractions (\definemathfraction)? I've seen keys like "threshold" and other weird ones in the command list, so I ask about a reference (maybe somewhere in a manual; the Garden doesn't say a lot about it). Thank you very much. Sincerely, Jairo :) El lun., 29 de jun. de 2020 a la(s) 09:51, Hans Hagen (j.ha...@xs4all.nl) escribió: > On 6/28/2020 6:06 PM, Jairo A. del Rio wrote: > > |Hi list! I've tried adapting the following code for continued > fractions:| > > || > > > > |% > https://tex.stackexchange.com/questions/73195/how-to-typeset-a-continued-fraction-in-the-following-format > > > \documentclass{article}\usepackage{amsmath}\begin{document}\newcommand*{\cofrac}[2]{%{%\rlap{$\dfrac{1}{\phantom{#1}}$}%\genfrac{}{}{0pt}{0}{}{#1+#2}%}%}\[a_0 > > > + > > > \cofrac{a_1}{\cofrac{a_2}{\cofrac{a_3}{\genfrac{}{}{0pt}{0}{}{\ddots\]\end{document} > > > > | > > > > |As I could read from the mailing list, ConTeXt no longer supports > > \genfrac, so I've tried > > | > > > > |the following using \definemathfraction > > > > \definemathfraction[gefrac][cfrac] > > \setupmathfraction[gefrac][rule=no] > > \def\cofrac#1#2{% > >{% > > \rlap{\cfrac{1}{\displaystyle\phantom{#1}}}% > > \gefrac{}{\displaystyle\gefrac{#1+}{}#2}% > >}% > > } > > \def\cofracnorule#1#2{% > > {% > > \rlap{\gefrac{\displaystyle\phantom{1}}{\displaystyle\phantom{#1}}}% > > \gefrac{}{\displaystyle\gefrac{#1}{}#2}% > > }% > > } > > \def\endfrac#1{\cofracnorule{#1}{\phantom{1}}} > > \startTEXpage > > \startplacefigure[location=force,number=no] > > \externalfigure[cofrac.png] > > \stopplacefigure > > \startformula > > \alpha + > > > \cofrac{\alpha'}{\cofrac{\alpha''}{\cofrac{\alpha'''}{{\endfrac{\ddots} > > \frac{1}{\alpha'''} > > \stopformula > > \stopTEXpage > > > > | > > > > |Mmm, superscripts and fraction rules superpose, so indeed something is > > wrong. Any ideas or references to a better result? > > | > In the next version this will look okay: > > \definemathfraction >[gefrac] >[d:frac] > > \setupmathfraction >[gefrac] >[mathstyle=display, > alternative=inner, > rule=hidden] > > \unexpanded\def\cofrac#1#2{% > \rlap{\cfrac{1}{\phantom{#1}}}% > \gefrac{}{\gefrac{#1+}{}#2}% > } > > \unexpanded\def\endfrac#1{% > \rlap{\phantom{\cfrac{1}{#1}}}% > \gefrac{}{#1}% > } > > \starttext > > \startTEXpage > \startformula \showmakeup[kern] > \alpha > + > \cofrac {\alpha'} > {\cofrac {\alpha''} > {\cofrac {\alpha'''} > {\endfrac {\ddots > + > \frac{1}{\alpha'''} > \stopformula > \stopTEXpage > > \stoptext > > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Fwd: Continued fractions in ConTeXt
On 6/28/2020 6:06 PM, Jairo A. del Rio wrote: |Hi list! I've tried adapting the following code for continued fractions:| || |%https://tex.stackexchange.com/questions/73195/how-to-typeset-a-continued-fraction-in-the-following-format \documentclass{article}\usepackage{amsmath}\begin{document}\newcommand*{\cofrac}[2]{%{%\rlap{$\dfrac{1}{\phantom{#1}}$}%\genfrac{}{}{0pt}{0}{}{#1+#2}%}%}\[a_0 + \cofrac{a_1}{\cofrac{a_2}{\cofrac{a_3}{\genfrac{}{}{0pt}{0}{}{\ddots\]\end{document} | |As I could read from the mailing list, ConTeXt no longer supports \genfrac, so I've tried | |the following using \definemathfraction \definemathfraction[gefrac][cfrac] \setupmathfraction[gefrac][rule=no] \def\cofrac#1#2{% {% \rlap{\cfrac{1}{\displaystyle\phantom{#1}}}% \gefrac{}{\displaystyle\gefrac{#1+}{}#2}% }% } \def\cofracnorule#1#2{% {% \rlap{\gefrac{\displaystyle\phantom{1}}{\displaystyle\phantom{#1}}}% \gefrac{}{\displaystyle\gefrac{#1}{}#2}% }% } \def\endfrac#1{\cofracnorule{#1}{\phantom{1}}} \startTEXpage \startplacefigure[location=force,number=no] \externalfigure[cofrac.png] \stopplacefigure \startformula \alpha + \cofrac{\alpha'}{\cofrac{\alpha''}{\cofrac{\alpha'''}{{\endfrac{\ddots} \frac{1}{\alpha'''} \stopformula \stopTEXpage | |Mmm, superscripts and fraction rules superpose, so indeed something is wrong. Any ideas or references to a better result? | In the next version this will look okay: \definemathfraction [gefrac] [d:frac] \setupmathfraction [gefrac] [mathstyle=display, alternative=inner, rule=hidden] \unexpanded\def\cofrac#1#2{% \rlap{\cfrac{1}{\phantom{#1}}}% \gefrac{}{\gefrac{#1+}{}#2}% } \unexpanded\def\endfrac#1{% \rlap{\phantom{\cfrac{1}{#1}}}% \gefrac{}{#1}% } \starttext \startTEXpage \startformula \showmakeup[kern] \alpha + \cofrac {\alpha'} {\cofrac {\alpha''} {\cofrac {\alpha'''} {\endfrac {\ddots + \frac{1}{\alpha'''} \stopformula \stopTEXpage \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Fwd: Continued fractions in ConTeXt
Hi list! I've tried adapting the following code for continued fractions: %https://tex.stackexchange.com/questions/73195/how-to-typeset-a-continued-fraction-in-the-following-format \documentclass{article}\usepackage{amsmath} \begin{document}\newcommand*{\cofrac}[2]{% {% \rlap{$\dfrac{1}{\phantom{#1}}$}% \genfrac{}{}{0pt}{0}{}{#1+#2}% }%}\[ a_0 + \cofrac{a_1}{ \cofrac{a_2}{ \cofrac{a_3}{ \genfrac{}{}{0pt}{0}{}{\ddots} }}}\]\end{document} As I could read from the mailing list, ConTeXt no longer supports \genfrac, so I've tried the following using \definemathfraction \definemathfraction[gefrac][cfrac] \setupmathfraction[gefrac][rule=no] \def\cofrac#1#2{% {% \rlap{\cfrac{1}{\displaystyle\phantom{#1}}}% \gefrac{}{\displaystyle\gefrac{#1+}{}#2}% }% } \def\cofracnorule#1#2{% {% \rlap{\gefrac{\displaystyle\phantom{1}}{\displaystyle\phantom{#1}}}% \gefrac{}{\displaystyle\gefrac{#1}{}#2}% }% } \def\endfrac#1{\cofracnorule{#1}{\phantom{1}}} \startTEXpage \startplacefigure[location=force,number=no] \externalfigure[cofrac.png] \stopplacefigure \startformula \alpha + \cofrac{\alpha'}{\cofrac{\alpha''}{\cofrac{\alpha'''}{{\endfrac{\ddots} \frac{1}{\alpha'''} \stopformula \stopTEXpage Mmm, superscripts and fraction rules superpose, so indeed something is wrong. Any ideas or references to a better result? I've attached the expected result (it's from Legendre's Théorie des nombres) and a normal fraction for comparison. Thank you very much. Jairo :) fraccioncontinualegendre.pdf Description: Adobe PDF document ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] page break
le nombre dérivé \m{h'(x)} est égal à \m{-2}. \stopitem \blank \startitem {\bi Affirmation 4 :} La valeur exacte de la somme des 12 premiers termes de la suite géométrique \m{\left(u_n\right)} de premier terme \m{4} et de raison \m{\dfrac{1}{3}} est : \startformula 6\left(1-\left(\frac{1}{3}\right)^{13}\right) \stopformula \stopitem \stopitemize \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Fwd: Re: The binomial coefficients do not look optimal
On Sat, Sep 2, 2017 at 6:36 PM, Hans Hagen <pra...@wxs.nl> wrote: > > > > Forwarded Message > Subject: Re: [NTG-context] The binomial coefficients do not look optimal > Date: Sat, 2 Sep 2017 18:35:53 +0200 > From: Hans Hagen <pra...@wxs.nl> > To: Mikael P. Sundqvist <mic...@gmail.com> > > On 9/2/2017 4:58 PM, Mikael P. Sundqvist wrote: > >> On Fri, Sep 1, 2017 at 7:49 PM, Hans Hagen <pra...@wxs.nl > pra...@wxs.nl>> wrote: >> >> On 9/1/2017 1:56 PM, Mikael P. Sundqvist wrote: >> >> 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 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 to look better. In particular I am concerned about >> the rather big parenthesis in displaystyle (and not so much >> about the vertical space issue in \tbinom). >> >> /Mikael >> >> PS The result looked better if I used the lucida fonts, if that >> helps. >> >> This is indeed font dependent. These binoms use a low level tex >> primitive that uses a threshold for steps and that one is part of >> the math parameters of a font and these are not that good for lm. As >> I'm looking into some other low level side effect I was in the mood >> for a configuration option for \setupmathfractions. >> >> So, in the next beta you can get the effects iof the attached: >> >> - relate the threshold to the bodyfont size >> - use normal left/right fences instead >> >> fwiw, cambria and pagella look better too. Upto you to wikify it. >> >> Hans >> >> - >>Hans Hagen | PRAGMA ADE >>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >> tel: 038 477 53 69 | www.pragma-ade.nl >> <http://www.pragma-ade.nl> | www.pragma-pod.nl >> <http://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 <mailto:ntg-context@ntg.nl> / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> <http://www.ntg.nl/mailman/listinfo/ntg-context> >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> <https://bitbucket.org/phg/context-mirror/commits/> >> wiki : http://contextgarden.net >> >> ___ >> >> >> Thank you very much, I'm looking forward to the next beta, and I will try >> to wikify it when I have tried it out. Also lucida looks better than latin >> modern does at the moment. >> >> I am a bit confused about the different versions. I would have guessed >> that there was \tbinom and \dbinom and that \binom used one of them >> depending on if one is in text mode or in display mode (just as I would >> expect \frac to behave like \tfrac in text mode and \dfrac in display >> mode). But \tbinom looks very different from \binom in text mode (with more >> vertical space). Is this on purpose? Have I missed something? >> > One can configure those things but the absense of rules and presence of > fences matters too (all kind of inter-this-or-that and > above-below-this-or-that playts a role). > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
[NTG-context] Fwd: Re: The binomial coefficients do not look optimal
Forwarded Message Subject: Re: [NTG-context] The binomial coefficients do not look optimal Date: Sat, 2 Sep 2017 18:35:53 +0200 From: Hans Hagen <pra...@wxs.nl> To: Mikael P. Sundqvist <mic...@gmail.com> On 9/2/2017 4:58 PM, Mikael P. Sundqvist wrote: On Fri, Sep 1, 2017 at 7:49 PM, Hans Hagen <pra...@wxs.nl <mailto:pra...@wxs.nl>> wrote: On 9/1/2017 1:56 PM, Mikael P. Sundqvist wrote: 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 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 to look better. In particular I am concerned about the rather big parenthesis in displaystyle (and not so much about the vertical space issue in \tbinom). /Mikael PS The result looked better if I used the lucida fonts, if that helps. This is indeed font dependent. These binoms use a low level tex primitive that uses a threshold for steps and that one is part of the math parameters of a font and these are not that good for lm. As I'm looking into some other low level side effect I was in the mood for a configuration option for \setupmathfractions. So, in the next beta you can get the effects iof the attached: - relate the threshold to the bodyfont size - use normal left/right fences instead fwiw, cambria and pagella look better too. Upto you to wikify it. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl> | www.pragma-pod.nl <http://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 <mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context> webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/> wiki : http://contextgarden.net ___ Thank you very much, I'm looking forward to the next beta, and I will try to wikify it when I have tried it out. Also lucida looks better than latin modern does at the moment. I am a bit confused about the different versions. I would have guessed that there was \tbinom and \dbinom and that \binom used one of them depending on if one is in text mode or in display mode (just as I would expect \frac to behave like \tfrac in text mode and \dfrac in display mode). But \tbinom looks very different from \binom in text mode (with more vertical space). Is this on purpose? Have I missed something? One can configure those things but the absense of rules and presence of fences matters too (all kind of inter-this-or-that and above-below-this-or-that playts a role). Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] The binomial coefficients do not look optimal
On Fri, Sep 1, 2017 at 7:49 PM, Hans Hagen <pra...@wxs.nl> wrote: > On 9/1/2017 1:56 PM, Mikael P. Sundqvist wrote: > >> 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 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 to >> look better. In particular I am concerned about the rather big parenthesis >> in displaystyle (and not so much about the vertical space issue in \tbinom). >> >> /Mikael >> >> PS The result looked better if I used the lucida fonts, if that helps. >> > This is indeed font dependent. These binoms use a low level tex primitive > that uses a threshold for steps and that one is part of the math parameters > of a font and these are not that good for lm. As I'm looking into some > other low level side effect I was in the mood for a configuration option > for \setupmathfractions. > > So, in the next beta you can get the effects iof the attached: > > - relate the threshold to the bodyfont size > - use normal left/right fences instead > > fwiw, cambria and pagella look better too. Upto you to wikify it. > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > Thank you very much, I'm looking forward to the next beta, and I will try to wikify it when I have tried it out. Also lucida looks better than latin modern does at the moment. I am a bit confused about the different versions. I would have guessed that there was \tbinom and \dbinom and that \binom used one of them depending on if one is in text mode or in display mode (just as I would expect \frac to behave like \tfrac in text mode and \dfrac in display mode). But \tbinom looks very different from \binom in text mode (with more vertical space). Is this on purpose? Have I missed something? /Mikael ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Strange behavior with enumeration
Hi, Level two items are not on the same baseline. Thank you Fabrice \starttext \startitemize[n] \item 15\,\% d'un stock de 12\,000 jouets sont des jouets \quotation{1\high{\tfxx er} âge}. Le nombre de jouets \quotation{1\high{\tfxx er} âge} est : \startitemize[columns,a,three] \item \math{\dfrac{15}{100}\times 12\,000.} \item \math{1\,500.} \item \math{1\,800.} \stopitemize \stopitemize \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Bug with Enumeration and \dfrac{}{} with Standalone ?
Hello, I am posting again on the same subject but with more precision. I use Standalone Context in its latest version. We can observe that the alignment is not correct with \dfrac{}{} but it is with {}\ over{}. But if I use Texlive 2016 there are no problems. Thank you Fabrice # \starttext \startitemize[n][stopper={.},style=bold,color=darkred] \item Soit \math{f} la fonction définie pour tout réel \m{x} différent de \m{-1} par \math{f(x)=\dfrac{x+2}{x+1}} et \math{\cal C} sa courbe représentative dans un repère du plan. \startitemize[a][stopper={.},style=bold,color=darkred] \item L'image de 3 par la fonction \math{f} est : \startitemize[i,columns,joinedup,three] [stopper={.},style=bold,color=darkred,grid=line] \item \math{{14}\over {3}} \item \math{{5}\over {4}} \item \math{2} \stopitemize \startitemize[i,columns,joinedup,three] [stopper={.},style=bold,color=darkred,grid=line] \item \math{\dfrac{14}{3}} \item \math{\dfrac{5}{4}} \item \math{2} \stopitemize \stopitemize \stopitemize # ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Strange behavior with Enumerations
Hello, I just updated Context Standalone, but the problem still exists. With Texlive Context, it works. Fabrice Le 8 mai 2017 à 12:27, Fabrice Couvreur <fabrice1.couvr...@gmail.com> a écrit : > Hello, > The alignment of the third level is incorrect, why ? > > ## > \starttext > > \startitemize[n][stopper={.},style=bold,color=darkred] > >\item Soit \math{f} la fonction définie pour tout réel \m{x} différent > de \m{-1} par \math{f(x)=\dfrac{x+2}{x+1}} et \math{\cal C} sa courbe > représentative dans un repère du plan. > \startitemize[a][stopper={.},style=bold,color=darkred] >\item L'image de 3 par la fonction \math{f} est : > > \startitemize[i,columns,joinedup,pack,1*broad,three] > [stopper={.},style=bold,color=darkred,grid=line] > > \item \math{\dfrac{14}{3}} > > \item \math{\dfrac{5}{4}} > > \item \math{2} > > \stopitemize > \stopitemize > \stopitemize > > > \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Strange behavior with Enumerations
Hello, The alignment of the third level is incorrect, why ? ## \starttext \startitemize[n][stopper={.},style=bold,color=darkred] \item Soit \math{f} la fonction définie pour tout réel \m{x} différent de \m{-1} par \math{f(x)=\dfrac{x+2}{x+1}} et \math{\cal C} sa courbe représentative dans un repère du plan. \startitemize[a][stopper={.},style=bold,color=darkred] \item L'image de 3 par la fonction \math{f} est : \startitemize[i,columns,joinedup,pack,1*broad,three] [stopper={.},style=bold,color=darkred,grid=line] \item \math{\dfrac{14}{3}} \item \math{\dfrac{5}{4}} \item \math{2} \stopitemize \stopitemize \stopitemize \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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Math fractions
Something is wrong in the current implmentation of \tfrac. If we take away all the bells and whistles provided by \definemathfraction, * \tfrac#1#2 should be equal to {\textstyle #2 \over #1} * \dfrac#1#2 should be equal to {\displaystyle #2 \over #1} * \frac should be equal to \tfrac in inline math and \dfrac in display math. In the current implmentation \frac works correctly, but \tfrac does not. For example: \startbuffer \frac 12 \tfrac 12 \dfrac 12 \stopbuffer \starttext $\getbuffer$ \startformula \getbuffer \stopformula \stoptext The output of \frac and \dfrac is correct in both inline and display mode. The output of \tfrac is wrong in both modes. In both modes, \tfrac should equal the current output of \frac in inline mode. Although I don't completely understand the code, my guess is that there is a bug in how mathstyle=text is implemented (really, mathstyle=text should be equivalent to mathstyle=empty in inline math mode). Thanks, 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 ___
Re: [NTG-context] Alignment on the baseline in a itemize environment with \dfrac{}{}
Hi Wolfgang, Thank you for these three solutions. One thing I'm missing is the role of grid I did not know. Fabrice ___ 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 ___
Re: [NTG-context] Alignment on the baseline in a itemize environment with \dfrac{}{}
Am 22.03.2015 um 13:10 schrieb Fabrice Couvreur fabrice1.couvr...@gmail.com: The alignment of the second item on the baseline is not correct if I use the command \dfrac{}{}. How to solve this problem without using the command \framed ? Best regards, Fabrice \starttext \startitemize[columns,A,joinedup,three][stopper={)},style=bold] \item $f^{\prime}(x) = \dfrac{- 1}{(x + 1)^2}$ \item $f^{\prime}(x) = 1$ \item $f^{\prime}(x) = \dfrac{1}{x + 1}$ \stopitemize \stoptext 1. You change your formulas. \starttext \startitemize[columns,A,joinedup,three][stopper={)},style=bold,grid=line] \item $f^{\prime}(x) = - 1 / (x + 1)^2$ \item $f^{\prime}(x) = 1$ \item $f^{\prime}(x) = 1 / (x + 1)$ \stopitemize \stoptext 2. You enable grid snapping for the columns in the itemize environment with the grid key. \starttext \startitemize[columns,A,joinedup,three][stopper={)},style=bold,grid=line] \item $f^{\prime}(x) = \dfrac{- 1}{(x + 1)^2}$ \item $f^{\prime}(x) = 1$ \item $f^{\prime}(x) = \dfrac{1}{x + 1}$ \stopitemize \stoptext 3. You increase the line height for the columns in the itemize environment. \setupmixedcolumns[itemgroupcolumns][before={\setupinterlinespace[big]}] \starttext \startitemize[columns,A,joinedup,three][stopper={)},style=bold] \item $f^{\prime}(x) = \dfrac{- 1}{(x + 1)^2}$ \item $f^{\prime}(x) = 1$ \item $f^{\prime}(x) = \dfrac{1}{x + 1}$ \stopitemize \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 ___
[NTG-context] Alignment on the baseline in a itemize environment with \dfrac{}{}
The alignment of the second item on the baseline is not correct if I use the command \dfrac{}{}. How to solve this problem without using the command \framed ? Best regards, Fabrice \starttext \startitemize[columns,A,joinedup,three][stopper={)},style=bold] \item $f^{\prime}(x) = \dfrac{- 1}{(x + 1)^2}$ \item $f^{\prime}(x) = 1$ \item $f^{\prime}(x) = \dfrac{1}{x + 1}$ \stopitemize \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 ___
Re: [NTG-context] numerator is too high in \frac{3}{4}, in palatino
Hans Hagen pra...@wxs.nl writes: these are font properties and using a consistent opentype math versus a bunch of loosely related type one fonts makes a difference But shouldn't TeXGyrePagellaMath qualify? I've added: \starttext $\displaystyle 1+{2g\over3}+{2\over3}$ \blank \setupmathfractions[topdistance=0pt] $\displaystyle 1+{2g\over3}+{2\over3}$ \blank \setupmathfractions[bottomdistance=0pt] $\displaystyle 1+{2g\over3}+{2\over3}$ \blank \setupmathfractions[topdistance=0pt,bottomdistance=0pt] $\displaystyle 1+{2g\over3}+{2\over3}$ \blank \stoptext Thanks, Hans. That is very useful. I also recompiled my textbook draft using the latest beta (2014.05.17), and it works very well. I tried the topdistance and bottomdistance and they are mostly working. To my eye, with topdistance=6pt, the {1\over2} looks very good again. However, the settings don't seem to affect fractions inside square roots. Here's an example (the 20pt setting is to exaggerate the possible effect), using 2014.05.17 beta. \starttext \placeformula\startformula \dfrac{ag}{bcd}\quad{ag\over bcd} \stopformula \placeformula\startformula \sqrt{1\over \dfrac{a}{bcd}} \quad \sqrt{\dfrac{1}{\dfrac{a}{bcd}}} \stopformula \setupmathfractions [topdistance=20pt] \placeformula\startformula \dfrac{ag}{bcd}\quad{ag\over bcd} \stopformula \placeformula\startformula \sqrt{1\over \dfrac{a}{bcd}} \quad \sqrt{\dfrac{1}{\dfrac{a}{bcd}}} \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 ___
[NTG-context] Table next to a text in an environment of type list
Hi, How to improve this code to make the table to the right of the text in the environment list ? \midaligned{\tfb Cadres en entreprise} \blank On compte 67 femmes dans une entreprise de 160 personnes. Parmi les personnes de cette entreprise, il y a 32 cadres dont 15 femmes. \startitemize[n][stopper=),style=bold] \item Recopier le tableau ci-contre. \startitemize[n][stopper=),style=bold] \setuphanging[location=right] \starthanging{% \bTABLE[align={middle,lohi}] \bTR\bTD {} \eTD \bTD {\bf Femmes} \eTD \bTD {\bf Hommes} \eTD \bTD {\bf Total} \eTD \eTR \bTR \bTD {\bf Cadres} \eTD \bTD {15} \eTD \bTD {} \eTD \bTD {32} \eTD \bTR \bTD {\bf Autres employés} \eTD \bTD {} \eTD \bTD {} \eTD \bTD {} \eTD \eTR \bTR \bTD {\bf Total} \eTD \bTD {67} \eTD \bTD {} \eTD \bTD 160{} \eTD \eTR \eTABLE} \stophanging \item Parmi les 160 personnes de cette entreprise, on en choisit une au hasard. On considère les événements suivants : \startitemize[2] \item F : \quotation{la personne choisie est une femme} ; \item C : \quotation{la personne choisie est un cadre}. \stopitemize \startitemize[a][stopper=),style=bold] \item Définir par une phrase les événements \math{\overline{C}}, \math{F \cap C} et \math{F\cap\overline{C}}. \item Calculer les probabilités \math{P(F)}, \math{P(C)}, \math{P(\overline{C})}, \math{P(F \cap C)} et \math{P(F \cap \overline{C})}. \stopitemize \item \startitemize[a][stopper=),style=bold] \item La personne choisie est un cadre de l'entreprise. Quelle est la probabilité que ce soit une femme ? {\it On note \math{P_{C}(F)} cette probabilité.} \item Calculer \math{\dfrac{P(F \cap C)}{P(C)}}. Que constate-t-on ? \stopitemize \item \startitemize[a][stopper=),style=bold] \item On choisit une femme parmi les personnes de l'entreprise. Quelle est la probabilité qu'elle soit cadre ? {\it On note \math{P_{F}(C)} cette probabilité.} \item Exmpliquer pourquoi on obtient le résultat de la question précédente en calculant \math{\dfrac{P(C \cap F)}{P(F)}}. \stopitemize \item Que représentent en termes de probabilités les quotients \math{\dfrac{52}{67}} et \math{\dfrac{52}{128}} ? \stopitemize \stoptext Regards, Fabrice ___ 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 ___
Re: [NTG-context] Math typesetting problems
On 1/29/2013 12:20 AM, Khaled Hosny wrote: On Mon, Jan 28, 2013 at 09:33:52PM +0100, Wolfgang Schuster wrote: The \frac command uses \vcenter for the content while \dfrac and \tfrac only set the mathstyle before placing the content with the \over primitive. The use of \vcenter seems odd here as it means the fraction rule will no longer guranteed to be centered around the math axis: \starttext \math{-\frac{a^{2^{2^2}}}{a} {a^{2^{2^2}}\over a}} \stoptext Also, why \frac is forcing text style fractions even in display mode? \starttext \startformula -\frac{a^{2^{2^2}}}{a} {a^{2^{2^2}}\over a} \stopformula \stoptext Both behaviours are different from MkII. I redid the mkiv code ... configurable, defineable, inheritable ... the whole lot \starttext \definemathfraction[myfrac] [mathstyle=script] \definemathfraction[myfracx][mathstyle=script,alternative=outer] \startformula {a^{2^{2^2}}\over a} \frac{a^{2^{2^2}}}{a} \frac{a^{2}}{b} \myfrac{a^{2}}{b} \myfracx{a^{2}}{b} \stopformula \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Math typesetting problems
Indeed it seems like the alignment is good with \dfrac, but this does not solve my problem, since I wish to also use fractions with script-size or scriptscript-size (\xfrac, \xxfrac). The specific formula I have is \startformula f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) + U(t-s)) + \frac{(S(u-t) + U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}} \stopformula Thanks, Janne Roland wrote: With \dfrac it looks good. With \fraction the minus sign is on the top of the fraction. Best regards, Roland ___ 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 ___
Re: [NTG-context] Math typesetting problems
Le 28 janv. 13 à 10:11, Janne Junnila a écrit : Indeed it seems like the alignment is good with \dfrac, but this does not solve my problem, since I wish to also use fractions with script-size or scriptscript-size (\xfrac, \xxfrac). The specific formula I have is \startformula f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) + U(t-s)) + \frac{(S(u-t) + U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}} \stopformula Thanks, Janne OK ! So you need an expert, I'm just a newbie :) I would be interested to know how to do that. Best, Roland ___ 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 ___ ___ 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 ___
Re: [NTG-context] Math typesetting problems
On Mon, 28 Jan 2013, Roland Thiers wrote: Le 28 janv. 13 à 10:11, Janne Junnila a écrit : Indeed it seems like the alignment is good with \dfrac, but this does not solve my problem, since I wish to also use fractions with script-size or scriptscript-size (\xfrac, \xxfrac). The specific formula I have is \startformula f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) + U(t-s)) + \frac{(S(u-t) + U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}} \stopformula Thanks, Janne OK ! So you need an expert, I'm just a newbie :) I would be interested to know how to do that. Best, Roland I'll look into fractions later this week. All the fraction macros of ConTeXt were based on \genfrac macro from AMSTeX so, in principle, they should behave in the same manner. 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 ___
Re: [NTG-context] Math typesetting problems
Am 28.01.2013 um 20:41 schrieb Aditya Mahajan adit...@umich.edu: On Mon, 28 Jan 2013, Roland Thiers wrote: Le 28 janv. 13 à 10:11, Janne Junnila a écrit : Indeed it seems like the alignment is good with \dfrac, but this does not solve my problem, since I wish to also use fractions with script-size or scriptscript-size (\xfrac, \xxfrac). The specific formula I have is \startformula f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) + U(t-s)) + \frac{(S(u-t) + U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}} \stopformula Thanks, Janne OK ! So you need an expert, I'm just a newbie :) I would be interested to know how to do that. Best, Roland I'll look into fractions later this week. All the fraction macros of ConTeXt were based on \genfrac macro from AMSTeX so, in principle, they should behave in the same manner. The \frac command uses \vcenter for the content while \dfrac and \tfrac only set the mathstyle before placing the content with the \over primitive. 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 ___
Re: [NTG-context] Math typesetting problems
On Mon, 28 Jan 2013, Wolfgang Schuster wrote: I'll look into fractions later this week. All the fraction macros of ConTeXt were based on \genfrac macro from AMSTeX so, in principle, they should behave in the same manner. The \frac command uses \vcenter for the content while \dfrac and \tfrac only set the mathstyle before placing the content with the \over primitive. Then something has been lost in the MkII - MkIV transition. I am pretty sure (cannot check right now), that the code in MkII used \genfrac (which is a fancy wrapper around \over \ovewithdelim etc) 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 ___
Re: [NTG-context] Math typesetting problems
Hi Janne, Personnally I prefer to use the Plain TeX alternative \over (which works fine in ConTeXt), that is ${a \over b}$ instead of $\frac{a}{b}$ Compare the following two outputs in the example you want to typeset: I think the second is more or less what you want \starttext Using \type{\frac} gives: \startformula f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) + U(t-s)) + \frac{(S(u-t) + U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}} \stopformula \blank Using \type{\over} gives: \startformula f_{B_t | B_s = S, B_u = U}(x) = { e^{-{(u-s)x^2 - 2x(S(u-t) + U(t-s)) + {(S(u-t) + U(t-s))^2 \over (u-s)} \over 2(t-s)(u-t)}} \over \sqrt{2\pi {(t-s)(u-t) \over u-s}}} \stopformula \stoptext Best regards: OK On 28 janv. 2013, at 10:11, Janne Junnila janne.junn...@gmail.com wrote: Indeed it seems like the alignment is good with \dfrac, but this does not solve my problem, since I wish to also use fractions with script-size or scriptscript-size (\xfrac, \xxfrac). The specific formula I have is \startformula f_{B_t | B_s = S, B_u = U}(x) = \frac{e^{-\frac{(u-s)x^2 - 2x(S(u-t) + U(t-s)) + \frac{(S(u-t) + U(t-s))^2}{(u-s)}}{2(t-s)(u-t)}}}{\sqrt{2\pi\frac{(t-s)(u-t)}{u-s}}} \stopformula Thanks, Janne Roland wrote: With \dfrac it looks good. With \fraction the minus sign is on the top of the fraction. Best regards, Roland ___ 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 ___ ___ 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 ___
Re: [NTG-context] Math typesetting problems
Am 28.01.2013 um 21:48 schrieb Aditya Mahajan adit...@umich.edu: On Mon, 28 Jan 2013, Wolfgang Schuster wrote: I'll look into fractions later this week. All the fraction macros of ConTeXt were based on \genfrac macro from AMSTeX so, in principle, they should behave in the same manner. The \frac command uses \vcenter for the content while \dfrac and \tfrac only set the mathstyle before placing the content with the \over primitive. Then something has been lost in the MkII - MkIV transition. I am pretty sure (cannot check right now), that the code in MkII used \genfrac (which is a fancy wrapper around \over \ovewithdelim etc) Yes, MkII uses \genfrac but in MkIV the command is no longer available and all fraction commands have been rewritten. 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 ___
Re: [NTG-context] Math typesetting problems
On Mon, Jan 28, 2013 at 09:33:52PM +0100, Wolfgang Schuster wrote: The \frac command uses \vcenter for the content while \dfrac and \tfrac only set the mathstyle before placing the content with the \over primitive. The use of \vcenter seems odd here as it means the fraction rule will no longer guranteed to be centered around the math axis: \starttext \math{-\frac{a^{2^{2^2}}}{a} {a^{2^{2^2}}\over a}} \stoptext Also, why \frac is forcing text style fractions even in display mode? \starttext \startformula -\frac{a^{2^{2^2}}}{a} {a^{2^{2^2}}\over a} \stopformula \stoptext Both behaviours are different from MkII. Regards, Khaled ___ 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 ___
Re: [NTG-context] Math typesetting problems
Le 27 janv. 13 à 12:52, Janne Junnila a écrit : Hi all, Another problem I have is related to the positioning of minus signs in front of fractions. I would expect the minus sign to align with the horizontal line of the fraction, as it does on LaTeX. Below is an example formula to illustrate my point. The result seems to be independent of the font in use. \startformula -\frac{e^{\frac{4}{5}}}{4} \stopformula Janne Hi Janne, With \dfrac it looks good. With \fraction the minus sign is on the top of the fraction. Best regards, Roland ___ 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 ___ ___ 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 ___
Re: [NTG-context] Context and metapost: using \frac
Am 26.04.2011 um 13:36 schrieb Matthieu Stigler: Le 26/04/2011 12:36, Hans Hagen a écrit : On 26-4-2011 12:02, Matthieu Stigler wrote: Dear Hans Thanks for your quick answer! I was however not able to produce the graph with the textext code... Should I actually then use another compiler? I tried with context and texexec (I thought texexec is the compiler for mkiv, right? I'm on linux ubuntu). no, use the 'context' command as texexec is for mkii ok, so I was using the right compiler I get a mystake while trying to compile a file with the code you sent... you didn't? Would you be so nice and send complete file, so I can check what is wrong? I saw also that, as you mention, context has a \frac: http://wiki.contextgarden.net/Math_with_newmat indeed, \frac is already there for a long time (ams compatible command) btw, in mkiv there is no m-newmath I tried then to simply add \usemodule[newmat] and compile with context, but did not work... Code below, error message below below... ! Math error: parameter \Umathfraction_del_size\displaystyle is not set. l.3 ...t{411}{$\displaystyle \frac {\sigma _t}{a}$ } inserted text ...ore.mp ; fi ; ;;;]===], false)} make sure that a font is loaded that has math before \starttext is seen (try with \setupbodyfont[palatino] at the top of your file) this does not work neither I still get error message with this code: \usemodule[newmat] \setupbodyfont[palatino] \starttext \startMPpage label.top(textext($ \frac{\sigma_t}{a}$) scaled 1.00, (1, 1)); %label.top(btex $ \frac{\sigma_t}{a}$ etex, (0, 10)); %label.top(textext( $\displaystyle \frac{\sigma_t}{a}$ ) scaled 1.00, (1, 1)); \stopMPpage \stoptext Hi, this works for me. \setupbodyfont[palatino] \startMPpage[offset=1ex] u := cm ; label.top(textext($ \frac{\sigma_t}{a}$) scaled 2, origin); label.top(textext($ \frac{\sigma_t}{a}$), (u,u)); label.top(textext($\dfrac{\sigma_t}{a}$) scaled .5, (u,0)); \stopMPpage Greeting Andreas ___ 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 ___
Re: [NTG-context] Context and metapost: using \frac
Le 26/04/2011 16:33, Andreas Harder a écrit : Am 26.04.2011 um 13:36 schrieb Matthieu Stigler: Le 26/04/2011 12:36, Hans Hagen a écrit : On 26-4-2011 12:02, Matthieu Stigler wrote: Dear Hans Thanks for your quick answer! I was however not able to produce the graph with the textext code... Should I actually then use another compiler? I tried with context and texexec (I thought texexec is the compiler for mkiv, right? I'm on linux ubuntu). no, use the 'context' command as texexec is for mkii ok, so I was using the right compiler I get a mystake while trying to compile a file with the code you sent... you didn't? Would you be so nice and send complete file, so I can check what is wrong? I saw also that, as you mention, context has a \frac: http://wiki.contextgarden.net/Math_with_newmat indeed, \frac is already there for a long time (ams compatible command) btw, in mkiv there is no m-newmath I tried then to simply add \usemodule[newmat] and compile with context, but did not work... Code below, error message below below... ! Math error: parameter \Umathfraction_del_size\displaystyle is not set. l.3 ...t{411}{$\displaystyle \frac {\sigma _t}{a}$ } inserted text ...ore.mp ; fi ; ;;;]===], false)} make sure that a font is loaded that has math before \starttext is seen (try with \setupbodyfont[palatino] at the top of your file) this does not work neither I still get error message with this code: \usemodule[newmat] \setupbodyfont[palatino] \starttext \startMPpage label.top(textext($ \frac{\sigma_t}{a}$) scaled 1.00, (1, 1)); %label.top(btex $ \frac{\sigma_t}{a}$ etex, (0, 10)); %label.top(textext( $\displaystyle \frac{\sigma_t}{a}$ ) scaled 1.00, (1, 1)); \stopMPpage \stoptext Hi, this works for me. \setupbodyfont[palatino] \startMPpage[offset=1ex] u := cm ; label.top(textext($ \frac{\sigma_t}{a}$) scaled 2, origin); label.top(textext($ \frac{\sigma_t}{a}$), (u,u)); label.top(textext($\dfrac{\sigma_t}{a}$) scaled .5, (u,0)); \stopMPpage Andreas Thanks for answer! Is this code you wrote supposed to be the whole doc to compile? And compiled with context? If yes, I got an error again... I have version context --version MTXrun | main context file: /usr/share/texmf/tex/context/base/context.tex MTXrun | current version: 2009.11.26 16:2 Is it likel;y then that the problem is solved in more recent versions? I would try to update then... I am on Ubuntu 10.10 64b, is there a simple way to update from other repos, or should I compile? Thanks for your help!!! Matthieu Greeting Andreas ___ 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 ___ ___ 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 ___
[NTG-context] Frac (was \everymath problem)
On Wed, 19 Aug 2009, Wolfgang Schuster wrote: And with \frac it can be configured at context low level (why no key for \setupmathematics?) \chardef\mathfracmode=1 % 0=auto, 1=displaystyle, 2=textstyle, 3=scriptstyle, 4=scriptscriptstyle, 5=mathstyle $\frac{a}{b}$ I am thinking of incoprorating a nath like frac in ConTeXt. So, we can have \definemathfraction[frac][style=...] where style can take values default: the current frac implementation auto:the nath like implementation displaystyle: the current dfrac implementation textstyle: the current tfrac implementation scriptstyle/scriptscriptstyle: (not sure when they would be needed) I need to check what is the difference between mathfracmode=0 and 5. We can also interface to vulgar fractions. 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] Extend the fraction bar
Taco, Mojca, Thanks for the response on lengthening the main fraction bar? Any way to make the main fraction bar wider? There is a genfrac command in amslatex. Anything similar in Context? On Jul 2, 2006, at 4:00 AM, Taco Hoekwater wrote: David Arnold wrote: All, How can I extend the main fraction bar in the following expression, making it a tad longer? Just add a bit of whitespace to the right and left: \dfrac{\,\dfrac{9+3x-2x^2}{x^2-16}\,} {\,\dfrac{4x^3-9x}{2x^2+5x-12}\,} You may want to add a \vphantom command as well to separate the fractions from the main bar a bit more. \dfrac{\,\dfrac{9+3x-2x^2}{x^2-16}\,}{\,\dfrac{4x^3-9x}{2x^2 +5x-12}\,}. \placeformula \startformula \dfrac{\dfrac{9+3x-2x^2}{x^2-16}}{\dfrac{4x^3-9x}{2x^2+5x-12}}. \stopformula ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Extend the fraction bar
On Tue, 4 Jul 2006, David Arnold wrote: Taco, Mojca, Thanks for the response on lengthening the main fraction bar? Any way to make the main fraction bar wider? There is a genfrac command in amslatex. Anything similar in Context? m-newmat.tex defines genfrac. \usemodule[newmat] \def\bigfrac{\genfrac{}{}{2pt}\displaystyle} \starttext \startformula \bigfrac{100}{200} \text{ vs } \frac{100}{200} \stopformula \stoptext Adjust 2pt to something that suits you. Aditya On Jul 2, 2006, at 4:00 AM, Taco Hoekwater wrote: David Arnold wrote: All, How can I extend the main fraction bar in the following expression, making it a tad longer? Just add a bit of whitespace to the right and left: \dfrac{\,\dfrac{9+3x-2x^2}{x^2-16}\,} {\,\dfrac{4x^3-9x}{2x^2+5x-12}\,} You may want to add a \vphantom command as well to separate the fractions from the main bar a bit more. \dfrac{\,\dfrac{9+3x-2x^2}{x^2-16}\,}{\,\dfrac{4x^3-9x}{2x^2 +5x-12}\,}. \placeformula \startformula \dfrac{\dfrac{9+3x-2x^2}{x^2-16}}{\dfrac{4x^3-9x}{2x^2+5x-12}}. \stopformula ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008 ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Extend the fraction bar
Aditya, Thanks. You are very helpful. On Jul 4, 2006, at 9:08 PM, Aditya Mahajan wrote: On Tue, 4 Jul 2006, David Arnold wrote: Taco, Mojca, Thanks for the response on lengthening the main fraction bar? Any way to make the main fraction bar wider? There is a genfrac command in amslatex. Anything similar in Context? m-newmat.tex defines genfrac. \usemodule[newmat] \def\bigfrac{\genfrac{}{}{2pt}\displaystyle} \starttext \startformula \bigfrac{100}{200} \text{ vs } \frac{100}{200} \stopformula \stoptext Adjust 2pt to something that suits you. Aditya On Jul 2, 2006, at 4:00 AM, Taco Hoekwater wrote: David Arnold wrote: All, How can I extend the main fraction bar in the following expression, making it a tad longer? Just add a bit of whitespace to the right and left: \dfrac{\,\dfrac{9+3x-2x^2}{x^2-16}\,} {\,\dfrac{4x^3-9x}{2x^2+5x-12}\,} You may want to add a \vphantom command as well to separate the fractions from the main bar a bit more. \dfrac{\,\dfrac{9+3x-2x^2}{x^2-16}\,}{\,\dfrac{4x^3-9x}{2x^2 +5x-12}\,}. \placeformula \startformula \dfrac{\dfrac{9+3x-2x^2}{x^2-16}}{\dfrac{4x^3-9x}{2x^2+5x-12}}. \stopformula ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008 ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Extend the fraction bar
Question. Is this genfrac identical to the one in ams definitions? On Jul 4, 2006, at 9:08 PM, Aditya Mahajan wrote: On Tue, 4 Jul 2006, David Arnold wrote: Taco, Mojca, Thanks for the response on lengthening the main fraction bar? Any way to make the main fraction bar wider? There is a genfrac command in amslatex. Anything similar in Context? m-newmat.tex defines genfrac. \usemodule[newmat] \def\bigfrac{\genfrac{}{}{2pt}\displaystyle} \starttext \startformula \bigfrac{100}{200} \text{ vs } \frac{100}{200} \stopformula \stoptext Adjust 2pt to something that suits you. Aditya On Jul 2, 2006, at 4:00 AM, Taco Hoekwater wrote: David Arnold wrote: All, How can I extend the main fraction bar in the following expression, making it a tad longer? Just add a bit of whitespace to the right and left: \dfrac{\,\dfrac{9+3x-2x^2}{x^2-16}\,} {\,\dfrac{4x^3-9x}{2x^2+5x-12}\,} You may want to add a \vphantom command as well to separate the fractions from the main bar a bit more. \dfrac{\,\dfrac{9+3x-2x^2}{x^2-16}\,}{\,\dfrac{4x^3-9x}{2x^2 +5x-12}\,}. \placeformula \startformula \dfrac{\dfrac{9+3x-2x^2}{x^2-16}}{\dfrac{4x^3-9x}{2x^2+5x-12}}. \stopformula ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008 ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Extend the fraction bar
Question. Is this genfrac identical to the one in ams definitions? AFAIK, yes. The syntax of genfrac is \genfrac{left-delim}{right-delim}{bar-thickness}{mathstyle}{numberator}{denominator} in both context and ams. One difference is that in amsmath, for mathstyle you can use integer vales 0-3 as a shortcut for \displaystyle, textstyle, scriptstyle and scriptscriptscript style. Context does not follow this, which I think is a good thing. Aditya On Jul 4, 2006, at 9:08 PM, Aditya Mahajan wrote: On Tue, 4 Jul 2006, David Arnold wrote: Taco, Mojca, Thanks for the response on lengthening the main fraction bar? Any way to make the main fraction bar wider? There is a genfrac command in amslatex. Anything similar in Context? m-newmat.tex defines genfrac. \usemodule[newmat] \def\bigfrac{\genfrac{}{}{2pt}\displaystyle} \starttext \startformula \bigfrac{100}{200} \text{ vs } \frac{100}{200} \stopformula \stoptext Adjust 2pt to something that suits you. Aditya On Jul 2, 2006, at 4:00 AM, Taco Hoekwater wrote: David Arnold wrote: All, How can I extend the main fraction bar in the following expression, making it a tad longer? Just add a bit of whitespace to the right and left: \dfrac{\,\dfrac{9+3x-2x^2}{x^2-16}\,} {\,\dfrac{4x^3-9x}{2x^2+5x-12}\,} You may want to add a \vphantom command as well to separate the fractions from the main bar a bit more. \dfrac{\,\dfrac{9+3x-2x^2}{x^2-16}\,}{\,\dfrac{4x^3-9x}{2x^2 +5x-12}\,}. \placeformula \startformula \dfrac{\dfrac{9+3x-2x^2}{x^2-16}}{\dfrac{4x^3-9x}{2x^2+5x-12}}. \stopformula ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008 ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008 ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Extend the fraction bar
David Arnold wrote: All, How can I extend the main fraction bar in the following expression, making it a tad longer? Just add a bit of whitespace to the right and left: \dfrac{\,\dfrac{9+3x-2x^2}{x^2-16}\,} {\,\dfrac{4x^3-9x}{2x^2+5x-12}\,} You may want to add a \vphantom command as well to separate the fractions from the main bar a bit more. \dfrac{\,\dfrac{9+3x-2x^2}{x^2-16}\,}{\,\dfrac{4x^3-9x}{2x^2+5x-12}\,}. \placeformula \startformula \dfrac{\dfrac{9+3x-2x^2}{x^2-16}}{\dfrac{4x^3-9x}{2x^2+5x-12}}. \stopformula ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Extend the fraction bar
On 7/2/06, David Arnold wrote: All, How can I extend the main fraction bar in the following expression, making it a tad longer? \placeformula \startformula \dfrac{\dfrac{9+3x-2x^2}{x^2-16}}{\dfrac{4x^3-9x}{2x^2+5x-12}}. \stopformula I don't know what \dfrac should be (I assumed \let\dfrac=\frac) The most easy solutions is probably to put a \ or \, before and after the content (if I understood your question correctly). \dfrac{\dfrac{9+3x-2x^2}{x^2-16}}{\ \dfrac{4x^3-9x}{2x^2+5x-12}\ }. If you use that a lot, something like \def\mainfrac#1#2{\frac{\ #1\ }{\ #2\ }} might be helpful. Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Extend the fraction bar
All, How can I extend the main fraction bar in the following expression, making it a tad longer? \placeformula \startformula \dfrac{\dfrac{9+3x-2x^2}{x^2-16}}{\dfrac{4x^3-9x}{2x^2+5x-12}}. \stopformula ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Bug report, \frac as redefined in m-newmat.tex
At 01:40 PM 8/2/2004, you wrote: ah ... the alignment lookahead problem, i think we can safely patch \mathematics to catch lookahead as well as make frac more robust for unwanted expansion \usemodule[newmat] \unexpanded\def\frac#1#2{\mathematics{\genfrac{}{}{}\donothing{#1}{#2}}} \def\mathematics#1{\relax\ifmmode#1\else$#1$\fi} [...] That fixes the problem on my end; thanks! Will you be updating the defintions of \tfrac, \dfrac, and so forth in m-newmat to match? I admit to not being too sure whether I think it's a good idea to support using math constructs such as \frac outside of math mode, but I do think that if one's going to do that, it's good to be consistent and do it with the variants too. - Brooks ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Bug report, \frac as redefined in m-newmat.tex
Brooks Moses wrote: At 01:40 PM 8/2/2004, you wrote: ah ... the alignment lookahead problem, i think we can safely patch \mathematics to catch lookahead as well as make frac more robust for unwanted expansion \usemodule[newmat] \unexpanded\def\frac#1#2{\mathematics{\genfrac{}{}{}\donothing{#1}{#2}}} \def\mathematics#1{\relax\ifmmode#1\else$#1$\fi} [...] That fixes the problem on my end; thanks! Will you be updating the defintions of \tfrac, \dfrac, and so forth in m-newmat to match? I admit to not being too sure whether I think it's a good idea to support using math constructs such as \frac do they need patching? they don't use \mathematics afaik Hans - 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 - ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Bug report, \frac as redefined in m-newmat.tex
On Wed, Aug 04, 2004 at 12:14:29AM +0200, Hans Hagen Outside wrote: Brooks Moses wrote: That fixes the problem on my end; thanks! Will you be updating the defintions of \tfrac, \dfrac, and so forth in m-newmat to match? I admit to not being too sure whether I think it's a good idea to support using math constructs such as \frac do they need patching? they don't use \mathematics afaik They don't need patching in the sense of fixing a bug, no -- it's more a matter of consistency in behavior. What I see is that there's a list of definitions for \frac, \dfrac, \tfrac, and various other similar forms, all of which can be used in math mode only, and do not use \mathematics. Then, a couple of lines after that, there's the second definition for \frac, which is the one that needed patching. This one, unlike the first definition, is wrapped in \mathematics so that it can work outside math mode. So I'm wondering why only \frac has this second definition that allows it to work outside of math mode. I would think that things should be consistent -- either that all of the definitions in the first list should be changed to use \mathematics, or that \frac should be returned to the simpler version -- so that \tfrac is still simply \frac typeset in text mode as one would expect it to be. Even if they're all left in the current form, I'd think that the unused definition of \frac in the first list should be removed. My argument for simplifying \frac to take the \mathematics out of it is that it is a math-mode construct that typesets its arguments in math mode, and allowing it to be used outside of math mode encourages sloppy TeXing. It also hides the point of transition to math mode, meaning that x and \frac{1}{x} will typeset x differently, which strikes me as confusing. I recognize that this is a very debatable position, though, and that there are at the very least arguments for backwards compatiblity that contradict it. - Brooks ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] amsl: startcases/stopcases
Thursday, May 20, 2004 David Munger wrote: Hello Giuseppe, I'm having a little trouble with the cases in amsl. Compiling this: \[ f(x) = \startcases 0 \text{if $x -\epsilon$} \\ \frac12 \text{if $x \epsilon$} \stopcases \] results in an error around the \frac. Hello David, sorry for the delay. The problem is caused by \frac being defined in the newmat module as %D Better: \def\frac#1#2{\mathematics{\genfrac{}{}{}\donothing{#1}{#2}}} If you comment that line, it will compile flawlessly. Hans, why would you want to allow \frac in text mode? Changing it to \dfrac makes the input compile ok, but typesets the cases in an ugly manner with really narrow spacing. (Yes.) Is there some way of telling startcases/stopcases to behave in display mode? Yup, I just changed a couple of things and now we have a \startbigcases ... \stopbigcases for this. Will upload new version soon. -- Giuseppe Oblomov Bilotta ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] amsl: startcases/stopcases
Hello Giuseppe, I'm having a little trouble with the cases in amsl. Compiling this: \[ f(x) = \startcases 0 \text{if $x -\epsilon$} \\ \frac12 \text{if $x \epsilon$} \stopcases \] results in an error around the \frac. Changing it to \dfrac makes the input compile ok, but typesets the cases in an ugly manner with really narrow spacing. Is there some way of telling startcases/stopcases to behave in display mode? Thanks in advance, David ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context