[NTG-context] Bug in counter
Hey there, please consider: \starttext \defineenumeration[definition][text=Definition, alternative=serried] \setupnumber[definition][way=bysection, numbersection=yes] \section{My section 1} \startdefinition My fist definition \stopdefinition \section{My section 2} \startdefinition My second definition \stopdefinition \stoptext It should number my definitions 1.1 and 2.1, but it doesn't. The prefix is missing. Any ideas? Thank you and best regards, Johann test.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] Overbar bug
Hey there, please have a look at the following example: \starttext $\overbar{\alpha} \overbar{\beta}$ \stoptext The first one works just fine, whereas the second one looks very odd. (At least in MkIV...) Any ideas? Best, Johann ___ 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] Multiline text in mathmode
Thank you! On Thu, 2022-06-30 at 07:58 +0200, Hans Hagen via ntg-context wrote: > On 6/30/2022 7:13 AM, Aditya Mahajan via ntg-context wrote: > > On Thu, 30 Jun 2022, Johann Birnick via ntg-context wrote: > > > > > I guess you will update to LMTX..? Unfortunately I use MkIV, because of > > > other > > > math bugs in LMTX. Do you know any (can be ugly) way of doing this without > > > the > > > new stuff? > > > > You could just use a framed. > > > > \define[1]\multilinetext{\vcenter{\framed[align=middle,frame=off]{#1}}} > > > > \startTEXpage[offset=2mm] > > \startformula > > \left\{ \multilinetext{Quaternion algebra over $\rationals$ \\ up to > > isomorphisms} \right\} > > \stopformula > > \stopTEXpage > indeed, the lmtx definiton sis similar: > > \permanent\tolerant\protected\def\mparagraph[#1]#*#:#2% > {\vcenter class \mathconstructcode \bgroup > \framed > [\c!offset=\v!overlay, > \c!frame=\v!overlay, > \c!align=\v!middle, > #1]{#2}% > \egroup} > > 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 > __ > _ ___ 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] Multiline text in mathmode
I guess you will update to LMTX..? Unfortunately I use MkIV, because of other math bugs in LMTX. Do you know any (can be ugly) way of doing this without the new stuff? Johann On Wed, 2022-06-29 at 20:12 +0200, Hans Hagen via ntg-context wrote: > On 6/29/2022 11:42 AM, Johann Birnick via ntg-context wrote: > > Hey there, > > > > does anybody know how to obtain a similar result as in the attached > > screenshot? > > I'm only asking about the multiline text in the big braces, the rest I know. > If you can wait a few days ... see attached. Mikael and I are currently > testing some of the latest updates to the math machinery and there will > be an intermediate update in a few days before we enter a next stage. > > 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 > __ > _ ___ 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] Multiline text in mathmode
Hey there, does anybody know how to obtain a similar result as in the attached screenshot? I'm only asking about the multiline text in the big braces, the rest I know. Thank you, Johann ___ 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] Detailed citation of reference
Works, thanks! On Fri, 2022-06-24 at 12:44 +0200, Wolfgang Schuster via ntg-context wrote: > Johann Birnick via ntg-context schrieb am 24.06.2022 um 11:59: > > Thanks! However, if I type \cite[righttext={, section 2.1}] is doesn't work > > anymore. Any ideas? > > What happens with > > \cite[righttext={{, section 2.1}}] > > or > > \cite[righttext={\textcomma\ section 2.1}] > > 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://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] Detailed citation of reference
Thanks! However, if I type \cite[righttext={, section 2.1}] is doesn't work anymore. Any ideas? Johann On Fri, 2022-06-24 at 09:24 +0200, Henning Hraban Ramm via ntg-context wrote: > Am 24.06.22 um 02:09 schrieb Johann Birnick via ntg-context: > > Hi there, > > > > using \cite[myreference] I will get a result like "[1]", or I could also > > change > > the "1" into some more detailed information such as a tag. > > > > However, I want to obtain something like "[1, section 2.1]". > > > > How can I achieve this? > > \cite[righttext={section 2.1}][myreference] > > 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 ___
[NTG-context] Detailed citation of reference
Hi there, using \cite[myreference] I will get a result like "[1]", or I could also change the "1" into some more detailed information such as a tag. However, I want to obtain something like "[1, section 2.1]". How can I achieve this? Thank you very much, Johann ___ 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 in \framed and \inframed
There is a bug with \framed and related commands: If this is the first object in a line, a linebreak is inserted! See the following example: \starttext This \inframed{works} fine. \inframed{But} this not. \stoptext Thank you, Johann ___ 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] Download old version
How to download an old LMTX version? Best regards, Johann ___ 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] Inline Fractions
Recently inline fractions stopped working correctly. For example symbol spacing, sub-/superscripts, the line is too short,... You can see the 3 named problems and how they sometimes appear and sometimes not in this two fractions: \starttext $\frac{\sin(x)}{16 \pi \epsilon_0 c^2 m_e^2} \frac{\sin(x)}{\epsilon_0}$ \stoptext Compare the output between the current LMTX version with some old version. (I compared with mk4, because I had nothing else available. I don't know when bugs were introduced.) Best regards, Johann ___ 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] Floating object in text - Spacing
Thank you. And is it possible to distribute the space equally between top and bottom? Or to set it to some specific dimension? Johann On Fri, 2021-01-15 at 21:43 -0500, Aditya Mahajan wrote: > On Sat, 16 Jan 2021, Johann Birnick wrote: > > > Consider the following example: > > > > \setupexternalfigures[location=default] > > \starttext > > \placefigure[right,none]{}{\externalfigure[hacker.jpg][scale=518]} > > \samplefile{lorem} > > \stoptext > > > > What bothers me is the top spacing. There is space to the top, and I dont > > want > > it to be there. On the bottom there is no spacing. I would expect it to be > > evenly distributed. But the spacing on the top will always be there. How to > > remove this? > > Add 'high' keyword: > > \placefigure[right,high,none]{}{\externalfigure[hacker.jpg][scale=518]} > > 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 > __ > _ ___ 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] Floating object in text - Spacing
Consider the following example: \setupexternalfigures[location=default] \starttext \placefigure[right,none]{}{\externalfigure[hacker.jpg][scale=518]} \samplefile{lorem} \stoptex What bothers me is the top spacing. There is space to the top, and I dont want it to be there. On the bottom there is no spacing. I would expect it to be evenly distributed. But the spacing on the top will always be there. How to remove this? Thank you, Johann ___ 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] Math align not working
Hi Aditya, thank you very much, now I need to specify the alignment only for one "column" and it gets applied for all of them. However, there is still the problem with the standard setting of the alignment. For example, \starttext \startformula \startalign[m=2, align={right,left}] \NC ab \NC = cd \NC efgh \NC = ijkl \NR \NC efgh \NC = ijkl \NC ab \NC = cd \NR \stopalign \stopformula \stoptext works now. But the setting [align={right,left}] should be the standard when n is not set. So (also according to your documentation) the following code \starttext \startformula \startalign[m=2] \NC ab \NC = cd \NC efgh \NC = ijkl \NR \NC efgh \NC = ijkl \NC ab \NC = cd \NR \stopalign \stopformula \stoptext should work, but it doesn't. The first column is right-oriented, the third (i.e. the first in the right "column") not. Could you please fix that? Thanks you very much, Johann On Sat, 2021-01-02 at 02:15 -0500, Aditya Mahajan wrote: > On Fri, 1 Jan 2021, Hans Hagen wrote: > > > On 1/1/2021 8:21 AM, Aditya Mahajan wrote: > > > \startformula \startalign[m=2,distance=8em,n=5, > > > align={right,middle,middle,middle,left, right,middle,middle,middle,left}] > > > \NC 0 \NC < \NC 2x + 5y \NC < \NC 10 > > > \NC 4 \NC < \NC 3x + y \NC < \NC 9 \NR > > > \NC 3 \NC < \NC 2y + 3z \NC < \NC 15 > > > \NC 10\NC < \NC 8y + 5z \NC < \NC 20 \NR > > > \stopalign \stopformula > > > > > > \stoptext > > > > > > Aditya: > > > > can you check this? > > > > \def\math_build_eqalign > > {\scratchtoks\emptytoks > > \d_math_eqalign_distance\mathalignmentparameter\c!distance\relax > > \scratchcounterone\mathalignmentparameter\c!m > > \scratchcountertwo\mathalignmentparameter\c!n > > \etoksapp\scratchtoks{\the\t_math_align_a}% > > \scratchcounter\plusone > > \dorecurse{\numexpr\scratchcounterone*\scratchcountertwo-\plusone\relax} > > {\ifnum\scratchcounter=\scratchcountertwo > > \scratchcounter\plusone > > \etoksapp\scratchtoks{\math_eqalign_distance}% > > \etoksapp\scratchtoks{\global\c_math_eqalign_column\zerocount}% > > \else > > \advance\scratchcounter\plusone > > \fi > > \etoksapp\scratchtoks{\the\t_math_align_b}}% > > \etoksapp\scratchtoks{\the\t_math_align_c}} > > > > > > I added: > > > > \etoksapp\scratchtoks{\global\c_math_eqalign_column\zerocount}% > > > > This works nicely. Thanks. > > I'll also go back to the mathalign document and try to update it for the > current LMTX to catch other regressions which might have happened. > > 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 > __ > _ ___ 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 blackboard (bug?)
To write blackboard math, the syntax was $\blackboard{N}$ , but now this also makes the rest of the text blackboard. So one has to use ${\blackboard N}$ . Is this indented? (the old way is a bit easier to use) Secondly, I want to address the blackboard font. Try out \starttext ${\blackboard NR}$ \stoptext This looks different then in the past. It doesn't have serifs. It looks like the wrong font, like sans. Is this a bug? To me it looks awful, honestly. It doesn't fit the rest of the math font at all. Best regards Johann ___ 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] xrightarrow specific size issue
On Sat, 2021-01-02 at 17:08 +0100, Wolfgang Schuster wrote: > Johann Birnick schrieb am 02.01.2021 um 17:04: > > On Sat, 2021-01-02 at 14:30 +, Bruce Horrocks wrote: > > > I'm not sure which manual you are looking in to find a reference to the > > > ability to add a specific dimension. > > > > > > In the source I can only find named sizes of 'none', 'normal', 'small', > > > 'medium' and 'big'. You can 'kludge' these by extending the length of the > > > text > > > using hard spaces. Alternatively there is \rightarrowfill which you might > > > be > > > able to put into a frame of the desired width? > > > > > > \starttext > > > $1\xrightarrow[none]{blah} 1$ > > > \par > > > $2\xrightarrow[normal]{blah} 2$ > > > \par > > > $3\xrightarrow[small]{blah} 3$ > > > \par > > > $4\xrightarrow[medium]{blah} 4$ > > > \par > > > $5\xrightarrow{~~~blah~~~} 5$ > > > \par > > > $6\xrightarrow[big]{blah} 6$ > > > \par > > > $7\rightarrowfill 7$ > > > \par > > > \stoptext > > > > > > -- > > > Bruce Horrocks > > > Hampshire, UK > > In particular the documentation > > https://dl.contextgarden.net/myway/matharrows.pdf shows exactly the example > > > > \xrightarrow[50] > > > > and the says the options are: > > > > none small medium big normal DIMENSION > > > > I'm sure I've seen the same options (i.e. including DIMENSION) in other > > documentations aswell, but I can't find them now. > > > > I assume this was removed with LMTX... is it possible to introduce it again? > > No, the change already happened in MkIV when Hans rewrote the arrows code. > > Wolfgang And it's not planned to make specific sizes possible? Johann ___ 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] xrightarrow specific size issue
On Sat, 2021-01-02 at 14:30 +, Bruce Horrocks wrote: > I'm not sure which manual you are looking in to find a reference to the > ability to add a specific dimension. > > In the source I can only find named sizes of 'none', 'normal', 'small', > 'medium' and 'big'. You can 'kludge' these by extending the length of the text > using hard spaces. Alternatively there is \rightarrowfill which you might be > able to put into a frame of the desired width? > > \starttext > $1\xrightarrow[none]{blah} 1$ > \par > $2\xrightarrow[normal]{blah} 2$ > \par > $3\xrightarrow[small]{blah} 3$ > \par > $4\xrightarrow[medium]{blah} 4$ > \par > $5\xrightarrow{~~~blah~~~} 5$ > \par > $6\xrightarrow[big]{blah} 6$ > \par > $7\rightarrowfill 7$ > \par > \stoptext > > -- > Bruce Horrocks > Hampshire, UK In particular the documentation https://dl.contextgarden.net/myway/matharrows.pdf shows exactly the example \xrightarrow[50] and the says the options are: none small medium big normal DIMENSION I'm sure I've seen the same options (i.e. including DIMENSION) in other documentations aswell, but I can't find them now. I assume this was removed with LMTX... is it possible to introduce it again? My problem is not to make the arrow bigger, I actually want to make it smaller. I have 2 long words above it, and so it's really long. I could use \clap{}, but then the spacing is gone and my 2 words clash with the text left and right of the arrow. So I want a small arrow with long text above it, but the spacing should be oriented on the text. Best, Johann ___ 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] blank pages bug [pagecolumns]
Hi there, I noticed a bug when using pagecolumns. If there is a title on the right column, a blank page gets added at the end of the document. For example \starttext \startpagecolumns[n=2] \title{lorem} \title{ipsum} \stoppagecolumns \stoptext gives an additional blank page. If you remove the second title (ipsum) then not. Best regards, Johann ___ 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] xrightarrow specific size issue
Hi Aditya, I know the syntax, my problem is about the options for the length of the arrow. For example \xrightarrow[big]{abc} gives a longer arrow than \xrightarrow{abc} According to different manuals also specific lengths should be possible. But they don't work. I think it's a bug. (because the example from a documentation doesn't work) Best regards, Johann On Fri, 2021-01-01 at 01:50 -0500, Aditya Mahajan wrote: > On Thu, 31 Dec 2020, Johann Birnick wrote: > > > Hi there, > > > > \starttext > > $\xrightarrow[50pt]$ > > \stoptext > > > > doesn't work. But it should, right? In the manual > > > > \starttext > > $\xrightarrow[50]$ > > \stoptext > > > > is shown, but that doesn't work either. > > The syntax is: > > \xrightarrow{top} > > or > > \xrightarrow{top}{bottom} > > 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 > __ > _ ___ 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] underbrace spacing
Thanks!! On Fri, 2021-01-01 at 01:48 -0500, Aditya Mahajan wrote: > On Thu, 31 Dec 2020, Johann Birnick wrote: > > > Hi there, > > > > if I do > > > > \starttext > > $4 \underbrace{+ 3}_{\text{because of lorem} + 2}$ > > \stoptext > > > > then the spacing gets really big because of the long. How can I prevent > > this? > > > > (in LaTeX one can use \mathcal or so and that works) > > Do you mean \mathclap? If so, then in Context, \clap works correctly in both > text and math mode. So, you can just use: > > \starttext > $4 \underbrace{+ 3}_{\clap{\text{because of lorem} + 2}}$ > \stoptext > > > 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 > __ > _ ___ 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] prevent error page
context --nodummy works fine with my viewer, thanks!! On Fri, 2021-01-01 at 11:10 +0100, Hans Hagen wrote: > On 12/31/2020 8:31 PM, Johann Birnick wrote: > > Hi there, > > > > in my setup I constantly have a pdf viewer open showing the output of > > context. > > When I recompile the viewer updates. > > > > Now if there is an error, the document fails to compile, of course. > > Previously > > the pdf file just remainded untouched, nice. But now with LMTX, the pdf will > > be > > overwritten with a pdf just saying "error". This makes my pdf viewer crash! > > I can't work like this. > > > > So how to prevent this "error" page and just let context remain the pdf > > untouched if there is an error? > Actually the remaining file is not untouched when there is an error > halfway, so maybe your viewer didn't do anything when the xref etc was > missing and fonts were unresolved ... all depends on the viewer i guess > (after a pdf update the viewer has to reread the xref at least and then > all objects it has cached). > > Long ago I played with a temp file and renaming but that also was not > stable (at least not here). > > (for ways around: see other mails) > > 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] underbrace spacing
Hi there, if I do \starttext $4 \underbrace{+ 3}_{\text{because of lorem} + 2}$ \stoptext then the spacing gets really big because of the long. How can I prevent this? (in LaTeX one can use \mathcal or so and that works) Best regards, Johann ___ 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] xrightarrow specific size issue
Hi there, \starttext $\xrightarrow[50pt]$ \stoptext doesn't work. But it should, right? In the manual \starttext $\xrightarrow[50]$ \stoptext is shown, but that doesn't work either. Best regards, Johann ___ 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] prevent error page
Hi there, in my setup I constantly have a pdf viewer open showing the output of context. When I recompile the viewer updates. Now if there is an error, the document fails to compile, of course. Previously the pdf file just remainded untouched, nice. But now with LMTX, the pdf will be overwritten with a pdf just saying "error". This makes my pdf viewer crash! I can't work like this. So how to prevent this "error" page and just let context remain the pdf untouched if there is an error? Best regards, Johann ___ 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] Math align not working
Okay, but I think it's a bug, because as you see in the linked pdf it worked the simple way some years ago... On Wed, 2020-12-30 at 14:38 +0100, Hans Åberg wrote: > One has to indicate the align pattern for all columns, otherwise it defaults > to left, it seems: > > \starttext > > \startformula \startalign[m=2,distance=8em,n=5, > align={right,middle,middle,middle,left,right,middle,middle,middle,left}] > \NC 0 \NC < \NC 2x + 5y \NC < \NC 10 > \NC 4 \NC < \NC 3x + y \NC < \NC 9 \NR > \NC 3 \NC < \NC 2y + 3z \NC < \NC 15 > \NC 10\NC < \NC 8y + 5z \NC < \NC 20 \NR > \stopalign \stopformula > > \stoptext > > > > On 29 Dec 2020, at 14:36, Johann Birnick wrote: > > > > Hi there, > > > > I noticed that Math align is not working properly. In particular I mean the > > alignment. For example, the following code > > > > > > \starttext > > > > > > \startformula \startalign[m=2,distance=8em,n=5, > > align={right,middle,middle,middle,left}] > > \NC 0 \NC < \NC 2x + 5y \NC < \NC 10 > > \NC 4 \NC < \NC 3x + y \NC < \NC 9 \NR > > \NC 3 \NC < \NC 2y + 3z \NC < \NC 15 > > \NC 10\NC < \NC 8y + 5z \NC < \NC 20 \NR > > \stopalign \stopformula > > > > \stoptext > > > > > > is copied from https://dl.contextgarden.net/myway/mathalign.pdf but doesn't > > produce the intended result. > > > > What's wrong? > > > > Best regards, > > Johann > > > > > > ___ > > 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] Math align not working
Hi Alain, I don't know what you mean by "you have two position in the second and one in the first" ? The 4 is not aligned correctly. Please see https://dl.contextgarden.net/myway/mathalign.pdf where the example comes from. The output looks different. Best regards, Johann On Wed, 2020-12-30 at 11:26 +0100, Alain Delmotte wrote: > Hi Johann, > The 4 is right aligned, but for this column you have two position in the > second and one in the first. > You could try ~4 and it will align with 10. > Best regards, > Alain > Le 29/12/2020 à 22:27, Johann Birnick a écrit : > Hi Otared, > > I'm using the same version. The problem is the "right"-alignment. See the 4 on > the right side. It should be right-aligned. I attached my pdf. > > Best regards, > Johann > > > On Tue, 2020-12-29 at 21:37 +0100, Otared Kavian wrote: > > > Hi Johann, > > > > The example you sent works fine here with LMTX version 2020.12.28 01:41. > > Which version of ConTeXt are you using ? > > > > Best regards: Otared > > > > > > > On 29 Dec 2020, at 14:36, Johann Birnick > > > wrote: > > > > > > Hi there, > > > > > > I noticed that Math align is not working properly. In particular I mean > > > the > > > alignment. For example, the following code > > > > > > > > > \starttext > > > > > > > > > > > > \startformula \startalign[m=2,distance=8em,n=5, > > > align={right,middle,middle,middle,left}] > > > \NC 0 \NC < \NC 2x + 5y \NC < \NC 10 > > > \NC 4 \NC < \NC 3x + y \NC < \NC 9 \NR > > > \NC 3 \NC < \NC 2y + 3z \NC < \NC 15 > > > \NC 10\NC < \NC 8y + 5z \NC < \NC 20 \NR > > > \stopalign \stopformula > > > > > > \stoptext > > > > > > > > > is copied from https://dl.contextgarden.net/myway/mathalign.pdf but > > > doesn't > > > produce the intended result. > > > > > > What's wrong? > > > > > > Best regards, > > > Johann > > > > > > __ > > > __ > > > ___ > > > 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 > > > > ___ > ___ 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] Math align not working
Hi Otared, I'm using the same version. The problem is the "right"-alignment. See the 4 on the right side. It should be right-aligned. I attached my pdf. Best regards, Johann On Tue, 2020-12-29 at 21:37 +0100, Otared Kavian wrote: > Hi Johann, > > The example you sent works fine here with LMTX version 2020.12.28 01:41. > Which version of ConTeXt are you using ? > > Best regards: Otared > > > On 29 Dec 2020, at 14:36, Johann Birnick wrote: > > > > Hi there, > > > > I noticed that Math align is not working properly. In particular I mean the > > alignment. For example, the following code > > > > > > \starttext > > > > > > \startformula \startalign[m=2,distance=8em,n=5, > > align={right,middle,middle,middle,left}] > > \NC 0 \NC < \NC 2x + 5y \NC < \NC 10 > > \NC 4 \NC < \NC 3x + y \NC < \NC 9 \NR > > \NC 3 \NC < \NC 2y + 3z \NC < \NC 15 > > \NC 10\NC < \NC 8y + 5z \NC < \NC 20 \NR > > \stopalign \stopformula > > > > \stoptext > > > > > > is copied from https://dl.contextgarden.net/myway/mathalign.pdf but doesn't > > produce the intended result. > > > > What's wrong? > > > > Best regards, > > Johann > > > > > > ___ > > 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 > __ > _ test.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] Math align not working
Hi there, I noticed that Math align is not working properly. In particular I mean the alignment. For example, the following code \starttext \startformula \startalign[m=2,distance=8em,n=5, align={right,middle,middle,middle,left}] \NC 0 \NC < \NC 2x + 5y \NC < \NC 10 \NC 4 \NC < \NC 3x + y \NC < \NC 9 \NR \NC 3 \NC < \NC 2y + 3z \NC < \NC 15 \NC 10\NC < \NC 8y + 5z \NC < \NC 20 \NR \stopalign \stopformula \stoptext is copied from https://dl.contextgarden.net/myway/mathalign.pdf but doesn't produce the intended result. What's wrong? Best regards, Johann ___ 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] Vertical space when surrounding with textbackground
On Thu, 2020-11-26 at 21:01 +0100, Johann Birnick wrote: > On Thu, 2020-11-26 at 20:11 +0100, Wolfgang Schuster wrote: > > Johann Birnick schrieb am 26.11.2020 um 19:42: > > > Ah, sorry again. I use > > > > > > \usemodule[Scite] > > > > > > at the begin of the document. Removing this helps. But I need it for the C > > > and > > > Cpp pretty printer. So do you know what's going on with Scite module? > > > > 1. There is still no working minimal example, just another piece. > > > > 2. There is no option line for me in the following example (LuaTeX and > > LMTX) with the current version (2020.11.26 15:41). > > > > \usemodule[scite] > > > > \definetextbackground > > [CodeBackground] > > [ frame=off, > > background=color, > > backgroundcolor=lightgray, > > location=paragraph, > > before=\blank, > > after=\blank] > > > > \setuptyping > > [CPP] > > [before=\startCodeBackground, > > after=\stopCodeBackground] > > > > \starttext > > > > \samplefile{ward} > > > > \startCPP > > #include > > > > int main(void) > > { > > printf("hello, world\n"); > > } > > \stopCPP > > > > \samplefile{weisman} > > > > \stoptext > > > > Wolfgang > > Hello Wolfgang, > > let's take your code as a MWE. I compiled exactly your code and there is a > line > at the end. I attached my compiled PDF. > > I compiled it using "context test" where the file name is "test.tex" with > exactly your content. > > I am using the latest version from the Arch Linux Repo, `context --version` > gives: > > mtx-context | ConTeXt Process Management 1.03 > mtx-context | > mtx-context | main context file: /usr/share/texmf- > dist/tex/context/base/mkiv/context.mkiv > mtx-context | current version: 2020.03.10 14:44 > mtx-context | main context file: /usr/share/texmf- > dist/tex/context/base/mkiv/context.mkxl > mtx-context | current version: 2020.03.10 14:44 > > So probably I should upgrade.. > > Greetings, > Johann I have updated and now it works. Thank you very much for all your efforts. Now let's come to my second problem: the sidebar. Proudly, I present to you my first MWE: \definetyping[CPP] [before=\startsidebar, after=\stopsidebar] \starttext \samplefile{ward} \startCPP #include int main(void) { printf("hello, world\n"); } \stopCPP \samplefile{weisman} \stoptext Can you see that there is an additional line before and after the code? How can I get rid of these? I greatly appreciate your help. Thanks, Johann ___ 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] Vertical space when surrounding with textbackground
On Thu, 2020-11-26 at 20:11 +0100, Wolfgang Schuster wrote: > Johann Birnick schrieb am 26.11.2020 um 19:42: > > Ah, sorry again. I use > > > > \usemodule[Scite] > > > > at the begin of the document. Removing this helps. But I need it for the C > > and > > Cpp pretty printer. So do you know what's going on with Scite module? > > 1. There is still no working minimal example, just another piece. > > 2. There is no option line for me in the following example (LuaTeX and > LMTX) with the current version (2020.11.26 15:41). > > \usemodule[scite] > > \definetextbackground > [CodeBackground] > [ frame=off, > background=color, > backgroundcolor=lightgray, > location=paragraph, > before=\blank, > after=\blank] > > \setuptyping > [CPP] > [before=\startCodeBackground, > after=\stopCodeBackground] > > \starttext > > \samplefile{ward} > > \startCPP > #include > > int main(void) > { > printf("hello, world\n"); > } > \stopCPP > > \samplefile{weisman} > > \stoptext > > Wolfgang Hello Wolfgang, let's take your code as a MWE. I compiled exactly your code and there is a line at the end. I attached my compiled PDF. I compiled it using "context test" where the file name is "test.tex" with exactly your content. I am using the latest version from the Arch Linux Repo, `context --version` gives: mtx-context | ConTeXt Process Management 1.03 mtx-context | mtx-context | main context file: /usr/share/texmf- dist/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2020.03.10 14:44 mtx-context | main context file: /usr/share/texmf- dist/tex/context/base/mkiv/context.mkxl mtx-context | current version: 2020.03.10 14:44 So probably I should upgrade.. Greetings, Johann test.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 ___
Re: [NTG-context] Vertical space when surrounding with textbackground
On Thu, 2020-11-26 at 19:39 +0100, Johann Birnick wrote: > On Thu, 2020-11-26 at 19:35 +0100, Wolfgang Schuster wrote: > > Johann Birnick schrieb am 26.11.2020 um 19:26: > > > I didn't want to copy paste it :D Just add [option=XML] to \starttext like > > > this: > > > > Why do pass a option for the typing environment to \starttext? > > > > > \definetextbackground[code][background=color, backgroundcolor=lightgray, > > > frame=off, location=paragraph] > > > > > > \setuptyping[before={\startbackground[code]}, after={\stopbackground}] > > > > > > \starttext[option=XML] > > > \starttyping > > > This is some code > > > a second line > > > \stoptyping > > > \stoptext > > > > > > When I use \definetyping[Mytyping][option=XML] and then use \startMytyping > > > ... > > > \stopMytyping nothing changes. > > ??? > > > > \definetextbackground > > [Code] > > [ frame=off, > > background=color, > > backgroundcolor=lightgray, > > location=paragraph] > > > > \definetyping > > [Mytyping] > > [option=XML] > > > > \setuptyping > > %[Mytyping] > > [before={\blank\starttextbackground[Code]}, > > after={\stoptextbackground\blank}] > > > > \starttext > > > > \startMytyping > > > > \stopMytyping > > > > \starttyping[option=XML] > > > > \stoptyping > > > > \stoptext > > > > Wolfgang > > > > Sorry for confusing \starttext with \starttyping. > > @Wolfgang this is exactly what I mean. It doesn't work. There is an extra line > at the end. If you remove [option=XML] it works. So what is going wrong? > > Thank you, > Johann Ah, sorry again. I use \usemodule[Scite] at the begin of the document. Removing this helps. But I need it for the C and Cpp pretty printer. So do you know what's going on with Scite module? Thanks, Johann ___ 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] Vertical space when surrounding with textbackground
On Thu, 2020-11-26 at 19:35 +0100, Wolfgang Schuster wrote: > Johann Birnick schrieb am 26.11.2020 um 19:26: > > I didn't want to copy paste it :D Just add [option=XML] to \starttext like > > this: > > Why do pass a option for the typing environment to \starttext? > > > \definetextbackground[code][background=color, backgroundcolor=lightgray, > > frame=off, location=paragraph] > > > > \setuptyping[before={\startbackground[code]}, after={\stopbackground}] > > > > \starttext[option=XML] > > \starttyping > > This is some code > > a second line > > \stoptyping > > \stoptext > > > > When I use \definetyping[Mytyping][option=XML] and then use \startMytyping > > ... > > \stopMytyping nothing changes. > ??? > > \definetextbackground > [Code] > [ frame=off, > background=color, > backgroundcolor=lightgray, > location=paragraph] > > \definetyping > [Mytyping] > [option=XML] > > \setuptyping > %[Mytyping] > [before={\blank\starttextbackground[Code]}, > after={\stoptextbackground\blank}] > > \starttext > > \startMytyping > > \stopMytyping > > \starttyping[option=XML] > > \stoptyping > > \stoptext > > Wolfgang > Sorry for confusing \starttext with \starttyping. @Wolfgang this is exactly what I mean. It doesn't work. There is an extra line at the end. If you remove [option=XML] it works. So what is going wrong? Thank you, Johann ___ 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] Vertical space when surrounding with textbackground
On Thu, 2020-11-26 at 19:17 +0100, Wolfgang Schuster wrote: > Johann Birnick schrieb am 26.11.2020 um 19:10: > > On Thu, 2020-11-26 at 17:31 +0100, Wolfgang Schuster wrote: > > > Johann Birnick schrieb am 26.11.2020 um 17:00: > > > > On Thu, 2020-11-26 at 09:38 -0500, Aditya Mahajan wrote: > > > > > On Thu, 26 Nov 2020, Johann Birnick wrote: > > > > > > > > > > > How to surround such things properly? I just want a background to > > > > > > these > > > > > > and > > > > > > a > > > > > > sidebar. No addition spacing / empty lines. > > > > > A MWE will help... > > > > > > > > > > Aditya > > > > For example, take: > > > > > > > > \definetextbackground[code][background=color, backgroundcolor=lightgray, > > > > frame=off, location=paragraph] > > > > > > > > \starttextbackground[code] > > > > \starttyping > > > > This is some code > > > > a second line > > > > \stoptyping > > > > \stoptextbackground > > > You missed the W (working) in MWE. > > > > > > \definetextbackground > > > [Code] > > > [ frame=off, > > > background=color, > > > backgroundcolor=lightgray, > > > location=paragraph] > > > > > > \setuptyping > > > [before={\blank\starttextbackground[Code]}, > > > after={\stoptextbackground\blank}] > > > > > > \starttext > > > > > > \starttyping > > > This is some code > > > a second line > > > \stoptyping > > > > > > \stoptext > > > > > > Wolfgang > > Okay so first sorry that the example missed the \starttext ... \stoptext. > > Won't > > I didn't want to copy paste it :D Just add [option=XML] to \starttext like this: \definetextbackground[code][background=color, backgroundcolor=lightgray, frame=off, location=paragraph] \setuptyping[before={\startbackground[code]}, after={\stopbackground}] \starttext[option=XML] \starttyping This is some code a second line \stoptyping \stoptext When I use \definetyping[Mytyping][option=XML] and then use \startMytyping ... \stopMytyping nothing changes. ___ 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] Vertical space when surrounding with textbackground
On Thu, 2020-11-26 at 17:31 +0100, Wolfgang Schuster wrote: > Johann Birnick schrieb am 26.11.2020 um 17:00: > > On Thu, 2020-11-26 at 09:38 -0500, Aditya Mahajan wrote: > > > On Thu, 26 Nov 2020, Johann Birnick wrote: > > > > > > > How to surround such things properly? I just want a background to these > > > > and > > > > a > > > > sidebar. No addition spacing / empty lines. > > > > > > A MWE will help... > > > > > > Aditya > > > > For example, take: > > > > \definetextbackground[code][background=color, backgroundcolor=lightgray, > > frame=off, location=paragraph] > > > > \starttextbackground[code] > > \starttyping > > This is some code > > a second line > > \stoptyping > > \stoptextbackground > > You missed the W (working) in MWE. > > \definetextbackground > [Code] > [ frame=off, > background=color, > backgroundcolor=lightgray, > location=paragraph] > > \setuptyping > [before={\blank\starttextbackground[Code]}, > after={\stoptextbackground\blank}] > > \starttext > > \starttyping > This is some code > a second line > \stoptyping > > \stoptext > > Wolfgang Okay so first sorry that the example missed the \starttext ... \stoptext. Won't happen again. So unfortunately my MWE was too minimal. Actually this works: \definetextbackground[code][background=color, backgroundcolor=lightgray, frame=off, location=paragraph] \setuptyping[before={\startbackground[code]}, after={\stopbackground}] \starttext \starttyping This is some code a second line \stoptyping \stoptext However, I use pretty printing. When you add [option=XML] to \starttext it breaks. Why? Thank you, Johann ___ 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] Vertical space when surrounding with textbackground
On Thu, 2020-11-26 at 09:38 -0500, Aditya Mahajan wrote: > On Thu, 26 Nov 2020, Johann Birnick wrote: > > > How to surround such things properly? I just want a background to these and > > a > > sidebar. No addition spacing / empty lines. > > A MWE will help... > > Aditya For example, take: \definetextbackground[code][background=color, backgroundcolor=lightgray, frame=off, location=paragraph] \starttextbackground[code] \starttyping This is some code a second line \stoptyping \stoptextbackground Johann ___ 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] Vertical space when surrounding with textbackground
Hi there, in my document(s) I have enumerations (created with \defineenumeration) and "typing"s (created with \definetyping) and I need to give a specific layout to them. In particular, I want to add textbackground (created with \definetextbackground) and sometimes a sidebar (created with \definesidebar) to them. However, when I surround for example my typing with a textbackground like this \starttextbackground[code] \startCpp ... \stopCpp \stoptextbackground or by putting the textbackground commands in "before=" and "after=" of my typing, then there will be an additional empty line at the end of the typing. Same with the enumerations and when I surround it with a sidebar instead of a textbackground. Often there is even an additional line / additional space before the typing/enumeration. How to surround such things properly? I just want a background to these and a sidebar. No addition spacing / empty lines. I would greatly appreciate your help. Thank you, Johann ___ 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] Piecewise margin line
On Fri, 2020-11-20 at 08:17 +0100, mf wrote: > Il 20/11/20 02:06, Johann Birnick ha scritto: > > On Thu, 2020-11-19 at 11:25 +0100, mf wrote: > > > Il 19/11/20 10:39, Johann Birnick ha scritto: > > > > Hello, > > > > > > > > I want to setup some fancy theorem style for my math notes. For this I > > > > want > > > > to > > > > have a colored margin line next to my theorems. It should look like > > > > this: > > > > > > > > https://i.ibb.co/F6L59pD/idea.png > > > > > > > > The line should stretch over the whole theorem, not just the first line. > > > > (But the latter would be a beginning, though.) > > > > > > > > Important to note is that the line should be *on the margin*, not in the > > > > text. > > > > > > > > So do you have an idea on how I could do that? I would greatly > > > > appreciate > > > > your > > > > answer. Thank you! > > > > > > > Look for \startsidebar \stopsidebar and \setupsidebar. > > > > > > \setupsidebar [...,...] [..,..=..,..] > > > 1 2 > > > OPT > > > 1 NAME > > > 2 rulethickness = DIMENSION > > > rulecolor = COLOR > > > alternative = NUMBER > > > topoffset = DIMENSION > > > bottomoffset = DIMENSION > > > distance = DIMENSION > > > leftmargindistance = DIMENSION > > > level = NUMBER > > > > > > Massi > > > > Thank you! I have two more questions: > > > > 1. Where can I find a documentation for this command? Even Google finds > > nothing. > > I took it from the "Commands" manual. You can find it here: > > ./tex/texmf-context/doc/context/documents/general/qrcs/setup-en.pdf > > in your ConTeXt directory. > > > 2. Unfortunately, adding \startsidebar and \stopsidebar into the `before` > > and > > `after` options of my enumeration messes up whitespace at the end. Here is a > > screenshot: > > > > https://s12.directupload.net/images/201120/lfmwp5lh.png > > > > The theorem is a normal enumeration. Like this: > > > > \defineenumeration[Theorem][before=\startsidebar, after=stopsidebar] > > > > \startsidebar and \stopsidebar should be called in horizontal mode, > since you might want to mark in the margin only a part of a paragraph. > In that case the bar would extend from the start of the marked text > until its end. > The default behavior of the bar is extending from the top of the first > line to the bottom of the last one. > Once you ended a paragraph with \par, you're in a new line and the bar > will extend to the bottom of it. > > A solution could be something like this: > > \dontleavehmode\startsidebar Theorem: ... \stopsidebar\par > > Otherwise you could adjust the bottomoffset parameter to the line > height, so that the bar ends a line height before its default. > > That way you could keep > > > \defineenumeration[Theorem][before=\startsidebar, after=stopsidebar] > > or, better: > > \definesidebar[Theorem][bottomoffset=...] > \defineenumeration[Theorem][before={\startsidebar[Theorem]},after=\stopsidebar > ] > > Massi Thank you very much. Now I understand why it happens. The `after` gets called after the end of the paragraph. Unfortunately, [before=\dontleavehmode\startsidebar, after=\stopsidebar\par] doesn't work, it doesn't change anything. I have also tried adding \nowhitespace \startlinecorrection ... \stoplinecorrection at certain positions, but it doesn't change anything. Also, I have tried to call \startsidebar by hand after \startTheorem and call \stopsidebar with [closesymbol=\stopsidebar]. That works! But there is no field in the enumeration where I can put [...=\startsidebar]. The fields 'stopper', 'right', 'titlecommand' etc. don't work. Do you have any further ideas? There must be a possibility! You also need that e.g. for setting a background color to your enumeration. I noticed that using [before=\starttextbackground, after=\stoptextbackground] also messes up whitespace... . I would again greatly appreciate your help. Thank you! Johann ___ 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] Piecewise margin line
On Thu, 2020-11-19 at 11:25 +0100, mf wrote: > Il 19/11/20 10:39, Johann Birnick ha scritto: > > Hello, > > > > I want to setup some fancy theorem style for my math notes. For this I want > > to > > have a colored margin line next to my theorems. It should look like this: > > > > https://i.ibb.co/F6L59pD/idea.png > > > > The line should stretch over the whole theorem, not just the first line. > > (But the latter would be a beginning, though.) > > > > Important to note is that the line should be *on the margin*, not in the > > text. > > > > So do you have an idea on how I could do that? I would greatly appreciate > > your > > answer. Thank you! > > > Look for \startsidebar \stopsidebar and \setupsidebar. > > \setupsidebar [...,...] [..,..=..,..] > 1 2 > OPT > 1 NAME > 2 rulethickness = DIMENSION > rulecolor = COLOR > alternative = NUMBER > topoffset = DIMENSION > bottomoffset = DIMENSION > distance = DIMENSION > leftmargindistance = DIMENSION > level = NUMBER > > Massi Thank you! I have two more questions: 1. Where can I find a documentation for this command? Even Google finds nothing. 2. Unfortunately, adding \startsidebar and \stopsidebar into the `before` and `after` options of my enumeration messes up whitespace at the end. Here is a screenshot: https://s12.directupload.net/images/201120/lfmwp5lh.png The theorem is a normal enumeration. Like this: \defineenumeration[Theorem][before=\startsidebar, after=stopsidebar] I would greatly appreciate your help. Thank you! Johann ___ 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] Piecewise margin line
Hello, I want to setup some fancy theorem style for my math notes. For this I want to have a colored margin line next to my theorems. It should look like this: https://i.ibb.co/F6L59pD/idea.png The line should stretch over the whole theorem, not just the first line. (But the latter would be a beginning, though.) Important to note is that the line should be *on the margin*, not in the text. So do you have an idea on how I could do that? I would greatly appreciate your answer. Thank you! Best regards, Johann ___ 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 ___