[NTG-context] Re: \mfunction does not work with the latest upload
Thank you for your prompt reply, Mikael. I like this new way of defining math functions. Mikael Sundqvist 於 2024年2月28日 週三 下午2:46寫道: > Hi, > > \definemathfunction [lcd] > > You can also add > [mathlimits=yes] > [mathlimits=no] > [mathlimits=auto] > > if you want the limits to go always below, never below or below in > display, respectively. > > /Mikael > > On Wed, Feb 28, 2024 at 1:26 AM fv leung wrote: > > > > > > \starttext > > % copy from wiki > > \definemathcommand[lcd][nolop]{\mfunction{lcd}} > > > > With \contextversion, the math command \tex{lcd} gives \m{\lcd} > (nothing)! > > > > \stoptext > > > ___ > > 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 > > ___ > ___ 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] \mfunction does not work with the latest upload
\starttext % copy from wiki \definemathcommand[lcd][nolop]{\mfunction{lcd}} With \contextversion, the math command \tex{lcd} gives \m{\lcd} (nothing)! \stoptext ___ 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: multipage metapost output from ConTeXt
You didn't specify the color of path A in p2 and p4. So it's drawn in black. The other issue, I can't help. Emanuel Han via ntg-context 於 2023年12月2日 週六 下午7:23寫道: > So is there a way to circumvent these issues? Or an explanation for this > behavior, so that I can try to find a solution by myself? > > Thanks > Emanuel > > On Nov. 29 2023, at 12:25 pm, Emanuel Han via ntg-context < > ntg-context@ntg.nl> wrote: > > Dear Aditya and Fabrice, > thanks for your responses. > > I included some of Fabrice's code into mine for testing purpose, and > indeed the multipage works now. > What is bizarre is that issues appear now that didn't appear before: > >- Path A is drawn with color red on page 1, and in color black on all >following pages, while it should stay red. >- textext(, ) is overwriting with >"T="(currentime) which has been used previously in textext() >before the for k=1 endfor loop. This overwriting happens only for the first >textext() which occurs inside the for k=1 endfor loop. All other textext() >inside the for k=1 endfor loop are not drawn at all. If the line « draw >textext("T="(currentime)) scaled 2 shifted(0,2in) withcolor magenta >; » is commented out, the first textext() inside the for k=1 endfor loop is >not drawn neither. It must be an issue with textext(), because when I >replace textext() by lmt_outline[], the text is drawn. > > Adjusted mwe: > > \enableregime[utf] % enable unicoded input > > \definefontfamily [RomanFont] [rm] [calluna] > > \definefontfamily [KoreanFont] [rm] [applemyungjo] > > \definefontfamily [JapaneseFont] [rm] [hannotatesc] > > \definefontfeature > [fea] > [mode=node,language=dflt,script=arab, > init=yes, > medi=yes, > fina=yes, > isol=yes, > calt=yes, > rlig=yes, > tlig=yes, > trep=yes, > curs=yes, > kern=yes, > mark=yes > ] > > \starttypescript [serif] [notonaskharabic] > \definefontsynonym [notonaskharabic-Light] > [name:notonaskharabic][features=fea] > \definefontsynonym [notonaskharabic-Bold] > [name:notonaskharabic][features=fea] > \definefontsynonym [notonaskharabic-Italic] > [name:notonaskharabic][features=fea] > \definefontsynonym [notonaskharabic-Bold-Italic] > [name:notonaskharabic][features=fea] > \stoptypescript > > \starttypescript [serif] [notonaskharabic] > \usetypescript[serif][fallback] > \definefontsynonym [Serif] > [notonaskharabic-Light] [features=fea] > \definefontsynonym [SerifItalic] > [notonaskharabic-Italic] [features=fea] > \definefontsynonym [SerifBold] > [notonaskharabic-Bold][features=fea] > \definefontsynonym [SerifBoldItalic] > [notonaskharabic-Bold-Italic] [features=fea] > \stoptypescript > > \starttypescript [notonaskharabic] > \definetypeface [notonaskharabic] [rm] [serif] [notonaskharabic] > [default] > \stoptypescript > > \usetypescript[notonaskharabic] > > \setupbodyfont [RomanFont] > > \usecolors[crayola] > > \startMPinclusions > > picture p[]; > path TheFrame ; > TheFrame := fullsquare scaled 5in ; > > z0 = (0,0); > z1 = (60,40); > z2 = (40,90); > z3 = (10,70); > z4 = (30,50); > z5 = (90,70); > z6 = (-10,70); > > path A; A = z0..z1..z2..z3..z4 ; > pair AStartPoint; AStartPoint = point 0 of A; > pair AEndPoint; AEndPoint = point 4 of A; > path B; B = z5..z6; > pair BStartPoint; BStartPoint = point 0 of B; > pair BEndPoint; BEndPoint = point 1 of B; > path C; C = AStartPoint..AEndPoint; > > p1:=image( > draw A withcolor red; > ); > > p2:=image(draw A; label(lmt_outline [ > text = "\JapaneseFont 日本語" > ], AEndPoint);); > > p3:=image( > label(textext("\notonaskharabic \textdir TRT دانگ") scaled 1.2, > BStartPoint); > ); > > p4:=image(draw A; label(lmt_outline [ > text = "\KoreanFont 한국어" > ], AStartPoint);); > > p5:=image( > label(textext("bāng"), BEndPoint); > draw C withcolor green; > ); > > p6:=image( > draw B withcolor blue; > ); > \stopMPinclusions > > \starttext > > \dorecurse{6}{ % Frame > \setupMPpage[background=color, backgroundcolor=SpringGreen] > \startMPpage[pagestate=start] > currentime := #1 ; > % Just for learning : > draw TheFrame withpen pencircle scaled .1in withcolor magenta ; > draw textext("T="(currentime)) scaled 2 shifted(0,2in) withcolor > magenta ; > for k=1 upto currentime: draw p[k]; endfor > setbounds currentpicture to TheFrame ; > > desiredformat := 1080;% In pixels (will be converted by default at 72dpi) > currentpicture := currentpicture xysized (desiredformat ,desiredformat ); > > \stopMPpage > } > > \stoptext > On Nov. 27 2023, at 11:25 pm, Aditya Mahajan wrote: > > On Mon, 27 Nov 2023, Fabrice L wrote: > > > Hi, > > > > It is fun fact very easy to do. You just use \startMPpage (…) > \stopMPpage multiple times. Here is an example which build an animation of > a particle moving according to a Brownian motion. > > A very similar option is to pass a variable to a metapost drawing. This is > what I use: > >
[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
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 ___
Re: [NTG-context] rotated headers in natural tables
How about using \vfill ? \define[1]{\RtH}{\vfill\rotate{#1}} Henning Hraban Ramm via ntg-context 於 2023年3月16日 週四 上午2:16寫道: > Hi! > > In my table, I want the header texts to be 90˚ rotated and aligned to > the bottom of their cell. I couldn’t find an option to do that. > Tried \dontleavehmode or \hfill in my \RtH macro to no avail. > Is it possible? > > > \define[1]{\RtH}{\rotate{#1}} > > \starttext > > \setupTABLE[offset=3pt] > \setupTABLE[header][background=color,backgroundcolor=yellow,align=bottom] > \bTABLE > \bTABLEhead > \bTR \bTH\RtH{animal}\eTH \bTH\RtH{size}\eTH \bTH\RtH{weight}\eTH > \bTH\RtH{average speed}\eTH \eTR > \eTABLEhead > \bTABLEbody > \bTR \bTD sparrow \eTD \bTD small \eTD \bTD light \eTD \bTD high \eTD \eTR > \bTR \bTD dog \eTD \bTD medium \eTD \bTD medium \eTD \bTD medium \eTD \eTR > \bTR \bTD snail \eTD \bTD small \eTD \bTD light \eTD \bTD slow \eTD \eTR > \bTR \bTD elephant \eTD \bTD big \eTD \bTD heavy \eTD \bTD medium \eTD \eTR > \eTABLEbody > \eTABLE > > \stoptext > > Hraban > > ___ > 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] Aaligned numbers in a matrix?
See if this way suits you. \definemathmatrix[bmatrix] [matrix:brackets] [simplecommand=bmatrix] \starttext $ a \rightarrow \bmatrix{1, \hfill 2, 3, \hfill 4; 2, \hfill 1, 4, \hfill 3; 3,-4, 1,-2; 4,-3, 2,-1} $ \stoptext Bruce Horrocks via ntg-context 於 2023年2月27日 週一 上午8:56寫道: > I'm using the following MWE to produce a matrix: > > \definemathmatrix[bmatrix] > [matrix:brackets] > [simplecommand=bmatrix] > \starttext > $ a \rightarrow > \bmatrix{1, 2, 3, 4; >2, 1, 4, 3; >3,-4, 1,-2; >4,-3, 2,-1} $ > \stoptext > > The columns with negative numbers in are centred and I would rather have > them right-aligned so that the digits stack up above each other and the > negative signs stick out to the left, so to speak. Is there an easy way to > achieve this? > > — > 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 / > 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] horizontal space in CJK document
Maybe the ideographic space U+3000 works. 在 2023年2月21日週二 03:42,Sylvain Hubert via ntg-context 寫道: > Dear list, > > Does anyone know how to insert a horizontal space in a CJK document with > \setscript[hanzi]? > > \setscript[hanzi] > \definefontfamily[mainface][rm][notoserifcjkhk][] > \setupbodyfont[mainface] > \starttext > 口口\hspace[big]口口 % with \setscript[hanzi], the \hspace is ignored > > \dorecurse{100}{口} % without \setscript[hanzi], the line is not properly > wrapped > \stoptext > > Many thanks, > Sylvain > > ___ > 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] How to stop enumerated tabulate environments from shifting to the right?
Will this suit you? \starttext \input knuth \startitemize[n] \item x \stopitemize \startitemize[n][leftmargindistance=-.1\textwidth,width=.1\textwidth] \starttabulate[|lp(.1\textwidth)|cp(.35\textwidth)|cp(.2\textwidth)|cp(.35\textwidth)|] \NI \NC \NC \NC\NR \NC \NC \NC \NC\NR \stoptabulate \stopitemize \input knuth \stoptext Joel via ntg-context 於 2022年11月13日 週日 凌晨12:11寫道: > When I place a tabulate environment inside itemize, it indents and the > entire table is shifted to the right about 1/2". > > \starttext > \input knuth > > \startitemize[n] > \item x > \stopitemize > > \startitemize[n] > > > \starttabulate[|lp(.1\textwidth)|cp(.35\textwidth)|cp(.2\textwidth)|cp(.35\textwidth)|] > \NI \NC \NC \NC\NR > \NC \NC \NC \NC\NR > \stoptabulate > \stopitemize > > \input knuth > \stoptext > > See this code which when compiled, the first itemize numbers line up with > the left edge of text, but the one with tables indents. It also seems to > spill into the right margin. > > How can I stop enumerated table environments from indenting? > > --Joel > > ___ > 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] Nested itemize
\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 ___
[NTG-context] metafun paralleled does not give a parallel path
The following used to produce three parallel lines. Now it produces one straight line and two arcs. \starttext \startMPcode z0 = origin; z1 = 72dir(45); dotlabel.bot("z0", z0); draw z0--z1; draw (z0--z1) paralleled -15 withcolor red; draw (z0--z1) paralleled 15 withcolor blue; \stopMPcode \stoptext ___ 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] MetaPost label font size
I've used something like the following before. \starttext \startMPcode label("normal label", (0, 0)); label("{\switchtobodyfont[3pt] tiny label}", (0, 18)); label("{\switchtobodyfont[72pt] giant label}", (0, -72)); \stopMPcode \stoptext Henning Hraban Ramm via ntg-context 於 2022年7月6日 週三 晚上7:36寫道: > Am 06.07.22 um 12:45 schrieb Hans Hagen via ntg-context: > > On 7/6/2022 12:19 PM, fv leung via ntg-context wrote: > >> My stupid way to get labels of different sizes: > >> > >> \starttext > >> > >> \startMPcode > >> > >>label("normal label", (0, 0)); > >> > >>label("\setsmallbodyfont small label", (0, 18)); > >> > >>label("\setbigbodyfont big label", (0, -18)); > >> > >> \stopMPcode > >> > >> \stoptext > > nothing stupid about that ... it's how i would do it > > Okay. So there’s really no possibility to adapt whatever defines the > label font size except defaultfontsize inbetween? Strange. > > My solution so far was to split the picture and re-combine it afterwards. > > Hraban > > > ___ > 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] MetaPost label font size
My stupid way to get labels of different sizes: \starttext \startMPcode label("normal label", (0, 0)); label("\setsmallbodyfont small label", (0, 18)); label("\setbigbodyfont big label", (0, -18)); \stopMPcode \stoptext Henning Hraban Ramm via ntg-context 於 2022年7月6日 週三 下午5:23寫道: > Am 06.07.22 um 07:17 schrieb Aditya Mahajan via ntg-context: > > On Wed, 6 Jul 2022, Henning Hraban Ramm via ntg-context wrote: > > > >> How can I change the font size of labels within one picture? > > > > (Untested): See https://www.contextgarden.net/Command/setupMPinstance > > > > \setupMPinstance[metafun][textstyle=sans] > > > > Or define a new instance, which sets the textstyle to sans. > > Thank you for trying, but that doesn’t seem to have anything to do with > my question. > > I need a different font size for different labels within one picture. > > Hraban > > > ___ > 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] Custom engine settings in AUCTEX
I changed the value for ConTeXt-Mark-version from "II" to "IV" in context.el file. There are more than one such entry. In the Windows platform, I added the following to the .emacs file: (load "context.el" nil t t) (add-to-list 'auto-mode-alist '("\\.tex\\'" . context-mode)) (eval-after-load 'tex '(add-to-list 'TeX-command-list '("LuaMetaTeX" "C:\\Users\\Leung\\AppData\\Local\\Programs\\ConTeXt\\tex\\texmf-win64\\bin\\mtxrun.exe --autogenerate --script context --autopdf %t" TeX-run-command nil (context-mode) :help "Run LuaMetaTeX"))) Maybe it's similar in the OSX platform. Jan-Erik Hägglöf via ntg-context 於 2022年6月15日 週三 清晨5:36寫道: > HI! > > I’ve been trying out Doom-Emacs and when I open a ConTeXt file i want the > engine point to my LMTX installation. > > /Users/jan-erikhagglof/context/context-osx-64/tex/texmf-osx-64/bin/ is the > path to my install on my Macos Monterey. > > How can this been customized? > > Its a bit confusing reading the AUCTEX manual so maybe someone has a > working config already? > > Thanks in advance > > Jan-Erik > > ___ > 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] 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] Conditional text appearing in a fixed vertical space
You can also consider using viewerlayer: \setupinteraction[state=start] \defineviewerlayer[solution] \setupcolors[state=start] \usecolors[xwi] \definecolor[keyColor][1.0(maroon)] \starttext \startitemize[n] \but[ToggleLayer{solution}] \samplefile{tufte} \blank[big] \startviewerlayer[solution] \keyColor \samplefile{knuth} \stopviewerlayer \stopitemize \stoptext I print the file with the solution layer off to a 'clean' file for students. Gavin via ntg-context 於 2022年1月12日 週三 下午11:30寫道: > Thanks Fabrice and Aditya! > > With three completely different approaches, I learned three times more > than I was expecting. This has been a great help. I will probably use the > framedtext method, but I learned something from each. > > Gavin > > > > On Jan 11, 2022, at 4:44 PM, Aditya Mahajan wrote: > > > > On Tue, 11 Jan 2022, Gavin via ntg-context wrote: > > > >> Hello List, > >> > >> I am making problem sets for a physics class. Solutions use the style > defined in the example below, and only appear if the “solution” mode is > enabled. I am struggling to get a vertical space for the solution which is > the same whether or not the solution is printed. Different problems require > different amounts of space, so this should be an argument or key-value. > > > > This is how I would do it: piggyback on framedtext. Note that framedtext > doesn't break across pages. So, if you have long answers, a different > mechanism is needed. > > > > \definemode[solution][no] > > > > \doifmodeelse{solution} > > {\defineframedtext[solution][empty=no]} > > {\defineframedtext[solution][empty=yes]} > > > > % Doesn't work. Why? > > % > \expanded{\defineframedtext[solution][empty=\doifmodeelse{solution}{no}{yes}]} > > > > \setupframedtext > > [solution] > > [ > >spacebefore=medium, > >spaceafter=medium, > >width=broad, > >foregroundstyle=\rm\it, > >loffset=2em, > >roffset=2em, > >indentnext=no, > > ] > > > > > > \starttext > > > > Sample question. Always show answer. > > > > \startsolution[height=1in, empty=no] > > Alotta wood! > > \stopsolution > > > > > > How much wood? > > > > \startsolution[height=1in] > > Alotta wood! > > \stopsolution > > > > You don't need to specify the height: > > > > \startsolution > > \input ward > > \stopsolution > > > > No more questions. > > \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 > > ___ > ___ 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] how to place getmarking[title] in header instead of getmarking[chapter]
can use this for the header: \setupheadertexts [text] [{\namedstructurevariable{chapter}{title}}] [] [] [{\namedstructurevariable{chapter}{title}}] juh via ntg-context 於 2022年1月5日 週三 上午12:28寫道: > Hi all, > > I know how to put the current chapter in the header. > > But how can I also put the value of \starttitle in the header. > > In this mwe the \starttitle command does not modify the header. > > Is it possible to do something like: > > \getmarking[chapter or title] > > I cannot include > \setmarking[chapter]{title headline} > right before \starttitle as the source is created automatically. > > > \setupheadertexts > [text] > [{\getmarking[chapter]}] > [] > [] > [{\getmarking[chapter]}] > > \setupcombinedlist[content][list={chapter}] > \starttext > \placecontent > \startchapter > [title=Lorem] > > \startsection > [title=Lorem subsection] > \stopsection > \stopchapter > \startchapter > [title=Ipsum] > \stopchapter > \starttitle > [title=title headline] > > Pellentesque dapibus suscipit ligula. Donec posuere augue in quam. > Etiam vel tortor sodales tellus ultricies commodo. > > \page > > Nullam eu ante vel est convallis dignissim. > > \stoptitle > \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 > > ___ > ___ 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] Two questions on enumerations/indentation
Can solve with \defineenumeration[remark][ alternative=serried, width=fit, text={{\it Remark}}, headstyle=\tf, indenting={first,medium}, %headcommand=\groupedcommand{\hskip 1em}{}, ] Mikael Sundqvist via ntg-context 於 2021年12月31日 週五 上午4:55寫道: > Hi, > > I have two questions: > > 1) What is the correct way to indent the first line of a (serried) > enumeration? In the example below, I can use headcommand, but then I > do not know what I should replace "1em" below to fit the medium > indenting. > > 2) I miss a numberstyle. What is the correct way to (in the example > below) get Remark in italic and the number upright? > > /Mikael > > \defineenumeration[remark][ > alternative=serried, > width=fit, > text=Remark, > headstyle=italic, > indenting={yes,medium}, > %headcommand=\groupedcommand{\hskip 1em}{}, > ] > > \starttext > > \samplefile{tufte} > > \startremark > This line should be indented. The next line should not be indented. I > wonder how we can fix that. > > This line is fine and is here for comparison. > \stopremark > > \samplefile{tufte} > > \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 > > ___ > ___ 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] fixing indentation of xtable inside item
add \dontleavehmode before the table Andres Conrado Montoya via ntg-context 於 2021年11月23日 週二 上午7:58寫道: > Considering the following MWE, I would like to know how I can get > the table inside the item to be aligned with the item. It seems the > tabel takes the width right, but it gets pushed to the left, disregarding > the item's indentation. > > I think I read about this behaviour somewhere, but I have spent 4 hours > looking for it in the manuals and I can't find it. :( > > Any help would be appreciated. > > %-startwme > \starttext > \startitemize > \item > Determine la {\sc an} de cada objetivo del microscopio, con los ángulos > de la tabla y teniendo en cuenta lo siguiente: $n_{\text{aire}} = 1$ y > $n_{\text{aceite de inmersión}} = 1.515$: > \blank > \startxtable[align=middle,option=stretch] > \startxtablebody[body] > \startxrow > \startxcell Objetivo 4x \stopxcell > \startxcell $n=1$ \stopxcell > \startxcell $\alpha=5.8$ \stopxcell > \startxcell {\sc an}$=$ \stopxcell > \stopxrow > \startxrow > \startxcell Objetivo 10x \stopxcell > \startxcell $n=1$ \stopxcell > \startxcell $\alpha=14.5$ \stopxcell > \startxcell {\sc an}$=$ \stopxcell > \stopxrow > \startxrow > \startxcell Objetivo 40x \stopxcell > \startxcell $n=1$ \stopxcell > \startxcell $\alpha=40.5$ \stopxcell > \startxcell {\sc an}$=$ \stopxcell > \stopxrow > \stopxtablebody > \startxtablefoot[foot] > \startxrow > \startxcell Objetivo 100x \stopxcell > \startxcell $n=1.515$ \stopxcell > \startxcell $\alpha=55.6$ \stopxcell > \startxcell {\sc an}$=$ \stopxcell > \stopxrow > \stopxtablefoot > \stopxtable > > \stopitemize > \stoptext > %-startwme > > > -- > Andrés Conrado Montoya > Andi Kú > andresconr...@gmail.com > http://sesentaycuatro.com > http://messier87.com > http://chiquitico.org > > Los fines no justifican los medios, porque la medida verdadera de nuestro > carácter está dada por los medios que estamos dispuestos a utilizar, no por > los fines que proclamamos. > > > “You develop an instant global consciousness, a people orientation, an > intense dissatisfaction with the state of the world, and a compulsion to do > something about it. From out there on the moon, international politics look > so petty. You want to grab a politician by the scruff of the neck and drag > him a quarter of a million miles out and say, ‘Look at that, you son of a > bitch.’” — Apollo 14 astronaut Edgar Mitchell > > ___ > 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] Indentation inside \framed won't go away
I use \removeunwantedspaces in this case. Ramkumar KB via ntg-context 於 2021年10月21日 週四 下午4:32寫道: > Hello, > > I have this nagging issue of indentation (in the 1st line) showing up > inside \framed in spite of all the commands to skip indentation (see > attached PDF). > > It appears that *\setupindenting[no]* is not playing any role here and > some other parameter is overriding this. > > Any tips would be appreciated. > > best regards, > Ramkumar > > \definepapersize[a4-portrait][A4][A4] > \setuppapersize[a4-portrait] > \setuplayout > [topspace=10mm,backspace=15mm,header=50pt,footer=50pt,textwidth=165mm,height=middle,width=middle] > > \starttext > > \offset[x=\dimexpr11mm\relax,y=\dimexpr23mm\relax] > {\framed[frame=on,offset=none,align=flushleft] > { > % \startparagraph[align=high] > \setupindenting[no] > Chief Vitalstatistix\\ > Getafix\\ > Dogmatix\\ > Asterix\\ > Obelix\\ > } > } > \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 > > ___ > ___ 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] changes of color
\starttext It seems that the problem comes up when the same color as the surrounding text is used in MPcode.\par { \red text red\par \startMPcode drawoptions(withcolor blue); label("text blue in MPcode", origin); \stopMPcode \par text still red\par But\par text red\par \startMPcode drawoptions(withcolor red); label("text red in MPcode", origin); \stopMPcode \par text turns black\par Can get over with this:\par text red\par \startMPcode drawoptions(withcolor red); label("text red in MPcode", origin); label("\null", origin); % add this seems to solve the problem \stopMPcode \par text still red\par Don't know why. Just an observation. } \stoptext Thierry Horsin via ntg-context 於 2021年9月21日 週二 下午8:00寫道: > Hi everybody > > After some part of a tex file where there is some startMPcode section the > color of the text (e.g. blue) changes to black up until the next page in > the pdf. > > Is there something I am missing ? > Thank you. > Thierry > > ___ > 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] margin of inner item group
Use distance=... instead of margin=... . 在 2021年9月7日週二 16:58,Sylvain Hubert via ntg-context 寫道: > Dear List, > > Does anyone know how to set the margin of an inner item group? The > natural way does not seem to work: > > \showframe > \starttext > \startitemize[margin=5em] > \item 1 > \startitemize[margin=10em] > \item 1 > \item 2 > \item 3 > \stopitemize > \item 2 > \item 3 > \stopitemize > \stoptext > > In the doc above, only the outer item group has a margin. > > Any help will be appreciated. > > Best, > Sylvain > > ___ > 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] itemize problems
Use \startitemize[A,text][lefttext=,righttext=,stopper=] then. Maybe that's the new way. Sylvain Hubert via ntg-context 於 2021年9月7日 週二 下午4:32寫道: > Thanks, but this doesn't seem to work on my laptop: > > \starttext > \startitemize[A,text][left=,right=,stopper=] > \item 1 > \item 2 > \stopitemize > \stoptext > > %output: (A) 1 (B) 2 > > On 07/09/2021, fv leung via ntg-context wrote: > > I add > > > > left=,right=, > > > > in the second option group. > > > > 在 2021年9月7日週二 07:02,Sylvain Hubert via ntg-context > 寫道: > > > >> A few more information: > >> > >> For the 1st problem: > >> > >> It seems that \setupitemize accepts two option groups, to which > >> n,packed and margin belong accordingly. However, > >> \setupitemize[n][margin=2em] does not seem to work. > >> > >> For the 2nd problem: > >> > >> \setupitemize[columns,one], although doing nothing in theory, seems to > >> fix the problem. > >> > >> For the 4th problem: > >> > >> I've found that we can do \setupitemize[A,text] which makes it like > >> > >> (A.) 0 (B.) 1 (C.) 2 (D.) 3 > >> > >> The problem now is, how can we remove the parentheses around the item > >> labels? > >> > >> On 07/09/2021, Sylvain Hubert wrote: > >> > Dear List, > >> > > >> > Here's a collection of four problems about item groups that I've just > >> > encountered. > >> > > >> > 1. 'n' and 'packed' not playing well with other options. > >> > > >> > This works: > >> > > >> > \defineitemgroup[myitems][itemize][margin=2em,before=before] > >> > \setupmyitems[n,packed] > >> > > >> > \starttext > >> > text > >> > \startmyitems > >> > \item 1 > >> > \item 2 > >> > \stopmyitems > >> > \stoptext > >> > > >> > This does not: > >> > > >> > > >> > \defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed] > >> > > >> > This does not either: > >> > > >> > \defineitemgroup[myitems][itemize] > >> > \setupmyitems[n,packed,margin=2em,before=before] > >> > > >> > Is there a rule for this glitch which makes it worth memorizing, or is > >> > this just a bug? > >> > > >> > 2. 'before' not working in nested item groups. > >> > > >> > \starttext > >> > \startitemize[before=before1] > >> > \item 1 > >> > \startitemize[before=before2] > >> > \item 2 > >> > \stopitemize > >> > \stopitemize > >> > \stoptext > >> > > >> > Both before1 and before2 should appear, but only before1 is shown. > >> > > >> > 3. How to wrap the line under the bulletin or number? > >> > > >> > To be more precise, the current wrapping behavior of, say, "\item 0 1 > >> > 2 3 4 5 6 7 8 9" is: > >> > > >> > * 0 1 2 3 4 5 6 7 > >> > 8 9 > >> > > >> > How can we remove the indentation of the second line and make it like > >> > > >> > * 0 1 2 3 4 5 6 7 > >> > 8 9 > >> > > >> > 4. How to put the items on the same line? > >> > > >> > That is, for "\item 0 \item 1 \item 2", I would like it to be like > >> > > >> > * 0 * 1 * 2 > >> > > >> > instead of > >> > > >> > * 0 > >> > * 1 > >> > * 2 > >> > > >> > My context version: 2021.03.05 19:11, texlive. > >> > > >> > Any help with any of the problems above would be greatly appreciated. > >> > > >> > Best, > >> > Sylvain > >> > > >> > >> > ___ > >> 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 > > ___ > ___ 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] itemize problems
I add left=,right=, in the second option group. 在 2021年9月7日週二 07:02,Sylvain Hubert via ntg-context 寫道: > A few more information: > > For the 1st problem: > > It seems that \setupitemize accepts two option groups, to which > n,packed and margin belong accordingly. However, > \setupitemize[n][margin=2em] does not seem to work. > > For the 2nd problem: > > \setupitemize[columns,one], although doing nothing in theory, seems to > fix the problem. > > For the 4th problem: > > I've found that we can do \setupitemize[A,text] which makes it like > > (A.) 0 (B.) 1 (C.) 2 (D.) 3 > > The problem now is, how can we remove the parentheses around the item > labels? > > On 07/09/2021, Sylvain Hubert wrote: > > Dear List, > > > > Here's a collection of four problems about item groups that I've just > > encountered. > > > > 1. 'n' and 'packed' not playing well with other options. > > > > This works: > > > > \defineitemgroup[myitems][itemize][margin=2em,before=before] > > \setupmyitems[n,packed] > > > > \starttext > > text > > \startmyitems > > \item 1 > > \item 2 > > \stopmyitems > > \stoptext > > > > This does not: > > > > \defineitemgroup[myitems][itemize][margin=2em,before=before,n,packed] > > > > This does not either: > > > > \defineitemgroup[myitems][itemize] > > \setupmyitems[n,packed,margin=2em,before=before] > > > > Is there a rule for this glitch which makes it worth memorizing, or is > > this just a bug? > > > > 2. 'before' not working in nested item groups. > > > > \starttext > > \startitemize[before=before1] > > \item 1 > > \startitemize[before=before2] > > \item 2 > > \stopitemize > > \stopitemize > > \stoptext > > > > Both before1 and before2 should appear, but only before1 is shown. > > > > 3. How to wrap the line under the bulletin or number? > > > > To be more precise, the current wrapping behavior of, say, "\item 0 1 > > 2 3 4 5 6 7 8 9" is: > > > > * 0 1 2 3 4 5 6 7 > > 8 9 > > > > How can we remove the indentation of the second line and make it like > > > > * 0 1 2 3 4 5 6 7 > > 8 9 > > > > 4. How to put the items on the same line? > > > > That is, for "\item 0 \item 1 \item 2", I would like it to be like > > > > * 0 * 1 * 2 > > > > instead of > > > > * 0 > > * 1 > > * 2 > > > > My context version: 2021.03.05 19:11, texlive. > > > > Any help with any of the problems above would be greatly appreciated. > > > > Best, > > Sylvain > > > > ___ > 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 ___
[NTG-context] Using \vrule within mathmatrix
\definemathmatrix[pmatrix][matrix:parentheses][simplecommand=pMat] \starttext I used to typeset an augmented matrix this way: \m{\pMat{1,7,-6,\vrule,-4;3,-4,7,\vrule,13;4,3,1,\vrule,9}} But this no longer works. Though I can get over this with \m{\pMat{1,7,-6,¦,-4;3,-4,7,¦,13;4,3,1,¦,9}} , I find the result from the old way looks nicer. Is the using of \backslash vrule within mathmatrix gone for good? \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] metafun doesn't compile \root 3 \of 2
\starttext \m{\root3\of2} \stoptext works. But \starttext \startMPcode label("\m{\root3\of2}", origin); \stopMPcode \stoptext doesn't. Running `LuaMetaTeX' on `trial' with ``/home/fvleung/ConTeXt/tex/texmf-linux-64/bin/mtxrun --autogenerate --script context trial.tex'' resolvers | formats | executing runner 'run luametatex format': /home/fvleung/ConTeXt/tex/texmf-linux-64/bin/luametatex --jobname="trial" --fmt=/home/fvleung/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/home/fvleung/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./trial.tex" --c:input="./trial.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/home/fvleung/ConTeXt/tex/texmf-linux-64/bin" open source > level 1, order 1, name 'cont-yes.mkiv' fonts > beware: no fonts are loaded yet, using 'lm mono' in box system > system > ConTeXt ver: 2021.07.27 19:27 LMTX fmt: 2021.7.28 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 2, order 2, name '/home/fvleung/ConTeXt/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 2, order 2, name '/home/fvleung/ConTeXt/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './trial', input './trial.tex', result './trial' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 2, order 3, name './trial.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern-designsize rm 12pt' is loaded metapost> initializing instance 'metafun:1' using format 'metafun' and method 'default' metapost> loading 'metafun' as 'metafun.mpxl' using method 'default' metapost> initializing number mode 'scaled' metapost> trace > This is MPLIB for LuaMetaTeX, version 3.11, running in scaled mode. metapost> trace > metapost> trace > loading metafun for lmtx, including the plain 1.004 base definitions metapost> trace > tex error > tex error on line 7 in file ./trial.tex: Argument of \root has an extra } 32\normalstopimath \fi \par } } \global \setbox \mptextbox \hbox {\clf_mptexttoks } [[special cmd: end local call]] \relax ... \stopMPcode 1 \starttext 2 3 \startMPcode 4 label("\m{\root3\of2}", origin); 5 \stopMPcode 6 7 >> \stoptext 8 I've run across a '}' that doesn't seem to match anything. For example, '\def\a#1{...}' and '\a}' would produce this error. The '\par' that I've just inserted will cause me to report a runaway argument that might be the root of the problem. mtx-context | fatal error: return code: 256 TeX Output exited abnormally with code 1 at Fri Sep 3 17:44:19 ___ 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] How to configure context command in Emacs
I 've been using emacs + auctex for years and they work fine with ConTeXt: I modified the \etc\environment file as: OSFONTDIR="/usr/share/fonts;/home/fvleung/.fonts" PATH="/home/fvleung/ConTeXt/tex/texmf-linux-64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" I added the following in the .emacs file: ;; ConTeXt mkiv (eval-after-load 'tex '(add-to-list 'TeX-command-list '("ConTeXt mkiv" "context --nonstopmode %t" TeX-run-command nil (context-mode) :help "Run ConTeXt mkiv"))) Gour 於 2019年2月15日 週五 上午6:05寫道: > On Wed, 24 Oct 2018 15:30:37 +0200 > "Jan U. Hasecke" wrote: > > > I hope there are some Emacs users out there. ;-) > > I also wonder about the current quality of ConTeXt support within Emacs? > > In the past Patrick did some work on it, but, probably, atm he is busy with > Speedata Publisher... > > > Sincerely, > Gour > > -- > Therefore, without being attached to the fruits of activities, > one should act as a matter of duty, for by working without > attachment one attains the Supreme. > > > > ___ > 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 ___