[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 ___
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
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 ___
[NTG-context] MP background for text typeset by \typefile
Hello, is there a way to draw custom background (via MP) to a text typed by \typefile, which is so long so it spreads over more pages? - I'm asking because I know how to typeset some text via \typefile with: 1. this: \definetyping[Test] [before={\startbackground[background=color,backgroundcolor=blue] }, after={\stopbackground }, ] - which creates a rectangular backround to the text, and the text may spread over pages; 2. or this: \defineoverlay[AnOverlayDefinition][] \definetyping[Test] [before={\startframedtext[background=AnOverlayDefinition, ]% }, after={\stopframedtext }, ] - which allows to define a custom background via overlay/MP, but which encloses the text to be typeset into a framed, and thus doesn't spread over pages. My intention is to "decore" the text typed by \typefile with a "fuzzy" background, which uses overlay/MP. But I am in the sitaution where I am able to figure out MP code just when the text is to be enclosed into \framed. Is it possible to combine both cases? How? Best regards, Lukas ___ 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] t-vim module: math in "normal" code and background color
Am Dienstag, 18. Juli 2017, 04:04:51 CEST schrieb Aditya Mahajan: > On Mon, 17 Jul 2017, 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? > > Short answer. No. > > Long answer. t-vim relies on vim to syntax highlight the code. Since the > code is not valid python, the default python syntax highlighting will not > work. In principle, it is possible to write a vim syntax highlighting > script for a derivative of python where math terms are allowed, but that > requires a lot of work for each language. The whole point of t-vim module > was that I am lazy and don't want to write the parser for each language > :-) I've invested some time and rewrote parts of the vimscript file of t-vim. Now one or more escapechars can be defined, that helps vim to not interpret the text: ``` \usemodule[vim] \definevimtyping[python][syntax=python] \definevimtyping[cpp][syntax=cpp] \starttext \startpython # Returns range(°\m{\sum_{i=1}^{n}i \in F \int_i f}° def sum_upto(°\m{n \in \mathbb{N} \sum_{i=1}}°) r = range(1, °\m{n}° + °\m{\sum_{i=1} 1}°) return sum(r) \stoppython \startcpp foobar(°\m{q_0}°); \stopcpp \stoptext ``` I'm not familiar enough with TeX or ConTeXt to get the TeX part to work, so the escapechar '°' is hardcoded at the moment. If you like the patch, this has to be fixed. Another problem, as you see in the above example, is, that vim interprets the second ')' in the startcpp section as color code "Error", so the whole part is colorized. This can be circumventented with the escapechars '°"', but I have no idea how to teach tex/lua to not interpret the '"'. Simply writing -c "let escapechar='°\"'" % etc. in the t-vim.tex does not work. Another point I saw is, that highlight together with TeX-code is not really usable: ``` \usemodule[vim] \definevimtyping[python][syntax=python, escape=on] \starttext \startpython[highlight=1] # Returns \m{\sum_{i=1}^{n}i \in F \int_i f} \stoppython \stoptext ``` > > 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 > > ``` > > Another option will be to use the algorithmic module: > https://bitbucket.org/wolfs/algorithmic/src/ > > > 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? > > You can add > > \setupbackground[background=color, backgroundcolor=gray] > > \setupvimtyping[python] > [ >before={\startbackground}, >after={\stopbackground}, > ] > > or, instead of modifying the default background, define a new background > and use that. OK, thank you. Gerion From 994de513a23210f1f4d50d24270f8f988abdd21c Mon Sep 17 00:00:00 2001 From: Gerion Entrup Date: Wed, 19 Jul 2017 00:13:52 +0200 Subject: [PATCH] t-vim: extended escape mode With this change it is possible to define one or more escapechars, that are used by vim to recognize parts that should not be interpreted. --- 2context.vim | 50 +- t-vim.tex| 12 ++-- 2 files changed, 35 insertions(+), 27 deletions(-) diff --git a/2context.vim b/2context.vim index 9c72ba1..b208e65 100644 --- a/2context.vim +++ b/2context.vim @@ -8,6 +8,11 @@ " output buffer. The script parses content line-by-line from the first buffer " and pastes the modified result on the second buffer. +" Compare a char of at with some Unicode +function UnicodeCompare(string, bytepos, ochar) +return strpart(a:string, a:bytepos, max([strlen(a:ochar), 1])) ==# a:ochar +endfunction + " Split screen and go to the second buffer, ensure modifiable is set, and the " buffer is empty. sblast @@ -38,9 +43,9 @@ if !exists("highlight") let highlight=[] endif -" Set escapecomments -if !exists("escapecomments") - let escapecomments=0 +" Set escapechar +if !exists("escapechar") + let escapechar='' endif let s:strip = strlen( matchstr( getline(s:lstart), '^\s*' ) ) @@ -71,37 +76,48 @@ let s:lines = [] let s:buffer_lnum = 1 let s:lnum = s:l
Re: [NTG-context] t-vim module: math in "normal" code and background color
On Mon, 17 Jul 2017, 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? Short answer. No. Long answer. t-vim relies on vim to syntax highlight the code. Since the code is not valid python, the default python syntax highlighting will not work. In principle, it is possible to write a vim syntax highlighting script for a derivative of python where math terms are allowed, but that requires a lot of work for each language. The whole point of t-vim module was that I am lazy and don't want to write the parser for each language :-) 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 ``` Another option will be to use the algorithmic module: https://bitbucket.org/wolfs/algorithmic/src/ 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? You can add \setupbackground[background=color, backgroundcolor=gray] \setupvimtyping[python] [ before={\startbackground}, after={\stopbackground}, ] or, instead of modifying the default background, define a new background and use that. 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] Footnote in TABLE isn't rendered anywhere
> Am 13.07.2017 um 01:18 schrieb Aditya Mahajan : > > On Wed, 12 Jul 2017, Mathias Schickel wrote: > >> Does no-one know what I can do to settle the problem? >> [...] >> So what can I do to get the footnotes in a background environment displayed? > > \automigrateinserts > \starttext > \startbackground > This is a test\footnote{Footnote} continue > \stopbackground > \stoptext > > According to node-mig.mkiv, this might cause problems with notes inside > captions. > > Aditya 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. Maybe I will be able to produce minimal examples of both issues and then I will send it to the list and maybe Hans or someone with similar skills can take care of that effects. Best and many thanks for the help Mathias > ___ > 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 Wed, 12 Jul 2017, Mathias Schickel wrote: Does no-one know what I can do to settle the problem? [...] So what can I do to get the footnotes in a background environment displayed? \automigrateinserts \starttext \startbackground This is a test\footnote{Footnote} continue \stopbackground \stoptext According to node-mig.mkiv, this might cause problems with notes inside captions. 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] Footnote in TABLE isn't rendered anywhere
Am 10.07.2017 um 20:23 schrieb Mathias Schickel <m...@fa.uni-tuebingen.de>:Am 10.07.2017 um 12:50 schrieb Pablo Rodriguez <oi...@gmx.es>:On 07/08/2017 03:17 PM, Mathias Schickel wrote:Dear Andreas, Pablo and the list,I did read your question and answer with great interest, since Iencountered similar issues. Sadly your trick to get footnotes that aredefined in some environments like tables displayed at the bottom of thepage does not work if you try it using backgrounds. Here I provide aminimal example that shows the problem:Dear Mathias,I didn’t even know that backgrounds existed in ConTeXt.Framed texts does the trick with your sample: \setupframedtext [width=\textwidth, frame=on, rulethickness=1pt, corner=0, offset=12pt] \starttext \startframedtext If you typeset text with background, the footnote workaround does not work. \postponenotes\footnote{So what could I do to get this footnote displayed? Use framed texts.} \stopframedtext \flushnotes \stoptextBut if you really need a background, I’m afraid it won’t work (or Idon’t know how to make it work).Just in case it might help,PabloDear Pablo,thank you very much for your suggestion! Sadly I have noticed that framed texts do not break across pages (at least if I simply copy and use your code). I remember that I switched to backgrounds (from \definetextbackground) because I did get problems at page breaks. Regarding that backgrounds showed the best behaviour but sadly it has the described problems using footnotes.Do you have any further suggestions how I can enable framed text to break across pages?And can anyone tell me how I can get rid of the problem of backgrounds and footnotes?Again, thank you very much for your kind help!BestMathiasDoes no-one know what I can do to settle the problem? I have created a minimal example that shows the problem using textbackground to work around the footnote problem. But sadly the framedtext environment does not seem to be able to break across pages. Besides I would prefer the background solution. So what can I do to get the footnotes in a background environment displayed?Help appreciated!BestMathiasThe minimal example follows:%%\setupbackground[ width=\textwidth, frame=on, framecolor=black, rulethickness=1pt, background=""> backgroundcolor=green, corner=0, before={\blank[4*small]}, after={\blank[5*small]}, topoffset=10pt, bottomoffset=10pt, leftoffset=10pt, rightoffset=10pt]\setupframedtext [width=\textwidth, frame=on, framecolor=black, rulethickness=1pt, background=""> backgroundcolor=red, corner=0, offset=12pt] \starttext%\startbackground % If you typeset text with background, the footnote workaround does not work.\postponenotes\footnote{So what could I do to get this footnote displayed?} %\stopbackground\flushnotes%\startbackground % One advantages of backgrounds is that they break across pages, as you can see here: % \dorecurse{5}{% \input{knuth}% } %\stopbackground%Compare that to the output of framedtext (the gap on this page is not intended!):%\startframedtext % Here I am getting trouble with breaking across pages. This was the first reason why I switched to backgrounds. % \dorecurse{5}{% \input{knuth}% } %\stopframedtext%\stoptext%% FramedFootnote.pdf Description: Adobe PDF document -- 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-contextwebpage : http://www.pragma-ade.nl / http://context.aanhet.netarchive : 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-contextwebpage : http://www.pragma-ade.nl / http://context.aanhet.netarchive : 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
Dear Andreas, Pablo and the list, I did read your question and answer with great interest, since I encountered similar issues. Sadly your trick to get footnotes that are defined in some environments like tables displayed at the bottom of the page does not work if you try it using backgrounds. Here I provide a minimal example that shows the problem: \setupbackground[ width=\textwidth, frame=on, framecolor=black, rulethickness=1pt, background=color, backgroundcolor=white, corner=0, offset=12pt] % \starttext % \startbackground % If you typeset text with background, the footnote workaround does not work.\postponenotes\footnote{So what could I do to get this footnote displayed?} % \stopbackground \flushnotes % \stoptext Can anyone tell me what I can do to get the footnote rendered? Thank you in advance. Best regards Mathias > Am 06.07.2017 um 09:41 schrieb Andreas Schneider : > > Am 2017-07-05 20:51, schrieb Pablo Rodriguez: >> this might do what you intend: >>\starttext >>\bTABLE[split=repeat,align=normal] >> \bTR\bTD Something\postponenotes\footnote[x]{bla bla}\eTD\eTR >> \bTR\bTD Foo\note[x] \eTD\eTR >>\eTABLE >>\flushnotes >>\stoptext >> Just in case it helps, > > Hello Pablo, > > yes, this does the trick. Thank you very much for that solution! :-) > > Best regards > Andreas > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] How to place background text on proper page
Dear list members, In the following minimal example the last block (on the background) is placed on page 3 while there is ample room for it on page 2. Only when the \page command in line 6 is uncommented, this block is placed on page 2. Is there a better way to force placement on page 2 or should I always put a \page command at the bottom of the previous page? My '\page solution' has the disadvantage that, when applied in the middle of a sentence, the last line on the page is usually not aligned. \define\block{\input knuth \blank} \starttext \block \block \block % still on page 1 %\page \block % partially on page 2 \startbackground \block % only on page 2 if \page is uncommented \stopbackground \stoptext Thanks in advance, Sytse Knypstra ___ 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] bug in latest beta?
Hi Pablo, Indeed the document I was talking about has been typeset with various versions of mkiv, but now I observe that sometimes the pagebreaks are made in a very strange way. Since I can’t make a minimal example, I put on the following link an excerpt of the PDF document where the bad pagebreaks can be seen: https://dl.dropboxusercontent.com/u/4316076/bad-pagebreak.pdf (Please see pages 19 and 32). It seems that this happens, sometimes, but as far as I can say from my experiments the bad pagebreak happens always before a « proclaim » which is defined as follows: \defineenumeration[proclaim] [text=, before={\blank\startbackground[frame=off,leftframe=on, rulethickness=2pt,framecolor=darkred, background=color, backgroundcolor=screen]}, after={\stopbackground\blank}, style=slanted, title=yes, titleleft=, titleright={.}, alternative=hanging, width=fit, right={~}, way=bysection, prefix=yes, prefixsegments={chapter:section}] Actually I found a workaround for this by changing the above definition into: \defineenumeration[proclaim] [text=, before={\blank\startmarginrule[rulethickness=1pt,rulecolor=darkred]}, after={\stopmarginrule}, style=slanted, title=yes, titleleft=, titleright={.}, alternative=hanging, width=fit, right={~}, way=bysection, prefix=yes, prefixsegments={chapter:section}] However it would be better to understand why the first definition does not work properly, in a rather random way. Best regards: OK > On 01 Jun 2015, at 00:16, Hans Hagen wrote: > > On 5/31/2015 1:56 PM, Pablo Rodriguez wrote: >> On 05/28/2015 07:10 PM, Hans Hagen wrote: >>> On 5/27/2015 10:38 PM, Pablo Rodriguez wrote: >>>> [...] >>>> Compiling it with beta from 2015.03.25 22:13, page break is fine. >>>> >>>> But with latest beta from 2015.05.24 12:42 (or even with beta from >>>> 2015.05.15 11:42 includes a wrong page break. The setups for widow and >>>> orphan lines move the two last lines to the next page. >>>> >>>> Could anyone confirm this bug? >>> >>> i wonder if it's a bug or just tex's decision ... you can use >>> >>> \showmakeup[penalty] >>> >>> and see what penalties get injected >>> >>> are the linebreaks identical, i.e. same hyphenation? >> >> Many thanks for your reply, Hans. >> >> Hyphenation is the same in both documents. >> >>> btw, brokenpenalty 1 gives a different result >> >> Page break is wrong when any of the three values (brokenpenalty, >> widowpenalty or clubpenalty) is 0 or above . >> >> I replacing \subsection with \section gives the right page break: >> >> \showframe\showgrid >> \setuplayout[setups=*lessstrict] >> \startsetups[*lessstrict] >> \setup[reset] >> \widowpenalty=1 >> \clubpenalty=1 >> \brokenpenalty=0 >> \stopsetups >> \setupbodyfont[pagella, 12.6pt] >> \starttext >> \chapter{Quotes} >> \section{Zapf} >> \dorecurse{4}{\input zapf\par} >> \section{Knuth} >> \input knuth >> \stoptext >> >> Why does \subsection cause a different page break than \section? > > because there are penalties related to (sub)sections in a way that keeps them > together but at the same time still permits breaks in case of too many > successive ones .. and penalties determine the way the page is broken > > 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] Unable to resave float
On 4/24/2015 4:22 PM, Aditya Mahajan wrote: I have a complex document, where I use \startbackground \startplacefigure[location={always,none}] ... \stopplacefigure ... \stopbackground (This is for exam solutions and the background is supposed to be a frame around the solution; the figure is a figure included in the solution). Occasionally, some of the floats are not placed in the output. For example $grep float filename.log gives: floatblocks > '1' placed floatblocks > '2' placed floatblocks > '3' placed floatblocks > order disturbed structure > floats > unable to resave float floatblocks > '5' placed floatblocks > '6' placed floatblocks > order disturbed structure > floats > unable to resave float floatblocks > '8' placed So, float 4 and 7 were not saved. It is bit tricky to create a minimal example, but any idea how I can prevent this. I am using version 2015.04.03 hm, weird ... btw, you can have 'local' as keyword which will store them till you call them. Thanks, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- - 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] Unable to resave float
I have a complex document, where I use \startbackground \startplacefigure[location={always,none}] ... \stopplacefigure ... \stopbackground (This is for exam solutions and the background is supposed to be a frame around the solution; the figure is a figure included in the solution). Occasionally, some of the floats are not placed in the output. For example $grep float filename.log gives: floatblocks > '1' placed floatblocks > '2' placed floatblocks > '3' placed floatblocks > order disturbed structure > floats > unable to resave float floatblocks > '5' placed floatblocks > '6' placed floatblocks > order disturbed structure > floats > unable to resave float floatblocks > '8' placed So, float 4 and 7 were not saved. It is bit tricky to create a minimal example, but any idea how I can prevent this. I am using version 2015.04.03 Thanks, Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] startbackground with footnotes cause problems
Hi, I observe that if startbackground stopbackground has footnotes inside, then page breaks are placed before and after footnotes with blank pages... Anyone does know anything about that? 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] \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
Sorry, I mean Wolfgang not Aditya ;-) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \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 ___
Re: [NTG-context] \startbackground with footnote
Am 22.05.2014 um 14:25 schrieb Xan : > Hi, > > I have a footnote in \startbackground \stopbackground environment and the > footnote is not displayed. Can anyone give me any hint? Add the command \automigrateinserts before \starttext. 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] \startbackground with footnote
Hi, I have a footnote in \startbackground \stopbackground environment and the footnote is not displayed. Can anyone give me any hint? 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] text with background does not break properly around float
Has really no one an idea how to solve this problem? It is driving me crazy... Thanks for any help. Thomas 2014-04-30 12:24 GMT+02:00 Thomas Möbius : > Dear ConTeXt list, > > text that has some background attached to it, does not properly break > if a float appears on the same page. How to work around it? > > ---minimal example--- > \starttext > > \chapter {Bsaoteh} > > \defineenumeration > [excursion] > [text=Excursion, > listtext={Excursion~}, > counter=theorem, > before={\blank\startbackground}, > after={\stopbackground\blank}] > > \input knuth > \input knuth > \input knuth > > \placetable > [here] > [tab:bala] > {Blaoesunthaoeusatoheu saohusaoteh asotehu asoehu aseohu}{ > \bTABLE > > \setupTABLE[frame=off] > \setupTABLE[r][first][topframe=on,rulethickness=1.3pt] > \setupTABLE[r][2][topframe=on] > \setupTABLE[r][last][bottomframe=on,rulethickness=1.3pt] > > \setupTABLE[c][each][align=left] > \setupTABLE[c][1][align=right] > \setupTABLE[c][1][width=.7\textwidth] > \setupTABLE[c][2][width=.2\textwidth] > > \bTR\bTD something \eTD\bTD 0. \eTD\eTR > \bTR\bTD something \eTD\bTD 0. \eTD\eTR > \bTR\bTD something \eTD\bTD 0. \eTD\eTR > \bTR\bTD something \eTD\bTD 0. \eTD\eTR > \bTR\bTD something \eTD\bTD 0. \eTD\eTR > \bTR\bTD something \eTD\bTD 0. \eTD\eTR > \bTR\bTD something \eTD\bTD 0. \eTD\eTR > \bTR\bTD something \eTD\bTD 0. \eTD\eTR > \eTABLE} > > \excursion \input knuth\input knuth\input knuth > \input knuth > > \input knuth \input knuth \input knuth > > \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] text with background does not break properly around float
Dear ConTeXt list, text that has some background attached to it, does not properly break if a float appears on the same page. How to work around it? ---minimal example--- \starttext \chapter {Bsaoteh} \defineenumeration [excursion] [text=Excursion, listtext={Excursion~}, counter=theorem, before={\blank\startbackground}, after={\stopbackground\blank}] \input knuth \input knuth \input knuth \placetable [here] [tab:bala] {Blaoesunthaoeusatoheu saohusaoteh asotehu asoehu aseohu}{ \bTABLE \setupTABLE[frame=off] \setupTABLE[r][first][topframe=on,rulethickness=1.3pt] \setupTABLE[r][2][topframe=on] \setupTABLE[r][last][bottomframe=on,rulethickness=1.3pt] \setupTABLE[c][each][align=left] \setupTABLE[c][1][align=right] \setupTABLE[c][1][width=.7\textwidth] \setupTABLE[c][2][width=.2\textwidth] \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \bTR\bTD something \eTD\bTD 0. \eTD\eTR \eTABLE} \excursion \input knuth\input knuth\input knuth \input knuth \input knuth \input knuth \input knuth \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] setuphead for in-paragraph head ?
On 9 janv. 2014, at 15:48, Jaroslav Hajtmar wrote: > Hello Otared. > I will throw this one... Thanx. > > Once I was using exercise-answer package for LaTeX. > Is there anything like this to use in ConTeXt? > > Thanx > Jaroslav Hajtmar Hello Jaroslav, I have something like the following which was given to me by Hans a long time ago: unfortunately for some reason this does not work anymore with ConTeXt mkiv, but it is quite fine with mkii: %%% begin question-hint-answer.tex \defineblock[question] \defineblock[hint] \defineblock[answer] \defineenumeration[question][location=hanging,text={Question},stopper={.}] \defineenumeration[hint][location=hanging,text={Hint for question},stopper={.}] \defineenumeration[answer][location=hanging,text={Answer to question},stopper={.}] \hideblocks[hint] \hideblocks[answer] \starttext \section{Questions} \beginquestion \question Compute $4\times 5$. \beginhint \hint Use the fact that $2\times 5 = 10$. \endhint \beginanswer \answer $20$. \endanswer \endquestion \beginquestion \question What is the value of $100 / 10$? \beginhint \hint Remember that $10\times 10 = 100$. \endhint \beginanswer \answer $10$ \endanswer \endquestion \section{Hints} \useblocks[hint] \section{Answers} \useblocks[answer] \stoptext %%% end question-hint-answer.tex Best regards: OK > > > Dne 9.1.2014 15:19, Otared Kavian napsal(a): >> %%% begin example-exercise.tex >> %%% >> % defining \startexo, \stopexo as an enumeration: >> \startsetups style:simple >> \defineenumeration[exo] >> [alternative=hanging, >> width=fit, >> stopper={.}, >> text=Exercise, >> %between=, >> before=, >> after=\blank] >> \stopsetups % style:simple >> >> \startsetups style:textrule >> \definenumber[MyExoNumber][way=bysection,sectionumber=yes] >> \setuptextrules[rulecolor=darkred] >> \define\ExoCommand{\incrementnumber[MyExoNumber] >> \textrule[top]{Exercise \getnumber[MyExoNumber]} >> \startbackground[frame=off,leftframe=on,backgroundcolor=white, >> framecolor=darkred]} >> >> \defineenumeration[exo] >> [alternative=hanging, >> width=fit, >> text={}, >> number=hide, >> number=no, >> before={\ExoCommand}, >> after={\stopbackground\blank}] >> \stopsetups % style:textrule >> >> % end defining \startexo, \stopexo as an enumeration >> %%% >> >> %defining numbered questions >> \defineconversion[exercise][\numbers] >> %\setupitemize[packed] >> \def\StartQuestions{% >> \startitemize[exercise][width=2em,packed,style=bold,stopper=,right=)]} >> \def\StopQuestions{\stopitemize} >> \def\q{\item} >> >> % trye each of the following >> \setups[style:simple] >> %\setups[style:textrule] >> >> \starttext >> \startexo >> Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has >> $(a+b)^2 = a^2 + b^2$. >> \stopexo >> >> >> \startexo >> Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has >> $(a+b)^4 = a^4 + b^4$. >> \stopexo >> >> \startexo >> \StartQuestions >> \q Prove that >> \startformula >> \sum_{n=1}^\infty{1 \over n^2} = {\pi^2 \over 6}. >> \stopformula >> >> \q Prove that for any $n \geq 1$ integer one has >> \startformula >> \sum_{k=1}^n k^3 = \left({n(n+1) \over 2}\right)^2. >> \stopformula >> \StopQuestions >> \stopexo >> >> \stoptext >> %%% end example-exercise.tex > > ___ > 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] setuphead for in-paragraph head ?
Hello Otared. I will throw this one... Thanx. Once I was using exercise-answer package for LaTeX. Is there anything like this to use in ConTeXt? Thanx Jaroslav Hajtmar Dne 9.1.2014 15:19, Otared Kavian napsal(a): %%% begin example-exercise.tex %%% % defining \startexo, \stopexo as an enumeration: \startsetups style:simple \defineenumeration[exo] [alternative=hanging, width=fit, stopper={.}, text=Exercise, % between=, before=, after=\blank] \stopsetups % style:simple \startsetups style:textrule \definenumber[MyExoNumber][way=bysection,sectionumber=yes] \setuptextrules[rulecolor=darkred] \define\ExoCommand{\incrementnumber[MyExoNumber] \textrule[top]{Exercise \getnumber[MyExoNumber]} \startbackground[frame=off,leftframe=on,backgroundcolor=white, framecolor=darkred]} \defineenumeration[exo] [alternative=hanging, width=fit, text={}, number=hide, number=no, before={\ExoCommand}, after={\stopbackground\blank}] \stopsetups % style:textrule % end defining \startexo, \stopexo as an enumeration %%% %defining numbered questions \defineconversion[exercise][\numbers] %\setupitemize[packed] \def\StartQuestions{% \startitemize[exercise][width=2em,packed,style=bold,stopper=,right=)]} \def\StopQuestions{\stopitemize} \def\q{\item} % trye each of the following \setups[style:simple] %\setups[style:textrule] \starttext \startexo Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has $(a+b)^2 = a^2 + b^2$. \stopexo \startexo Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has $(a+b)^4 = a^4 + b^4$. \stopexo \startexo \StartQuestions \q Prove that \startformula \sum_{n=1}^\infty{1 \over n^2} = {\pi^2 \over 6}. \stopformula \q Prove that for any $n \geq 1$ integer one has \startformula \sum_{k=1}^n k^3 = \left({n(n+1) \over 2}\right)^2. \stopformula \StopQuestions \stopexo \stoptext %%% end example-exercise.tex ___ 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] setuphead for in-paragraph head ?
Hi Jean Guillaume, I guess Marco Patzer and Wolfgang Schuster gave you already the appropriate answers. Nevertheless, I wanted to share with you the definitions I use for the kind of work you want to do: %%% begin example-exercise.tex %%% % defining \startexo, \stopexo as an enumeration: \startsetups style:simple \defineenumeration[exo] [alternative=hanging, width=fit, stopper={.}, text=Exercise, % between=, before=, after=\blank] \stopsetups % style:simple \startsetups style:textrule \definenumber[MyExoNumber][way=bysection,sectionumber=yes] \setuptextrules[rulecolor=darkred] \define\ExoCommand{\incrementnumber[MyExoNumber] \textrule[top]{Exercise \getnumber[MyExoNumber]} \startbackground[frame=off,leftframe=on,backgroundcolor=white, framecolor=darkred]} \defineenumeration[exo] [alternative=hanging, width=fit, text={}, number=hide, number=no, before={\ExoCommand}, after={\stopbackground\blank}] \stopsetups % style:textrule % end defining \startexo, \stopexo as an enumeration %%% %defining numbered questions \defineconversion[exercise][\numbers] %\setupitemize[packed] \def\StartQuestions{% \startitemize[exercise][width=2em,packed,style=bold,stopper=,right=)]} \def\StopQuestions{\stopitemize} \def\q{\item} % trye each of the following \setups[style:simple] %\setups[style:textrule] \starttext \startexo Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has $(a+b)^2 = a^2 + b^2$. \stopexo \startexo Prove that for all $a,b\in {\Bbb K}$, a field of characteristic 2, one has $(a+b)^4 = a^4 + b^4$. \stopexo \startexo \StartQuestions \q Prove that \startformula \sum_{n=1}^\infty{1 \over n^2} = {\pi^2 \over 6}. \stopformula \q Prove that for any $n \geq 1$ integer one has \startformula \sum_{k=1}^n k^3 = \left({n(n+1) \over 2}\right)^2. \stopformula \StopQuestions \stopexo \stoptext %%% end example-exercise.tex Best regards: OK On 9 janv. 2014, at 14:23, Jean-Guillaume wrote: > But this: > > \definehead > [Exercise] [subsection] > [after=] > \starttext > \startExercise [title=This is the exercise's title] >The exercise's content. > \stopExercise > \stoptext > > results to: > > 1 This is the exercise's title > The exercise's content. > > and I would like it to be: > > 1 This is the exercise's title The exercise's content. > > (When I can typeset that, I will see about formatting the number and so on.) > > I'm sorry it wasn't very clear. Now I understand that I misunderstood > \startExercise{...} for \startExercise[title=...] and that's why I was > confused about which newline I want to get rid of. > > Jean-Guillaume > ___ > 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] Undefined \continueifinputfile on presentation
Hello, I have installed texlive and defined the path correctly: echo $PATH /usr/local/texlive/2013/bin/x86_64-linux:/usr/libexec/lightdm:/usr/local/bin:/usr/bin:/bin:/home/pau/bin:/usr/local/sbin:/usr/sbin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/sbin:/home/pau/bin:/home/pau/smbin:/home/pau/treball/simulacions/nemo/bin:/opt/local:/opt/local/bin:/home/pau/prawn/bin:/home/pau/treball/simulacions/splash2/bin:/home/pau/andromina/programes_diversos/pyxplot-0.9.2/bin:/home/pau/andromina/programes_diversos/rubber/bin:/home/pau/golang/bin/ (notice that it is the first entry) I am trying to recompile a presentation that I prepared with context on texlive2012 and I am getting this problem: ! Undefined control sequence. l.220 \continueifinputfile {s-pre-05.tex} The whole output is: == /usr/local/texlive/2013/texmf-dist/scripts/context/ruby/texexec.rb:688: warning: class variable access from toplevel /usr/local/texlive/2013/texmf-dist/scripts/context/ruby/texexec.rb:695: warning: class variable access from toplevel /usr/local/texlive/2013/texmf-dist/scripts/context/ruby/texexec.rb:702: warning: class variable access from toplevel /usr/local/texlive/2013/texmf-dist/scripts/context/ruby/texexec.rb:703: warning: class variable access from toplevel This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) restricted \write18 enabled. entering extended mode (./TU_Berlin_June_2012.tex ConTeXt ver: 2013.04.09 10:38 MKII fmt: 2013.7.22 int: english/english system : cont-new.mkii loaded (/usr/local/texlive/2013/texmf-dist/tex/context/base/cont-new.mkii systems : beware: some patches loaded from cont-new.mkii ) system : cont-sys.tex loaded (/home/pau/fitx_confg/texinputs/cont-sys.tex (/usr/local/texlive/2013/texmf-dist/tex/context/base/type-siz.mkii) (/usr/local/texlive/2013/texmf-dist/tex/context/base/type-one.mkii)) system : TU_Berlin_June_2012.top loaded (./TU_Berlin_June_2012.top) bodyfont: 12pt rm is loaded language: patterns nl->texnansi:texnansi->1->2:2 nl->ec:ec->2->2:2 us-> ec:ec->3->2:3 de->texnansi:texnansi->4->3:3 de->ec:ec->5->3:3 da->ec:ec->6->2:2 sv->ec:ec->7->2:2 af->ec:ec->8->2:2 gb->ec:ec->9->2:2 fr->texnansi:texnansi->1 0->2:2 fr->ec:ec->11->2:2 es->ec:ec->12->2:2 ca->ec:ec->13->2:2 it->texnansi:te xnansi->14->2:2 it->ec:ec->15->2:2 la->ec:ec->16->2:2 pt->texnansi:texnansi->17 ->2:2 pt->ec:ec->18->2:2 ro->ec:ec->19->2:2 pl->pl0:pl0->20->2:2 pl->ec:ec->21- >2:2 pl->qx:qx->22->2:2 cs->il2:il2->23->2:2 cs->ec:ec->24->2:2 sk->il2:il2->25 ->2:2 sk->ec:ec->26->2:2 hr->ec:ec->27->2:2 sl->ec:ec->28->2:2 tr->ec:ec->29->2 :2 tk->ec:ec->30->1:2 lt->l7x:l7x->31->2:2 agr->agr:agr->33->2:2 fi->ec:ec->34- >2:2 hu->ec:ec->35->2:2 ru->t2a:t2a->37->2:2 uk->t2a:t2a->38->3:3 loaded specials: dvips loaded systems : system commands are enabled language: language en is active specials: loading definition file tpd (/usr/local/texlive/2013/texmf-dist/tex/context/base/spec-tpd.mkii specials: loading definition file fdf (/usr/local/texlive/2013/texmf-dist/tex/context/base/spec-fdf.mkii)) system : module pre-fuzzy loaded (./s-pre-05.tex system : module pre-general loaded (/usr/local/texlive/2013/texmf-dist/tex/context/base/s-pre-00.tex) color : mpcmyk color space is supported color : mpspot color space is supported color : system rgb is global activated interaction : active system : mark Topic defined [chapter] system : mark Topicnumber defined [chapternumber] system : mark Nopic defined [title] system : mark Nopicnumber defined [titlenumber] system : mark Subject defined [section] system : mark Subjectnumber defined [sectionnumber] ! Undefined control sequence. l.220 \continueifinputfile {s-pre-05.tex} == And this is the preamble of the file (apologies for the % signs): = \usemodule[pre-fuzzy] \usemodule[amsl] \useMPlibrary[txt] \setupexternalfigures[directory={/home/pau/treball/xerrades/grafiques_xerrades_png, % /home/pau/treball/xerrades/grafiques_xerrades}]% % \definestartstop[CapsaTitolBlanca][before={\setupbackground% [style=\tfx,background=color,backgroundcolor=white, % frame=on,framecorner=rectangular,framecolor=black, % rulethickness=3pt,topoffset=0.25cm,bottomoffset=0.25cm, % leftoffset=0.25cm,rightoffset=0.25
Re: [NTG-context] Math Overruns Background
On Thu, 25 Oct 2012, Nicholas Ulle wrote: Hello, I'm trying to typeset an exam with solutions in framed or shaded boxes, using \background. However, the background doesn't stretch to the bottom of the text area when there is text preceding it, so if there is enough math inside the background, the math overruns its lower bound. How can I get everything to stay inside the background? A minimal example: \starttext \input knuth \startbackground \input knuth \dorecurse{20}{\startformula \sum_{i=0}^5 i \stopformula} \stopbackground \stoptext I've tried some of the options in \setupbackground with no luck, and have also tried Googling for an answer. Try textbackground rather than background (untested). Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Math Overruns Background
Hello, I'm trying to typeset an exam with solutions in framed or shaded boxes, using \background. However, the background doesn't stretch to the bottom of the text area when there is text preceding it, so if there is enough math inside the background, the math overruns its lower bound. How can I get everything to stay inside the background? A minimal example: \starttext \input knuth \startbackground \input knuth \dorecurse{20}{\startformula \sum_{i=0}^5 i \stopformula} \stopbackground \stoptext I've tried some of the options in \setupbackground with no luck, and have also tried Googling for an answer. Thanks, Nick ___ 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] Left margin of vim module output
On 2012-08-01 Aditya Mahajan wrote: > > I'll add a margin key to vim module (but not the oddmargin and > > evenmargin keys; they would require a complete low-level rewrite > > of the module). Thanks a million. That was fast :) > The dev version on github now includes a margin key, Does it? I just can see a new test file in the recent commit history (without margin key, however). Did you already push the changes to the public repo? > I haven't tested it too much That's my part, I guess > hence no new release at the moment). No problem, I'm totally fine with the git repo. > Note that this works differently from \definetyping. The typing > environment honors the leftskip set by its parent environment (for > example, if typing is inside startbackground); vimtyping > environment resets all the settings of its parent environment. That's why the hacks that I tried before all miserably failed. Thanks again! 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 ___
Re: [NTG-context] Left margin of vim module output
On Wed, 1 Aug 2012, Aditya Mahajan wrote: I'll add a margin key to vim module (but not the oddmargin and evenmargin keys; they would require a complete low-level rewrite of the module). The dev version on github now includes a margin key, so you can add margin= to \setupvimtyping or \definevimtyping. (I haven't tested it too much, hence no new release at the moment). Note that this works differently from \definetyping. The typing environment honors the leftskip set by its parent environment (for example, if typing is inside startbackground); vimtyping environment resets all the settings of its parent environment. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Simple backgrounds not working
On 26-5-2012 10:56, Wolfgang Schuster wrote: Am 26.05.2012 um 04:57 schrieb Aditya Mahajan: Hi, Simple backgrounds are not working with the latest beta. The following has no background color. \setupbackground [background=color, backgroundcolor=red] \starttext \startbackground ABC \stopbackground \stoptext Name clash in pack-rul.mkiv. \startbackgorund uses \currentbackground for the instance of the environment and \framed uses also \currentbackground when it does process the list of backgrounds, changing the macro name in pack-rul.mkiv to \m_framed_background helps. \unprotect %\let\currentbackground\empty \let\m_framed_background\empty Ha, you beat me in maling ... i just changed that in the same way ... but i was wondering why a public name was used .. can it be that \currentbackground is used in modules or styles (e.g. implementing alternative built in backgrounds as I remember that Aditya has some plugs)? If so then at some point we might need a public name but let's wait till it shows up. 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] Simple backgrounds not working
Am 26.05.2012 um 04:57 schrieb Aditya Mahajan: > Hi, > > Simple backgrounds are not working with the latest beta. The following has no > background color. > > \setupbackground > [background=color, backgroundcolor=red] > \starttext > \startbackground > ABC > \stopbackground > \stoptext Name clash in pack-rul.mkiv. \startbackgorund uses \currentbackground for the instance of the environment and \framed uses also \currentbackground when it does process the list of backgrounds, changing the macro name in pack-rul.mkiv to \m_framed_background helps. \unprotect %\let\currentbackground\empty \let\m_framed_background\empty \def\pack_framed_process_background % {\ifcsname\??overlaybuiltin\currentbackground\endcsname {\ifcsname\??overlaybuiltin\m_framed_background\endcsname \pack_framed_process_background_indeed_internal % \else\ifcsname\??overlay\currentbackground\endcsname \else\ifcsname\??overlay\m_framed_background\endcsname \pack_framed_process_background_indeed_external \fi\fi} \def\pack_framed_process_background_indeed_internal % : in name {\bgroup \setbox\b_framed_extra\hbox{%\bgroup \ifzeropt\framedbackgroundoffset % \csname\??overlaybuiltin\currentbackground\endcsname \csname\??overlaybuiltin\m_framed_background\endcsname \else \kern-\framedbackgroundoffset % \hbox{\csname\??overlaybuiltin\currentbackground\endcsname}% \hbox{\csname\??overlaybuiltin\m_framed_background\endcsname}% \fi }%\egroup \wd\b_framed_extra\zeropoint \ht\b_framed_extra\framedbackgroundheight \dp\b_framed_extra\framedbackgrounddepth \box\b_framed_extra \egroup} \def\pack_framed_process_background_indeed_external {\pack_framed_overlay_initialize \bgroup \setbox\b_framed_extra\hbox{%\bgroup \ifzeropt\framedbackgroundoffset % \csname\??overlay\currentbackground\endcsname \csname\??overlay\m_framed_background\endcsname \else \kern-\framedbackgroundoffset % \hbox{\csname\??overlay\currentbackground\endcsname}% \hbox{\csname\??overlay\m_framed_background\endcsname}% \fi }%\egroup \wd\b_framed_extra\zeropoint \ht\b_framed_extra\framedbackgroundheight \dp\b_framed_extra\framedbackgrounddepth \box\b_framed_extra \egroup} \def\pack_framed_process_backgrounds#1,#2% #2 gobbles spaces (we could avoid one catch if we have nextbackground) % {\edef\currentbackground{#1}% {\edef\m_framed_background{#1}% % \ifx\currentbackground\s!unknown\else \ifx\m_framed_background\s!unknown\else \pack_framed_process_background \expandafter\pack_framed_process_backgrounds \fi#2} \protect \setupbackground [background=color, backgroundcolor=yellow] \starttext \startbackground ABC \stopbackground \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Simple backgrounds not working
Hi, Simple backgrounds are not working with the latest beta. The following has no background color. \setupbackground [background=color, backgroundcolor=red] \starttext \startbackground ABC \stopbackground \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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \startitemize[columns] broken with backgrounds?
Hi all, It seems that when using background, \startitemize[columns] does not work as expected: there are no columns, and the numbers of the items are pushed to the left. Below is a not so minimal example: the resulting PDF can be found here: http://dl.dropbox.com/u/4316076/enumeration-background-exo.pdf I am not sure whether this behaviour began with a recent beta or not. The version I am using is: ConTeXt ver: 2012.01.16 18:33 MKIV. Best regards: OK %%% begin enumeration-background-exo.pdf \definenumber[MyExoNumber][way=bysection,sectionumber=yes] \setuptextrules[rulecolor=darkred] \define\ExoCommand{\incrementnumber[MyExoNumber] \textrule[top]{Exercise \getnumber[MyExoNumber]} \startbackground[frame=off,leftframe=on, framecolor=darkred]} \defineenumeration[exo] [location=hanging, width=fit, text={}, number=hide, number=no, before={\ExoCommand}, after={\stopbackground\blank}] \defineconversion[exercice][\numbers] \def\StartQuestions{% \startitemize[exercice][width=2em,packed,style=bold,stopper=,right=)]} \def\StopQuestions{\stopitemize} \def\q{\item} \starttext % \startexo Prove that \startformula \cos(nt) + {\rm i}\sin(nt) = (\cos(t) + {\rm i}\sin(t))^n. \stopformula \StartQuestions \dorecurse{5}{\q This is question \recurselevel. } \StopQuestions \stopexo % % \startexo Solve the following equations or inequations: \startitemize[r,packed,columns][stopper=,left={(},right={)},distance=1em] \item $3x - 5 = 4$. \item $(x-1)(x+3) = 5$. \item $2 - 3x \geq 2 x - 8$. \item $(x - 1) \leq (x-1)(x+2)$. \item $2x^2 - 3x +1 < 0$. \item $x^2 - 4x \geq x - x^2 - 1$. \stopitemize \stopexo % \stoptext %%% end enumeration-background-exo.pdf ___ 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 textbackground
On 19-12-2011 09:14, Otared Kavian wrote: Hi Hans, If this can be of any help for you to localize the origin of the bug with the latest beta (ConTeXt ver: 2011.12.18 15:57 MKIV), I would like to report that when a \framedtext is used by its own, the result is as expected, while when it follows \startbackground …. \stopbackground, no \framedtext appears (thee rsult is the same when \framedtext is before textbackground). The example is: \starttext \definetextbackground[test][backgroundcolor=lightgray] \starttextbackground[test] \input ward \input ward \stoptextbackground \startframedtext \input knuth \stopframedtext \stoptext These two mechanisms are unrelated. The reported problem had to do with reorganizing and cleaning up some low level helper. Actually, most recently reported bugs relate to this effort. There is already a fix uploaded. 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 textbackground
Hi Hans, If this can be of any help for you to localize the origin of the bug with the latest beta (ConTeXt ver: 2011.12.18 15:57 MKIV), I would like to report that when a \framedtext is used by its own, the result is as expected, while when it follows \startbackground …. \stopbackground, no \framedtext appears (thee rsult is the same when \framedtext is before textbackground). The example is: \starttext \definetextbackground[test][backgroundcolor=lightgray] \starttextbackground[test] \input ward \input ward \stoptextbackground \startframedtext \input knuth \stopframedtext \stoptext Best regards: OK On 18 déc. 2011, at 23:49, Otared Kavian wrote: > Dear Hans, > > For your information it seems that in the latest beta, textbackground is > broken: minimal example below, and the output can be found here: > http://dl.dropbox.com/u/4316076/textbackground-bug.pdf > Best regards: OK > > %%% begin textbackground-bug.tex > \starttext > > \definetextbackground[test][backgroundcolor=lightgray] > > \starttextbackground[test] > \input ward > \input ward > \stoptextbackground > > \stoptext > %%% begin textbackground-bug.tex ___ 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] Text in a box now broken
On 23-11-2011 20:02, Kip Warner wrote: On Wed, 2011-11-23 at 11:03 +0100, Hans Hagen wrote: it depends .. if you have small boxes, you as well use a regular framedtext (with background) or when you span pages you can use textbackgrounds ... the backgrounds you use is some compromise Hmm, I am using boxes that sometimes span multiple pages. This is what I was using originally. How would it look if it used textbackgrounds? \definestartstop [TimelineDocument] [before={ \crlf \setupbackground[frame=on, before=\blank, after=\blank, corner=round, topoffset=0.5cm, leftoffset=0.5cm, rightoffset=0.5cm, bottomoffset=0.5cm] \startbackground }, after={ \stopbackground \crlf }, commands={\setupalign[yes]}, style=italic] \starttext \startTimelineDocument Some stuff in a box. \stopTimelineDocument \stoptext google: context wiki textbackground -- - 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] Text in a box now broken
On Wed, 2011-11-23 at 11:03 +0100, Hans Hagen wrote: > it depends .. if you have small boxes, you as well use a regular > framedtext (with background) or when you span pages you can use > textbackgrounds ... the backgrounds you use is some compromise Hmm, I am using boxes that sometimes span multiple pages. This is what I was using originally. How would it look if it used textbackgrounds? \definestartstop [TimelineDocument] [before={ \crlf \setupbackground[frame=on, before=\blank, after=\blank, corner=round, topoffset=0.5cm, leftoffset=0.5cm, rightoffset=0.5cm, bottomoffset=0.5cm] \startbackground }, after={ \stopbackground \crlf }, commands={\setupalign[yes]}, style=italic] \starttext \startTimelineDocument Some stuff in a box. \stopTimelineDocument \stoptext -- 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 ___
[NTG-context] Text in a box now broken
Hey folks, I noticed as of maybe a week ago, that all of the text I have positioned inside of a box has disappeared. I can see everything else, as before, but not the stuff in the box. The box just shows up as a mangled line. The following is a minimal example from ConTeXt version 2011.11.17 09:18. This code was working just fine a few days ago. \definestartstop [TimelineDocument] [before={ \crlf \setupbackground[frame=on, before=\blank, after=\blank, corner=round, topoffset=0.5cm, leftoffset=0.5cm, rightoffset=0.5cm, bottomoffset=0.5cm] \startbackground }, after={ \stopbackground \crlf }, commands={\setupalign[yes]}, style=italic] \starttext \startTimelineDocument Some stuff in a box. \stopTimelineDocument \stoptext Thanks a lot. -- 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 ___
[NTG-context] Footnote Problem
Hey folks, The second \footnote doesn't show in the generated PDF. The number is listed where it should at the end of the sentence, but the text of the footnote is not listed at the bottom of the page. \definestartstop [SomeDocument] [before={ \crlf \setupbackground[frame=on, before=\blank, after=\blank, corner=round, topoffset=0.5cm, leftoffset=0.5cm, rightoffset=0.5cm, bottomoffset=0.5cm] \startbackground }, after={ \stopbackground \crlf }, commands={\setupalign[yes]}, style=italic] \starttext First footnote.\footnote{This one works.} \startSomeDocument Second footnote.\footnote{This one doesn't.} \stopSomeDocument \stoptext Thanks anyone. -- 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] Fatal error
On Fri, 2011-11-04 at 15:15 +0100, Wolfgang Schuster wrote: > Am 04.11.2011 um 02:33 schrieb Kip Warner: > > > On Thu, 2011-11-03 at 05:26 +0100, Wolfgang Schuster wrote: > >> ??? > > There was so many nonsense on your definition for your CodeExample > environment, I don’t know where you found the code but I’m going to explain > what was wrong, this will help you write something better next time. > > What you defined was the following piece of code: > > \crlf > \setupbackground[..,.=.,..] > \startbackground > \startlines[style=type] > \setupalign[right] > \starttyping > … > \stoptyping > \stoplines > \stopbackground > \crlf > > 1. You used \crlf to add a empty line at the begin and end of the > environment, better is to use \blank or \blank[line]. > > 2. You used the lines environment but it useless here because the typing > environment already takes care that each line in the input is also line of > its own in the output. > > 3. The style “type” is also useless because typing will overwrite this > setting with its own style which is also “type”. > > 4. The alignment setup is another setting which is ignored because typing > itself has a align key which is used. > > Wolfgang Thanks for the explanation, Wolfgang. -- 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] Fatal error
Am 04.11.2011 um 02:33 schrieb Kip Warner: > On Thu, 2011-11-03 at 05:26 +0100, Wolfgang Schuster wrote: >> ??? There was so many nonsense on your definition for your CodeExample environment, I don’t know where you found the code but I’m going to explain what was wrong, this will help you write something better next time. What you defined was the following piece of code: \crlf \setupbackground[..,.=.,..] \startbackground \startlines[style=type] \setupalign[right] \starttyping … \stoptyping \stoplines \stopbackground \crlf 1. You used \crlf to add a empty line at the begin and end of the environment, better is to use \blank or \blank[line]. 2. You used the lines environment but it useless here because the typing environment already takes care that each line in the input is also line of its own in the output. 3. The style “type” is also useless because typing will overwrite this setting with its own style which is also “type”. 4. The alignment setup is another setting which is ignored because typing itself has a align key which is used. 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] Fatal error
Am 03.11.2011 um 03:41 schrieb Kip Warner: > Hey list, > > I can't recall if either I explicitly changed something in my ConTeXt > typesetting or if this happened with the most recent version of ConTeXt > I pulled from Adam's PPA. I am using version 2011.11.02 20:10. > > Here is a minimal example: > \definestartstop >[CodeExample] >[before={ >\crlf >\setupbackground[frame=on, > before=\blank, > after=\blank, > corner=round, > topoffset=0.5cm, > leftoffset=0.5cm, > rightoffset=0.5cm, > bottomoffset=0.5cm] >\startbackground >\startlines >}, > after={ >\stoplines >\stopbackground >\crlf > }, > commands={\setupalign[right]}, > style=type] ??? \defineframedtext [CodeExampleFrame] [before=\blank, after=\blank, corner=round, offset=0.5cm] \definetyping [CodeExample] [before=\startCodeExampleFrame, after=\stopCodeExampleFrame] \starttext Hello World \startCodeExample Hello World Again \stopCodeExample \stoptext or \definetextbackground [CodeExampleFrame] [before=\blank, after=\blank, corner=round, frame=on, background=, location=paragraph, topoffset=0.5cm, leftoffset=0.5cm] \definetyping [CodeExample] [before=\startCodeExampleFrame, after=\stopCodeExampleFrame] \starttext Hello World \startCodeExample Hello World Again \stopCodeExample \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Fatal error
Hey list, I can't recall if either I explicitly changed something in my ConTeXt typesetting or if this happened with the most recent version of ConTeXt I pulled from Adam's PPA. I am using version 2011.11.02 20:10. Here is a minimal example: \definestartstop [CodeExample] [before={ \crlf \setupbackground[frame=on, before=\blank, after=\blank, corner=round, topoffset=0.5cm, leftoffset=0.5cm, rightoffset=0.5cm, bottomoffset=0.5cm] \startbackground \startlines }, after={ \stoplines \stopbackground \crlf }, commands={\setupalign[right]}, style=type] \starttext Hello World \startCodeExample \starttyping Hello World Again \stoptyping \stopCodeExample \stoptext Here is the output: $ context foo.tex resolvers | resolving | loading configuration file 'selfautodir:/share/texmf/web2c/contextcnf.lua' resolvers | resolving | loading configuration file '/usr/share/texmf/web2c/contextcnf.lua' mtx-context | run 1: luatex --fmt="/home/kip/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en" --lua="/home/kip/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en.lui" --backend="pdf" "./foo.tex" \stoptext This is LuaTeX, Version beta-0.71.0-2011101421 (rev 4358) \write18 enabled. resolvers > resolving > loading configuration file '/usr/share/texmf/web2c/contextcnf.lua' (foo.tex ConTeXt ver: 2011.11.02 20:10 MKIV fmt: 2011.11.2 int: english/english system > cont-new.mkiv loaded (/usr/share/texmf/tex/context/base/cont-new.mkiv system > beware: some patches loaded from cont-new.mkiv ) system > foo.top loaded (foo.top) fonts > latin modern fonts are not preloaded languages > language en is active {/usr/share/texmf/fonts/map/pdftex/context/mkiv-base.map} fonts > preloading latin modern fonts (second stage) (/usr/share/texmf/tex/context/base/type-siz.mkiv) (/usr/share/texmf/tex/context/base/type-otf.mkiv) files > readfile > asked name: 'loc', not found {/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map} fonts > defining > forced type afm of stmary10 not found fonts > defining > font with asked name 'stmary10' is not found using lookup 'file' fonts > virtual math > loading font LMMath7-Regular subfont 9 with name stmary10.afm at 458752 is skipped, not found fonts > defining > forced type afm of stmary10 not found fonts > defining > font with asked name 'stmary10' is not found using lookup 'file' fonts > virtual math > loading font LMMath9-Regular subfont 9 with name stmary10.afm at 589824 is skipped, not found fonts > defining > forced type afm of stmary10 not found fonts > defining > font with asked name 'stmary10' is not found using lookup 'file' fonts > virtual math > loading font LMMath12-Regular subfont 9 with name stmary10.afm at 786432 is skipped, not found fonts > fallback modern rm 12pt is loaded Underfull \hbox (badness 1) in paragraph at lines 25--26 ! TeX capacity exceeded, sorry [input stack size=1]. \obeylines ...andafter \def \activeendoflinetoken {\obeyedline } \dostarttyping ...f \currenttyping {#1}\obeylines \futurelet \nexttoken \dod... \obeyedline ...ed \t!line \empty \futurelet \next \dobetweenthelines \obeylines ...andafter \def \activeendoflinetoken {\obeyedline } \dostarttyping ...f \currenttyping {#1}\obeylines \futurelet \nexttoken \dod... \obeyedline ...ed \t!line \empty \futurelet \next \dobetweenthelines ... l.29 \stoptyping ! ==> Fatal error occurred, no output PDF file produced! mtx-context | fatal error: return code: 1 Any help appreciated. -- 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] Framed Text Split Over Multiple Pages
On Wed, 2011-10-05 at 23:58 +0200, Hans Hagen wrote: > http://wiki.contextgarden.net/TextBackground Thanks Hans. I saw it already, but I couldn't get the frame to appear around the text. Can you show me the textbackground equivalent that has page breaks to the following that I have been using? \definestartstop [SomeFramedText] [before={ \crlf \setupbackground[frame=on, before=\blank, after=\blank, corner=round, topoffset=0.5cm, leftoffset=0.5cm, rightoffset=0.5cm, bottomoffset=0.5cm] \startbackground }, after={ \stopbackground \crlf }, commands={\setupalign[yes]}, style=italic] -- 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 ___
[NTG-context] Framed Text Split Over Multiple Pages
Hey list, I'd like my framed text to be split over multiple pages rather than leaving a big empty page before it starts so that it can fill its own whole page when large enough. This is what I am using and works fine, with the exception of no inline page breaks: \definestartstop [SubDocument] [before={ \crlf \setupbackground[frame=on, before=\blank, after=\blank, corner=round, topoffset=0.5cm, leftoffset=0.5cm, rightoffset=0.5cm, bottomoffset=0.5cm] \startbackground }, after={ \stopbackground \crlf }, commands={\setupalign[yes]}, style=italic] Then used as such: \startSubDocument ... \stopSubDocument -- 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] background over two page
Reviving an old thread because I found a really simple solution. Hopefully this will also be useful to someone else. On Mon, 18 Oct 2010, Wolfgang Schuster wrote: Am 18.10.2010 um 14:18 schrieb Otared Kavian: Your solution works as intended when the framed, highlighted text with background spans over two pages (though it doesn't when it spans over three pages or more, but this is not a real issue, since it is a bad idea to have such long highlighted texts…). I guess this is also possible with textbackground: \newcounter\CurrentBackground \def\StartBackground {\doglobal\increment\CurrentBackground \setposition{Background:b:\CurrentBackground}% \startbackground} \def\StopBackground {\stopbackground \setposition{Background:e:\CurrentBackground}} \def\DrawBackground {\ifnum\MPp{Background:b:\CurrentBackground}=\MPp{Background:e:\CurrentBackground} \startMPcode draw topboundaryOverlayBox withcolor red ; draw bottomboundary OverlayBox withcolor red ; draw leftboundary OverlayBox withcolor red ; draw rightboundary OverlayBox withcolor red ; \stopMPcode \else\ifnum\realpageno=\MPp{Background:b:\CurrentBackground} \startMPcode draw topboundaryOverlayBox withcolor red ; draw leftboundary OverlayBox withcolor red ; draw rightboundary OverlayBox withcolor red ; \stopMPcode \else\ifnum\realpageno=\MPp{Background:e:\CurrentBackground} \startMPcode draw bottomboundary OverlayBox withcolor red ; draw leftboundary OverlayBox withcolor red ; draw rightboundary OverlayBox withcolor red ; \stopMPcode \else \startMPcode draw leftboundary OverlayBox withcolor red ; draw rightboundary OverlayBox withcolor red ; \stopMPcode \fi\fi\fi} \defineoverlay[DrawBackground][\DrawBackground] \setupbackground[background=DrawBackground] A much simpler solution using textbackgrounds: \startuseMPgraphic{splitframe} for i=1 upto nofmultipars : if one_piece_multi_par : draw multipars[i] ; elseif multilocs[i]=1 : draw topboundary multipars[i] ; draw leftboundary multipars[i] ; draw rightboundary multipars[i] ; elseif multilocs[i]=2 : draw leftboundary multipars[i] ; draw rightboundary multipars[i] ; elseif multilocs[i]=3 : draw leftboundary multipars[i] ; draw rightboundary multipars[i] ; draw bottomboundary multipars[i]; fi ; endfor ; \stopuseMPgraphic \definetextbackground [splitframe] [state=start, mp=splitframe, location=paragraph] \starttext \startsplitframe \input knuth \endgraf \stopsplitframe \blank[big] \startsplitframe \dorecurse{4}{\input knuth \endgraf} \stopsplitframe \blank[big] \startsplitframe \dorecurse{10}{\input knuth \endgraf} \stopsplitframe \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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Getting framed text to page break
On Thu, 2011-07-07 at 07:04 +0200, Wolfgang Schuster wrote: > Am 07.07.2011 um 03:16 schrieb Kip Warner: > > > I'm not very competent with ConTeXt, but I tried to translate what you > > and wrote into the following: > > > > [...] > > Solution 1: > > \definestartstop > [SpecialFramed] > [ > before={\setupbackground[frame=on,before=\blank,after=\blank]\startbackground}, > after=\stopbackground, > %commands={\setupalign[flushleft,broad]}, > style=italic] > > \starttext > > \input knuth > > \startSpecialFramed > \dorecurse{6}{\input knuth\par} > \stopSpecialFramed > > \input knuth > > \stoptext > > Solution 2: > > \definetextbackground > [SpecialFramed] > [before=\blank, > after=\blank, >background=, >framecolor=black, > location=paragraph, >%align={flushleft,broad}, > style=italic] > > \starttext > > \input knuth > > \startSpecialFramed > \dorecurse{6}{\input knuth\par} > \stopSpecialFramed > > \input knuth > > \stoptext > > Wolfgang Thanks Wolfgang. It worked. I also didn't know about \definestartstop. Thanks for that too. -- 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] Getting framed text to page break
Am 07.07.2011 um 03:16 schrieb Kip Warner: > I'm not very competent with ConTeXt, but I tried to translate what you > and wrote into the following: > > [...] Solution 1: \definestartstop [SpecialFramed] [ before={\setupbackground[frame=on,before=\blank,after=\blank]\startbackground}, after=\stopbackground, %commands={\setupalign[flushleft,broad]}, style=italic] \starttext \input knuth \startSpecialFramed \dorecurse{6}{\input knuth\par} \stopSpecialFramed \input knuth \stoptext Solution 2: \definetextbackground [SpecialFramed] [before=\blank, after=\blank, background=, framecolor=black, location=paragraph, %align={flushleft,broad}, style=italic] \starttext \input knuth \startSpecialFramed \dorecurse{6}{\input knuth\par} \stopSpecialFramed \input 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Getting framed text to page break
On Wed, 2011-07-06 at 10:44 +0200, Philipp Gesang wrote: > Hi again, > > there’s also the background mechanism which has been explicitly > (see pack-rul.mkiv) designed with page breaks in mind. Example: > > ···8< > > \setupbackground[ > corner=rectangular, > frame=on, > background=, > ] > > > \starttext > \startbackground > \dorecurse{42}{\input dawkins \endgraf} > \stopbackground > \stoptext Hey Phil, I'm not very competent with ConTeXt, but I tried to translate what you and wrote into the following: \def\StartSpecialFramedText% { \crlf \setupbackground [corner=rectangular, frame=on, background= ] \startbackground \startframedtext [width=broad, bottom=\vss, top=\vss, align=right, corner=rectangular] \it } \def\StopSpecialFramedText% { \stopframedtext \stopbackground \crlf } ... \StartSpecialFramedText Lots ... of ... Text \StopSpecialFramedText It comes out looking almost the same as initially, but with a box around it. -- 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] Getting framed text to page break
On 2011-07-06 <00:22:39>, Kip Warner wrote: > Hey list, > > I'd like to get framed text to break over a page, but I'm not sure how > to do this. Right now, I am using: Hi again, there’s also the background mechanism which has been explicitly (see pack-rul.mkiv) designed with page breaks in mind. Example: ···8< \setupbackground[ corner=rectangular, frame=on, background=, ] \starttext \startbackground \dorecurse{42}{\input dawkins \endgraf} \stopbackground \stoptext ···8< Hth, Philipp > > \def\StartSpecialFramedText% > { > \crlf > \startframedtext > [width=broad, > bottom=\vss, > top=\vss, > align=right, > corner=rectangular] > \it > } > > \def\StopSpecialFramedText% > { > \stopframedtext > \crlf > } > > ... > > \StartSpecialFramedText > Some > ... > text > \StopSpecialFramedText > > But the problem is that does not page break, but seems to want to stay > all together on a single page. > > -- > Kip Warner -- Software Engineer > OpenPGP encrypted/signed mail preferred > http://www.thevertigo.com > ___ > 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 pgpPvutfVgrdo.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] Annotation and background color
Hi Wolfgang, Many thanks for your explanations. If I may ask a further question, I would like to know at which level one can control whether the first argument of the quotation in the example \MyQuotation{Wolfgang Schuster}{The annotation module is wonderful!} is surrounded or not by parentheses? I am asking this because I defined for my own use a macro which replaces the \proclaim command of Plain TeX (which disappeared in ConTeXt): I am thinking of switching to use the annotation module, since maybe with that it should be possible to have a list of all anotations of a certain type (for instance list of all theorems, all lemmas, etc) with the page at which they appear. Also with the annotations environment it seems that one can have more fancy layouts for proclaims. My definition of proclaim works only with mkii (somehow in mkiv the section number does not appear when numbering the proclaimed stuff…). The example is below. Best regards: OK %% defining \proclaim which is built in Plain-teX %% but has disappeared from ConTeXt \defineenumeration[proclaim] [text=, style=slanted, title=yes, titleleft=, titleright=, location=serried, width=fit, right={.~}] \setupnumber[proclaim][way=bysection,numbersection=yes] % maybe one has to change this in mkiv? %% end definition \proclaim \starttext When there is not a declared section the numbers have no prefix as in the following: \startproclaim[def:test]{Definition} This is a definition. \stopproclaim \startproclaim{Lemma} This is a lemma. \stopproclaim \section{Here is a section} When there is a declared section the numbers have as prefix the section number, as in the following: \startproclaim{Lemme} Here is another lemma. \stopproclaim \startproclaim[thm:result]{Theorem} This is our main theorem. \stopproclaim \stoptext On 7 mai 2011, at 14:04, Wolfgang Schuster wrote: > > Am 07.05.2011 um 12:44 schrieb Otared Kavian: > >> Hi Wolfgang, >> >> Following up one of the recent threads about your annotation module, I made >> some experiments and found it a wonderful and extremely useful module. >> Out of curiosity, I wanted to know whether there is a key to set a >> background color for an annotation (as it is possible to use >> headcolor=darkred, or textcolor=darkgray, for instance). > > No, you one of ConTeXt commands/environments which have a background, e.g. > framed, background or textbaxkground. > > \define[2]\MyQuotationCommand > {\setupbackground[background=color,backgroundcolor=gray] >\startbackground >\textrule{#1}#2\textrule >\stopbackground} > > or > > \define[2]\MyQuotationCommand > {\setupbackground[background=color,backgroundcolor=gray] >\textrule{#1}% >\startbackground >#2% >\stopbackground >\textrule} > >> Also I didn't get the difference between textcolor=darkgray and >> color=darkgray: are they the same? > > The “color” affects the header *and* the text while “headcolor” and > “textcolor” only affect one of them. You can test this when you comment > headcolor/textcolor and use only color. > > 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 > ___ %% Otared Kavian Département de Mathématiques Université de Versailles Saint-Quentin Bâtiment Fermat 45 avenue des Etats Unis 78035 Versailles cedex Téléphone: +33 1 39 25 46 42 Secrétariat: +33 1 39 25 46 44 Secrétariat: +33 1 39 25 46 46 e-mail: otared.kav...@math.uvsq.fr ___ 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] Annotation and background color
Am 07.05.2011 um 12:44 schrieb Otared Kavian: > Hi Wolfgang, > > Following up one of the recent threads about your annotation module, I made > some experiments and found it a wonderful and extremely useful module. > Out of curiosity, I wanted to know whether there is a key to set a background > color for an annotation (as it is possible to use headcolor=darkred, or > textcolor=darkgray, for instance). No, you one of ConTeXt commands/environments which have a background, e.g. framed, background or textbaxkground. \define[2]\MyQuotationCommand {\setupbackground[background=color,backgroundcolor=gray] \startbackground \textrule{#1}#2\textrule \stopbackground} or \define[2]\MyQuotationCommand {\setupbackground[background=color,backgroundcolor=gray] \textrule{#1}% \startbackground #2% \stopbackground \textrule} > Also I didn't get the difference between textcolor=darkgray and > color=darkgray: are they the same? The “color” affects the header *and* the text while “headcolor” and “textcolor” only affect one of them. You can test this when you comment headcolor/textcolor and use only color. 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] background over two page
Hi Wolfgang, Indeed your solution works without any flaw… Looking at your code, I learned that Overlaybox is an object which can be filled with a background color, as in: fill OverlayBox withcolor lightgray ; so that the background can be in color. Should we add this kind of problems and solutions to the wiki? If yes, I am willing to do so. Best regards: OK On 18 oct. 2010, at 17:22, Wolfgang Schuster wrote: > > Am 18.10.2010 um 14:18 schrieb Otared Kavian: > >> Your solution works as intended when the framed, highlighted text with >> background spans over two pages (though it doesn't when it spans over three >> pages or more, but this is not a real issue, since it is a bad idea to have >> such long highlighted texts…). > > > I guess this is also possible with textbackground: > > \newcounter\CurrentBackground > > \def\StartBackground > {\doglobal\increment\CurrentBackground > \setposition{Background:b:\CurrentBackground}% > \startbackground} > > \def\StopBackground > {\stopbackground > \setposition{Background:e:\CurrentBackground}} > > \def\DrawBackground > > {\ifnum\MPp{Background:b:\CurrentBackground}=\MPp{Background:e:\CurrentBackground} > \startMPcode > draw topboundaryOverlayBox withcolor red ; > draw bottomboundary OverlayBox withcolor red ; > draw leftboundary OverlayBox withcolor red ; > draw rightboundary OverlayBox withcolor red ; > \stopMPcode > \else\ifnum\realpageno=\MPp{Background:b:\CurrentBackground} > \startMPcode > draw topboundaryOverlayBox withcolor red ; > draw leftboundary OverlayBox withcolor red ; > draw rightboundary OverlayBox withcolor red ; > \stopMPcode > \else\ifnum\realpageno=\MPp{Background:e:\CurrentBackground} > \startMPcode > draw bottomboundary OverlayBox withcolor red ; > draw leftboundary OverlayBox withcolor red ; > draw rightboundary OverlayBox withcolor red ; > \stopMPcode > \else > \startMPcode > draw leftboundary OverlayBox withcolor red ; > draw rightboundary OverlayBox withcolor red ; > \stopMPcode > \fi\fi\fi} > > \defineoverlay[DrawBackground][\DrawBackground] > > \starttext > > \setupbackground[background=DrawBackground] > > \input knuth > > \StartBackground > \dorecurse{12}{\input knuth\par} > \StopBackground > > \input knuth > > \StartBackground > \input knuth\par > \StopBackground > > \input 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://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] background over two page
Am 18.10.2010 um 14:18 schrieb Otared Kavian: > Your solution works as intended when the framed, highlighted text with > background spans over two pages (though it doesn't when it spans over three > pages or more, but this is not a real issue, since it is a bad idea to have > such long highlighted texts…). I guess this is also possible with textbackground: \newcounter\CurrentBackground \def\StartBackground {\doglobal\increment\CurrentBackground \setposition{Background:b:\CurrentBackground}% \startbackground} \def\StopBackground {\stopbackground \setposition{Background:e:\CurrentBackground}} \def\DrawBackground {\ifnum\MPp{Background:b:\CurrentBackground}=\MPp{Background:e:\CurrentBackground} \startMPcode draw topboundaryOverlayBox withcolor red ; draw bottomboundary OverlayBox withcolor red ; draw leftboundary OverlayBox withcolor red ; draw rightboundary OverlayBox withcolor red ; \stopMPcode \else\ifnum\realpageno=\MPp{Background:b:\CurrentBackground} \startMPcode draw topboundaryOverlayBox withcolor red ; draw leftboundary OverlayBox withcolor red ; draw rightboundary OverlayBox withcolor red ; \stopMPcode \else\ifnum\realpageno=\MPp{Background:e:\CurrentBackground} \startMPcode draw bottomboundary OverlayBox withcolor red ; draw leftboundary OverlayBox withcolor red ; draw rightboundary OverlayBox withcolor red ; \stopMPcode \else \startMPcode draw leftboundary OverlayBox withcolor red ; draw rightboundary OverlayBox withcolor red ; \stopMPcode \fi\fi\fi} \defineoverlay[DrawBackground][\DrawBackground] \starttext \setupbackground[background=DrawBackground] \input knuth \StartBackground \dorecurse{12}{\input knuth\par} \StopBackground \input knuth \StartBackground \input knuth\par \StopBackground \input 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] background over two page
On 18 oct. 2010, at 09:43, luigi scarso wrote: > On Mon, Oct 18, 2010 at 9:32 AM, Otared Kavian wrote: >> […] > With my solution it's a matter of changing few lines > bottomframe=off,topframe=on, > > bottomframe=on,topframe=off, Thanks Luigi! Your solution works as intended when the framed, highlighted text with background spans over two pages (though it doesn't when it spans over three pages or more, but this is not a real issue, since it is a bad idea to have such long highlighted texts…). Best regards: OK I copy below your modfied solution: % A solution by Luigi Scarso, slightly modified by him %% \newdimen\SpaceLeft \def\CheckSpace{% \ifdim\pagetotal=0pt\SpaceLeft=\vsize\else\SpaceLeft=\pagegoal\advance\SpaceLeft by -\pagetotal\advance\SpaceLeft by -2\lineheight\fi}% \setupcolors[state=start] \long\def\StartBg#1\StopBg{% \bgroup \setbox8000=\vbox{\hsize=\dimexpr\textwidth-1em\relax#1} \CheckSpace% \the\SpaceLeft\the\ht8000 \the\dp8000 \ifdim\dimexpr(\ht8000+\dp8000)>\SpaceLeft\relax % \setbox8001=\vsplit8000 to \SpaceLeft% \setbox8001=\vbox{\unvbox8001}% % \setupbackground [bottomframe=off, topframe=on, % suggested by Luigi, in his answer rulethickness=1pt, rightframe=on, width=\textwidth, leftframe=on] \startbackground\unvbox8001\stopbackground% \setupbackground [bottomframe=on, topframe=off, % suggested by Luigi, in his answer rulethickness=1pt, rightframe=on, width=\textwidth, leftframe=on] \startbackground\unvbox8000\stopbackground% \else \setupbackground [bottomframe=on, topframe=on, rulethickness=1pt, rightframe=on, leftframe=on] \startbackground #1\stopbackground% \fi \egroup } \setupbackground [bottomframe=on, rulethickness=1pt, rightframe=on, leftframe=on] \starttext \input ward \blank \StartBg \dorecurse{2}{\input knuth\par} \StopBg \blank \input ward \blank \StartBg \dorecurse{4}{\input knuth\par} \StopBg \blank \input ward \stoptext %% On 18 oct. 2010, at 09:43, luigi scarso wrote: > On Mon, Oct 18, 2010 at 9:32 AM, Otared Kavian wrote: >> >> On 16 oct. 2010, at 17:30, Emanuele Sacco wrote: >> >>> A solution by Luigi: >>> […] >> >> Hi Emmanuele, Hi Luigi, >> >> Please excuse me if I get involved in the thread of your discussions… >> I was interested both by the question ad the solutions, since I had a >> similar problem some time ago, but I gave up. >> >> Now that you give a solution with \definetextbackground (the solution >> below), I would like to point out that with this definition the beginning of >> the highlighted text does not have the upper frame turned on, while at the >> end the bottom frame is turned on (of course this is what we want). >> So my question is: can one have both the upper frame turned on at the >> begining of the highlighted text (and only there) and also the bottom frame >> turned on at the end (and only there). >> In other words, a highlighted framed text spanning over two (or more) pages, >> would be like a big rectangle of which the upper and the bottom frame, as >> well as the left and right frames, are shown. >> >> Thanks in advance for you attention: OK > With my solution it's a matter of changing few lines > bottomframe=off,topframe=on, > > > bottomframe=on,topframe=off, > > > -- > luigi > ___ > 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] background over two page
A solution by Luigi: %% \newdimen\SpaceLeft \def\CheckSpace{% \ifdim\pagetotal=0pt\SpaceLeft=\vsize\else\SpaceLeft=\pagegoal\advance\SpaceLeft by -\pagetotal\advance\SpaceLeft by -2\lineheight\fi}% \setupcolors[state=start] \long\def\StartBg#1\StopBg{% \bgroup \setbox8000=\vbox{\hsize=\dimexpr\textwidth-1em\relax#1} \CheckSpace% \the\SpaceLeft\the\ht8000 \the\dp8000 \ifdim\dimexpr(\ht8000+\dp8000)>\SpaceLeft\relax % \setbox8001=\vsplit8000 to \SpaceLeft% \setbox8001=\vbox{\unvbox8001}% % \setupbackground [bottomframe=off, rulethickness=1pt, rightframe=on,width=\textwidth, leftframe=on] \startbackground\unvbox8001\stopbackground% \setupbackground [bottomframe=on, rulethickness=1pt, rightframe=on,width=\textwidth, leftframe=on] \startbackground\unvbox8000\stopbackground% \else \setupbackground [bottomframe=on, rulethickness=1pt, rightframe=on, leftframe=on] \startbackground #1\stopbackground% \fi \egroup } \setupbackground [bottomframe=on, rulethickness=1pt, rightframe=on, leftframe=on] \starttext \startbackground \input knuth \stopbackground e poi \StartBg \input knuth \input knuth \input knuth \StopBg \stoptext %% An alternative solution with the command \definetextbackground: %% \setupcolors[state=start] \enableregime[utf] \def\Linea{\startMPcode draw (0,0) -- (\the\textwidth-1,0) withpen pencircle scaled 1bp withcolor red; \stopMPcode } \definetextbackground [Prova] [ mp=background:mp, location=paragraph, rulethickness=1pt, width=broad, leftoffset=1em, rightoffset=1em, after={\Linea} ] \startuseMPgraphic{background:mp} path p; for i = 1 upto nofmultipars : p = (multipars[i] topenlarged 5pt bottomenlarged 10pt); fill p withcolor lightgray ; draw leftboundary p withpen pencircle scaled 1bp withcolor red ; draw rightboundary p withpen pencircle scaled 1bp withcolor red ; endfor; \stopuseMPgraphic \starttext \startProva \input knuth \input knuth \input knuth \input knuth \input knuth \stopProva \stoptext %% bye ES 2010/10/14 luigi scarso : > On Thu, Oct 14, 2010 at 11:05 AM, Emanuele Sacco > wrote: >> Hi all, >> >> I'm using context MkII. >> My code is >> >> >> \setupcolors[state=start] >> \setupbackground >> [bottomframe=on, >> rulethickness=1pt, >> rightframe=on, >> leftframe=on] >> >> \starttext >> Good: >> \startbackground >> \input knuth >> \stopbackground >> >> Not good: >> >> \startbackground >> \input knuth >> \input knuth >> \input knuth >> \stopbackground >> \stoptext >> >> >> >> The second backgrounded text is on two pages. Is there a way to not >> show the bottomframe at the end of the first page? >> thanks >> >> ES >> -- >> Al mondo ci sono 10 tipi di persone: quelli che conoscono il sistema >> binario e quelli che non lo conoscono. >> ___ >> 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 >> ___ >> > > As always my pov: a wrapper macro. > > \showframe > \newdimen\SpaceLeft > \def\CheckSpace{% > \ifdim\pagetotal=0pt\SpaceLeft=\vsize\else\SpaceLeft=\pagegoal\advance\SpaceLeft > by -\pagetotal\advance\SpaceLeft by -2\lineheight\fi}% > > > \setupcolors[state=start] > > > \long\def\StartBg#1\StopBg{% > \bgroup > \setbox8000=\vbox{#1} > \CheckSpace% \the\SpaceLeft\the\ht8000 \the\dp8000 > \ifdim\dimexpr(\ht8000+\dp8000)>\SpaceLeft\relax > % > \setbox8001=\vsplit8000 to \SpaceLeft% > \setbox8001=\vbox{\unvbox8001}% > % > \setupbackground > [bottomframe=off, > rulethickness=1pt, > rightframe=on, > leftframe=on] > \startbackground\unvbox8001\stopbackground% > > \setupbackground > [bottomframe=on, > rulethickness=1pt, > rightframe=on, > leftframe=on] > \startbackground\unvbox8000\stopbackground% > \else > \setupbackground > [bottomframe=on, > rulethickness=1pt, > rightframe=on, > leftframe=on] > \startbackground #1\stopbackground% > \fi > \egroup > } > > \setupbackground > [bottomframe=on, > rulethickness=1pt, > rightframe=on, > leftframe=on] > > \starttext > Good: > \startbackground > \inp
Re: [NTG-context] background over two page
On Thu, Oct 14, 2010 at 11:05 AM, Emanuele Sacco wrote: > Hi all, > > I'm using context MkII. > My code is > > > \setupcolors[state=start] > \setupbackground > [bottomframe=on, > rulethickness=1pt, > rightframe=on, > leftframe=on] > > \starttext > Good: > \startbackground > \input knuth > \stopbackground > > Not good: > > \startbackground > \input knuth > \input knuth > \input knuth > \stopbackground > \stoptext > > > > The second backgrounded text is on two pages. Is there a way to not > show the bottomframe at the end of the first page? > thanks > > ES > -- > Al mondo ci sono 10 tipi di persone: quelli che conoscono il sistema > binario e quelli che non lo conoscono. > ___ > 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 > ___ > As always my pov: a wrapper macro. \showframe \newdimen\SpaceLeft \def\CheckSpace{% \ifdim\pagetotal=0pt\SpaceLeft=\vsize\else\SpaceLeft=\pagegoal\advance\SpaceLeft by -\pagetotal\advance\SpaceLeft by -2\lineheight\fi}% \setupcolors[state=start] \long\def\StartBg#1\StopBg{% \bgroup \setbox8000=\vbox{#1} \CheckSpace% \the\SpaceLeft\the\ht8000 \the\dp8000 \ifdim\dimexpr(\ht8000+\dp8000)>\SpaceLeft\relax % \setbox8001=\vsplit8000 to \SpaceLeft% \setbox8001=\vbox{\unvbox8001}% % \setupbackground [bottomframe=off, rulethickness=1pt, rightframe=on, leftframe=on] \startbackground\unvbox8001\stopbackground% \setupbackground [bottomframe=on, rulethickness=1pt, rightframe=on, leftframe=on] \startbackground\unvbox8000\stopbackground% \else \setupbackground [bottomframe=on, rulethickness=1pt, rightframe=on, leftframe=on] \startbackground #1\stopbackground% \fi \egroup } \setupbackground [bottomframe=on, rulethickness=1pt, rightframe=on, leftframe=on] \starttext Good: \startbackground \input knuth \stopbackground Not good: \StartBg \input knuth \input knuth \input knuth \StopBg \stoptext -- luigi ___ 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] background over two page
Hi all, I'm using context MkII. My code is \setupcolors[state=start] \setupbackground [bottomframe=on, rulethickness=1pt, rightframe=on, leftframe=on] \starttext Good: \startbackground \input knuth \stopbackground Not good: \startbackground \input knuth \input knuth \input knuth \stopbackground \stoptext The second backgrounded text is on two pages. Is there a way to not show the bottomframe at the end of the first page? thanks ES -- Al mondo ci sono 10 tipi di persone: quelli che conoscono il sistema binario e quelli che non lo conoscono. ___ 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] background, mkii vs. mkiv
Thank you, Wolfgang. I added the line "\setnewconstant\backgroundsplit\zerocount" to pack-rul.mkiv, AND IT WORKED! This leaves the (not vital for me) question why minimal example 2 (using "setuptextbackground") produces that funny background with the same commands as in "setupbackground". Thanks again, Jörg On 9/10/10 4:06 PM, Wolfgang Schuster wrote: Am 10.09.2010 um 16:01 schrieb Jörg Hagmann: Ok, I narrowed it down: ---First minimal example--- \setupcolors[state=start] \starttext \setupbackground[background=color,backgroundcolor=lightgray,corner=round,frame=on,framecorner=round,framecolor=red,rulethickness=2pt,topoffset=0.25cm,bottomoffset=0.25cm,leftoffset=0.5cm,rightoffset=0.5cm,before={\blank[big]}] \startbackground \startitemize[packed] \item First question \item Second question \item Third question \stopitemize \stopbackground \stoptext -end of first minimal example This works in mk II, but not in mk IV. It seems that start/stopbackground has been deprecated (?). And replaced with \definetextbackground ? The reason is simpler, Hans replaced in MkIV many \newcounter and \chardef definitions with real counters and forgot for the background macros to add \setnewconstant\backgroundsplit\zerocount to pack-rul.mkiv. 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 ___ -- Prof. Jörg Hagmann-Zanolari MD University of Basel Department of Biomedicine Institute of Biochemistry and Genetics Mattenstrasse 28 CH-4058 Basel Switzerland Phone +41 (0)61 267 3565 ___ 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] background, mkii vs. mkiv
Am 10.09.2010 um 16:01 schrieb Jörg Hagmann: > Ok, I narrowed it down: > > ---First minimal example--- > \setupcolors[state=start] > > \starttext > > \setupbackground[background=color,backgroundcolor=lightgray,corner=round,frame=on,framecorner=round,framecolor=red,rulethickness=2pt,topoffset=0.25cm,bottomoffset=0.25cm,leftoffset=0.5cm,rightoffset=0.5cm,before={\blank[big]}] > \startbackground > > \startitemize[packed] > \item First question > \item Second question > \item Third question > \stopitemize > > \stopbackground > > \stoptext > -end of first minimal example > > This works in mk II, but not in mk IV. It seems that start/stopbackground > has been deprecated (?). And replaced with \definetextbackground ? The reason is simpler, Hans replaced in MkIV many \newcounter and \chardef definitions with real counters and forgot for the background macros to add \setnewconstant\backgroundsplit\zerocount to pack-rul.mkiv. 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] background, mkii vs. mkiv
Ok, I narrowed it down: ---First minimal example--- \setupcolors[state=start] \starttext \setupbackground[background=color,backgroundcolor=lightgray,corner=round,frame=on,framecorner=round,framecolor=red,rulethickness=2pt,topoffset=0.25cm,bottomoffset=0.25cm,leftoffset=0.5cm,rightoffset=0.5cm,before={\blank[big]}] \startbackground \startitemize[packed] \item First question \item Second question \item Third question \stopitemize \stopbackground \stoptext -end of first minimal example This works in mk II, but not in mk IV. It seems that start/stopbackground has been deprecated (?). And replaced with \definetextbackground ? ---Second minimal example- \setupcolors[state=start] \starttext \setuptextbackground[background=color,backgroundcolor=lightgray,corner=round,frame=on,framecorner=round,framecolor=red,rulethickness=2pt,topoffset=0.25cm,bottomoffset=0.25cm,leftoffset=0.5cm,rightoffset=0.5cm,before={\blank[big]}] \starttextbackground \startitemize[packed] \item First question \item Second question \item Third question \stopitemize \stoptextbackground \stoptext -end of second minimal example--- This "works" in both mk II and mk IV, but compare the background with the one in the first example. Help appreciated, thanks Jörg On 9/10/10 9:28 AM, Jörg Hagmann wrote: Could somebody please tell me why this minimal example works in mk II but not in mk IV -- and what I have to change? Thanks very much, Jörg -minimal example \definestartstop[Questions][before={\setupbackground[background=color,backgroundcolor=lightgray,corner=round,frame=on,framecorner=round,framecolor=red,rulethickness=2pt,topoffset=0.25cm,bottomoffset=0.25cm,leftoffset=0.5cm,rightoffset=0.5cm,before={\blank[big]}]\startbackground},after=\stopbackground] \starttext \startQuestions \startitemize[packed] \item First question \item Second question \item Third question \stopitemize \stopQuestions \stoptext end minimal example-- PS: On 9/8/10 10:51 AM, luigi scarso wrote: Did I misunderstand something? $> context --purge or $>context --purgeal I'm embarrassed ... ___ 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] background, mkii vs. mkiv
Could somebody please tell me why this minimal example works in mk II but not in mk IV -- and what I have to change? Thanks very much, Jörg -minimal example \definestartstop[Questions][before={\setupbackground[background=color,backgroundcolor=lightgray,corner=round,frame=on,framecorner=round,framecolor=red,rulethickness=2pt,topoffset=0.25cm,bottomoffset=0.25cm,leftoffset=0.5cm,rightoffset=0.5cm,before={\blank[big]}]\startbackground},after=\stopbackground] \starttext \startQuestions \startitemize[packed] \item First question \item Second question \item Third question \stopitemize \stopQuestions \stoptext end minimal example-- PS: On 9/8/10 10:51 AM, luigi scarso wrote: Did I misunderstand something? $> context --purge or $>context --purgeal I'm embarrassed ... ___ 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] Problem With an Enumeration After a Forced Float
Hi All, Here's a corner case for you: place a figure with the 'force' option, followed by an enumeration with a background. Like this (also attached as tadtest1.tex): \defineenumeration[enum][before={\startbackground},after={\stopbackground}] \starttext \dorecurse{3}{\input knuth\par} \placefigure[force]{Moo}{\externalfigure[cow.pdf][width=.7\textwidth]} \startenum The contents of a test enumeration. \stopenum \stoptext The enumeration will start at the top of the next page (after the figure) even though there's plenty of room below the figure on the same page. If you take the background away from the enumeration (delete the 'before' and 'after' options), OR take the 'force' option off the \placefigure command, then the problem goes away. I suspect that this isn't the expected behavior. :-) Thanks, Tad tadtest1.tex Description: TeX 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] Thoughts on ConTeXt: ditched
On Mon, Dec 28, 2009 at 02:44:20PM +0100, Manuel P. wrote: > >>\def\quotebox#1#2 > >>{\blank > >>\midaligned{\startbackground > >>\quotation{\em #1} \crlf --#2 > >>\stopbackground} > >>\blank} > >> > >> > >>- the above \quotebox command, in some cases, sends pdftex and luatex (MKII > >>and MKIV) to the moon with an infinite loop (100% CPU). > >I guess this is a result of your own definition of the \quotebox macro which > >expects a space > >at the end of the command, you should write (untested) instead: > > > >\define[2]\quotebox > > {\blank > >\startalignment[middle] > >\startbackground > >\quotation{\em#1}\crlf--#2 > >\stopbackground > >\stopalignment > >\blank} > > > > A infinite loop with 100% cpu for some spaces? Well, I wasn't > expecting this. Well, that is how TeX works, not a ConTeXt issue here; your \quotebox definition tells TeX to expect a space at the end of the macro, and it was looking for it. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer 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] Thoughts on ConTeXt: ditched
Il 27/12/2009 19.41, Wolfgang Schuster ha scritto: You're wrong, MkIV supports colors by default while you have to enable it in MkII by yourself for backwards compatibilities. The screen value for the background key could be used to set a gray background where you could change the gray value with the backgroundscreen key but real colored backgrounds are set with 'background=color,backgroundcolor=...'. In MkIV Hans made the decision to break sometimes backward compatibility and one result of this was that background=color is no longer supported because you could use backgroundcolor. Yes, I'm wrong and I'm not surprised. I've said it clearly: I don't know ConTeXt as much as I need to use it correctly. Part of the problem is the documentation: it's difficult (for me) to navigate and know what works on what version, especially with very limited time to figure out everything. Another "problem" is the "fluidity" of ConTeXt: it changes rapidly and the documentation is left behind. It's good because it responds very quickly to the real world and users needs, on the other hand it's bad because a new user has to be "in the club" for some time to figure out everything. \setupcolors[state=start] \setupbackground[background=screen] \setupbackground[state=start] \def\quotebox#1#2 {\blank \midaligned{\startbackground \quotation{\em #1} \crlf --#2 \stopbackground} \blank} - the above \quotebox command, in some cases, sends pdftex and luatex (MKII and MKIV) to the moon with an infinite loop (100% CPU). I guess this is a result of your own definition of the \quotebox macro which expects a space at the end of the command, you should write (untested) instead: \define[2]\quotebox {\blank \startalignment[middle] \startbackground \quotation{\em#1}\crlf--#2 \stopbackground \stopalignment \blank} A infinite loop with 100% cpu for some spaces? Well, I wasn't expecting this. You should try to play a while with ConTeXt without such a strict and shirt timeline as you had it this time. Best regards, Wolfgang You are perfectly right, I've picked the wrong choice given this specific context and requirements. -- Manuel P. ___ 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] Thoughts on ConTeXt: ditched
Am 27.12.2009 um 16:54 schrieb Manuel P.: > ConTeXt is a good software. I was impressed with a manual typesetted with it > and decided to give it a try. After some small documents, despite my > ridicously small knowledge of it I decided to use ConTeXt for my thesis. Bad > move. > > ConTeXt is beautiful because it's very configurable, for the most uses > doesn't need any external module (unlike LaTeX), and gives me more power on > the presentation of the document. But in a few days of work I've come to > realize that it's not suited for me and this project. > > I've had some unpleasant surprises: > - Bibliography doesn't work the way it should on MKIV. Unlike MKII. > - MKIV, unlike MKII, doesn't setup any background color: You're wrong, MkIV supports colors by default while you have to enable it in MkII by yourself for backwards compatibilities. The screen value for the background key could be used to set a gray background where you could change the gray value with the backgroundscreen key but real colored backgrounds are set with 'background=color,backgroundcolor=...'. In MkIV Hans made the decision to break sometimes backward compatibility and one result of this was that background=color is no longer supported because you could use backgroundcolor. > > \setupcolors[state=start] > \setupbackground[background=screen] > \setupbackground[state=start] > \def\quotebox#1#2 >{\blank >\midaligned{\startbackground >\quotation{\em #1} \crlf --#2 >\stopbackground} >\blank} > > > - the above \quotebox command, in some cases, sends pdftex and luatex (MKII > and MKIV) to the moon with an infinite loop (100% CPU). I guess this is a result of your own definition of the \quotebox macro which expects a space at the end of the command, you should write (untested) instead: \define[2]\quotebox {\blank \startalignment[middle] \startbackground \quotation{\em#1}\crlf--#2 \stopbackground \stopalignment \blank} > One reason for this is probably my very limited knowledge and experience with > ConTeXt. It's extremely configurable, and this is a plus. But on the other > hand if you don't know how to move, what to do, the system internals and how > any configuration affect the typesetting, a lot of thing won't work. And > worse, you won't know where to bump your head. I don't have time to read the > reference manual (I've already read the excursion) because the deadline is > too near, so I have to call defeat and go to the LaTeX camp. I've wasted days > of work, now I can't afford more of that. > > It's a learning experience: don't use an "experimental" (new for me) tool for > an important job. Stick to the tried&tested ones, and use new stuff only in a > safe context (without a near hard deadline). > > Maybe, in some future, I'll take again ConTeXt and try to learn it the proper > way. But for now, it's "fired". > > For your patience, time and help: thanks to all of you! You should try to play a while with ConTeXt without such a strict and shirt timeline as you had it this time. Best regards, 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] Thoughts on ConTeXt: ditched
ConTeXt is a good software. I was impressed with a manual typesetted with it and decided to give it a try. After some small documents, despite my ridicously small knowledge of it I decided to use ConTeXt for my thesis. Bad move. ConTeXt is beautiful because it's very configurable, for the most uses doesn't need any external module (unlike LaTeX), and gives me more power on the presentation of the document. But in a few days of work I've come to realize that it's not suited for me and this project. I've had some unpleasant surprises: - Bibliography doesn't work the way it should on MKIV. Unlike MKII. - MKIV, unlike MKII, doesn't setup any background color: \setupcolors[state=start] \setupbackground[background=screen] \setupbackground[state=start] \def\quotebox#1#2 {\blank \midaligned{\startbackground \quotation{\em #1} \crlf --#2 \stopbackground} \blank} - the above \quotebox command, in some cases, sends pdftex and luatex (MKII and MKIV) to the moon with an infinite loop (100% CPU). One reason for this is probably my very limited knowledge and experience with ConTeXt. It's extremely configurable, and this is a plus. But on the other hand if you don't know how to move, what to do, the system internals and how any configuration affect the typesetting, a lot of thing won't work. And worse, you won't know where to bump your head. I don't have time to read the reference manual (I've already read the excursion) because the deadline is too near, so I have to call defeat and go to the LaTeX camp. I've wasted days of work, now I can't afford more of that. It's a learning experience: don't use an "experimental" (new for me) tool for an important job. Stick to the tried&tested ones, and use new stuff only in a safe context (without a near hard deadline). Maybe, in some future, I'll take again ConTeXt and try to learn it the proper way. But for now, it's "fired". For your patience, time and help: thanks to all of you! A little wish: I hope that when I'll return here there'll be good documentation (user-oriented) and a single (througly tested, see TDD/BDD approaches) reference implementation. -- Manuel P. ___ 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] Strange Behaviour for toc
Hallo list, I just started to work with conTeXt, now that I seted up an project environment as follows with the following content: file project_oc.tex: \startproject project_oc \environment env_oc \startfrontmatter \setuppagenumbering[conversion=romannumerals] \completecontent \stopfrontmatter \startbodymatter \setuppagenumbering[conversion=] \product prd_oc_0 \stopbodymatter \startappendices \stopappendices \stopproject file env_oc.tex: \startenvironment env_oc \enableregime [utf] \setuplanguage [de] [leftquote=\upperleftsinglesixquote,rightquote= \upperrightsinglesixquote,leftquotation=\leftguillemot,rightquotation= \rightguillemot] \mainlanguage [de] \setupbodyfontenvironment[default][em=italic] \usemodule[greek] \usemodule[units] \setupcolors[state=start] \setupcolor[rgb] \definecolor[lightred][r=1,g=0.85,b=0.85] \definefont[BigFontOne][Regular sa 3] \definefont[BigFontTwo][RegularBold sa 2] \definecolor[BigColorOne][r=.86,g=.850,b=.54] \definecolor[BigColorTwo][r=.43,g=.425,b=.27] \setuplayout[location=middle, topspace=1.3cm, width=middle, cutspace=4.5cm, rightmargindistance=0.4cm, leftmargindistance=0.2cm, backspace=1.2cm, height=fit, rightmargin=2.5cm, leftmargin=1cm, bottomspace=2cm, footer=0.8cm, setup=strict] % \showgrid \showframe % \showsetups % \showlayout \setuppagenumbering[alternative=doublesided,location=footer] \setupheader[state=none] \setuptolerance[tolerant, stretch] \setupwhitespace[medium] \setupfootnotes[way=bypage, conversion=set 2] \definepagebreak[chapter][yes,footer,right] \setuphead[chapter][textcommand=\MyChapterText,color=BigColorTwo,style= \BigFontTwo] \def\MyChapterText#1{\rlap{\BigFontOne\BigColorOne#1}\kern15pt#1} \setuphead[section][numbercolor=red] \setuphead[subsection][number=no,style=\ss] \setuphead[subsubsection][style=slanted,number=no,before={\blank [big]},before={\testpage[1]},after=\nowhitespace] \setupfloats[spaceafter=3*medium] \setuptables[bodyfont=small] \setupcaption[table][style={\ssx\setupinterlinespace [line=2.5ex]},align=left] \setupfloat[table][criterium=0.5\textwidth,default=inner] \setupcaption[figure][style={\ssx\setupinterlinespace [line=2.5ex]},align=left] \definefloat[Bigfigure][Bigfigures][figure] \setupfloat[Bigfigure][location=inner] \definefloat[Bigtable][Bigtables][table] \setupfloat[Bigtable][location=inner] \definefloat[vignette][figure] \setupfloat[vignette][leftmargindistance=- \outermargintotal,rightmargindistance=-\outermargintotal,default= {outer,none,low}] % \setup[vignette][number=no] \definestartstop[Story][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] \definestartstop[MySummary][before={\setupbackground [background=color,backgroundcolor=lightgray,backgroundcorner=rectangular,frame=off,topoffset=0.3cm,bottomoffset=0.3cm,leftoffset=0.5cm,rightoffset=0.5cm,before= {\blank[big]}]\startbackground\Zus},after=\stopbackground] \defineframedtext[Oddity][width=0.75 \textwidth,background=color,backgroundcolor=lightred,frame=off,framecorner=round,frameradius=0.5cm,backgroundcorner=round,style= \tfx] \setupinmargin[align=right,style=\ss\tfx\setupinterlinespace] \setupitemize[align=right] \startsectionblockenvironment[appendix] \setuptabulate[align=right,split=yes] \definepagebreak[chapter][yes,footer,right] \setuphead[chapter][bodypartconversion=Character,page=chapter] \setuphead[subsection][command=\SectionCommand,number=yes,numbercolor,red] \setuphead[subsubsection][number=yes] \definefloat[BigFramedFigure][BigFramedFigures][figure] \setupfloat[BigFramedFigure][location=inner,frame=on,offset=2pt] \definefloat[FramedFigure][FramedFigures][figure] \setupfloat[FramedFigure][frame=on,offset=2pt] \stopsectionblockenvironment \setupregister[index][imp][pagestyle=bold] \setupcombinedlist[content][level=2,alternative=c] \setuplist[chapter][style=bold] \stopenvironment file prd_oc_0.tex: -- \startproduct prd_oc_0 \project project_oc \component c_oc0_1 \stopproduct file c_oc0_1.tex: - \startcomponent c_oc0_1 \product prd_oc_0 \project project_oc \starttext \title{Titel} \chapter[chap:ques]{Question} \chapter[chap:answ]{Answer} \chapter[chap:rema]{Remarque} \stoptext \stopcomponent Now Im getting doubled entries in the \completecontent part, it lists everything as 1 Question 5 1 Question 5 2 Answer7 2 Answer7 so as this is not the wished behaviour, can someone help me to solve thsi problem. please be patient with me to get it done right, as I'm a newbe... Greetings M
Re: [NTG-context] \framed (and others) don't honor directional switches
Khaled Hosny wrote: On Fri, Apr 03, 2009 at 02:55:56PM +0200, Hans Hagen wrote: Khaled Hosny wrote: framed, framedtext, TEXpage (and may be others), no longer honor directional switches. I'm sure TEXpage at least was OK a month ago. \pagedir TRT\bodydir TRT\pardir TRT\textdir TRT \starttext \startTEXpage \input tufte \stopTEXpage \framed{Hello world} \startframedtext \input tufte \stopframedtext \startbackground \input tufte \stopbackground \stoptext if so then it's a side effect of changesin the engine (changes in rl handling are dangerous because macro packages are internally lr in many aspects (like positioning data relative to other data) and patching each macro for rl is non trivial (due to possible side effects) so first we need to be sure that the luatex engine is okay I tried to debug thus further, compiling the following document with both plain and context formats, in plain all boxes are TRT (the part of the log after "Completed box being shipped out [1]"), while in context all boxes are TLT except that hbox that contains the text. Though I don't know how much relevant is this or what it does actually mean. a better example of the mess we're dealing with: \starttext \pagedir TRT \bodydir TRT \pardir TRT \textdir TRT \startTEXpage \input tufte \stopTEXpage \pagedir TLT \bodydir TRT \pardir TRT \textdir TRT \startTEXpage \input tufte \stopTEXpage \pagedir TRT \bodydir TLT \pardir TRT \textdir TRT \startTEXpage \input tufte \stopTEXpage \pagedir TLT \bodydir TLT \pardir TRT \textdir TRT \startTEXpage \input tufte \stopTEXpage \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \framed (and others) don't honor directional switches
Khaled Hosny wrote: On Fri, Apr 03, 2009 at 02:55:56PM +0200, Hans Hagen wrote: Khaled Hosny wrote: framed, framedtext, TEXpage (and may be others), no longer honor directional switches. I'm sure TEXpage at least was OK a month ago. \pagedir TRT\bodydir TRT\pardir TRT\textdir TRT \starttext \startTEXpage \input tufte \stopTEXpage \framed{Hello world} \startframedtext \input tufte \stopframedtext \startbackground \input tufte \stopbackground \stoptext if so then it's a side effect of changesin the engine (changes in rl handling are dangerous because macro packages are internally lr in many aspects (like positioning data relative to other data) and patching each macro for rl is non trivial (due to possible side effects) so first we need to be sure that the luatex engine is okay I tried to debug thus further, compiling the following document with both plain and context formats, in plain all boxes are TRT (the part of the log after "Completed box being shipped out [1]"), while in context all boxes are TLT except that hbox that contains the text. Though I don't know how much relevant is this or what it does actually mean. \pagedir TRT \bodydir TRT \pardir TRT \textdir TRT \tracingall Hello \hbox{World} \bye you can comment this in cont-new.mkiv % \def\pagedir{\expandafter\gobblethreearguments} % \def\bodydir{\expandafter\gobblethreearguments} i'm trying to figure out what dirs make sense (even when all are enabled the alignment is no 100% ok; for instance, why should bodydir influence textdir and pardir (i.e. when i would expect the content to be rl independent of page/bodydir (we need some higher level interface and not these low level *dir commands) best is if you and idris sort this out (is part of idris onthology) - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \framed (and others) don't honor directional switches
On Fri, Apr 03, 2009 at 02:55:56PM +0200, Hans Hagen wrote: > Khaled Hosny wrote: >> framed, framedtext, TEXpage (and may be others), no longer honor >> directional switches. I'm sure TEXpage at least was OK a month ago. >> >> \pagedir TRT\bodydir TRT\pardir TRT\textdir TRT >> \starttext >> \startTEXpage >> \input tufte >> \stopTEXpage >> \framed{Hello world} >> \startframedtext >> \input tufte >> \stopframedtext >> \startbackground >> \input tufte >> \stopbackground >> \stoptext > > if so then it's a side effect of changesin the engine (changes in rl > handling are dangerous because macro packages are internally lr in many > aspects (like positioning data relative to other data) and patching each > macro for rl is non trivial (due to possible side effects) so first we > need to be sure that the luatex engine is okay I tried to debug thus further, compiling the following document with both plain and context formats, in plain all boxes are TRT (the part of the log after "Completed box being shipped out [1]"), while in context all boxes are TLT except that hbox that contains the text. Though I don't know how much relevant is this or what it does actually mean. \pagedir TRT \bodydir TRT \pardir TRT \textdir TRT \tracingall Hello \hbox{World} \bye Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \framed (and others) don't honor directional switches
Khaled Hosny wrote: framed, framedtext, TEXpage (and may be others), no longer honor directional switches. I'm sure TEXpage at least was OK a month ago. \pagedir TRT\bodydir TRT\pardir TRT\textdir TRT \starttext \startTEXpage \input tufte \stopTEXpage \framed{Hello world} \startframedtext \input tufte \stopframedtext \startbackground \input tufte \stopbackground \stoptext if so then it's a side effect of changesin the engine (changes in rl handling are dangerous because macro packages are internally lr in many aspects (like positioning data relative to other data) and patching each macro for rl is non trivial (due to possible side effects) so first we need to be sure that the luatex engine is okay Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \framed (and others) don't honor directional switches
framed, framedtext, TEXpage (and may be others), no longer honor directional switches. I'm sure TEXpage at least was OK a month ago. \pagedir TRT\bodydir TRT\pardir TRT\textdir TRT \starttext \startTEXpage \input tufte \stopTEXpage \framed{Hello world} \startframedtext \input tufte \stopframedtext \startbackground \input tufte \stopbackground \stoptext Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] right/left only background offset?
On Thu, Apr 02, 2009 at 07:05:04PM +0200, Wolfgang Schuster wrote: > > Am 02.04.2009 um 18:55 schrieb Khaled Hosny: > >> Is there a way to typeset a paragraph with background extending only >> in >> the margin? >> >> I used the following setup, but I don't want the background to extend >> in >> the top/bottom (or at least minimize it), any ideas? > > Use textbackgrounds. Thanks for he tip. However, I managed to get the desired effect by setting a positive background offset, zero left/right offset, and negative top offset, this worked fine foe background, but the negative part has no effect in textbackground, any ideas? \setupcolors[state=start] \setupbackground [background=color,backgroundcolor=lightgray, leftoffset=0cm,rightoffset=0cm, backgroundoffset=.5cm,topoffset=-.3cm, % the offset works here frame=on] \setuptextbackground [background=color,backgroundcolor=lightgray, leftoffset=0cm,rightoffset=0cm, backgroundoffset=.5cm,topoffset=-.3cm, % but not here frame=on] \starttext \startbackground \input tufte \stopbackground \vfill \starttextbackground \input tufte \stoptextbackground \stoptext Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] right/left only background offset?
Is there a way to typeset a paragraph with background extending only in the margin? I used the following setup, but I don't want the background to extend in the top/bottom (or at least minimize it), any ideas? \setupcolors[state=start] \setupbackground [background=color, backgroundcolor=green, frame=on, backgroundoffset=.5cm]%, %leftoffset=0cm,rightoffset=0cm] \starttext \startbackground \input tufte \stopbackground \input tufte \stoptext Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Background on paragraphs
Hi Antoine, > By reading the excursion, I typed something that did > not work on my computer. It is about the background > on paragraphs. I've a big black background and we > cannot see the text. I attached the PDF file produced. \setupcolors[state=start] > \setupbackground[background=screen,corner=round] > \starttext > \startbackground > Lorem ipsum dolor sit amet, consectetur adipiscing elit. > Nam semper mi pellentesque diam. Vestibulum tellus erat, > vestibulum vel, blandit ac, placerat at, metus. Integer > rhoncus neque vel dolor. Sed dapibus arcu eu lorem. > In eleifend nunc nec justo. Maecenas sagittis ultricies > orci. Proin nec est. Integer dictum dictum felis. Mauris > nibh dui, tempus eget, auctor et, ultrices nec, nulla. > Cum sociis natoque penatibus et magnis dis parturient > montes, nascetur ridiculus mus. Duis lacinia vehicula > pede. Sed eros tellus, ultricies id, porttitor sed, bibendum > quis, metus. Pellentesque et justo eu ante tristique aliquet. > Quisque dui tellus, cursus sit amet, tincidunt nec, > imperdiet et, nibh. Quisque sapien elit, semper ac, molestie > et, dapibus vulputate, nunc. Sed in nisl. Vivamus ligula. > Aliquam eros pede, iaculis vitae, imperdiet sit amet, > commodo a, nibh. Pellentesque a turpis. > \stopbackground > \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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Background on paragraphs
Hi all, I'm new to ConTeXt but not new to LaTeX and I really enjoy to learn again something new and that seems to be cleaner in syntax at least. By reading the excursion, I typed something that did not work on my computer. It is about the background on paragraphs. I've a big black background and we cannot see the text. I attached the PDF file produced. I used texexec : % texexec TeXExec | version 6.2.0 - 1997-2006 - PRAGMA ADE/POD and the following code : \setupbackground[background=screen,corner=round] \starttext \startbackground Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam semper mi pellentesque diam. Vestibulum tellus erat, vestibulum vel, blandit ac, placerat at, metus. Integer rhoncus neque vel dolor. Sed dapibus arcu eu lorem. In eleifend nunc nec justo. Maecenas sagittis ultricies orci. Proin nec est. Integer dictum dictum felis. Mauris nibh dui, tempus eget, auctor et, ultrices nec, nulla. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Duis lacinia vehicula pede. Sed eros tellus, ultricies id, porttitor sed, bibendum quis, metus. Pellentesque et justo eu ante tristique aliquet. Quisque dui tellus, cursus sit amet, tincidunt nec, imperdiet et, nibh. Quisque sapien elit, semper ac, molestie et, dapibus vulputate, nunc. Sed in nisl. Vivamus ligula. Aliquam eros pede, iaculis vitae, imperdiet sit amet, commodo a, nibh. Pellentesque a turpis. \stopbackground \stoptext I hope to have some help and feedback about, Cheers, Antoine C. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] ConTeXt-ifying Kile
\setupTABLE \setuptables[options] \setuptabulate[name][options] \setuptext[text|margin|edge][options] # \setuptextbackground \setuptextposition[name][settings] \setuptextrules[options] \setuptexttexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber] \setuptextvariable[name][options] \setupthinrules[options] \setuptolerance[options] \setuptop[text|margin|edge][options] \setuptoptexts[text|margin|edge][text|section|date|mark|pagenumber][text|section|date|mark|pagenumber] \setuptype[options] \setuptyping[file|typing|name][options] \setupunderbar[options] \setupurl[options] \setupversions[options] \setupwhitespace[none|small|medium|big|line|fixed|fix|dimension] # \setvalue # \setvariables # \setxvalue # \setxvariables # \showaccents \showbodyfont[settings] \showbodyfontenvironment[settings] # \showcharacters \showcolor[name] \showcolorgroup[name][horizontal|vertical|name|value|number] \showexternalfigures[alternative=a|b|c] \showfields[names] # \showfont \showframe[text|margin|edge] \showgrid # \showgridboxes # \showgridsnapping \showlayout # \showlayoutcomponents \showmakeup \showpalet[name][horizontal|vertical|name|value] \showprint[typesetting papersize][printing papersize][settings] \showsetups \showstruts # \showstruts \showsymbolset[name] # \snaptogrid \someline[reference] \somewhere{text}{text}[reference] \sort[text]{text} \space \splitfloat[settings]{text}{text} # \splitstring # \SR # \start \stop # \start \stop \startalignment[width|left|right|middle|inner|outer|wide|broad|height|bottom|line|reset|hanging|nothanging|hyphenated|nothyphenated] \stopalignment # \startarabicpar \stoparabicpar # \startarabictext \stoparabictext # \startappendices \stopappendices \startbackground \stopbackground # \startbackmatter \stopbackmatter # \startbaselinecorrection \stopbaselinecorrection # \startblockquote \stopblockquote # \startbodymatter \stopbodymatter \startbuffer[name] \stopbuffer \startcolor[name] \stopcolor \startcolumns[settings] \stopcolumns \startcombination[matrix] \stopcombination \startcomment[name][settings] \stopcomment \startcomponent file \stopcomponent \startdescription{text} \stopdescription \startdocument[name] \stopdocument \startenumeration \stopenumeration \startenvironment file \stopenvironment \startfact\fact text \\ text \\ text \\\fact text \stopfact \startfigure[name][file][factor=number][frame=on|off] \stopfigure \startfloattext[left|right|high|middle|low|offset|tall][reference]{text}{text} \stopfloattext # \startFLOWcell \stopFLOWcell # \startFLOWchart \stopFLOWchart \startformula \stopformula # \startframedcontent \stopframedcontent \startframedtext[left|right|middle|none][settings] \stopframedtext # \startfrontmatter \stopfrontmatter # \starthanging \stophanging \starthiding \stophiding \startinteractionmenu[name] \stopinteractionmenu \startitemgroup[name][options][settings] \stopitemigroup # \startitemize \stopitemize # \startitemize \stopitemize # \startJScode \stopJScode # \startJSpreamble \stopJSpreamble # \startJSscripts \stopJSscripts \startlegend[two]\leg text \\ text \\ text \\\leg \stoplegend \startline[reference] \stopline \startlinecorrection \stoplinecorrection \startlinenumbering[continue] \stoplinenumbering \startlines \stoplines \startlocal \stoplocal \startlocalenvironment \stoplocalenvironment \startlocalfootnotes \stoplocalfootnotes # \startlocalsetups \stoplocalsetups \startmakeup[name][settings] \stopmakeup \startmarginblock \stopmarginblock \startmarginrule[number] \stopmarginrule # \startmode \stopmode # \startMPpage \stopMPpage \startnamemakeup \stopnamemakeup \startnarrower[left|middle|right] \stopnarrower # \startnointerference \stopnointerference # \startnotmode \stopnotmode \startopposite \stopopposite \startoverlay{text}{text} \stopoverlay \startoverview[names] \stopoverview \startpacked[blank] \stoppacked \startparagraph \stopparagraph \startpositioning \stoppositioning \startpostponing \stoppostponing \startproduct file \stopproduct \startprofile[names] \stopprofile \startproject file \stopproject \startquotation[left|middle|right] \stopquotation \startregister[text]{text+text+text} \stopregister # \startsetups \stopsetups # \startstandardmakeup \stopstandardmakeup \startsymbolset[name] \stopsymbolset \startsynchronization \stopsynchronization \starttable[text|name] \stoptable \starttables[text|name] \stoptables \starttabulate[text][settings] \stoptabulate # \startTEXpage \stopTEXpage # \starttext \stoptext # \starttextbackground \stoptextbackground # \starttextdata \stoptextdata \starttextrule[top|bottom]{text} \stoptextrule \starttyping \stoptyping \startunpacked \stopunpacked \startversion[numbers] \stopversion # \startXMLdata \stopXMLdata # \startXMLignore \stopXMLignore # \startXMLmapping \stopXMLmapping \stretched{text} # \strut # \strutdepth # \strutheight # \struttedbox \sub[references] \subject[references]{text} \subsection[references]{text} \subsubject[references]{text} \subsubsection[references]{text} \subsubsubject[re
Re: [NTG-context] breaking framed text across pages
Mojca Miklavec wrote: > On 2/21/07, Vyatcheslav Yatskovsky wrote: > >> Hi, >> >> I'm struggling against framed text and is beaten again. >> >> If the text below doesn't fit the page, it goes below footer and stops pdf >> file without explanations. After many experiments I should note that frame >> text is not user-tolerant construction at all, unlike the whole Context is. >> :( >> > > Hans should probably answer the framed-tet related question. I was > also a bit disappointed last time when I figured out that framedtext > framed just takes a box and boxes don't break try to imagine how to implement breaking across pages with backgrounds ... als try to figure out (without looking at the source) how the text background mechanism works ... it may turn you rdisappointment into amazement on how a 25 year old tex can still keep up with it > doesn't support breaking along pages. But then I discovered an > alternative: > > \setupbackground[frame=on,rulethickness=0.7pt,corner=round,bodyfont=11pt,width=\textwidth] > > \startbackground > > \stopbackground > dependin gon usage, this mechanism also provides background behind parts of paragraphs, nested backgrounds, arbitrary mp backgrounds, etc Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] breaking framed text across pages
On Sat, 24 Feb 2007, Mojca Miklavec wrote: > On 2/21/07, Vyatcheslav Yatskovsky wrote: >> >> Hi, >> >> I'm struggling against framed text and is beaten again. >> >> If the text below doesn't fit the page, it goes below footer and stops pdf >> file without explanations. After many experiments I should note that frame >> text is not user-tolerant construction at all, unlike the whole Context is. >> :( > > Hans should probably answer the framed-tet related question. I was > also a bit disappointed last time when I figured out that framedtext > doesn't support breaking along pages. But then I discovered an > alternative: > > \setupbackground[frame=on,rulethickness=0.7pt,corner=round,bodyfont=11pt,width=\textwidth] > > \startbackground > ... > \stopbackground > > The only little problem is that background doesn't support > \definebackground yet, so you should either help yourself with > something similar to what I did: Well, my understandin is that backgrounds is obsolete/no longer developed and the right thing to use is textbackgrounds. You can define textbackgrounds and they work fairly well. The documentation is a bit lacking, but details manual as the basics. Defining new backgrounds can be tricky, as the backgrounds work well in multi-column documents, break across pages and follow grids! You can not ask for more. > \def\starthomework{\dosingleempty\dostarthomework} > \long\def\dostarthomework[#1]#2\stophomework > {\bgroup > \setupbackground[frame=on,rulethickness=0.7pt, > corner=round,width=\textwidth] > \startbackground > {\bf Homework\doifsomething{#1}{: #1}}\switchtobodyfont[10pt]\crlf > #2 > \stopbackground > \egroup} > > or ask someone here to extend the functionality (if you need that). > (I experinced some problems: a bit weird spacing around backgrounds > and buggy end of pages - but I didn't yet manage to post a bug > report.) textbackgrounds are a bit more robust. They work better with the option that Hans suggested in http://archive.contextgarden.net/thread/20060523.234652.af86fd7f.en.html > It would be nice if backgrounds would gain some functionality and if > they would be more consistent with framedtexts, but I didn't yet take > time to create a more extensive comparison (long > bug-report/feature-request list for Hans, or even Aditya, who likes > such challenges as well). Last time that I seriously used textbackgrounds (in typesetting homework solutions) I had a few problems near the page ends. Occasionally a large equation would not split across the page boundary and would hang outside the page background. A \page[bigpreference] would usually set it right. The math stuff was in the intial stages then, and I do not know if it was math alignment at that time (early Jan/Feb 2006) or the textbackgrounds. I did not really get time to clean up the project and test the whole thing. My cleaned up solution of using textbackgrounds is in my practex article http://tug.org/pracjourn/2006-4/mahajan/ Overall textbackgrounds worked fairly well. I have been thinking of making a library of different text backgrounds, so that one could say \definetextbackground[whatever][background=background:oval] and get an oval background. Basically just a collection of commonly used backgrounds (oval, random squeezed, random puked, frame, random frame, all of the above with a shadow, etc.). What I had in mind was not something with lot of configuration options, since that will be hard for my knowledge of metapost context interaction, but something simple which shows how to define new backgrounds, so that one can modify the examples according to their needs. But it is a bit low on my todo list right now :-( Aditya ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] breaking framed text across pages
On 2/21/07, Vyatcheslav Yatskovsky wrote: > > Hi, > > I'm struggling against framed text and is beaten again. > > If the text below doesn't fit the page, it goes below footer and stops pdf > file without explanations. After many experiments I should note that frame > text is not user-tolerant construction at all, unlike the whole Context is. > :( Hans should probably answer the framed-tet related question. I was also a bit disappointed last time when I figured out that framedtext doesn't support breaking along pages. But then I discovered an alternative: \setupbackground[frame=on,rulethickness=0.7pt,corner=round,bodyfont=11pt,width=\textwidth] \startbackground ... \stopbackground The only little problem is that background doesn't support \definebackground yet, so you should either help yourself with something similar to what I did: \def\starthomework{\dosingleempty\dostarthomework} \long\def\dostarthomework[#1]#2\stophomework {\bgroup \setupbackground[frame=on,rulethickness=0.7pt, corner=round,width=\textwidth] \startbackground {\bf Homework\doifsomething{#1}{: #1}}\switchtobodyfont[10pt]\crlf #2 \stopbackground \egroup} or ask someone here to extend the functionality (if you need that). (I experinced some problems: a bit weird spacing around backgrounds and buggy end of pages - but I didn't yet manage to post a bug report.) It would be nice if backgrounds would gain some functionality and if they would be more consistent with framedtexts, but I didn't yet take time to create a more extensive comparison (long bug-report/feature-request list for Hans, or even Aditya, who likes such challenges as well). > \defineframedtext[assignment][rulethickness=0.7pt, > corner=round, bodyfont=11pt, width=\textwidth] > > > > > \startassignment > > Write an M-file which inputs matrixes $A$, $B$, initial $N$ and number of > iterations, and which plots 3D bars. > > \startcolumns[n=3] > > \par\thinrule > > \par\thinrule > > \par\thinrule > > \par\thinrule > > \par\thinrule > > \par\thinrule > > \par\thinrule > > \par\thinrule > > \par\thinrule > > \par\thinrule Why not simply \dorecurse{10}{\par\thinrule}? > \stopcolumns > > > > > Find relative distribution (in percents) of population within age classes > and store the result into new matrix $P$. Plot it too. > > \startcolumns[n=3] > > \par\thinrule > > \par\thinrule > > \par\thinrule > > \par\thinrule > > \par\thinrule > > \par\thinrule > > \par\thinrule > > \stopcolumns > > \stopassignment > > > > > Best, > > Vyatcheslav ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] rotate a TABLE
Mojca Miklavec wrote: > On 1/14/07, Gerhard Kugler wrote: > >> On Sat, Jan 13, 2007 at 12:02:43PM +0100, Henning Hraban Ramm wrote: >> >>> What's wrong with \rotate{your table} ? >>> >> Thanks Henning. >> >> But now I still have a problem. The TABLE covers a whole page. This >> page should habe a colored background (grey). I get the background, >> but shifted. It begins (vertically) a line before the table and ends a >> line before the end of the table. >> >> \startbackground >> \rotate[rotation=270]{ >> > > It helps if you place a '%' at the end, so > \rotate[rotation=270]{% > and similar to the rest of lines which don't end with a command > \placetable[here,270]{some caption}{the table} \placetable[page,270,none] is also possible - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] rotate a TABLE
Hi Gerhard, Gerhard Kugler wrote: > On Sat, Jan 13, 2007 at 12:02:43PM +0100, Henning Hraban Ramm wrote: >> What's wrong with \rotate{your table} ? > > Thanks Henning. > > But now I still have a problem. The TABLE covers a whole page. This > page should habe a colored background (grey). I get the background, > but shifted. It begins (vertically) a line before the table and ends a > line before the end of the table. > > \startbackground > \rotate[rotation=270]{ > \setupTABLE[width=\textheight, height=\textwidth] > \setupTABLE[r][each][height=0.13\textwidth] > \setupTABLE[r][1,2][align=lohi, height=0.06\textwidth] > \setupTABLE[c][1,2,3,4][width=0.15\textheight] > \setupTABLE[c][5][width=0.4\textheight] The shift is caused by the \setupTABLE commands (ends with "]", so the line break becomes active and adds one space). You can add a comment symbol at the end of every such line or move the whole setup part out of the rotate macro. I also used \framed here, as \st(art|op)background still has some spurious space at the end of the table. % - - - - - - - - - - \setupoutput[pdftex] \setupcolors[state=start] \starttext \setupTABLE[width=\textheight, height=\textwidth] \setupTABLE[r][each][height=0.13\textwidth] \setupTABLE[r][1,2][align=lohi, height=0.06\textwidth] \setupTABLE[c][1,2,3,4][width=0.15\textheight] \setupTABLE[c][5][width=0.4\textheight] \rotate[rotation=270] {\framed[offset=overlay,frame=off,background=color,backgroundcolor=lightgray]\bgroup %\startbackground \bTABLE \bTABLEhead \bTR \bTH[nc=5] \midaligned{Übung: Einschätzung der eigenen Erfahrung: Prüfen, was wirkungsvoll ist} \eTH \eTR \eTABLEhead \switchtobodyfont[small] \bTABLEbody \bTR \bTD[m=5] \eTD \eTR \eTABLEbody \eTABLE %\stopbackground \egroup % \framed } \stoptext Greetings, Peter > \bTABLE > \bTABLEhead > \bTR >\bTH[nc=5] \midaligned{Übung: Einschätzung der eigenen Erfahrung: Prüfen, > was wirkungsvoll ist} \eTH > \eTR > \eTABLEhead > \switchtobodyfont[small] > \bTABLEbody > \bTR > . > \bTR >\bTD[m=5] \eTD > \eTR > \eTABLEbody > \eTABLE > } > \stopbackground > > > Gerhard > ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] rotate a TABLE
On 1/14/07, Gerhard Kugler wrote: > On Sat, Jan 13, 2007 at 12:02:43PM +0100, Henning Hraban Ramm wrote: > > > > What's wrong with \rotate{your table} ? > > Thanks Henning. > > But now I still have a problem. The TABLE covers a whole page. This > page should habe a colored background (grey). I get the background, > but shifted. It begins (vertically) a line before the table and ends a > line before the end of the table. > > \startbackground > \rotate[rotation=270]{ It helps if you place a '%' at the end, so \rotate[rotation=270]{% and similar to the rest of lines which don't end with a command > \setupTABLE[width=\textheight, height=\textwidth] > \setupTABLE[r][each][height=0.13\textwidth] > \setupTABLE[r][1,2][align=lohi, height=0.06\textwidth] > \setupTABLE[c][1,2,3,4][width=0.15\textheight] > \setupTABLE[c][5][width=0.4\textheight] > \bTABLE > \bTABLEhead > \bTR >\bTH[nc=5] \midaligned{Übung: Einschätzung der eigenen Erfahrung: Prüfen, > was wirkungsvoll ist} \eTH > \eTR > \eTABLEhead > \switchtobodyfont[small] > \bTABLEbody > \bTR > . this \bTR hopefully doesn't end here? > \bTR >\bTD[m=5] \eTD > \eTR > \eTABLEbody > \eTABLE > } > \stopbackground It might look like a bug (it depends, if you have "whitespace", then the table will be shifted one line down, I have no idea how the background should look like in such cases), but perhaps something like \setupTABLE[c][each][background=screen] (or background=color,backgroundcolor=...) can help you? Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] rotate a TABLE
On Sat, Jan 13, 2007 at 12:02:43PM +0100, Henning Hraban Ramm wrote: > > What's wrong with \rotate{your table} ? Thanks Henning. But now I still have a problem. The TABLE covers a whole page. This page should habe a colored background (grey). I get the background, but shifted. It begins (vertically) a line before the table and ends a line before the end of the table. \startbackground \rotate[rotation=270]{ \setupTABLE[width=\textheight, height=\textwidth] \setupTABLE[r][each][height=0.13\textwidth] \setupTABLE[r][1,2][align=lohi, height=0.06\textwidth] \setupTABLE[c][1,2,3,4][width=0.15\textheight] \setupTABLE[c][5][width=0.4\textheight] \bTABLE \bTABLEhead \bTR \bTH[nc=5] \midaligned{Übung: Einschätzung der eigenen Erfahrung: Prüfen, was wirkungsvoll ist} \eTH \eTR \eTABLEhead \switchtobodyfont[small] \bTABLEbody \bTR . \bTR \bTD[m=5] \eTD \eTR \eTABLEbody \eTABLE } \stopbackground Gerhard -- Gerhard Kugler Psychotherapeut http://www.psychotherapie-kugler.de ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Problems with columnsets and \startbackground \stopbackground
Olaf Mersmann wrote: > Hi list, > > The second \subject{} causes a page break instead of wrapping into the > second column. Is this a bug, or am I missing something when using > \start- / \stopbackground? It is probably a bug, but it is not likely that it will get fixed soon. \startbackground is an 'old' command, columnsets are 'new' and the interaction is not always perfect. > Would this go away if I where to use a MP graphic for the background? Yes. If you do not want to write MP code yourself, you can also use textbackgrounds. This gives similar results to your code: \definecolor [grey] [s=.9] \definetextbackground [section] [background=color, backgroundcolor=grey, framecolor=black, frame=on, distance=10pt, before=, after=, location=paragraph] \setuphead[section] [style={\ss\bf}, before={\starttextbackground[section]~}, %NOTE after={\stoptextbackground}] NOTE: I am unhappy with the ~ in that line, but my version seems to ignore offset commands at the moment. Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Problems with columnsets and \startbackground \stopbackground
Hi list, I have some wierd interactions between a columnset and \start- / \stopbackground. cut here \setuppapersize [A4, landscape] [A4, landscape] \setupcolors [state=start] \setupbackground [background=screen, frame=on, frameoffset=2pt, backgroundoffset=2pt] \setuphead [section] [style={\ss\bf}, before={\startbackground}, after={\stopbackground}] \definecolumnset [foo] [n=2] \starttext \startcolumnset[foo] \subject{ABC} \input tufte \input knuth One more line and {\em BOOM} - it's broken.\crlf Here we go. 3 2 1 -- page break! \subject{DEF} \input knuth \stopcolumnset \stoptext cut here The second \subject{} causes a page break instead of wrapping into the second column. Is this a bug, or am I missing something when using \start- / \stopbackground? Would this go away if I where to use a MP graphic for the background? Thanks for any help. -- Olaf ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Page breaking problem
nico wrote: > On Mon, 19 Jun 2006 12:20:05 +0200, Hans Hagen <[EMAIL PROTECTED]> wrote: > > >> Helin Gai wrote: >> >>> Hi, I'm new to ConTeXt and I'm preparing a document for my own >>> reference. The source code is below. I came across a few weird >>> issues: 1) I don't quite understand why the page break occurs on >>> >> because of \startbackground, best use textbackgrounds >> > > Hi Hans, since textbackground seems now the default background feature to > use, do you plan to fix the textbackground overlapping trouble i submitted > some time ago? > remind me what it was ... Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context