[NTG-context] Re: background= key not working in \startbackground and \starttextbackground
On Thu, 6 Jun 2024, Wolfgang Schuster wrote: > Aditya Mahajan schrieb am 06.06.2024 um 14:48: > > Hi, > > > > I am testing some of my old styles on latest context and find that the > > background key of \startbackground and \starttextbackground doesn't work > > (\framed is working as expected). Here is a MWE: > > 1. \starttextbackground isn't based on \framed and has a mp-key to assign a > metapost graphic. Thanks. I had forgotten that. > 2. \startbackground needs to be fixed but it's simple, replace \defcsname > with \edefcsname in pack-bck.mklx: > > \appendtoks > \frozen\protected\instance\defcsname\e!start\currentbackground\endcsname{\pack_backgrounds_start > [\currentbackground]}% > \frozen\protected\instance\defcsname\e!stop > \currentbackground\endcsname{\pack_backgrounds_stop }% > \frozen\protected\instance\defcsname > \currentbackground\endcsname{\pack_backgrounds_direct[\currentbackground]}% > \to \everydefinebackground Thanks. I'll patch it locally. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: background= key not working in \startbackground and \starttextbackground
Aditya Mahajan schrieb am 06.06.2024 um 14:48: Hi, I am testing some of my old styles on latest context and find that the background key of \startbackground and \starttextbackground doesn't work (\framed is working as expected). Here is a MWE: 1. \starttextbackground isn't based on \framed and has a mp-key to assign a metapost graphic. 2. \startbackground needs to be fixed but it's simple, replace \defcsname with \edefcsname in pack-bck.mklx: \appendtoks \frozen\protected\instance\defcsname\e!start\currentbackground\endcsname{\pack_backgrounds_start [\currentbackground]}% \frozen\protected\instance\defcsname\e!stop \currentbackground\endcsname{\pack_backgrounds_stop }% \frozen\protected\instance\defcsname \currentbackground\endcsname{\pack_backgrounds_direct[\currentbackground]}% \to \everydefinebackground Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] background= key not working in \startbackground and \starttextbackground
Hi, I am testing some of my old styles on latest context and find that the background key of \startbackground and \starttextbackground doesn't work (\framed is working as expected). Here is a MWE: \startuseMPgraphic{background:test} fill OverlayBox withcolor 0.75[red,white]; draw OverlayBox withcolor red withpen pencircle scaled 2bp; \stopuseMPgraphic \defineoverlay[background:test][\useMPgraphic{background:test}] \definetextbackground [testA] [ location=paragraph, background=background:test, frame=off, ] \definebackground [testB] [ location=paragraph, background=background:test, frame=off, ] \defineframedtext [testC] [ background=background:test, frame=off, width=broad, ] \starttext \starttestA \input tufte \stoptestA \starttestB \input tufte \stoptestB \starttestC \input tufte \stoptestC \stoptext testA gives nothing, testB gives a gray(!) background, and testC works as expected. The output is attached. I am using 2024.05.31. Aditya 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 / 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] Wiki - question about Command/ pages which start with a space character
Hi all, Is it on purpose that 128 pages "https://wiki.contextgarden.net/Command/ " start with a space character ? I didn't find an explanation in https://wiki.contextgarden.net/Command For example, these two pages exist : - https://wiki.contextgarden.net/Command/startbuffer - https://wiki.contextgarden.net/Command/_startbuffer If it is on purpose: - What is the purpose, and which page should contain which documentation? If it is not: - Is there a way to automatically merge the content of the couple of pages, and to remove the "wrong" pages, or should it be done manually ? Thanks for your help. List : Command/ attachment Command/ background Command/ bar Command/ beginblock Command/ button Command/ characterkerning Command/ comment Command/ completecombinedlist Command/ completelistoffloats Command/ completelistofsorts Command/ completelistofsynonyms Command/ completeregister Command/ copylabeltext Command/ ctxfunction Command/ ctxfunctiondefinition Command/ currentlabel Command/ delimitedtext Command/ description Command/ enumeration Command/ fence Command/ fraction Command/ framed Command/ framedtext Command/ getbuffer Command/ hbox Command/ help Command/ high Command/ highlight Command/ label Command/ labellanguage Command/ labeltext Command/ labeltexts Command/ language Command/ leftlabeltext Command/ linenote Command/ low Command/ lowhigh Command/ lowmidhigh Command/ margindata Command/ mathcommand Command/ mathdoubleextensible Command/ mathextensible Command/ mathframed Command/ mathmatrix Command/ mathornament Command/ mathoverextensible Command/ mathovertextextensible Command/ mathradical Command/ mathtriplet Command/ mathunderextensible Command/ mathundertextextensible Command/ mathunstacked Command/ nextparagraphs Command/ note Command/ ornament Command/ paragraphs Command/ placecombinedlist Command/ placefloat Command/ placelistoffloats Command/ placelistofsorts Command/ placelistofsynonyms Command/ placement Command/ placepairedbox Command/ placeregister Command/ presetlabeltext Command/ referenceformat Command/ register Command/ rightlabeltext Command/ script Command/ section Command/ seeregister Command/ setupcombinedlist Command/ setupitemgroup Command/ setuplabeltext Command/ setuppairedbox Command/ setupregister Command/ shift Command/ sorting Command/ startattachment Command/ startbackground Command/ startbuffer Command/ startcolumnset Command/ startcomment Command/ startdelimitedtext Command/ startdescription Command/ starteffect Command/ startenumeration Command/ startfittingpage Command/ startfloattext Command/ startformula Command/ startframedtext Command/ starthelp Command/ startindentedtext Command/ startitemgroup Command/ startlabeltext Command/ startlinenote Command/ startlines Command/ startmakeup Command/ startmathalignment Command/ startmathcases Command/ startmathmatrix Command/ startmixedcolumns Command/ startnarrower Command/ startnote Command/ startpagecolumns Command/ startparagraphs Command/ startparallel Command/ startplacefloat Command/ startplacepairedbox Command/ startsection Command/ startsectionblock Command/ startstartstop Command/ startstop Command/ startstyle Command/ starttabulate Command/ starttextbackground Command/ starttyping Command/ startviewerlayer Command/ startxtable Command/ stoplinenote Command/ style Command/ synonym Command/ textbackground Command/ textnote Command/ tooltip Command/ type Command/ typebuffer Command/ unit ___ 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: textbackground spacing offset
On 1/31/2024 7:15 PM, Marco Patzer wrote: On Thu, 16 Nov 2023 13:52:05 +0100 Marco Patzer wrote: I'm having problems getting the textbackground spacing offset to work. Example: \setupframedtext [offset=overlay, width=max, depthcorrection=off] \setuptextbackground [location=paragraph, %% offset=overlay, %% does nothing %% backgroundoffset=overlay, %% does nothing %% depthcorrection=off, %% does nothing %% topoffset=3mm,%% works, but only for positive values background=, frame=on] \starttext \startframedtext \framed{Foo} \stopframedtext \starttextbackground \framed{Foo} \stoptextbackground \stoptext How do it get the same spacing as in the framedtext case? Is there a solution to this? Or an explanation why the spacing differs? these are fundamentally different mechanisms .. you can play with \inframed in the second case - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: textbackground spacing offset
On Thu, 16 Nov 2023 13:52:05 +0100 Marco Patzer wrote: > I'm having problems getting the textbackground spacing offset to work. > Example: > > \setupframedtext > [offset=overlay, >width=max, >depthcorrection=off] > > \setuptextbackground > [location=paragraph, >%% offset=overlay, %% does nothing >%% backgroundoffset=overlay, %% does nothing >%% depthcorrection=off, %% does nothing >%% topoffset=3mm,%% works, but only for positive values >background=, >frame=on] > > \starttext > \startframedtext > \framed{Foo} > \stopframedtext > \starttextbackground > \framed{Foo} > \stoptextbackground > \stoptext > > How do it get the same spacing as in the framedtext case? Is there a solution to this? Or an explanation why the spacing differs? Marco ___ 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] textbackground spacing offset
Hi! I'm having problems getting the textbackground spacing offset to work. Example: \setupframedtext [offset=overlay, width=max, depthcorrection=off] \setuptextbackground [location=paragraph, %% offset=overlay, %% does nothing %% backgroundoffset=overlay, %% does nothing %% depthcorrection=off, %% does nothing %% topoffset=3mm,%% works, but only for positive values background=, frame=on] \starttext \startframedtext \framed{Foo} \stopframedtext \starttextbackground \framed{Foo} \stoptextbackground \stoptext How do it get the same spacing as in the framedtext case? The textbackground has a small gap between the inner and outer frame at the top and a larger gab at the bottom. I'm not concerned with horizontal spacing here. Marco LMTX 2023.09.04 19:15 ___ 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] Verbatim Textbox with Reference NUmbering
This is a longshot, but would be great to have. Below I have at MWE1 the verbatim codefragment textbox I am using. I found in the forum MWE2 which is a textbox with an automatic reference number. Is there a way to get the same for MWE1 with automatic reference numbering like 1.1, 1.2 etc for chapter 1, codefragment 1, 2 etc. with the possibility that in the text I can refer to the codefragment like \in{codefragment\space}[code:ccpsample] similar as to tables and figures? Thanks Jeroen %% % MWE1 %% \startuseMPgraphic{mpos:par:myexample} path p; for i = 1 upto nofmultipars : p := multipars[1] topenlarged 4pt bottomenlarged 4pt cornered 2mm ; fill p withcolor 0.95white ; draw p withcolor black withpen pencircle scaled \MPvar{linewidth}; endfor; \stopuseMPgraphic \definetextbackground [listingbackground] [state=start, mp=mpos:par:myexample, location=paragraph, topoffset=0.4em, leftoffset=0em, rulethickness=0.7pt] \definetyping[Listing] [option=commands] \setuptyping [Listing] [bodyfont=10pt, margin=1em, before=% {\blank[3*medium] \setupinterlinespace[line=2.4ex] \starttextbackground[listingbackground]}, after=% {\stoptextbackground \blank[4*medium]}, align={flushleft,verytolerant}] \starttext \startListing this is a code example \stopListing \stoptext %% % MWE2 %% \startuseMPgraphic{FunnyFrame} picture p ; numeric w, h, o ; p := textext.rt(\MPstring{FunnyFrame}) ; w := OverlayWidth ; h := OverlayHeight ; o := BodyFontSize ; p := p shifted (2o,h-ypart center p) ; draw p ; drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; draw (2o,h)--(0,h)--(0,0)--(w,0)--(w,h)--(xpart urcorner p,h) ; draw boundingbox p ; setbounds currentpicture to unitsquare xyscaled(w,h) ; \stopuseMPgraphic \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext[FunnyText][frame=off,background=FunnyFrame] \def\FrameTitle#1% {\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}} \setMPtext{FunnyFrame}{} % Add the enumeration \defineenumeration [Counter] [text=, alternative=empty, before={\FrameTitle{Counter \getnumber[Counter]} \startFunnyText}, after={\stopFunnyText}] \starttext \startCounter First example \stopCounter \startCounter Second example \stopCounter \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 ___
[NTG-context] Re: Text runs out of Verbatim Frame
Jeroen schrieb am 08.09.2023 um 13:09: I am using the following to print some verbatim text in a frame. At the right side, it keeps running out of the frame, is there a way to prevent this with the MWE? This verbatim frame always is textwidth, is there a way for a single frame just for if the situation asks for it to have it only have a frame half pagewidth, like a width=0.5\textwidth Thanks Jeroen \unprotect \startuseMPgraphic{mpos:par:myexample} path p; for i = 1 upto nofmultipars : p := multipars[1] topenlarged 4pt bottomenlarged 4pt cornered 2mm ; fill p withcolor 0.95white ; draw p withcolor black withpen pencircle scaled \MPvar{linewidth}; endfor; \stopuseMPgraphic \definetextbackground [listingbackground] [state=start, mp=mpos:par:myexample, location=paragraph, topoffset=0.4em, leftoffset=0em, rulethickness=0.7pt] \definetyping[Listing] [option=commands] Change the alignment value for your Listing's. \setuptyping [Listing] [bodyfont=10pt, margin=1em, align={flushleft,verytolerant}, before=% {\blank[3*medium] \setupinterlinespace[line=2.4ex] \starttextbackground[listingbackground]}, after=% {\stoptextbackground \blank[4*medium]}] There is also no need to put \unprotect ... \protect around your setups. Wolfgang ___ 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] Text runs out of Verbatim Frame
I am using the following to print some verbatim text in a frame. At the right side, it keeps running out of the frame, is there a way to prevent this with the MWE? This verbatim frame always is textwidth, is there a way for a single frame just for if the situation asks for it to have it only have a frame half pagewidth, like a width=0.5\textwidth Thanks Jeroen \unprotect \startuseMPgraphic{mpos:par:myexample} path p; for i = 1 upto nofmultipars : p := multipars[1] topenlarged 4pt bottomenlarged 4pt cornered 2mm ; fill p withcolor 0.95white ; draw p withcolor black withpen pencircle scaled \MPvar{linewidth}; endfor; \stopuseMPgraphic \definetextbackground [listingbackground] [state=start, mp=mpos:par:myexample, location=paragraph, topoffset=0.4em, leftoffset=0em, rulethickness=0.7pt] \definetyping[Listing] [option=commands] \setuptyping [Listing] [bodyfont=10pt, margin=1em, before=% {\blank[3*medium] \setupinterlinespace[line=2.4ex] \starttextbackground[listingbackground]}, after=% {\stoptextbackground \blank[4*medium]}] \protect \starttext \startListing test test test test test test test test test test test test test test test test test test test test test test test \stopListing \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 ___
[NTG-context] Defineenumeration head offset
Dear list, Is there a trick to not apply the leftoffset to the header of a defineenumeration? MWE: \definetextbackground [textFrameEx] [ frame=off, framecolor=darkgreen, rulethickness=2ex, background=, location=paragraph, leftoffset=2.25ex, rightoffset=2.25ex, after={\hrule} ] \defineenumeration [example] [ text=Example, headalign=middle, headcolor=white, headcommand={\inframed[background=color,backgroundcolor=darkgreen,width=\textwidth]}, number=no, before={% \starttextbackground[textFrameEx] }, after={% \stoptextbackground% }, ] \starttext \startexample Blablabla \stopexample \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 ___
[NTG-context] Question about text backgrounds
Hi, I just came across nofmultipars (which is great for splitting frames across pages, unlike a simple framed). Is there an equivalent for floats? The MWE would contain \startuseMPgraphic{mp:textFrame} begingroup; path p ; for i = 1 upto nofmultipars : p := (ulcorner multipars[i]) -- (llcorner multipars[i]) -- (llcorner multipars[i] xshifted .25cm) -- (ulcorner multipars[i] xshifted .25cm) -- cycle ; fill p withcolor "darkgreen" ; endfor; endgroup; \stopuseMPgraphic together with \definetextbackground [exampleFrame] [ mp=mp:textFrame, location=paragraph, ] Assuming I have between \starttextbackground[exampleFrame] and \starttextbackground[exampleFrame] also a figure in addition to text paragraphs. Would it be possible to also draw a rule next to it? Best regards, Alex ___ 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] Verbatim text in a frame
Hans Hagen via ntg-context schrieb am 31.07.2021 um 00:18: On 7/30/2021 9:12 PM, Jeroen via ntg-context wrote: I am using the following preamble to put a frame around verbatim text. How can I have all the text start some 5pt from the frame and how can I get rounded corners, corner=0 does not seem to work \setupcolors[state=start] \setupcolor[xwi] \definetextbackground [Code] [frame=on, framecolor=black, %corner=0, %offset=10pt, background=color, backgroundcolor=gray, location=paragraph] \setuptyping [before={\blank\starttextbackground[Code]}, after={\stoptextbackground\blank}] \starttext \starttyping example \stoptyping \stoptext \definetextbackground [Code] [frame=on, framecolor=black, corner=round, radius=10pt, topoffset=10pt, leftoffset=5pt, background=color, backgroundcolor=gray, location=paragraph] Both \blank settings can also be moved from \setuptyping to \setuptextbackground. \definetextbackground [Code] [frame=on, framecolor=black, corner=round, background=color, backgroundcolor=gray, location=paragraph, leftoffset=5mm, topoffset=5mm, before=\blank, after=\blank] \setuptyping [typing] [before={\starttextbackground[Code]}, after={\stoptextbackground}] 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 ___
Re: [NTG-context] Verbatim text in a frame
On 7/30/2021 9:12 PM, Jeroen via ntg-context wrote: I am using the following preamble to put a frame around verbatim text. How can I have all the text start some 5pt from the frame and how can I get rounded corners, corner=0 does not seem to work \setupcolors[state=start] \setupcolor[xwi] \definetextbackground [Code] [frame=on, framecolor=black, %corner=0, %offset=10pt, background=color, backgroundcolor=gray, location=paragraph] \setuptyping [before={\blank\starttextbackground[Code]}, after={\stoptextbackground\blank}] \starttext \starttyping example \stoptyping \stoptext \definetextbackground [Code] [frame=on, framecolor=black, corner=round, radius=10pt, topoffset=10pt, leftoffset=5pt, background=color, backgroundcolor=gray, location=paragraph] - 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] Verbatim text in a frame
I am using the following preamble to put a frame around verbatim text. How can I have all the text start some 5pt from the frame and how can I get rounded corners, corner=0 does not seem to work \setupcolors[state=start] \setupcolor[xwi] \definetextbackground [Code] [frame=on, framecolor=black, %corner=0, %offset=10pt, background=color, backgroundcolor=gray, location=paragraph] \setuptyping [before={\blank\starttextbackground[Code]}, after={\stoptextbackground\blank}] \starttext \starttyping example \stoptyping \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] textbackground not working
On 6/25/2021 8:33 AM, Christoph Reller wrote: Hi, Consider the MWE: \definetextbackground[background][ background=color, backgroundcolor=gray] \starttext \starttextbackground[background] Test \stoptextbackground \stoptext In the latest version 2021-06-24 of ConTeXt LMTX, the textbackground is not working. Could this be a bug or am I doing something wrong? Cheers, Christoph fixed in next upload (note: tex->mp parameters are redone, more in a pull than push fashion) - 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] textbackground not working
Hi, Consider the MWE: \definetextbackground[background][ background=color, backgroundcolor=gray] \starttext \starttextbackground[background] Test \stoptextbackground \stoptext In the latest version 2021-06-24 of ConTeXt LMTX, the textbackground is not working. Could this be a bug or am I doing something wrong? Cheers, Christoph ___ 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
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 ___ 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, 26 Nov 2020, Johann Birnick wrote: > 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: \starttext does not take an `option=XML` argument. > \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. Again, a MWE help to understand what is going wrong. \definetextbackground[code][background=color, backgroundcolor=lightgray, frame=off, location=paragraph] \setuptyping[before={\startbackground[code]}, after={\stopbackground}] \definetyping[XMLtyping] [ option=XML, before={\startbackground[code]}, after={\stopbackground}, ] \starttext \startXMLtyping This is some code a second line \stopXMLtyping \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 ___
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
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 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? Do you have a example. 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 ___
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
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 ___ 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, 26 Nov 2020, Johann Birnick wrote: > 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 \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 Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] 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
Hi Johann, Here is an example (extracted from one of my files…) which might give what you want: you can change some of the specifications easily. % begin proclaim-leftbar.tex %%% \startuseMPgraphic{mpos:region:leftbar} draw_multi_pars; draw_multi_side; \stopuseMPgraphic \definetextbackground[leftbartext] [location=paragraph, mp=mpos:region:leftbar, width=broad, frame=off, framecolor=darkred, rulethickness=2pt, frameoffset=1.25em, topoffset=-2ex, bottomoffset=-2ex, background=color, backgroundcolor=white, ] %%% \defineenumeration[proclaim] [text=, before={\starttextbackground[leftbartext]}, after={\stoptextbackground}, style=slanted, title=yes, titleleft=, titleright={.}, alternative=hanging, width=fit, right={~}, way=bysection, prefix=yes, prefixsegments={chapter:section}] %%% \starttext \startchapter[title={Topologie des nombres réels},reference=chap:R] \startproclaim[lem:Q-Archimedien]{Proposition} L'ensemble ${\Bbb Q}$ est {\bi archimédien}\index{archimédien}, c'est-à-dire que si $\epsilon \in {\Bbb Q}$ et $\epsilon > 0$, pour tout $R \in {\Bbb Q}$ tel que $R > 0$ il existe un entier $n \in {\Bbb N}$ tel que $n\epsilon > R$. Plus précisément il existe un unique entier $m \geq 0$ tel que $m\epsilon \leq R < (m+1)\epsilon$~: cet entier $m$ est appelé partie entière de $R/\epsilon$ et souvent noté $m = \lfloor R/\epsilon \rfloor$ (et l'entier $(m+1)$ est noté $m+1 = \lceil R/\epsilon \rceil$). \stopproclaim \stopchapter \stoptext %%% % end proclaim-leftbar.tex Best regards: Otared > On 20 Nov 2020, at 02:06, Johann Birnick wrote: > > 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 > ___ ___ 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] Text around a figure
Hi Otared and Wolfgang, It's great, the following code does the job! Thank you so much. Fabrice \useMPlibrary[dum] \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] \setupfloats[freeregion=no] \definetextbackground[fondpaille] [background=color, backgroundcolor=fondpaille, frame=off, location=always, ] \showframe \starttext \starttextbackground[fondpaille] \startplacefigure[number=no,location=right] \externalfigure[dummy] \stopplacefigure \startitemize[n] \dorecurse{3}{\startitem \input ward \stopitem} \stopitemize \stoptextbackground \stoptext Le jeu. 16 juil. 2020 à 14:59, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> a écrit : > Otared Kavian schrieb am 16.07.2020 um 11:58: > > Hi Fabrice, > > > > Maybe you can play with different settings of your textbackground, as in > > > > \definetextbackground[fondpaille] > > [background=color, > > backgroundcolor=fondpaille, > > frame=off, > > location=paragraph, % or: text, always, paragraph > > backgroundoffset=4pt] % change the value here > > It's a float feature which can be disabled. > > \setupfloats[freeregion=no] > > 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] Text around a figure
Hi Fabrice, Maybe you can play with different settings of your textbackground, as in \definetextbackground[fondpaille] [background=color, backgroundcolor=fondpaille, frame=off, location=paragraph, % or: text, always, paragraph backgroundoffset=4pt] % change the value here Best regards: Otared > On 16 Jul 2020, at 11:10, Fabrice Couvreur > wrote: > > Hi Otared and Wolfgang, > Thanks for your help ; the result is almost what I want (the space between > the text and the figure is not colored) but it is likely that we could not do > better. > Fabrice > > Le mer. 15 juil. 2020 à 22:25, Otared Kavian a écrit : > Hi Fabrice, > > I think what Wolfgang suggests is something like the following: > > \useMPlibrary[dum] > \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > \definetextbackground[fondpaille] > [background=color, > backgroundcolor=fondpaille, > frame=off, > location=always] > > \starttext > > \starttextbackground[fondpaille] > \startplacefigure[number=no,location=right] > \externalfigure[dummy] > \stopplacefigure > \startitemize[n] > \dorecurse{3}{\startitem \input ward \stopitem} > \stopitemize > \stoptextbackground > > \stoptext > > Best regards: Otared K. > > > On 15 Jul 2020, at 22:13, Wolfgang Schuster > > wrote: > > > > Fabrice Couvreur schrieb am 15.07.2020 um 19:54: > >> Hello, > >> I always encounter difficulties with the placement of figures in such a > >> way that the text envelops the figure. > >> Thank you. > >> Fabrice > >> \useMPlibrary[dum] > >> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > >> \starttext > >> \startframedtext[width=max,background=color,backgroundcolor=fondpaille] > >> \placefloat[][right,none]{} > >>{\externalfigure[dummy]} > >> \startitemize[n] > >>\dorecurse{3}{\startitem \input ward \stopitem} > >> \stopitemize > >>\stopframedtext > >>\stoptext > > > > > > Side floats don't work in frames, use the textbackground environment to add > > a colored box behind the text. > > > > 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 > ___ > ___ > 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] Text around a figure
Hi Otared and Wolfgang, Thanks for your help ; the result is almost what I want (the space between the text and the figure is not colored) but it is likely that we could not do better. Fabrice Le mer. 15 juil. 2020 à 22:25, Otared Kavian a écrit : > Hi Fabrice, > > I think what Wolfgang suggests is something like the following: > > \useMPlibrary[dum] > \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > \definetextbackground[fondpaille] > [background=color, > backgroundcolor=fondpaille, > frame=off, > location=always] > > \starttext > > \starttextbackground[fondpaille] > \startplacefigure[number=no,location=right] > \externalfigure[dummy] > \stopplacefigure > \startitemize[n] > \dorecurse{3}{\startitem \input ward \stopitem} > \stopitemize > \stoptextbackground > > \stoptext > > Best regards: Otared K. > > > On 15 Jul 2020, at 22:13, Wolfgang Schuster < > wolfgang.schuster.li...@gmail.com> wrote: > > > > Fabrice Couvreur schrieb am 15.07.2020 um 19:54: > >> Hello, > >> I always encounter difficulties with the placement of figures in such a > way that the text envelops the figure. > >> Thank you. > >> Fabrice > >> \useMPlibrary[dum] > >> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > >> \starttext > >> \startframedtext[width=max,background=color,backgroundcolor=fondpaille] > >> \placefloat[][right,none]{} > >>{\externalfigure[dummy]} > >> \startitemize[n] > >>\dorecurse{3}{\startitem \input ward \stopitem} > >> \stopitemize > >>\stopframedtext > >>\stoptext > > > > > > Side floats don't work in frames, use the textbackground environment to > add a colored box behind the text. > > > > 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 > > ___ > ___ 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] Text around a figure
Hi Fabrice, I think what Wolfgang suggests is something like the following: \useMPlibrary[dum] \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] \definetextbackground[fondpaille] [background=color, backgroundcolor=fondpaille, frame=off, location=always] \starttext \starttextbackground[fondpaille] \startplacefigure[number=no,location=right] \externalfigure[dummy] \stopplacefigure \startitemize[n] \dorecurse{3}{\startitem \input ward \stopitem} \stopitemize \stoptextbackground \stoptext Best regards: Otared K. > On 15 Jul 2020, at 22:13, Wolfgang Schuster > wrote: > > Fabrice Couvreur schrieb am 15.07.2020 um 19:54: >> Hello, >> I always encounter difficulties with the placement of figures in such a way >> that the text envelops the figure. >> Thank you. >> Fabrice >> \useMPlibrary[dum] >> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] >> \starttext >> \startframedtext[width=max,background=color,backgroundcolor=fondpaille] >> \placefloat[][right,none]{} >>{\externalfigure[dummy]} >> \startitemize[n] >>\dorecurse{3}{\startitem \input ward \stopitem} >> \stopitemize >>\stopframedtext >>\stoptext > > > Side floats don't work in frames, use the textbackground environment to add a > colored box behind the text. > > 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] Using TestBackground inside Offset
Jon Wong schrieb am 23.12.2019 um 09:13: Is it possible? Yes. I get “missing endgroup inserted” error. Without a minimal example there is no way to tell why you get this error message. As can be seen in the example below you can use textbackgrounds with the \offset command. \definetextbackground [DisplayBackground] [location=paragraph] \definetextbackground [InlineBackground] [location=text] \starttext X\offset[x=1em]{\starttextbackground[InlineBackground]Text\stoptextbackground} X\offset[x=1em]{\vtop{\starttextbackground[DisplayBackground]Text\crlf Text\stoptextbackground}} X\offset[x=1em]{\framed[location=top,align=normal]{Text\crlf Text}} \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Strange pagebreaks in LMTX
Hi Wolfgang, Thanks for your answer. I tried Hans' suggestion to use \textbackground instead of background: indeed it solves the problem of incorrect page breaks, but it seems that \setuptextbackground « leftframe=on » is not honoured, that is one cannot say for instance: \setuptextbackground[frame=off,leftframe=on] while using \background this would be possible. The other issue, as you pointed out is the way the end of \textbackground can be controlled (even though for my case it is not an issue). The \sidebar mechanism in order to have a vertical line on the left of each exercise does not work properly neither, because it is difficult to control precisely where it ends. Best regards: OK > On 4 Sep 2019, at 18:32, Wolfgang Schuster > wrote: > > Hans Hagen schrieb am 04.09.2019 um 17:58: >> On 9/4/2019 2:24 PM, Otared Kavian wrote: >>> Hi all, >>> >>> I have a document which typesets correctly in mkiv giving a PDF file with 7 >>> pages, but the same document typeset with lmtx gives two pages with a >>> strange pagebreak on the second page. Up to now, unfortunately, I could not >>> create a minimal example to show this behaviour, so I put the files in the >>> folder here: >>> >>> >>> https://www.dropbox.com/sh/7rolmpe47njvy0l/AADmcILO0XgY3Sb6FC2dwMw-a?dl=0 >>> >>> and the PDF file obtained with mkiv is here >>> >>> https://www.dropbox.com/s/udbz0lulat9vum7/bug-pagebreaks-mkiv.pdf?dl=0 >>> >>> while the one obtained with lmtx is here >>> >>> https://www.dropbox.com/s/t6kge5lq8otju4y/bug-pagebreaks-lmtx.pdf?dl=0 >>> >>> Also, the TeX file typesets correctly with lmtx, if I don't use textrules, >>> so I wonder whether there has been some changes in the way such textrules >>> have to be used. >>> As far as I can remember, two months ago the same file was typeset with >>> lmtx without any problem. >>> >>> Thanks in advance for any help, >>> Best regards: OK >> you have some interaction between textrules and backgrounds (and that can be >> a matter of very small differences in dimensions and rounding and such .. i >> just don't see a quick way out) ... esp these backgrounds are an old >> mechanism (maybe i should alias it to textbackgrounds in lmtx) >> >> much better is to use this: >> >> \definetextbackground >> [xx] >> [location=paragraph] >> >> \starttextbackground[xx] >> \stoptextbackground >> >> can you try to use that instead? less page overflow too >> >> (actually i should iontegrate some title line in that) > A limitation of textbackgrounds is the limited control over the vertical > space at page breaks. > > With the old background mechanism you get the normal topoffset and > bottomoffset values > but with textbackgrounds you can just control the space at the end and end of > the environment. > > \showframe[text][text] > > \starttext > > \dorecurse{3}{\samplefile{knuth}} > > \startbackground[topoffset=1em,bottomoffset=1em] > \dorecurse{2}{\samplefile{knuth}} > \stopbackground > > \dorecurse{2}{\samplefile{knuth}} > > \page > > \definetextbackground[xx][location=paragraph,frame=off,background=color,backgroundcolor=gray,topoffset=1em,bottomoffset=1em] > > \dorecurse{3}{\samplefile{knuth}} > > \starttextbackground[xx] > \dorecurse{2}{\samplefile{knuth}} > \stoptextbackground > > \dorecurse{2}{\samplefile{knuth}} > > \stoptext > > Wolfgang > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Strange pagebreaks in LMTX
Hans Hagen schrieb am 04.09.2019 um 17:58: On 9/4/2019 2:24 PM, Otared Kavian wrote: Hi all, I have a document which typesets correctly in mkiv giving a PDF file with 7 pages, but the same document typeset with lmtx gives two pages with a strange pagebreak on the second page. Up to now, unfortunately, I could not create a minimal example to show this behaviour, so I put the files in the folder here: https://www.dropbox.com/sh/7rolmpe47njvy0l/AADmcILO0XgY3Sb6FC2dwMw-a?dl=0 and the PDF file obtained with mkiv is here https://www.dropbox.com/s/udbz0lulat9vum7/bug-pagebreaks-mkiv.pdf?dl=0 while the one obtained with lmtx is here https://www.dropbox.com/s/t6kge5lq8otju4y/bug-pagebreaks-lmtx.pdf?dl=0 Also, the TeX file typesets correctly with lmtx, if I don't use textrules, so I wonder whether there has been some changes in the way such textrules have to be used. As far as I can remember, two months ago the same file was typeset with lmtx without any problem. Thanks in advance for any help, Best regards: OK you have some interaction between textrules and backgrounds (and that can be a matter of very small differences in dimensions and rounding and such .. i just don't see a quick way out) ... esp these backgrounds are an old mechanism (maybe i should alias it to textbackgrounds in lmtx) much better is to use this: \definetextbackground [xx] [location=paragraph] \starttextbackground[xx] \stoptextbackground can you try to use that instead? less page overflow too (actually i should iontegrate some title line in that) A limitation of textbackgrounds is the limited control over the vertical space at page breaks. With the old background mechanism you get the normal topoffset and bottomoffset values but with textbackgrounds you can just control the space at the end and end of the environment. \showframe[text][text] \starttext \dorecurse{3}{\samplefile{knuth}} \startbackground[topoffset=1em,bottomoffset=1em] \dorecurse{2}{\samplefile{knuth}} \stopbackground \dorecurse{2}{\samplefile{knuth}} \page \definetextbackground[xx][location=paragraph,frame=off,background=color,backgroundcolor=gray,topoffset=1em,bottomoffset=1em] \dorecurse{3}{\samplefile{knuth}} \starttextbackground[xx] \dorecurse{2}{\samplefile{knuth}} \stoptextbackground \dorecurse{2}{\samplefile{knuth}} \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Strange pagebreaks in LMTX
On 9/4/2019 2:24 PM, Otared Kavian wrote: Hi all, I have a document which typesets correctly in mkiv giving a PDF file with 7 pages, but the same document typeset with lmtx gives two pages with a strange pagebreak on the second page. Up to now, unfortunately, I could not create a minimal example to show this behaviour, so I put the files in the folder here: https://www.dropbox.com/sh/7rolmpe47njvy0l/AADmcILO0XgY3Sb6FC2dwMw-a?dl=0 and the PDF file obtained with mkiv is here https://www.dropbox.com/s/udbz0lulat9vum7/bug-pagebreaks-mkiv.pdf?dl=0 while the one obtained with lmtx is here https://www.dropbox.com/s/t6kge5lq8otju4y/bug-pagebreaks-lmtx.pdf?dl=0 Also, the TeX file typesets correctly with lmtx, if I don't use textrules, so I wonder whether there has been some changes in the way such textrules have to be used. As far as I can remember, two months ago the same file was typeset with lmtx without any problem. Thanks in advance for any help, Best regards: OK you have some interaction between textrules and backgrounds (and that can be a matter of very small differences in dimensions and rounding and such .. i just don't see a quick way out) ... esp these backgrounds are an old mechanism (maybe i should alias it to textbackgrounds in lmtx) much better is to use this: \definetextbackground [xx] [location=paragraph] \starttextbackground[xx] \stoptextbackground can you try to use that instead? less page overflow too (actually i should iontegrate some title line in that) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Unwanted white box above float
Hi, \setupfloat[thematicimage] [freeregion=no] But I do not know what that actually means. I just noticed that it makes the white background box not be white any more. Taco > On 22 Jul 2019, at 16:39, Duncan Hothersall wrote: > > Hi all. > > Have been experimenting with the many and varied options for placefloat to > try to resolve this problem with no success. As per minimal example below I > have nearly what I'm after - an image which floats to the right of a > background box with a 1em offset - but I can't get rid of the white box which > appears above it no matter what permutations I try. > > (Secondary query: why do I have to set leftoffset=, rightoffset= etc. > individually for the text background? offset= seems to have no effect.) > > Thanks for any help you can offer. > > > \definetextbackground[TintBoxedBackground] > [background=color, > backgroundcolor=cyan, > frame=off, > leftoffset=1em, > rightoffset=1em, > topoffset=1em, > bottomoffset=1em, > location=paragraph] > > \definefloat[thematicimage][figure] > \setupfloat[thematicimage] > [default=right,none}, > offset=1em, > margin=0em, > background=color, > backgroundcolor=cyan, > rightmargindistance=-1em] > > \starttext > > \starttextbackground[TintBoxedBackground] > > {\bf Lorem ipsum dolor sit amet}\blank > > \placethematicimage{}{\externalfigure[cow][width=0.30\makeupwidth]} Lorem > ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor > incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis > nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. > Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore > eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, > sunt in culpa qui officia deserunt mollit anim id est laborum. > > \stoptextbackground > > \stoptext > > > Duncan > ___ > 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 > ___ Taco Hoekwater Elvenkind BV ___ 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] Unwanted white box above float
Hi all. Have been experimenting with the many and varied options for placefloat to try to resolve this problem with no success. As per minimal example below I have nearly what I'm after - an image which floats to the right of a background box with a 1em offset - but I can't get rid of the white box which appears above it no matter what permutations I try. (Secondary query: why do I have to set leftoffset=, rightoffset= etc. individually for the text background? offset= seems to have no effect.) Thanks for any help you can offer. \definetextbackground[TintBoxedBackground] [background=color, backgroundcolor=cyan, frame=off, leftoffset=1em, rightoffset=1em, topoffset=1em, bottomoffset=1em, location=paragraph] \definefloat[thematicimage][figure] \setupfloat[thematicimage] [default=right,none}, offset=1em, margin=0em, background=color, backgroundcolor=cyan, rightmargindistance=-1em] \starttext \starttextbackground[TintBoxedBackground] {\bf Lorem ipsum dolor sit amet}\blank \placethematicimage{}{\externalfigure[cow][width=0.30\makeupwidth]} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \stoptextbackground \stoptext Duncan ___ 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] Small pages and large framed texts
Gosh Wolfgang! Thank you so much for your piece of code! — It starts to look nicer and nicer in my little project :-) Kindest regards Willi > On 20 Mar 2019, at 22:31, Wolfgang Schuster > wrote: > > Willi Egger schrieb am 20.03.19 um 22:11: >> It’s me again… >> I appears that I was not clear enough, though I am happy about the >> possibility of using textbackground. >> What I must do is to prepare a list of ConTeXt commands on a very small >> page. So the specific question is, how I can influence the >> \placelistofsorts[texcommand] in such a way, that the framed pieces break >> over the page. > > \usemodule [setups] > > \setuppapersize [A6] [A6] > > \setupbodyfont [pagella,9pt] > > \definetextbackground > [SetupsParameter] > [before=\blank, > after=\blank, > topoffset=10pt, > leftoffset=10pt, > location=paragraph, > frame=on] > > \startsetups [xml:setups:start] > \starttextbackground [SetupsParameter] > \stopsetups > > \startsetups [xml:setups:stop] > \stoptextbackground > \stopsetups > > \starttext > > \startsection[title={Short Version of the Command}] > > \cmdshortsetup [setupframed] > \cmdshortsetup [setupinteraction] > > \stopsection > > \startsection[title={\TEX-commands}] > > \placesetup > > \stopsection > > \stoptext > > Wolfgang > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://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] Small pages and large framed texts
Willi Egger schrieb am 20.03.19 um 22:11: It’s me again… I appears that I was not clear enough, though I am happy about the possibility of using textbackground. What I must do is to prepare a list of ConTeXt commands on a very small page. So the specific question is, how I can influence the \placelistofsorts[texcommand] in such a way, that the framed pieces break over the page. \usemodule [setups] \setuppapersize [A6] [A6] \setupbodyfont [pagella,9pt] \definetextbackground [SetupsParameter] [before=\blank, after=\blank, topoffset=10pt, leftoffset=10pt, location=paragraph, frame=on] \startsetups [xml:setups:start] \starttextbackground [SetupsParameter] \stopsetups \startsetups [xml:setups:stop] \stoptextbackground \stopsetups \starttext \startsection[title={Short Version of the Command}] \cmdshortsetup [setupframed] \cmdshortsetup [setupinteraction] \stopsection \startsection[title={\TEX-commands}] \placesetup \stopsection \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] MetaFun: nofmultipars wrong?
On 9/25/2018 3:24 AM, Henri Menke wrote: Dear list, I used to be under the impression that when you wanted a background frame around a piece of text, you'd use a loop over nofmultipars. However, I realized that even when the contained material breaks across pages, the counter remains 1 on the second page. Another issue is that the frame containing the page break has a stray blank line at the end. Is this something that changed recently when switching to the one-pass processing? I have attached the output of beta 2018.09.24 14:11 (which I believe is the latest). label.lft(decimal multilocs[i], ulcorner multipars[i]) withcolor red ; Cheers, Henri --- \startuseMPgraphic{pageframe} for i=1 upto nofmultipars : draw (ulcorner multipars[i] -- urcorner multipars[i]) withcolor red ; draw (llcorner multipars[i] -- lrcorner multipars[i]) withcolor red ; label.lft(decimal i, ulcorner multipars[i]) withcolor red ; endfor ; \stopuseMPgraphic \definetextbackground [PageFrame] [mp=pageframe, location=paragraph] \starttext \samplefile{knuth} \starttextbackground[PageFrame] \samplefile{knuth} \stoptextbackground \samplefile{knuth} \starttextbackground[PageFrame] \samplefile{knuth} \samplefile{knuth} \samplefile{knuth} \stoptextbackground \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 ___ -- - 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] MetaFun: nofmultipars wrong?
Dear list, I used to be under the impression that when you wanted a background frame around a piece of text, you'd use a loop over nofmultipars. However, I realized that even when the contained material breaks across pages, the counter remains 1 on the second page. Another issue is that the frame containing the page break has a stray blank line at the end. Is this something that changed recently when switching to the one-pass processing? I have attached the output of beta 2018.09.24 14:11 (which I believe is the latest). Cheers, Henri --- \startuseMPgraphic{pageframe} for i=1 upto nofmultipars : draw (ulcorner multipars[i] -- urcorner multipars[i]) withcolor red ; draw (llcorner multipars[i] -- lrcorner multipars[i]) withcolor red ; label.lft(decimal i, ulcorner multipars[i]) withcolor red ; endfor ; \stopuseMPgraphic \definetextbackground [PageFrame] [mp=pageframe, location=paragraph] \starttext \samplefile{knuth} \starttextbackground[PageFrame] \samplefile{knuth} \stoptextbackground \samplefile{knuth} \starttextbackground[PageFrame] \samplefile{knuth} \samplefile{knuth} \samplefile{knuth} \stoptextbackground \stoptext 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] \definetextbackground does not fill tables within
Floating objects (\placetable, \placefigure, ... and footnotes, etc.) do not inherit the text background, for indeed, imagine that it floats to another location. Here, you use location=force, so one might expect it to use the text background... In fact, side floats, location=left and location=right, do get the text background color, so there is a *kludge* possible there: \startplacetable [location=right] ... \stopplacetable \flushsidefloats ... (incomplete example) Alan P.S. Hans: maybe location=force ought to work similarly with respect to text backgrounds as location=left or location=right. On Mon, 13 Aug 2018 21:37:45 + dxpubl...@posteo.net wrote: > Hi, > > I have simple document which I define my \definetextbackground: > \startteoria and \stopteoria (see below). When I use it and put table > within, the table does not get filled with color. Any solution? > > Thanks in advance, > Xavier > > \definecolor[teoriacolor][lightgray] > > \definetextbackground[bteoria][ > frame=off, > location=paragraph, > background=color, > backgroundcolor=teoriacolor, % fins aquí provat: > http://www.mail-archive.com/ntg-context%40ntg.nl/msg78014.html > %width=broad, > %corner=round, > %radius=5ex, > leftoffset=10pt,rightoffset=10pt, > topoffset=10pt,bottomoffset=10pt > %offset=-5pt > ] > > \definestartstop[teoria][before={\begingroup\blank[big]\testpage[2]\starttextbackground[bteoria]},after={\stoptextbackground\blank[big]\endgroup}] > > > \starttext > > \startteoria > \input tufte > > \placetable[force,none][taula:teoria:1]{Recopilació de dades. Conceptes > fonamentals}{ > \starttable[|l|p(.6\textwidth)|] > \NC Població: \NC Són {\em tots} els elements que són objecte d'estudi > \NC \FR > \HL > \NC Mostra: \NC La {\em part} de la població de la qual recopilem les > dades i estudiam. > > Poques vegades coincideix amb la població. Una bona mostra necessita ser > suficientment heterogènia per a poder representar la població. > > Es pot determinar el tamany mínim necessari per a què una mostra tengui > la representativitat necessària amb un marge d'error. \NC \MR > \HL > \NC Grandària: \NC {\em Nombre} d'elements de la població o de la > mostra. \NC \MR > \HL > \NC Variable estadística: \NC Cadascuna de les {\em propietats} o > característiques que volem estudiar d'un conjunt de dades. \NC \LR > \stoptable} > > Existeixen dues branques de l'estadística: > > \startitemize > \item L'{\em estadística descriptiva}, que simplement descriu i > interpreta les característiques del grup d'estudi, tal com és. Fa un > {\em retrat} de la població. > \item L'{\em estadística inferencial} que intenta fer prediccions i > justificar que la mostra s'adeqüa a la població, de manera que les > característiques de la mostra siguin les mateixes que les > característiques de la població. > \stopitemize > > > \stopteoria > > \stoptext > > > > > Result (see pdf file) ___ 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] \definetextbackground does not fill tables within
Hi, I have simple document which I define my \definetextbackground: \startteoria and \stopteoria (see below). When I use it and put table within, the table does not get filled with color. Any solution? Thanks in advance, Xavier \definecolor[teoriacolor][lightgray] \definetextbackground[bteoria][ frame=off, location=paragraph, background=color, backgroundcolor=teoriacolor, % fins aquí provat: http://www.mail-archive.com/ntg-context%40ntg.nl/msg78014.html %width=broad, %corner=round, %radius=5ex, leftoffset=10pt,rightoffset=10pt, topoffset=10pt,bottomoffset=10pt %offset=-5pt ] \definestartstop[teoria][before={\begingroup\blank[big]\testpage[2]\starttextbackground[bteoria]},after={\stoptextbackground\blank[big]\endgroup}] \starttext \startteoria \input tufte \placetable[force,none][taula:teoria:1]{Recopilació de dades. Conceptes fonamentals}{ \starttable[|l|p(.6\textwidth)|] \NC Població: \NC Són {\em tots} els elements que són objecte d'estudi \NC \FR \HL \NC Mostra: \NC La {\em part} de la població de la qual recopilem les dades i estudiam. Poques vegades coincideix amb la població. Una bona mostra necessita ser suficientment heterogènia per a poder representar la població. Es pot determinar el tamany mínim necessari per a què una mostra tengui la representativitat necessària amb un marge d'error. \NC \MR \HL \NC Grandària: \NC {\em Nombre} d'elements de la població o de la mostra. \NC \MR \HL \NC Variable estadística: \NC Cadascuna de les {\em propietats} o característiques que volem estudiar d'un conjunt de dades. \NC \LR \stoptable} Existeixen dues branques de l'estadística: \startitemize \item L'{\em estadística descriptiva}, que simplement descriu i interpreta les característiques del grup d'estudi, tal com és. Fa un {\em retrat} de la població. \item L'{\em estadística inferencial} que intenta fer prediccions i justificar que la mostra s'adeqüa a la població, de manera que les característiques de la mostra siguin les mateixes que les característiques de la població. \stopitemize \stopteoria \stoptext Result (see pdf file) prova.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] Textbackground offset with multi-col paragraphs
> On 2. Nov 2017, at 15:17, Thomas Floeren wrote: > > Hi, > > I noticed that with one of the recent betas the right offset of my > textbackgrounds doesn’t work properly anymore when the textbackground > contains a multi-column “paragraph”. > > A minimal: > > \defineparagraphs [TestPar][n=2, distance=7mm] > \setupparagraphs [TestPar][1][width=2em] > > \definetextbackground [CB][ > location=paragraph, > backgroundcolor=gray, > leftoffset=.3em, > rightoffset=.3em, > topoffset=.3em, > bottomoffset=.3em, > frame=off > ] > > \starttext > > \starttextbackground [CB] > \dorecurse {40} {a b c } > \stoptextbackground > > text > > \starttextbackground [CB] > \startTestPar > img > \TestPar > \dorecurse {40} {a b c } > \stopTestPar > \stoptextbackground > > \stoptext > > > The first box is OK and as expected. But with the second one (containing a > “paragraph”) the right offset gets miscalculated, so that the text runs into > the edge of the background. > > With a beta from July or so the behavior was still OK. > Any news on this? Just to know if I should wait for a fix, or rather adapt my existing documents. Thanks, -- Tom ___ 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] Textbackground offset with multi-col paragraphs
Hi, I noticed that with one of the recent betas the right offset of my textbackgrounds doesn’t work properly anymore when the textbackground contains a multi-column “paragraph”. A minimal: \defineparagraphs [TestPar][n=2, distance=7mm] \setupparagraphs [TestPar][1][width=2em] \definetextbackground [CB][ location=paragraph, backgroundcolor=gray, leftoffset=.3em, rightoffset=.3em, topoffset=.3em, bottomoffset=.3em, frame=off ] \starttext \starttextbackground [CB] \dorecurse {40} {a b c } \stoptextbackground text \starttextbackground [CB] \startTestPar img \TestPar \dorecurse {40} {a b c } \stopTestPar \stoptextbackground \stoptext The first box is OK and as expected. But with the second one (containing a “paragraph”) the right offset gets miscalculated, so that the text runs into the edge of the background. With a beta from July or so the behavior was still OK. Thanks for any advice, best, -- Tom http://dflect.net/context-typeset-tool/ ___ 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] t-vim module: math in "normal" code and background color
On Mon, 2017-07-17 at 21:13 +0200, Gerion Entrup wrote: > Hi, > > I have two questions with the vim module. > > 1. I want to use the math mode inside the code. I've seen the escape option, > e.g. here [1], but this seems to work only with comments. Is there a > possibility to use it directly in the code, too? > > Minimal example: > ``` > \usemodule[vim] > \definevimtyping[python][syntax=python, escape=on] > > \starttext > \startpython > # Returns \m{\sum_{i=1}^{n}i} > def sum_upto(\m{n \in \mathbb{N}}) > r = range(1, \m{n} + 1) > return sum(r) > \stoppython > \stoptext > ``` > > 2. It would be cool, if I can define some background color for the code. > Unfortunately I'm very new to context and haven't seen a direct option. I > assume this is possible with some kind of extra environment around the code? Background is no problem, escape in code is not implemented in t-vim. I filed a feature request for /BTEX ... /ETEX escaping as in regular typing on Aditya's GitHub: https://github.com/adityam/filter/ issues/23 \definetextbackground [verbatim] [location=paragraph] \usemodule[vim] \definevimtyping [python] [syntax=python, escape=on, before={\starttextbackground[verbatim]}, after={\stoptextbackground}] \setuptyping [before={\starttextbackground[verbatim]}, after={\stoptextbackground}] \starttext \starttyping[escape=yes] # Returns /BTEX\m{\sum_{i=1}^{n}i}/ETEX def sum_upto(/BTEX\m{n \in \mathbb{N}}/ETEX) r = range(1, \m{n} + 1) return sum(r) \stoptyping \startpython # Returns \m{\sum_{i=1}^{n}i} def sum_upto(\m{n \in \mathbb{N}}w) r = range(1, \m{n} + 1) return sum(r) \stoppython \stoptext > (I've subscribed the list, so you don't have to CC me.) > > Thank you in advance, > Gerion > > ___ > 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] Footnote in TABLE isn't rendered anywhere
> Am 15.07.2017 um 21:55 schrieb Hans Hagen : > > On 7/15/2017 9:11 PM, Alan Braslau wrote: >> On Wed, 12 Jul 2017 19:05:26 +0200 >> Hans Hagen wrote: >>> best play with textbackgrounds >>> >>> \starttext >>> >>> \starttextbackground >>> \dorecurse{10}{test\footnote{tufte}: \input tufte\par} >>> \stoptextbackground >>> >>> \stoptext >>> >> I have found the following to be necessary when using textbackground, >> especially when backgrounds cross page boundaries: >> \setnewconstant\kindofpagetextareas\plusone >> % partial page. HH: low level, no high level switch (yet) >> Maybe Hans can explain this? > Because it's an option (with no parameter yet .. not sure where/how to > configure it; for floats one can do it per float) > \setnewconstant\kindofpagetextareas\plusone That indeed solves the problem of the textbackground extended over footnotes. Is that anywhere documented? I did not find that anywhere. And what exactly does that command do? Would it not be a good idea to add this as an option in the definition of a textbackground? Mathias > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | > www.pragma-pod.nl <http://www.pragma-pod.nl/> > - > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / 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] Footnote in TABLE isn't rendered anywhere
On 7/15/2017 9:11 PM, Alan Braslau wrote: On Wed, 12 Jul 2017 19:05:26 +0200 Hans Hagen wrote: best play with textbackgrounds \starttext \starttextbackground \dorecurse{10}{test\footnote{tufte}: \input tufte\par} \stoptextbackground \stoptext I have found the following to be necessary when using textbackground, especially when backgrounds cross page boundaries: \setnewconstant\kindofpagetextareas\plusone % partial page. HH: low level, no high level switch (yet) Maybe Hans can explain this? Because it's an option (with no parameter yet .. not sure where/how to configure it; for floats one can do it per float) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Footnote in TABLE isn't rendered anywhere
On Wed, 12 Jul 2017 19:05:26 +0200 Hans Hagen wrote: > best play with textbackgrounds > > \starttext > > \starttextbackground > \dorecurse{10}{test\footnote{tufte}: \input tufte\par} > \stoptextbackground > > \stoptext > I have found the following to be necessary when using textbackground, especially when backgrounds cross page boundaries: \setnewconstant\kindofpagetextareas\plusone % partial page. HH: low level, no high level switch (yet) Maybe Hans can explain this? Alan ___ 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] Footnote in TABLE isn't rendered anywhere
On 07/15/2017 08:07 PM, Mathias Schickel wrote: >> Am 15.07.2017 um 18:07 schrieb Pablo Rodriguez: >> [...] >> Just in case I got you wrong: is your issue that the background also >> covers the footnotes, such as in the first and second pages from: >> >>\automigrateinserts >>\setuptextbackground[location=paragraph] >>\starttext >>\dorecurse{10}{\starttextbackground >>test\footnote{tufte}: \input knuth\hfill >>\stoptextbackground\blank} >>\stoptext > > What can be done that this does not happen? (Your example?) Here we > have a minimal example, your own. ;-) Report the bug so that Hans can fix it :-). Pablo -- http://www.ousia.tk ___ 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] Footnote in TABLE isn't rendered anywhere
> Am 15.07.2017 um 18:07 schrieb Pablo Rodriguez : > > On 07/14/2017 05:22 PM, Mathias Schickel wrote: >> This indeed does the trick! Thank you very much! Maybe I will take >> use of Hans’ suggestion about textbackgrounds, but as I remember I have >> switched from those to backgrounds because they sometimes showed strange >> behaviour at page breaks if formulas are involved (leaving far too much >> space at the bottom of a page that could be used if I used backgrounds). >> Maybe I will be able to write a minimal example showing this effect of >> textbackgrounds. >> >> However, I have met some issues using your solution, Aditya, with >> \automigrateinserts. I got one text in background containing a footnote >> that has been rendered onto the footnote. Of course this can only happen >> if the backgrounded text appears at the bottom of a page. It is a little >> hard to get a minimal example showing this. But I think everyone can >> imagine what I mean. > > Mathias, > > it would be weird that body text ended up in a footnote, but without a > source it will be much harder to fix the bug. Indeed the text was written onto the text of the footnote, so both texts did overlap. Sadly I was not able to reproduce it, since meanwhile I did change my document a bit (and updated to the latest beta). But it was in combination with mathematical theorems (so I defined the background to highlight theorems), this means it was in combination with lists. If I will run into a similar issue or will be able to reproduce it in a minimal example I will inform you. But in the latest test I did not get that behaviour even if a theorem was extended to the next page and footnotes had been at the first page of the theorem. So things worked fine. > > Just in case I got you wrong: is your issue that the background also > covers the footnotes, such as in the first and second pages from: > > \automigrateinserts >\setuptextbackground[location=paragraph] >\starttext >\dorecurse{10}{\starttextbackground >test\footnote{tufte}: \input knuth\hfill >\stoptextbackground\blank} >\stoptext > > Just in cas it helps, What can be done that this does not happen? (Your example?) Here we have a minimal example, your own. ;-) > > Pablo Best Mathias > -- > http://www.ousia.tk > ___ > 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] Footnote in TABLE isn't rendered anywhere
On 07/14/2017 05:22 PM, Mathias Schickel wrote: > This indeed does the trick! Thank you very much! Maybe I will take > use of Hans’ suggestion about textbackgrounds, but as I remember I have > switched from those to backgrounds because they sometimes showed strange > behaviour at page breaks if formulas are involved (leaving far too much > space at the bottom of a page that could be used if I used backgrounds). > Maybe I will be able to write a minimal example showing this effect of > textbackgrounds. > > However, I have met some issues using your solution, Aditya, with > \automigrateinserts. I got one text in background containing a footnote > that has been rendered onto the footnote. Of course this can only happen > if the backgrounded text appears at the bottom of a page. It is a little > hard to get a minimal example showing this. But I think everyone can > imagine what I mean. Mathias, it would be weird that body text ended up in a footnote, but without a source it will be much harder to fix the bug. Just in case I got you wrong: is your issue that the background also covers the footnotes, such as in the first and second pages from: \automigrateinserts \setuptextbackground[location=paragraph] \starttext \dorecurse{10}{\starttextbackground test\footnote{tufte}: \input knuth\hfill \stoptextbackground\blank} \stoptext Just in cas it helps, Pablo -- http://www.ousia.tk ___ 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] Footnote in TABLE isn't rendered anywhere
best play with textbackgrounds \starttext \starttextbackground \dorecurse{10}{test\footnote{tufte}: \input tufte\par} \stoptextbackground \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Textbackground issue with margin pictures
On 4/3/2017 2:58 PM, Tom wrote: On 3. Apr 2017, at 10:16, Hans Hagen wrote: On 4/3/2017 2:20 AM, Tom wrote: Hi, today I updated from ConTeXt 2015.11.19 to the recent Beta 2017.03.26 16:15. I noticed that my textbackgrounds now interfere with margin pictures, that is, if there is a margin picture at the side of a textbackground, then the textbackground is suppressed for the entire height of the margin picture. Here is a minimal: \setuplayout [ leftmargin=0mm, rightmargin=45mm, height=fit, width=fit, ] \definetextbackground [test] \starttext \placefigure [margin]{}{} \starttextbackground [test] \dorecurse{3}{\readfile{ward}{}{}} \stoptextbackground \stoptext With the ConTeXt Current from 2016.05.19 13:43 I don’t see the issue, everything’s fine there. Here are two screenshots: Desired behavior (Ctx Current): http://d.pr/i/Xgtc Non-desired behavior (Ctx Beta): http://d.pr/i/1gyi Is this a bug? \definetextbackground [test] [location=paragraph] \setupfloat[figure][freeregion=no] Thank you, Hans, this works absolutely great! Two little questions: I have set it now globally for _all_ floats as \setupfloats[freeregion=no]. At a first glance it doesn’t seem to cause any issues. Is there any pitfall when setting it globally, which I might not be aware? Is 'freeregion=no' an option that is meant to stay, or is it a workaround for the recent betas? it will stay (being a feature) Hans -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Textbackground issue with margin pictures
> On 3. Apr 2017, at 10:16, Hans Hagen wrote: > > On 4/3/2017 2:20 AM, Tom wrote: >> Hi, >> >> today I updated from ConTeXt 2015.11.19 to the recent Beta 2017.03.26 16:15. >> >> I noticed that my textbackgrounds now interfere with margin pictures, that >> is, >> if there is a margin picture at the side of a textbackground, then the >> textbackground is suppressed for the entire height of the margin picture. >> >> >> Here is a minimal: >> >> \setuplayout [ >> leftmargin=0mm, >> rightmargin=45mm, >> height=fit, >> width=fit, >> ] >> >> \definetextbackground [test] >> >> \starttext >> >> \placefigure [margin]{}{} >> >> \starttextbackground [test] >> \dorecurse{3}{\readfile{ward}{}{}} >> \stoptextbackground >> >> \stoptext >> >> >> With the ConTeXt Current from 2016.05.19 13:43 I don’t see the issue, >> everything’s fine there. >> >> Here are two screenshots: >> >> Desired behavior (Ctx Current): http://d.pr/i/Xgtc >> Non-desired behavior (Ctx Beta): http://d.pr/i/1gyi >> >> Is this a bug? > > \definetextbackground [test] [location=paragraph] > > \setupfloat[figure][freeregion=no] Thank you, Hans, this works absolutely great! Two little questions: I have set it now globally for _all_ floats as \setupfloats[freeregion=no]. At a first glance it doesn’t seem to cause any issues. Is there any pitfall when setting it globally, which I might not be aware? Is 'freeregion=no' an option that is meant to stay, or is it a workaround for the recent betas? Thanks again, Best, -- Tom > > \starttext > > \placefigure [margin]{}{} > > \starttextbackground [test] >\dorecurse{3}{\readfile{ward}{}{}} >\placefigure {}{} >\dorecurse{3}{\readfile{ward}{}{}} > \stoptextbackground > > \stoptext > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ 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] Textbackground issue with margin pictures
On 4/3/2017 2:20 AM, Tom wrote: Hi, today I updated from ConTeXt 2015.11.19 to the recent Beta 2017.03.26 16:15. I noticed that my textbackgrounds now interfere with margin pictures, that is, if there is a margin picture at the side of a textbackground, then the textbackground is suppressed for the entire height of the margin picture. Here is a minimal: \setuplayout [ leftmargin=0mm, rightmargin=45mm, height=fit, width=fit, ] \definetextbackground [test] \starttext \placefigure [margin]{}{} \starttextbackground [test] \dorecurse{3}{\readfile{ward}{}{}} \stoptextbackground \stoptext With the ConTeXt Current from 2016.05.19 13:43 I don’t see the issue, everything’s fine there. Here are two screenshots: Desired behavior (Ctx Current): http://d.pr/i/Xgtc Non-desired behavior (Ctx Beta): http://d.pr/i/1gyi Is this a bug? \definetextbackground [test] [location=paragraph] \setupfloat[figure][freeregion=no] \starttext \placefigure [margin]{}{} \starttextbackground [test] \dorecurse{3}{\readfile{ward}{}{}} \placefigure {}{} \dorecurse{3}{\readfile{ward}{}{}} \stoptextbackground \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Textbackground issue with margin pictures
Hi, today I updated from ConTeXt 2015.11.19 to the recent Beta 2017.03.26 16:15. I noticed that my textbackgrounds now interfere with margin pictures, that is, if there is a margin picture at the side of a textbackground, then the textbackground is suppressed for the entire height of the margin picture. Here is a minimal: \setuplayout [ leftmargin=0mm, rightmargin=45mm, height=fit, width=fit, ] \definetextbackground [test] \starttext \placefigure [margin]{}{} \starttextbackground [test] \dorecurse{3}{\readfile{ward}{}{}} \stoptextbackground \stoptext With the ConTeXt Current from 2016.05.19 13:43 I don’t see the issue, everything’s fine there. Here are two screenshots: Desired behavior (Ctx Current): http://d.pr/i/Xgtc Non-desired behavior (Ctx Beta): http://d.pr/i/1gyi Is this a bug? Thanks for any help. -- Thomas Floeren ___ 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] RTL bug in textbackground
On 7/3/2016 6:46 PM, Mohammad Hossein Bateni wrote: Hello, When using \definetextbackground in RTL setting, the boundaries are not determined correctly (both for location=paragraph and location=text) and colors gets messed up. Here a sort-of-minimal example adapted from details.pdf. Is there any particular keys I should use in RTL to fix the issue? \setupcolors[state=start] \definecolor[infogray][s=0.5] \definecolor[textgray][s=0.8] \definetextbackground[intro] [backgroundcolor=infogray, backgroundoffset=.25cm, offset=.5cm, frame=on,framecolor=red, location=paragraph, color=white] \definetextbackground[subintro] [backgroundcolor=textgray, backgroundoffset=0pt, offset=0pt, frame=off, location=text, color=blue] \starttext \starttextbackground[intro] A rather common way to draw attention to a passage, is to add a background. In this chapter we will therefore discuss how to enhance your document with \starttextbackground [subintro] colorful areas that either or not follow the shape of your paragraph. \stoptextbackground\ Be warned: this chapter has so many backgrounds that you should consider wearing sunglasses. \stoptextbackground \blank[3*big] \righttoleft \starttextbackground[intro] A rather common way to draw attention to a passage, is to add a background. In this chapter we will therefore discuss how to enhance your document with \starttextbackground [subintro] colorful areas that either or not follow the shape of your paragraph. \stoptextbackground\ Be warned: this chapter has so many backgrounds that you should consider wearing sunglasses. \stoptextbackground \stoptext I think i fixed it (no upload yet) but this kind of tricky things probably need some time to get sorted out. 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] RTL bug in textbackground
Hello, When using \definetextbackground in RTL setting, the boundaries are not determined correctly (both for location=paragraph and location=text) and colors gets messed up. Here a sort-of-minimal example adapted from details.pdf. Is there any particular keys I should use in RTL to fix the issue? \setupcolors[state=start] \definecolor[infogray][s=0.5] \definecolor[textgray][s=0.8] \definetextbackground[intro] [backgroundcolor=infogray, backgroundoffset=.25cm, offset=.5cm, frame=on,framecolor=red, location=paragraph, color=white] \definetextbackground[subintro] [backgroundcolor=textgray, backgroundoffset=0pt, offset=0pt, frame=off, location=text, color=blue] \starttext \starttextbackground[intro] A rather common way to draw attention to a passage, is to add a background. In this chapter we will therefore discuss how to enhance your document with \starttextbackground [subintro] colorful areas that either or not follow the shape of your paragraph. \stoptextbackground\ Be warned: this chapter has so many backgrounds that you should consider wearing sunglasses. \stoptextbackground \blank[3*big] \righttoleft \starttextbackground[intro] A rather common way to draw attention to a passage, is to add a background. In this chapter we will therefore discuss how to enhance your document with \starttextbackground [subintro] colorful areas that either or not follow the shape of your paragraph. \stoptextbackground\ Be warned: this chapter has so many backgrounds that you should consider wearing sunglasses. \stoptextbackground \stoptext Thanks, MHB ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Textbackgrounds interrupted by floats
Folks, Here is problem that must have been asked about before, but I can’t seem to find a solution on the archive or anywhere else. I want a colour background for verbatim text (for code), and floating figures. However if a figure floats to the bottom (as in the example below), and the verbatim text is broken over to the next page because it is long, I don’t want the colour background under the figure as well — I want no background at all. What is the correct setup to do that? Thanks, Robin \setupexternalfigures[location=default] \setupcolors[state=start] \definetextbackground[code][ frame=off, location=paragraph, background=color, backgroundcolor=yellow] \setuptyping[typing][ %option=color, before={\starttextbackground[code]}, after=\stoptextbackground] \starttext \startplacefigure[location=bottom] \externalfigure[cow][width=0.5\textwidth] \stopplacefigure \input tufte \starttyping Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long Long \stoptyping \input 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] textbackground
On 2/26/2015 10:22 AM, Alan BRASLAU wrote: Hello, For a multilingual document, alternating one language or another, not necessarily a bilingual, translated text, I thought about using textbackground to set-off paragraphs. This technique could also apply to a single language text having multiple levels of information, perhaps statements followed by discussion, etc. A problem appears with respect to footnotes that I do not know how to handle. If the backgrounded text goes across pages placing footnotes, then the footnote also gets the background. This is incorrect, perhaps a bug. Second problem, if a footnote of a backgrounded text gets placed on a following page, then it may not get a background. (It is not clear to me whether it would be correct for footnotes to get the background or not.) Of course, a solution to this secondary problem might be before={\startlocalfootnotes}, after={\placelocalfootnotes\stoplocalfootnotes}, although such a solution would postpone backgrounded footnotes to the end of the backgrounded text. Alan MWE: \definetextbackground [spanish] [location=paragraph, frame=off, before={\language[es]}, background=color, backgroundcolor=lightgray] \starttext \input darwin% \startfootnote \input dawkins \stopfootnote \input tufte \startspanish \input quevedo-es% \startfootnote \input cervantes-es \stopfootnote \stopspanish \input zapf \stoptext \definetextbackground[en] \definetextbackground[nl] \setnewconstant\kindofpagetextareas 1 % low level, no high level switch (yet) \starttext \starttextbackground[en] \dorecurse{10}{\input tufte \footnote{tufte} \par} \stoptextbackground \starttextbackground[nl] \dorecurse{10}{\input tufte \footnote{tufte} \par} \stoptextbackground \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] textbackground within framedtext
Hi, How can I use textbackground within framedtext. In the following MWE, the background extends beyond the frame of framedtext. Do I have to use a different mechanism? \definetextbackground[bg][ background=color, backgroundcolor=yellow, frame=off] \starttext \startframedtext Before \par \starttextbackground[bg] \input knuth \stoptextbackground \par After \stopframedtext \input tufte \par \starttextbackground[bg] \dorecurse{2}{\input knuth \par} \stoptextbackground \input tufte \stoptext Any feedback is welcome, Regards, Christoph ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] TOC with Grey background for pages belonging to last section of every chapter
> Am 02.02.2015 um 14:00 schrieb Keith J. Schultz : > > Hi Wolgang, > > I noticed that \startnamedsection does not add it to the TOC > how would one go about having these „namedsections“ added to the TOC. > > regards > Keith. > >> Am 02.02.2015 um 12:51 schrieb Wolfgang Schuster >> mailto:schuster.wolfg...@gmail.com>>: >> >> You have to add „location=paragraph” to the textbackground setup. >> >> \definetextbackground >> [ChapterFrame] >> [frame=off, >> background=color, >> backgroundcolor=green, >> backgroundoffset=1ex, >> location=paragraph] % default: location=text >> >> \definehead [Framed][chapter] >> \definehead [Frameless] [chapter] >> >> \setuphead >> [Frameless] >> [before={\blank[2*line]}] >> >> \setuphead >> [Framed] >> [page=no, >> before=, >> beforesection={\page\blank[2*line]\starttextbackground[ChapterFrame]}, >> aftersection=\stoptextbackground] >> >> \starttext >> >> \startnamedsection[Frameless][title=Chapter without frame] >> >> \input knuth >> >> \stopnamedsection >> >> \startnamedsection[Framed][title=Chapter with frame] >> >> \input knuth >> >> \stopnamedsection >> >> \stoptext The command \startnamedsection[chapter] is the same as using \startchapter in your document, the only difference is that you use the header-type as argument in the first case while in the second case the head-type is part of the command name. When you print your table of contents with the \placecontent or \completecontent commands ConTeXt uses only headers which are in the list for the “content” list. To print additional headers which are defined with \definehead in your document you can either use \placelist[chapter,MYHEADER,section,…] instead of \placecontent or you extend the list for “content” with \setupcombinedlist[content][list={chapter,MYHEADER,…}] or \placecontent[list={chapter,MYHEADER,…}] Wolfgang___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] TOC with Grey background for pages belonging to last section of every chapter
Hi Wolgang, I noticed that \startnamedsection does not add it to the TOC how would one go about having these „namedsections“ added to the TOC. regards Keith. > Am 02.02.2015 um 12:51 schrieb Wolfgang Schuster > : > > You have to add „location=paragraph” to the textbackground setup. > > \definetextbackground > [ChapterFrame] > [frame=off, > background=color, > backgroundcolor=green, > backgroundoffset=1ex, > location=paragraph] % default: location=text > > \definehead [Framed][chapter] > \definehead [Frameless] [chapter] > > \setuphead > [Frameless] > [before={\blank[2*line]}] > > \setuphead > [Framed] > [page=no, > before=, > beforesection={\page\blank[2*line]\starttextbackground[ChapterFrame]}, > aftersection=\stoptextbackground] > > \starttext > > \startnamedsection[Frameless][title=Chapter without frame] > > \input knuth > > \stopnamedsection > > \startnamedsection[Framed][title=Chapter with frame] > > \input knuth > > \stopnamedsection > > \stoptext > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Grey background for pages belonging to last section of every chapter
> Am 30.01.2015 um 21:43 schrieb Rob Heusdens : > > Correction, I added "offset=none,frameoffset=0pt," to the parameters for > the textbackground frame. > > Code again with correction: > > % test background > \setupwhitespace[none] > \setupindenting[yes, small, next] > \setuppagenumbering[alternative=doublesided] > > \definetextbackground > [SummaryBackground] > [frame=off,offset=none,frameoffset=0pt, > background=color, > backgroundcolor=gray, > backgroundoffset=2ex] > > \definehead[summary][section] > > \setuphead > [summary] > [number=no, > style=bold, > before=, > beforesection={\noindentation\page\starttextbackground[SummaryBackground]}, > aftersection={\stoptextbackground\blank}] > > \setuphead[section][number=no,style=bold] > > > \definecombinedlist[content][section,summary] > \setupcombinedlist[content][level=4, alternative=c] > > \starttext > \completecontent > \page > \dorecurse{9}{ > \startsection[title={Knuth -- \recurselevel}] > > \input{knuth} > > \stopsection > } > > \startsummary[title=Samenvatting] > > \input{zapf} > > \stopsummary > > \stoptext > > > > Still the summary title is a bit lower on the page then other text. You have to add „location=paragraph” to the textbackground setup. \definetextbackground [ChapterFrame] [frame=off, background=color, backgroundcolor=green, backgroundoffset=1ex, location=paragraph] % default: location=text \definehead [Framed][chapter] \definehead [Frameless] [chapter] \setuphead [Frameless] [before={\blank[2*line]}] \setuphead [Framed] [page=no, before=, beforesection={\page\blank[2*line]\starttextbackground[ChapterFrame]}, aftersection=\stoptextbackground] \starttext \startnamedsection[Frameless][title=Chapter without frame] \input knuth \stopnamedsection \startnamedsection[Framed][title=Chapter with frame] \input knuth \stopnamedsection \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] section with \sethupead[section][alternative=text]; other type of section misbehaves..
I forgot to add the basic example, with neither for section nor for summary an option set in \setuphead[..] for alternative. So, read this as example 0: = test5.pdf Example 0: \defineblank[sprong][.5cm] \definehead[summary][section] \setuphead[section][number=no,style=bold,before={\blank[sprong]},after=,indentnext=no] \setuphead[summary][number=no,style=bold,before=,after={\blank[sprong]},beforesection={\noindentation\page\starttextbackground[SummaryBackground]},aftersection={\stoptextbackground\page}] \setupwhitespace[none] \setupindenting[yes, small, next] \definetextbackground [SummaryBackground] [frame=off,frameoffset=0pt, background=color, backgroundcolor=gray, backgroundoffset=2ex] \starttext \section{First sentence. Second sentence.}\input zapf \summary{Summary}\input zapf \stoptext Example 0 => Example 1 Setting the alternative=text for section also causes a change in behaviour of the summary section. test5c.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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] section with \sethupead[section][alternative=text]; other type of section misbehaves..
When using \setuphead[section][alternative=text] I noticed two things: 1. There is an extra space (horizontally) directly after the section heading. I can't get a grip on how to get rid of it. 2. A different type of section (define with \definehead[summary][section] seems to alter it's behaviour due to a \setuphead[section][..]. Shouldn't the summary behaviour be independend of what one sets for section? Here is a MWE that shows the problem: example 1: \defineblank[sprong][.5cm] \definehead[summary][section] \setuphead[section][number=no,style=bold,before={\blank[sprong]},after=,alternative=text,indentnext=no] \setuphead[summary][number=no,style=bold,before=,after={\blank[sprong]},beforesection={\noindentation\page\starttextbackground[SummaryBackground]},aftersection={\stoptextbackground\page}] \setupwhitespace[none] \setupindenting[yes, small, next] \definetextbackground [SummaryBackground] [frame=off,frameoffset=0pt, background=color, backgroundcolor=gray, backgroundoffset=2ex] \starttext \section{First sentence. Second sentence.}\input zapf \summary{Summary}\input zapf \stoptext example 2: \defineblank[sprong][.5cm] \definehead[summary][section] \setuphead[section][number=no,style=bold,before={\blank[sprong]},after=,alternative=text,indentnext=no] \setuphead[summary][number=no,style=bold,before=,alternative=paragraph,after={\blank[sprong]},beforesection={\noindentation\page\starttextbackground[SummaryBackground]},aftersection={\stoptextbackground\page}] \setupwhitespace[none] \setupindenting[yes, small, next] \definetextbackground [SummaryBackground] [frame=off,frameoffset=0pt, background=color, backgroundcolor=gray, backgroundoffset=2ex] \starttext \section{First sentence. Second sentence.}\input zapf \summary{Summary}\input zapf \stoptext Adding [alternative=paragraph] for summary solves this problem, and is at least a workaround, but that should not be necessary. My main problem though is how to get rid of that extra horizontal space after the normal section heading. The next sentence should align just like the section is a normal sentence itself (only typeset as bold). Is there a solution for that? Many thanks. Greeting, Rob -- attached (example 1 = test5a.pdf; example 2 = test5b.pdf) test5a.pdf Description: Adobe PDF document test5b.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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Grey background for pages belonging to last section of every chapter
Correction, I added "offset=none,frameoffset=0pt," to the parameters for the textbackground frame. Code again with correction: % test background \setupwhitespace[none] \setupindenting[yes, small, next] \setuppagenumbering[alternative=doublesided] \definetextbackground [SummaryBackground] [frame=off,offset=none,frameoffset=0pt, background=color, backgroundcolor=gray, backgroundoffset=2ex] \definehead[summary][section] \setuphead [summary] [number=no, style=bold, before=, beforesection={\noindentation\page\starttextbackground[SummaryBackground]}, aftersection={\stoptextbackground\blank}] \setuphead[section][number=no,style=bold] \definecombinedlist[content][section,summary] \setupcombinedlist[content][level=4, alternative=c] \starttext \completecontent \page \dorecurse{9}{ \startsection[title={Knuth -- \recurselevel}] \input{knuth} \stopsection } \startsummary[title=Samenvatting] \input{zapf} \stopsummary \stoptext Still the summary title is a bit lower on the page then other text. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Grey background for pages belonging to last section of every chapter
> Make a working minimal example which shows the problem because Icant > reproduce the problems you mention. > > Wolfgang Hello Wofgang, So far I am unable of re-producing the missing bold description for summary section titles (and all of sudden, the summary titles no longer show up in the TOC either even though 'summary' is included in the definedcombinedlist , although the page still shows with empty title). This example does however show that the alignment to the section title of summary sections does not line up properly with normal section text. It's a bit too low. How to fix that? And another thing, the background sometimes extends to a new page even though there is no text, which looks silly. Deleting the \blank in the \setupheads entry for the option after does not help. Below is the code. Greetings, Rob % test background \setupwhitespace[none] \setupindenting[yes, small, next] \setuppagenumbering[alternative=doublesided] \definetextbackground [SummaryBackground] [frame=off, background=color, backgroundcolor=gray, backgroundoffset=2ex] \definehead[summary][section] \setuphead [summary] [number=no, style=bold, before=, beforesection={\noindentation\page\starttextbackground[SummaryBackground]}, aftersection={\stoptextbackground\blank}] \setuphead[section][number=no,style=bold] \definecombinedlist[content][section,summary] \setupcombinedlist[content][level=4, alternative=c] \starttext \completecontent \page \dorecurse{9}{ \startsection[title={Knuth -- \recurselevel}] \input{knuth} \stopsection } \startsummary[title=Samenvatting] \input{zapf} \stopsummary \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Grey background for pages belonging to last section of every chapter
> Am 30.01.2015 um 19:28 schrieb Rob Heusdens : > >> Use text backgrounds. >> >> \definetextbackground >> [SummaryBackground] >> [frame=off, >> background=color, >> backgroundcolor=gray] >> >> \definehead[summary][section] >> >> \setuphead >> [summary] >> [before=, >> beforesection={\blank\starttextbackground[SummaryBackground]}, >> aftersection={\stoptextbackground\blank}] >> >> \starttext >> >> \startsection[title=Knuth] >> >> \input{knuth} >> >> \stopsection >> >> \startsummary[title=Zapf] >> >> \input{zapf} >> >> \stopsummary >> >> \stoptext >> >> Wolfgang > > Hello Wolfgang, > > Your example works. After adjusting the \summary to using \startsummary, > \stopsummary, and using your code, with only minor additions, as below: > > \definetextbackground > [SummaryBackground] > [frame=off, > background=color, > backgroundcolor=gray, > backgroundoffset=2ex] % <- added > > \definehead[summary][section] > > \setuphead[summary] >[number=no, % <- added >style=bold, % <- added >before=, >beforesection={\page\starttextbackground[SummaryBackground]}, % <- > changed \blank to \page >aftersection={\stoptextbackground\page}] % <- changed \blank to \page > > I get some unwanted result. See the picture. > > The bold does not show up, and a small portion of the topleft corner of > the background frame is missing > > Changing bold to italic also has no effect. > > Something strange > > Also trying with \blank instead of \page, the background then starts right > after the previous section, and it seems the indentation causes the > missing background on the first line. > > So I placed "\noindentation\page" into beforesection (replacing \blank) > and get the background result I want, but still the bold is missing in the > summary title, and too much whitespace appears before the section title. > > The title should be placed in the same position as normal text would > appear (and as a side note: in fact I am copying a style that was used in > a printed book that I typeset, in which each section title - except for > the summary - is just a normal sentence (or 2) typeset bold, with the rest > of the text appearing after the section title just as after a normal > sentence, so no vertical space between title and first sentence of the > section. Since it appears in the content also, I had to use section > commands, but is this behaviour duplicatable using setuphead for section?) > > > How can I adjust that? Make a working minimal example which shows the problem because I’cant reproduce the problems you mention. Wolfgang___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Grey background for pages belonging to last section of every chapter
> Use text backgrounds. > > \definetextbackground > [SummaryBackground] > [frame=off, >background=color, >backgroundcolor=gray] > > \definehead[summary][section] > > \setuphead > [summary] > [before=, > beforesection={\blank\starttextbackground[SummaryBackground]}, >aftersection={\stoptextbackground\blank}] > > \starttext > > \startsection[title=Knuth] > > \input{knuth} > > \stopsection > > \startsummary[title=Zapf] > > \input{zapf} > > \stopsummary > > \stoptext > > Wolfgang Hello Wolfgang, Your example works. After adjusting the \summary to using \startsummary, \stopsummary, and using your code, with only minor additions, as below: \definetextbackground [SummaryBackground] [frame=off, background=color, backgroundcolor=gray, backgroundoffset=2ex] % <- added \definehead[summary][section] \setuphead[summary] [number=no, % <- added style=bold, % <- added before=, beforesection={\page\starttextbackground[SummaryBackground]}, % <- changed \blank to \page aftersection={\stoptextbackground\page}] % <- changed \blank to \page I get some unwanted result. See the picture. The bold does not show up, and a small portion of the topleft corner of the background frame is missing Changing bold to italic also has no effect. Something strange Also trying with \blank instead of \page, the background then starts right after the previous section, and it seems the indentation causes the missing background on the first line. So I placed "\noindentation\page" into beforesection (replacing \blank) and get the background result I want, but still the bold is missing in the summary title, and too much whitespace appears before the section title. The title should be placed in the same position as normal text would appear (and as a side note: in fact I am copying a style that was used in a printed book that I typeset, in which each section title - except for the summary - is just a normal sentence (or 2) typeset bold, with the rest of the text appearing after the section title just as after a normal sentence, so no vertical space between title and first sentence of the section. Since it appears in the content also, I had to use section commands, but is this behaviour duplicatable using setuphead for section?) How can I adjust that? Greetings, Rob (my context version is 2014.12.03 18:26)___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Grey background for pages belonging to last section of every chapter
> Am 30.01.2015 um 18:17 schrieb Rob Heusdens : > > Problem is however resetting the background. In the after option of > \setuphead will not work, the \page is ejected directly after the section > title. I want to reset to normal background after the section itself > finishes. After this special section (summary) always a new chapter begins > (except perhaps the last summary). > > Should I add that manually as the last command of every summary (where > also the chapter ends), or is there some way to perform a command after > the summary itself (at the location where one would place \stopsummary if > using the \startsummary syntax) ends? > > The background should only be displayed behind the text itself, not the > whole text area (so if a section ends halfway of the page, the bottom part > should have no background) with some extra space surrounding it > (above,below,left,right) using the offset or perhaps backgroundoffset > options of \setupframed). Use text backgrounds. \definetextbackground [SummaryBackground] [frame=off, background=color, backgroundcolor=gray] \definehead[summary][section] \setuphead [summary] [before=, beforesection={\blank\starttextbackground[SummaryBackground]}, aftersection={\stoptextbackground\blank}] \starttext \startsection[title=Knuth] \input{knuth} \stopsection \startsummary[title=Zapf] \input{zapf} \stopsummary \stoptext Wolfgang___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] textbackground inside itemize
On 7/9/2014 5:55 AM, Troy Henderson wrote: The following code produces a textbackground whose background color enters into the "itemize label" area on the second (and succeeding) lines of the paragraph. I would appreciate advice on fixing this. i'll send you a (simple one line) patch to test Thanks, Troy Henderson --- \setuppapersize[letter,landscape][letter,landscape] \definetextbackground[foo][ state=start, location=paragraph, background=color, backgroundcolor={0.875,0.875,0.875}, frame=off ] \starttext \startcolumns[n=2,rule=on] \startitemize[n,2*broad] \item Here is my first item \starttextbackground[foo] Here is some long text that demonstrates how the background color is wrong on the second line and all successive lines of this paragraph. \stoptextbackground \item Here is my second item \stopitemize \stopcolumns \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] textbackground inside itemize
The following code produces a textbackground whose background color enters into the "itemize label" area on the second (and succeeding) lines of the paragraph. I would appreciate advice on fixing this. Thanks, Troy Henderson --- \setuppapersize[letter,landscape][letter,landscape] \definetextbackground[foo][ state=start, location=paragraph, background=color, backgroundcolor={0.875,0.875,0.875}, frame=off ] \starttext \startcolumns[n=2,rule=on] \startitemize[n,2*broad] \item Here is my first item \starttextbackground[foo] Here is some long text that demonstrates how the background color is wrong on the second line and all successive lines of this paragraph. \stoptextbackground \item Here is my second item \stopitemize \stopcolumns \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \starttextbackground and \startbackground equivalent options
Hi folks, Just a question: I have this textbackground environment: \definestartstop [teoria] [ before={\startbackground[background=color, backgroundcolor=mteoria, frame=on, width=broad, after={\bigskip}, before={\blank[big]\testpage[2]}, backgroundcorner=round, backgroundradius=5ex, backgroundoffset=5pt, framecorner=round, radius=5ex, frameoffset=5pt]}, after=\stopbackground ] and I want an equivalent one with starttextbackground. I try this: \definetextbackground[provateoria] [background=color, backgroundcolor=mteoria, location=paragraph, frame=on, width=broad, after={\bigskip}, before={\blank[big]\testpage[2]}, backgroundcorner=round, backgroundradius=5ex, backgroundoffset=5pt, framecorner=round, radius=5ex, frameoffset=5pt ] \definestartstop [teoria] [ before={\starttextbackground[provateoria]}, after=\stoptextbackground ] But I get: * The corners are not rounded * Can I achieve to "unbackground" footnotes inside \startteoria \stopteoria? Thanks in advance, Xan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \startbackground with footnote
Thanks Aditya. What's the difference between startbackground and starttextbackground? I can't see the options of textbackground. Thanks, ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Undefined \continueifinputfile on presentation
cm,before={\blank[big]}] % \startbackground\switchtobodyfont[18pt]}, % after=\stopbackground] % % \definestartstop[CapsaTitolRoja][before={\setupbackground % [style=\os, background=color, % backgroundcolor=lightred,frame=on,framecorner=round,% backgroundcorner=round,foregroundcolor=white, framecolor=black, % rulethickness=2pt,topoffset=0.25cm,bottomoffset=0.25cm, % leftoffset=0.25cm,rightoffset=0.25cm,before={\blank[big]}] % \startbackground\switchtobodyfont[15pt]}, % after=\stopbackground] % % \definestartstop[CapsaBlanca][before={\setupbackground % [style=\tfx,background=color,backgroundcolor=white, % frame=on,framecorner=rectangular,framecolor=black, % rulethickness=0.5pt,topoffset=0.25cm,bottomoffset=0.25cm, % leftoffset=0.25cm,rightoffset=0.25cm,before={\blank[big]}] % \startbackground\switchtobodyfont[10pt]}, % after=\stopbackground] % % \defineframedtext[CapsaBlancaRodona][width=0.90\textwidth, % background=color,backgroundcolor=white, % foregroundcolor=black,frame=on,framecolor=black,% framecorner=round, rulethickness=2.5pt, % frameradius=0.38cm,backgroundcorner=round,style=\bf] % % \defineframedtext[CapsaVermellaRodona][width=0.95\textwidth,% background=color,backgroundcolor=red, % foregroundcolor=white,frame=on,framecolor=black,% framecorner=round, rulethickness=2.5pt, % frameradius=0.38cm,backgroundcorner=round,style=\bf] % % \defineframedtext[CapsaVermellaRodonaGran][width=0.99\textwidth,% background=color,backgroundcolor=red, % foregroundcolor=white,frame=on,framecolor=black,% framecorner=round, rulethickness=2.5pt, % frameradius=0.5cm,backgroundcorner=round,style=\bf] % % \defineframedtext[CapsaVerdaRodona][width=0.75\textwidth, % background=color,backgroundcolor=lightgreen,% foregroundcolor=black,frame=on,framecolor=black,% framecorner=round, rulethickness=2.5pt, % frameradius=0.38cm,backgroundcorner=round,style=\bf] % % \defineframedtext[CapsaVermella][width=0.75\textwidth, % background=color,backgroundcolor=lightred, % foregroundcolor=white,frame=off,framecorner=round, % frameradius=0.5cm,backgroundcorner=round,style=\bf] % % %\startCapsaVermella...\stopCapsaVermella % \startuseMPgraphic{mpos:par:columnset} % Shift underlining down a touch% \iftracepositions show_multi_pars \else draw_multi_pars \fi ; % path p ; p := boundingbox currentpicture ; % currentpicture := currentpicture shifted (0,-StrutDepth/3) ;% setbounds currentpicture to p ; % \stopuseMPgraphic % \definetextbackground[underline] % [location=text,alternative=1,background=,frame=off] % \definestartstop % [underline] % [before={\starttextbackground[underline]}, % after=\stoptextbackground] % \definecolor [InteractionColor] [s=.2] % \definecolor [ContrastColor][s=.5] % % \setupinteraction % [page=yes, % color=InteractionColor, % contrastcolor=ContrastColor,% menu=on,% state=start]% % \setupsubpagenumber
Re: [NTG-context] Vim module - different settings for inline and block code
Am 16.01.2013 um 15:51 schrieb Marco Patzer : > Hi, > > I need different settings for code in inline and block mode. See the > following example: > > \usemodule [vim] > \definetextbackground [C] [location=text] > \definevimtyping [C] > [syntax=c, > before={\starttextbackground[C]}, > after=\stoptextbackground, > margin=2em] > > \starttext > > This is C: \inlineC{int foo();}. \blank > \startC > int foo(){ > return 0; > } > \stopC > > \stoptext > > Inline code needs “location=text”, block code on the other hand > needs “location=paragraph” as text background setting. Sure, I can > create two environments “Cinline” and “Cblock”, but that feels > clumsy. > > What's the proper way to set up different backgrounds for inline > and block code? You can try this (untested): \definetextbackground[InlineBackground][location=text] \definetextbackground[DisplayBackground][location=paragraph] \definevimytping [C] […, before={\ifhmode\startInlineBackground\else\startDisplayBackground\fi}, after={\ifhmode\stopInlineBackground\else\stopDisplayBackground\fi}, …] You could also ask Aditya to use different keys for display (e.g. before/aftter) and inline (e.g. left/right) code blocks. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Vim module - different settings for inline and block code
Hi, I need different settings for code in inline and block mode. See the following example: \usemodule [vim] \definetextbackground [C] [location=text] \definevimtyping [C] [syntax=c, before={\starttextbackground[C]}, after=\stoptextbackground, margin=2em] \starttext This is C: \inlineC{int foo();}. \blank \startC int foo(){ return 0; } \stopC \stoptext Inline code needs “location=text”, block code on the other hand needs “location=paragraph” as text background setting. Sure, I can create two environments “Cinline” and “Cblock”, but that feels clumsy. What's the proper way to set up different backgrounds for inline and block code? Marco signature.asc Description: Digital signature ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] (XeTeX) trouble debugging a "Missing number" error
Am 05.12.2012 um 16:46 schrieb Lars Huttar : > /Hans Hagen wrote (///Wed Dec 5 14:10:12 CET 2012/):/ >> >> >> >> On 12/5/2012 11:19 AM, Lars Huttar wrote: >>> / Hi all, >> /> > > /... > > / >> / >> />/ >> />/ % Abbreviations >> />/ \definestartstop >> />/[abblist] >> />/[before={\setupbackgrounds[text][background=verticalline] >> />/ \starttextbackground[text] >> />/ >> \setuptab[headstyle={\switchtobodyfont[SansB,\SansBsize]},width=20mm,location=left] >> />/ \startcolumnset[abbcolumn] \startalignment[flushleft,nothyphenated]}, >> />/ after={\stopalignment \stopcolumnset \stoptextbackground >> />/ \setupbackgrounds[text][background=off]}] >> / >> you can try >> >> \unexpanded\def\StartAbbList >> {\setupbackgrounds[text][background=verticalline] >>\starttextbackground[text] >> >> \setuptab[headstyle={\switchtobodyfont[SansB,\SansBsize]},width=20mm,location=left] >>\startcolumnset[abbcolumn] >>\startalignment[flushleft,nothyphenated]} >> >> \unexpanded\def\StopAbbList >> {\stopalignment >>\stopcolumnset >>\stoptextbackground >>\setupbackgrounds[text][background=off]} >> >> \definestartstop >> [abblist] >> [before=\StartAbbList, >>after=\StopAbbList] > > Thanks, I will try this. > Is the goal of this change to fix the error? To help diagnose it? > I don't really understand the use of \unexpanded. Putting many command and setup in the before and after keys for \definestartstop isn’t the nicest way to create start/stop command, Hans used a two step method and put all setups and separate commands which are now used by \definestartstop. Defining command with \unexpanded\def\…{…} instead of \def\…{…} can prevent you from unwanted side effects when you use command in headings etc. > After making this change, the behavior is unaffected... I still get the > "Missing number" error, etc. The information you provided aren sufficient to reproduce the error, according to the message there is a problem with columnsets but there is no way to tell why you get it. >> in such case best make a small example, for instance how is abblist used? > > > \startabblist{ > \tab{\ITC{alt.}}\AE{alternate name for}\par > ... > \tab{USDS}\AE{US Department of State}\par > }\stopabblist > > where \AE is defined as: > > \def\AE#1{\hskip -3mm \SerifL{#1} \vskip 1mm} Can you provide a working minimal example which does produce the error. >>> / >> />/ E16settings.tex: I added these definitions: >> />/ \define\XLfontsize{14pt} >> />/ \define\XXLfontsize{16pt} >> />/ >> />/ There are modes involved, so things are a bit more complicated, but I >> />/ believe that is the only effective difference. >> / >> and how about: >> >> \def\XLfontsize{14pt} >> \def\XXLfontsize{16pt} > > I will try that, but all our font size definitions have always used > \define, and it used to work fine without errors. > On http://wiki.contextgarden.net/Command/define it says that \define is > like the TeX primitive \def, but "will print an error to the log file if > the new definition overwrites an existing command". > I checked the log file, and there is no error mentioning XLfontsize. > > So the purpose of your suggestion is to remove the possibility of > reporting a duplicate definition? (There's probably more to it than that > - I'm just trying to understand.) > > I tried changing \define to \def as you suggested. The result was > unchanged - same error. There is no difference between \define and \def in MkII but for MkIV there is a difference because \define is \unexpanded\def and the new command \defineexpandable corresponds to the normal \def. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] (XeTeX) trouble debugging a "Missing number" error
/Hans Hagen wrote (///Wed Dec 5 14:10:12 CET 2012/):/ > > > > On 12/5/2012 11:19 AM, Lars Huttar wrote: > >/ Hi all, > /> /... / > / > />/ > />/ % Abbreviations > />/ \definestartstop > />/[abblist] > />/[before={\setupbackgrounds[text][background=verticalline] > />/ \starttextbackground[text] > />/ > \setuptab[headstyle={\switchtobodyfont[SansB,\SansBsize]},width=20mm,location=left] > />/ \startcolumnset[abbcolumn] \startalignment[flushleft,nothyphenated]}, > />/ after={\stopalignment \stopcolumnset \stoptextbackground > />/ \setupbackgrounds[text][background=off]}] > / > you can try > > \unexpanded\def\StartAbbList >{\setupbackgrounds[text][background=verticalline] > \starttextbackground[text] > > \setuptab[headstyle={\switchtobodyfont[SansB,\SansBsize]},width=20mm,location=left] > \startcolumnset[abbcolumn] > \startalignment[flushleft,nothyphenated]} > > \unexpanded\def\StopAbbList >{\stopalignment > \stopcolumnset > \stoptextbackground > \setupbackgrounds[text][background=off]} > > \definestartstop >[abblist] >[before=\StartAbbList, > after=\StopAbbList] Thanks, I will try this. Is the goal of this change to fix the error? To help diagnose it? I don't really understand the use of \unexpanded. After making this change, the behavior is unaffected... I still get the "Missing number" error, etc. > > in such case best make a small example, for instance how is abblist used? \startabblist{ \tab{\ITC{alt.}}\AE{alternate name for}\par ... \tab{USDS}\AE{US Department of State}\par }\stopabblist where \AE is defined as: \def\AE#1{\hskip -3mm \SerifL{#1} \vskip 1mm} > >/ > />/ E16settings.tex: I added these definitions: > />/ \define\XLfontsize{14pt} > />/ \define\XXLfontsize{16pt} > />/ > />/ There are modes involved, so things are a bit more complicated, but I > />/ believe that is the only effective difference. > / > and how about: > > \def\XLfontsize{14pt} > \def\XXLfontsize{16pt} I will try that, but all our font size definitions have always used \define, and it used to work fine without errors. On http://wiki.contextgarden.net/Command/define it says that \define is like the TeX primitive \def, but "will print an error to the log file if the new definition overwrites an existing command". I checked the log file, and there is no error mentioning XLfontsize. So the purpose of your suggestion is to remove the possibility of reporting a duplicate definition? (There's probably more to it than that - I'm just trying to understand.) I tried changing \define to \def as you suggested. The result was unchanged - same error. Regards, Lars ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] (XeTeX) trouble debugging a "Missing number" error
On 12/5/2012 11:19 AM, Lars Huttar wrote: Hi all, I'm working with some code that was developed by someone else. The document I'm typesetting is now giving the following error: ! Missing number, treated as zero. \otr:1:27 \OTRSETdoifcellelse ...er #1:\number #2\endcsname \@EA \secondoftwoarguments... \@@ar@@1 ...ellelse {\mofcolumns }\columnlastcell {\global \advance \columnl... \redoloop ->\expandrecursecontent \endofloop { 28 l.12 \startabblist { ? I haven't been able to figure out what's wrong or how to fix it. I had just made changes to refactor the definitions of fonts. (I confirmed that these changes really are a necessary cause of the error: when I back out just these changes, the error goes away.) From the above error message I understand the error was detected during the expansion of \startabblist. Here's the definition of abblist: % Abbreviations \definestartstop [abblist] [before={\setupbackgrounds[text][background=verticalline] \starttextbackground[text] \setuptab[headstyle={\switchtobodyfont[SansB,\SansBsize]},width=20mm,location=left] \startcolumnset[abbcolumn] \startalignment[flushleft,nothyphenated]}, after={\stopalignment \stopcolumnset \stoptextbackground \setupbackgrounds[text][background=off]}] you can try \unexpanded\def\StartAbbList {\setupbackgrounds[text][background=verticalline] \starttextbackground[text] \setuptab[headstyle={\switchtobodyfont[SansB,\SansBsize]},width=20mm,location=left] \startcolumnset[abbcolumn] \startalignment[flushleft,nothyphenated]} \unexpanded\def\StopAbbList {\stopalignment \stopcolumnset \stoptextbackground \setupbackgrounds[text][background=off]} \definestartstop [abblist] [before=\StartAbbList, after=\StopAbbList] in such case best make a small example, for instance how is abblist used? From that, one might guess that the font SansB or the font dimension \SansBsize were the problem. But those definitions haven't changed (though I would like to confirm that empirically with a run-time trace message). Here are the font settings changes that did occur: E16fonts.tex: changed this block: \definefont[SerifXLI][name:GentiumBookBasic-Italic at 10pt] \definefont[SerifXXL][name:GentiumBookBasic at 12pt] \definefont[SerifXXLB][name:GentiumBookBasic-Bold at 12pt] to use size dimensions defined elsewhere: \definefont[SerifXLI][name:GentiumBookBasic-Italic at \XLfontsize] \definefont[SerifXXL][name:GentiumBookBasic at \XXLfontsize] \definefont[SerifXXLB][name:GentiumBookBasic-Bold at \XXLfontsize] E16settings.tex: I added these definitions: \define\XLfontsize{14pt} \define\XXLfontsize{16pt} There are modes involved, so things are a bit more complicated, but I believe that is the only effective difference. and how about: \def\XLfontsize{14pt} \def\XXLfontsize{16pt} I also created a log file, which I'll attach. There is also a version with \tracingmacros=1, but it's 600K, so I'll put it at http://www.huttar.net/tmp/country-report-country_id-15-tracing.log Thanks for taking a look. Please let me know what further information I need to provide. I can provide the .tex files themselves upon request. I would especially like to know better techniques for debugging -- how I can induce TeX/ConTeXt to tell me more about what's going on. I realize that as a macro language, this is inherently difficult with TeX. yes, it's not always easy ... best is to make small tests (while developing styles) and test those snippets ... due to tex's expansion there can always be nasty interferences in complex setups We are heavily invested in XeTeX, so switching to LuaTeX in the near term is not an option. a pitty as it runs smoother (and context mkiv has some more features) (i never used xetex in production and as in context it used the mkii macros there are not updates, so in principle old runs should still run) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] (XeTeX) trouble debugging a "Missing number" error
Hi all, I'm working with some code that was developed by someone else. The document I'm typesetting is now giving the following error: ! Missing number, treated as zero. \otr:1:27 \OTRSETdoifcellelse ...er #1:\number #2\endcsname \@EA \secondoftwoarguments... \@@ar@@1 ...ellelse {\mofcolumns }\columnlastcell {\global \advance \columnl... \redoloop ->\expandrecursecontent \endofloop { 28 ... l.12 \startabblist { ? I haven't been able to figure out what's wrong or how to fix it. I had just made changes to refactor the definitions of fonts. (I confirmed that these changes really are a necessary cause of the error: when I back out just these changes, the error goes away.) >From the above error message I understand the error was detected during the expansion of \startabblist. Here's the definition of abblist: % Abbreviations \definestartstop [abblist] [before={\setupbackgrounds[text][background=verticalline] \starttextbackground[text] \setuptab[headstyle={\switchtobodyfont[SansB,\SansBsize]},width=20mm,location=left] \startcolumnset[abbcolumn] \startalignment[flushleft,nothyphenated]}, after={\stopalignment \stopcolumnset \stoptextbackground \setupbackgrounds[text][background=off]}] >From that, one might guess that the font SansB or the font dimension \SansBsize were the problem. But those definitions haven't changed (though I would like to confirm that empirically with a run-time trace message). Here are the font settings changes that did occur: E16fonts.tex: changed this block: \definefont[SerifXLI][name:GentiumBookBasic-Italic at 10pt] \definefont[SerifXXL][name:GentiumBookBasic at 12pt] \definefont[SerifXXLB][name:GentiumBookBasic-Bold at 12pt] to use size dimensions defined elsewhere: \definefont[SerifXLI][name:GentiumBookBasic-Italic at \XLfontsize] \definefont[SerifXXL][name:GentiumBookBasic at \XXLfontsize] \definefont[SerifXXLB][name:GentiumBookBasic-Bold at \XXLfontsize] E16settings.tex: I added these definitions: \define\XLfontsize{14pt} \define\XXLfontsize{16pt} There are modes involved, so things are a bit more complicated, but I believe that is the only effective difference. I also created a log file, which I'll attach. There is also a version with \tracingmacros=1, but it's 600K, so I'll put it at http://www.huttar.net/tmp/country-report-country_id-15-tracing.log Thanks for taking a look. Please let me know what further information I need to provide. I can provide the .tex files themselves upon request. I would especially like to know better techniques for debugging -- how I can induce TeX/ConTeXt to tell me more about what's going on. I realize that as a macro language, this is inherently difficult with TeX. We are heavily invested in XeTeX, so switching to LuaTeX in the near term is not an option. ConTeXt version: ConTeXt ver: 2012.05.30 11:26 MKII fmt: 2012.11.14 int: english/english (From TeX Live 2012) XeTeX version: 3.1415926-2.4-0.9998 (TeX Live 2012) (format=cont-en 2012.11.14) Lars This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012) (format=cont-en 2012.11.14) 4 DEC 2012 14:17 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **country-report-country_id-15.tex (./country-report-country_id-15.tex ConTeXt ver: 2012.05.30 11:26 MKII fmt: 2012.11.14 int: english/english system : cont-new.mkii loaded (/usr/local/texlive/2012/texmf-dist/tex/context/base/cont-new.mkii systems : beware: some patches loaded from cont-new.mkii ) system : cont-sys.rme loaded (/usr/local/texlive/2012/texmf-dist/tex/context/user/cont-sys.rme (/usr/local/texlive/2012/texmf-dist/tex/context/base/type-siz.mkii) (/usr/local/texlive/2012/texmf-dist/tex/context/base/type-otf.mkii) (/usr/local/texlive/2012/texmf-dist/tex/context/base/type-xtx.mkii)) system : country-report-country_id-15.top loaded (./country-report-country_id-15.top) bodyfont: 12pt rm is loaded language: patterns nl->default:default->1->2:2 us->default:default->2-> 2:3 de->default:default->3->3:3 da->default:default->4->2:2 sv->default:default ->5->2:2 af->default:default->6->2:2 gb->default:default->7->2:2 fr->default:de fault->8->2:2 es->default:default->9->2:2 ca->default:default->10->2:2 it->defa ult:default->11->2:2 la->default:default->12->2:2 pt->default:default->13->2:2 ro->default:default->14->2:2 pl->default:default->15->2:2 cs->default:default-> 16->2:2 sk->default:default->17->2:2 hr->default:default->18->2:2 sl->default:d efault->19->2:2 tr->default:default->20->
[NTG-context] Left margin of vim module output
Hi, how can I adjust the left margin of the output of the vim module? The core typing mechanism implements a “margin” key for this. The vim output also does not react to the “leftoffset” setting of the background mechanism. \usemodule [vim] \definetextbackground [code] [location=paragraph, %leftoffset=1cm, topoffset=5mm] \definevimtyping [C] [syntax=c, before={\starttextbackground[code]}, after=\stoptextbackground] \setuptyping [typing] [margin=1cm, before={\starttextbackground[code]}, after=\stoptextbackground] \starttext \startC /* This MEMB() definition defines a memory pool from * which we allocate neighbour entries. */ MEMB(neighbours_memb, struct neighbour, MAX_NEIGHBOURS); \stopC \blank \starttyping /* This MEMB() definition defines a memory pool from * which we allocate neighbour entries. */ MEMB(neighbours_memb, struct neighbour, MAX_NEIGHBOURS); \stoptyping \stoptext Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] tables
Hi, two table mechanisms now have the textwidth (max available width) set to local which makes it work inside for instance text backgrounds \starttext \starttextbackground \input ward \bTABLE % [textwidth=local] \bTR \bTD \input ward \eTD \bTD \input ward \eTD \eTR \eTABLE \startxtable % [textwidth=local] \startxrow \startxcell \input ward \stopxcell \startxcell \input ward \stopxcell \stopxrow \stopxtable \stoptextbackground \stoptext Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Broken Nightly (2012.02.18)
On 24-2-2012 01:12, Kip Warner wrote: \definetextbackground[TimelineGeneralDocument][ location=paragraph, color=color_text, background=color, backgroundcolor=colour_page, framecolor=colour_text, topoffset=1.0cm, bottomoffset=1.0cm, leftoffset=1.0cm, rightoffset=1.0cm, before={ \blank[2*big] }, after={ \blank[2*big] }, style=small, corner=round, frame=on] I use it as such... \startTimelineGeneralDocument Some stuff... \stopTimelineGeneralDocument So I'm not really sure what I am suppose to do with \starttextbackground? apart from a funny corner at least it helps if the colors are defined \definecolor[colour_page][red] \definecolor[colour_text][green] -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Broken Nightly (2012.02.18)
On Fri, 2012-02-24 at 05:34 +0100, Wolfgang Schuster wrote: > You should make a minimal example with \starttextbackground which produces > the same error as your document. As a minimal, it seems to work. But as part of my book, it bails with the following: graphics> invalid region for 'tbg:1' ! LuaTeX error /usr/share/texmf/tex/context/base/anch-pgr.lua:530: attempt to index field 'list' (a nil value) stack traceback: /usr/share/texmf/tex/context/base/anch-pgr.lua:530: in function 'fetchmultipar' /usr/share/texmf/tex/context/base/anch-pgr.lua:569: in function 'fetchmultipar' :1: in main chunk. \ctxcommand ...\directlua \zerocount {commands.#1} ...tipars {\MPvar {self}}{\MPanchorid } ; \includeMPgraphic {\MPv... \meta_process_graphic ...graphicformat ", \!!bs #1 ;\!!es , \!!bs \meta_flush... \anch_positions_meta_graphic_use ...#3\stopMPcode \endgroup \anch_positions_meta_graphic_nested ...graphic #2} \endgroup \anch_positions_meta_graphic_direct_indeed ...ame \removelastspace }\smashbo... ... l.206 I am using it as such: \starttextbackground[CodeExampleFrame] ... \stoptextbackground And the background is defined as such: \definetextbackground[CodeExampleFrame] [corner=round, frame=on, before={ \blank[2*big] }, after={ \blank[2*big] }, color=color_text, background=color, backgroundcolor=colour_page, framecolor=colour_text, location=paragraph, topoffset=0.5cm, bottomoffset=0.5cm, leftoffset=0.5cm, rightoffset=0.5cm] This is with ConTeXt version 2012.02.21 14:02 MKIV fmt: 2012.2.26. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com signature.asc Description: This is a digitally signed message part ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Broken Nightly (2012.02.18)
Am 24.02.2012 um 01:12 schrieb Kip Warner: > On Wed, 2012-02-22 at 22:21 +0100, Wolfgang Schuster wrote: >> \starttextbackground >> >> Wolfgang > > I have the following defined in my environment: > > \definetextbackground[TimelineGeneralDocument][ >location=paragraph, >color=color_text, >background=color, >backgroundcolor=colour_page, >framecolor=colour_text, >topoffset=1.0cm, >bottomoffset=1.0cm, >leftoffset=1.0cm, >rightoffset=1.0cm, >before={ >\blank[2*big] >}, >after={ >\blank[2*big] >}, >style=small, >corner=round, >frame=on] > > I use it as such... > > \startTimelineGeneralDocument > ...Some stuff... > \stopTimelineGeneralDocument > > So I'm not really sure what I am suppose to do with > \starttextbackground? You should make a minimal example with \starttextbackground which produces the same error as your document. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Broken Nightly (2012.02.18)
On Wed, 2012-02-22 at 22:21 +0100, Wolfgang Schuster wrote: > \starttextbackground > > Wolfgang I have the following defined in my environment: \definetextbackground[TimelineGeneralDocument][ location=paragraph, color=color_text, background=color, backgroundcolor=colour_page, framecolor=colour_text, topoffset=1.0cm, bottomoffset=1.0cm, leftoffset=1.0cm, rightoffset=1.0cm, before={ \blank[2*big] }, after={ \blank[2*big] }, style=small, corner=round, frame=on] I use it as such... \startTimelineGeneralDocument ...Some stuff... \stopTimelineGeneralDocument So I'm not really sure what I am suppose to do with \starttextbackground? -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com signature.asc Description: This is a digitally signed message part ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Broken Nightly (2012.02.18)
Am 22.02.2012 um 22:17 schrieb Kip Warner: > On Wed, 2012-02-22 at 22:08 +0100, Wolfgang Schuster wrote: >> Check text backgrounds in your document, Hans made a few changes in the code >> to make it faster. > > Any suggestions on what I should look for? Thanks. \starttextbackground Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [beta] anch-pos.lua
On 17-2-2012 02:05, Philipp Gesang wrote: The new code is solid. Of course one can always stretch it to the limit: \setuptextbackground [mp=mpos:par:region, method=mpos:par:region] \setupbodyfont[dejavu,10pt] \showframe \definetextbackground[r] \definetextbackground[b] \starttext test \starttextbackground[b] \input ward \parshape 5 5cm 8cm 4cm 8cm 3cm 8cm 2cm 8cm 1cm 8cm \input ward \input ward \input ward \stoptextbackground{} test \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [beta] anch-pos.lua
On 2012-02-16 22:44, Hans Hagen wrote: > On 16-2-2012 19:01, Philipp Gesang wrote: > >there seems to be a typo in anch-pos.lua, line 100: > > > >· > >-local r = collected[region] > >+local r = collected[tag] > >· > > > >(“region” references a boolean.) > > not so much a typo but i'll add some more checks The new code is solid. > > >Here’s an example that triggers the bug and works after the > >patch is applied. I have no idea as to why this exact series of > >macros causes the issue. Please have a look at it anyways because > >the text background looks weird even after. > > > >· > >\definetextbackground[tb] > >\setuptyping[ > > after={\stoptextbackground}, > > before={\starttextbackground[tb]}, > >] > > add [location=paragraph] Thanks, looks good now! Philipp > > >\starttext > > > >foo > >\starttyping > >bar > >\stoptyping > >baz > > > >\starttabulate[|r|l|] > > \NC foo \NC bar \AR > >\stoptabulate% > > ^^ missing \NC > > > > > >\stoptext > >· > > > >Regards > >Philipp > > > > > > > > > >> > >>\setuptextbackground > >> [mp=mpos:par:region, > >>method=mpos:par:region] > >> > >>or with some more visual tracing > >> > >>\setuptextbackground > >> [mp=mpos:par:region:kind, > >>method=mpos:par:region] > >> > >>A simple test with some 200 backgrounds brings down runtime with one > >>second on my machine (not the fastest anyway). > >> > >>Apart from a performance gain, backgrounds are now also supported in > >>regular multicolumns as well as in some specific mechanisms like > >>tabulate and xtables. In xtables one needs to set region=yes in > >>order to get the desired results. Actually, the region key is a new > >>one in framed so anything that can be framed can also have fancy > >>text backgrounds. > >> > >>Yet another improvement is that (although rather untested) you can > >>do things like > >> > >> \starttextbackground[r] START > >> \dorecurse{10}{ > >> \dorecurse{1}{\input ward } > >> \placefigure[right]{}{} > >> some text before BEGIN \dorecurse{2}{\input ward } END some after > >> \placefigure[left]{}{} > >> some text before BEGIN \dorecurse{2}{\input ward } END some after > >> \placefigure[right]{}{} > >> some text before BEGIN \dorecurse{2}{\input ward } END some after > >> } > >> STOP \stoptextbackground > >> \dorecurse{1}{\input ward } > >> > >>and get more or less expected results. Keep in mind that it can > >>never get perfect due to all kind of possible interference. Also, > >>keep away from internals as they will quite certainly change. > >> > >>Hans > >> > >> > >> > >>- > >> Hans Hagen | PRAGMA ADE > >> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > >> tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > >> | www.pragma-pod.nl > >>- > >>___ > >>If your question is of interest to others as well, please add an entry to > >>the Wiki! > >> > >>maillist : ntg-context@ntg.nl / > >>http://www.ntg.nl/mailman/listinfo/ntg-context > >>webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > >>archive : http://foundry.supelec.fr/projects/contextrev/ > >>wiki : http://contextgarden.net > >>___ > > > > > > > >___ > >If your question is of interest to others as well, please add an entry to > >the Wiki! > > > >maillist : ntg-context@ntg.nl / > >http://www.
Re: [NTG-context] [beta] anch-pos.lua
On 16-2-2012 19:01, Philipp Gesang wrote: On 2012-02-16 10:17, Hans Hagen wrote: Hi, I uploaded a beta. Apart from some fixes, the biggest change is in dealing with positional info and text backgrounds (first stage cleanup). As I have no clue to what extend users mess around with background graphics themselves, it's hard to predict side effects, but the biggest impact is speed. The adventurous might want to try out Hi Hans, there seems to be a typo in anch-pos.lua, line 100: · -local r = collected[region] +local r = collected[tag] · (“region” references a boolean.) not so much a typo but i'll add some more checks Here’s an example that triggers the bug and works after the patch is applied. I have no idea as to why this exact series of macros causes the issue. Please have a look at it anyways because the text background looks weird even after. · \definetextbackground[tb] \setuptyping[ after={\stoptextbackground}, before={\starttextbackground[tb]}, ] add [location=paragraph] \starttext foo \starttyping bar \stoptyping baz \starttabulate[|r|l|] \NC foo \NC bar \AR \stoptabulate% ^^ missing \NC \stoptext · Regards Philipp \setuptextbackground [mp=mpos:par:region, method=mpos:par:region] or with some more visual tracing \setuptextbackground [mp=mpos:par:region:kind, method=mpos:par:region] A simple test with some 200 backgrounds brings down runtime with one second on my machine (not the fastest anyway). Apart from a performance gain, backgrounds are now also supported in regular multicolumns as well as in some specific mechanisms like tabulate and xtables. In xtables one needs to set region=yes in order to get the desired results. Actually, the region key is a new one in framed so anything that can be framed can also have fancy text backgrounds. Yet another improvement is that (although rather untested) you can do things like \starttextbackground[r] START \dorecurse{10}{ \dorecurse{1}{\input ward } \placefigure[right]{}{} some text before BEGIN \dorecurse{2}{\input ward } END some after \placefigure[left]{}{} some text before BEGIN \dorecurse{2}{\input ward } END some after \placefigure[right]{}{} some text before BEGIN \dorecurse{2}{\input ward } END some after } STOP \stoptextbackground \dorecurse{1}{\input ward } and get more or less expected results. Keep in mind that it can never get perfect due to all kind of possible interference. Also, keep away from internals as they will quite certainly change. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archi
Re: [NTG-context] [beta] anch-pos.lua
On 2012-02-16 10:17, Hans Hagen wrote: > Hi, > > I uploaded a beta. Apart from some fixes, the biggest change is in > dealing with positional info and text backgrounds (first stage > cleanup). As I have no clue to what extend users mess around with > background graphics themselves, it's hard to predict side effects, > but the biggest impact is speed. The adventurous might want to try > out Hi Hans, there seems to be a typo in anch-pos.lua, line 100: · -local r = collected[region] +local r = collected[tag] · (“region” references a boolean.) Here’s an example that triggers the bug and works after the patch is applied. I have no idea as to why this exact series of macros causes the issue. Please have a look at it anyways because the text background looks weird even after. · \definetextbackground[tb] \setuptyping[ after={\stoptextbackground}, before={\starttextbackground[tb]}, ] \starttext foo \starttyping bar \stoptyping baz \starttabulate[|r|l|] \NC foo \NC bar \AR \stoptabulate% \stoptext · Regards Philipp > > \setuptextbackground > [mp=mpos:par:region, >method=mpos:par:region] > > or with some more visual tracing > > \setuptextbackground > [mp=mpos:par:region:kind, >method=mpos:par:region] > > A simple test with some 200 backgrounds brings down runtime with one > second on my machine (not the fastest anyway). > > Apart from a performance gain, backgrounds are now also supported in > regular multicolumns as well as in some specific mechanisms like > tabulate and xtables. In xtables one needs to set region=yes in > order to get the desired results. Actually, the region key is a new > one in framed so anything that can be framed can also have fancy > text backgrounds. > > Yet another improvement is that (although rather untested) you can > do things like > > \starttextbackground[r] START > \dorecurse{10}{ > \dorecurse{1}{\input ward } > \placefigure[right]{}{} > some text before BEGIN \dorecurse{2}{\input ward } END some after > \placefigure[left]{}{} > some text before BEGIN \dorecurse{2}{\input ward } END some after > \placefigure[right]{}{} > some text before BEGIN \dorecurse{2}{\input ward } END some after > } > STOP \stoptextbackground > \dorecurse{1}{\input ward } > > and get more or less expected results. Keep in mind that it can > never get perfect due to all kind of possible interference. Also, > keep away from internals as they will quite certainly change. > > Hans > > > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgp0hCipZI4VJ.pgp Description: PGP signature ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] beta
Hi Hans, Another small issue with the new beta (ConTeXt ver: 2012.02.16 13:05 MKIV): the key « location= hanging » does not work anymore in enumerations. Minimal example: %% \defineenumeration[Exo] [location=hanging, width=fit, text={Exercise }, stopper={.}] \starttext \startExo This is a test: this line should not be below « Exercise 1. »\dots \stopExo \stoptext % Best regards: OK On 16 févr. 2012, at 10:17, Hans Hagen wrote: > Hi, > > I uploaded a beta. Apart from some fixes, the biggest change is in dealing > with positional info and text backgrounds (first stage cleanup). As I have > no clue to what extend users mess around with background graphics themselves, > it's hard to predict side effects, but the biggest impact is speed. The > adventurous might want to try out > > \setuptextbackground > [mp=mpos:par:region, > method=mpos:par:region] > > or with some more visual tracing > > \setuptextbackground > [mp=mpos:par:region:kind, > method=mpos:par:region] > > A simple test with some 200 backgrounds brings down runtime with one second > on my machine (not the fastest anyway). > > Apart from a performance gain, backgrounds are now also supported in regular > multicolumns as well as in some specific mechanisms like tabulate and > xtables. In xtables one needs to set region=yes in order to get the desired > results. Actually, the region key is a new one in framed so anything that can > be framed can also have fancy text backgrounds. > > Yet another improvement is that (although rather untested) you can do things > like > >\starttextbackground[r] START >\dorecurse{10}{ >\dorecurse{1}{\input ward } >\placefigure[right]{}{} >some text before BEGIN \dorecurse{2}{\input ward } END some after >\placefigure[left]{}{} >some text before BEGIN \dorecurse{2}{\input ward } END some after >\placefigure[right]{}{} >some text before BEGIN \dorecurse{2}{\input ward } END some after >} >STOP \stoptextbackground >\dorecurse{1}{\input ward } > > and get more or less expected results. Keep in mind that it can never get > perfect due to all kind of possible interference. Also, keep away from > internals as they will quite certainly change. > > Hans > > > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] beta
Hi Hans, Thanks for the new beta: as a matter of fact it seems to be much faster the previous ones, even with many backgrounds! I wanted to submit a small bug with the « \prime » in math mode: the following gives an error %% begin example.tex \starttext The function $\exp$ is the unique solution of \startformula u'(x) = u(x) \quad u(0) = 1. \stopformula \stoptext % end example.tex The error message is: \301>c ->\egroup ( l.6 u'( x) = u(x) \quad u(0) = 1. Best regards: OK On 16 févr. 2012, at 10:17, Hans Hagen wrote: > Hi, > > I uploaded a beta. Apart from some fixes, the biggest change is in dealing > with positional info and text backgrounds (first stage cleanup). As I have > no clue to what extend users mess around with background graphics themselves, > it's hard to predict side effects, but the biggest impact is speed. The > adventurous might want to try out > > \setuptextbackground > [mp=mpos:par:region, > method=mpos:par:region] > > or with some more visual tracing > > \setuptextbackground > [mp=mpos:par:region:kind, > method=mpos:par:region] > > A simple test with some 200 backgrounds brings down runtime with one second > on my machine (not the fastest anyway). > > Apart from a performance gain, backgrounds are now also supported in regular > multicolumns as well as in some specific mechanisms like tabulate and > xtables. In xtables one needs to set region=yes in order to get the desired > results. Actually, the region key is a new one in framed so anything that can > be framed can also have fancy text backgrounds. > > Yet another improvement is that (although rather untested) you can do things > like > >\starttextbackground[r] START >\dorecurse{10}{ >\dorecurse{1}{\input ward } >\placefigure[right]{}{} >some text before BEGIN \dorecurse{2}{\input ward } END some after >\placefigure[left]{}{} >some text before BEGIN \dorecurse{2}{\input ward } END some after >\placefigure[right]{}{} >some text before BEGIN \dorecurse{2}{\input ward } END some after >} >STOP \stoptextbackground >\dorecurse{1}{\input ward } > > and get more or less expected results. Keep in mind that it can never get > perfect due to all kind of possible interference. Also, keep away from > internals as they will quite certainly change. > > Hans > > > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] beta
Hi, I uploaded a beta. Apart from some fixes, the biggest change is in dealing with positional info and text backgrounds (first stage cleanup). As I have no clue to what extend users mess around with background graphics themselves, it's hard to predict side effects, but the biggest impact is speed. The adventurous might want to try out \setuptextbackground [mp=mpos:par:region, method=mpos:par:region] or with some more visual tracing \setuptextbackground [mp=mpos:par:region:kind, method=mpos:par:region] A simple test with some 200 backgrounds brings down runtime with one second on my machine (not the fastest anyway). Apart from a performance gain, backgrounds are now also supported in regular multicolumns as well as in some specific mechanisms like tabulate and xtables. In xtables one needs to set region=yes in order to get the desired results. Actually, the region key is a new one in framed so anything that can be framed can also have fancy text backgrounds. Yet another improvement is that (although rather untested) you can do things like \starttextbackground[r] START \dorecurse{10}{ \dorecurse{1}{\input ward } \placefigure[right]{}{} some text before BEGIN \dorecurse{2}{\input ward } END some after \placefigure[left]{}{} some text before BEGIN \dorecurse{2}{\input ward } END some after \placefigure[right]{}{} some text before BEGIN \dorecurse{2}{\input ward } END some after } STOP \stoptextbackground \dorecurse{1}{\input ward } and get more or less expected results. Keep in mind that it can never get perfect due to all kind of possible interference. Also, keep away from internals as they will quite certainly change. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___