Re: [NTG-context] itemize in two columns and pagebreaks
Am 29.06.2012 um 23:30 schrieb Marcin Borkowski: > Hello, > > I encountered a weird problem with > > \startitemize[columns] > > Namely, sometimes ConTeXt (MkIV) puts a pagebreak before the > itemization. I tried to distill the problem to a minimal example, > until now without success, but I'll post a ME if I'm able to reproduce > a problem in a small file. > > Anybody encountered this, too? Are there any solutions/workarounds > known? Use this setting for your chapter headings (adjust the test page/blank values to your needs). \setuphead[chapter][page=no,sectionstopper=.,before={\testpage[6]\blank[big]}] BTW: You can replace your numbercommand setting with sectionstopper. 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] itemize in two columns and pagebreaks
Dnia 2012-06-30, o godz. 07:05:36 Otared Kavian napisał(a): > Hi, > > The mechanisms of columns in itemize (which I think is the same as > startcolumns) and in simplecolumns are indeed different, as Hans > indicated once. The issue you encountered is indeed a bug as you > point out: once (a few months ago) I had an analogous problem and > Wolfgang S. suggested me to use simplecolumns to avoid the strange > page breaks. Oh, now I remember: I found that thread when searching through the archives! Hans, are there any chances of fixing this? (Not necessarily within hours/days, of course, maybe months, but not years;)?) Best, -- Marcin Borkowski http://mbork.pl ___ If your question is of interest to others as well, please add an 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] itemize in two columns and pagebreaks
Hi, The mechanisms of columns in itemize (which I think is the same as startcolumns) and in simplecolumns are indeed different, as Hans indicated once. The issue you encountered is indeed a bug as you point out: once (a few months ago) I had an analogous problem and Wolfgang S. suggested me to use simplecolumns to avoid the strange page breaks. Best regards: OK On 30 juin 2012, at 06:53, Marcin Borkowski wrote: > Dnia 2012-06-30, o godz. 05:05:31 > Otared Kavian napisał(a): > >> Hi Marcin, >> >> I tested your file and noticed the issue you are reporting. In your >> case you can use \startsimplecolumns to get rid of the page break >> (however there is a small problem with the distance between the text >> and the items): > > I knew that - but as you probably have noticed, the columns done by > \startsimplecolumns and by \startitemize[columns] do not align > correctly. So this is rather a workaround than a solution. (Well, > thanks anyway!) > > Currently I changed the file a bit and the problem disappeared, > but still I'd like to know what's going on, since this tends to happen > from time to time. (And this bug - because I guess it's a bug indeed - > has been around for quite a few years: I noticed it for the first time > something like 3 years ago...) > > Best, > > -- > Marcin Borkowski > http://mbork.pl > ___ > If your question is of interest to others as well, please add an 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] itemize in two columns and pagebreaks
Dnia 2012-06-30, o godz. 05:05:31 Otared Kavian napisał(a): > Hi Marcin, > > I tested your file and noticed the issue you are reporting. In your > case you can use \startsimplecolumns to get rid of the page break > (however there is a small problem with the distance between the text > and the items): I knew that - but as you probably have noticed, the columns done by \startsimplecolumns and by \startitemize[columns] do not align correctly. So this is rather a workaround than a solution. (Well, thanks anyway!) Currently I changed the file a bit and the problem disappeared, but still I'd like to know what's going on, since this tends to happen from time to time. (And this bug - because I guess it's a bug indeed - has been around for quite a few years: I noticed it for the first time something like 3 years ago...) Best, -- Marcin Borkowski http://mbork.pl ___ If your question is of interest to others as well, please add an 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] itemize in two columns and pagebreaks
Hi Marcin, I tested your file and noticed the issue you are reporting. In your case you can use \startsimplecolumns to get rid of the page break (however there is a small problem with the distance between the text and the items): \startchapter[title={Nim-suma liczb całkowitych nieujemnych}] \startexercises \startitem Przelicz następujące liczby w~zapisie dwójkowym na system dziesiątkowy: \startsimplecolumns \startitemize[r][left=(,right=),stopper={}] \startitem \math{(101)_2} \stopitem \startitem \math{(101011)_2} \stopitem \stopitemize \stopsimplecolumns \stopitem \startitem Przelicz następujące liczby na system dwójkowy: \startsimplecolumns \startitemize[r][left=(,right=),stopper={}] \startitem \math{10} \stopitem \startitem \math{77} \stopitem \stopitemize \stopsimplecolumns \stopitem \stopexercises \stopchapter Best regards: OK On 30 juin 2012, at 00:16, Marcin Borkowski wrote: > Dnia 2012-06-29, o godz. 23:30:13 > Marcin Borkowski napisał(a): > >> Hello, >> >> I encountered a weird problem with >> >> \startitemize[columns] >> >> Namely, sometimes ConTeXt (MkIV) puts a pagebreak before the >> itemization. I tried to distill the problem to a minimal example, >> until now without success, but I'll post a ME if I'm able to reproduce >> a problem in a small file. > > OK, so I didn't succeed in isolating this problem. I attach the > complete file (it's in Polish, sorry;)). The problem appears at page 3 > in the resulting pdf (line 141 of the source file). > >> Anybody encountered this, too? Are there any solutions/workarounds >> known? > > I naively tried putting \page[no] in various places around the > problematic line, but to no avail. Also, while trying to isolate the > problem, for instance by removing things before the itemization, it > turned out that it's difficult to reproduce it: often, everything is > fine (at the beginning of the page as well as near the end). > > Any ideas? > > -- > Marcin Borkowski > http://mbork.pl > ___ > If your question is of interest to others as well, please add an 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] itemize in two columns and pagebreaks
Dnia 2012-06-29, o godz. 23:30:13 Marcin Borkowski napisał(a): > Hello, > > I encountered a weird problem with > > \startitemize[columns] > > Namely, sometimes ConTeXt (MkIV) puts a pagebreak before the > itemization. I tried to distill the problem to a minimal example, > until now without success, but I'll post a ME if I'm able to reproduce > a problem in a small file. OK, so I didn't succeed in isolating this problem. I attach the complete file (it's in Polish, sorry;)). The problem appears at page 3 in the resulting pdf (line 141 of the source file). > Anybody encountered this, too? Are there any solutions/workarounds > known? I naively tried putting \page[no] in various places around the problematic line, but to no avail. Also, while trying to isolate the problem, for instance by removing things before the itemization, it turned out that it's difficult to reproduce it: often, everything is fine (at the beginning of the page as well as near the end). Any ideas? -- Marcin Borkowski http://mbork.pl % Äwiczenia na Newtona o grach \mainlanguage[pl] \usetypescript[pagella] \setupbodyfont[pagella] \def\todo#1{{\em \kap{do dopisania}: #1}} \enablemode[nauczyciel] \def\startteacher{\grabbufferdata[teacher][startteacher][stopteacher]} \doifmodeelse{nauczyciel}{\def\stopteacher{\getbuffer[teacher]}}{\def\stopteacher{}} \def\startanswer{\grabbufferdata[answer][startanswer][stopanswer]} \doifmodeelse{nauczyciel}{\def\stopanswer{\blank[small]{\sl Odpowiedź.} \getbuffer[answer]}}{\def\stopanswer{}} \def\putdotafter#1{#1.} \setuphead[subsubject][style=bold,after={},alternative=text,distance=0.25em,textcommand=\putdotafter] \setuphead[section][numbercommand=\putdotafter] \setuphead[chapter][numbercommand=\putdotafter,page=no] \defineitemgroup[exercises] \setupitemgroup[exercises][1][n][before={},inbetween={\blank[medium]}] \def\ppauza{\unskip\kern.2em--\hskip.2em\ignorespaces} \starttext \startalignment[middle] \tfb Gry (materiaÅy na Äwiczenia w~czwartek) \par\blank[big] \stopalignment \completecontent \startchapter[title={Gry macierzowe}] \startexercises \startitem Jakie sÄ strategie optymalne dla obu graczy w~grze o~poniższej macierzy? \startformula \startmathmatrix[n=2,left={\left(\,},right={\,\right)},align=right] \NC 1 \NC 2 \NR \NC 3 \NC 4 \NR \stopmathmatrix \stopformula \startanswer Pierwszy gracz, wybierajÄ c drugi wiersz, w~każdym wypadku wygrywa wiÄcej, niż gdyby wybraÅ pierwszy; powinien wiÄc wybraÄ drugi wiersz (dominujÄ cy). Drugi gracz, wybierajÄ c pierwszÄ kolumnÄ, w~każdym przypadku traci mniej, niż gdyby wybraÅ drugÄ ; powinien wiÄc wybraÄ pierwszÄ (dominujÄ cÄ ) kolumnÄ. \stopanswer \stopitem \startitem Rozważmy grÄ z~nastÄpujÄ cÄ macierzÄ : \startformula \startmathmatrix[n=3,left={\left(\,},right={\,\right)},align=right] \NC 4 \NC 1 \NC -1 \NR \NC 0 \NC 1 \NC 6 \NR \NC 3 \NC 2 \NC 5 \NR \stopmathmatrix \stopformula Jaka jest optymalna strategia dla każdego z~graczy? \startanswer Å»aden wiersz ani kolumna nie sÄ dominujÄ ce, ale ponieważ \math{2} w~trzecim rzÄdzie i~drugiej kolumnie jest {\em najmniejszÄ } wartoÅciÄ w~swoim rzÄdzie i~{\em najwiÄkszÄ } wartoÅciÄ w~swojej kolumnie, optymalnÄ strategiÄ dla I~gracza jest trzecia, a~dla II~gracza druga. \stopanswer \stopitem \startitem Gra {\em parzyste czy nieparzyste} polega na tym, że dwóch graczy wybiera (równoczeÅnie) liczbÄ \math{1} lub~\math{2}. JeÅli suma wybranych liczb jest nieparzysta, wygrywa gracz~I; jeÅli jest parzysta, wygrywa gracz~II. Gracz, który przegraÅ, oddaje drugiemu kwotÄ równÄ sumie wybranych liczb. Narysuj macierz tej gry. Jaka jest optymalna strategia każdego z~graczy? Czy gra jest sprawiedliwa? \startanswer Macierz: \startformula \startmathmatrix[n=2,left={\left(\,},right={\,\right)},align=right] \NC -2 \NC 3 \NR \NC 3 \NC -4 \NR \stopmathmatrix \stopformula Powyższa macierz nie ma strategii dominujÄ cych ani punktów siodÅowych, trzeba wiÄc zastosowaÄ innÄ metodÄ. ZaÅóżmy, że gracz~I wybiera~\math{1} z~prawdopodobieÅstwem~\math{p} i~\math{2} z~prawdopodobieÅstwem~\math{1-p}. Wyznaczymy~\math{p} tak, żeby gracz~I wygrywaÅ przeciÄtnie {\em tyle samo}, obojÄtnie, co zrobi gracz~II. JeÅli gracz~II wybierze~\math{1}, przeciÄtna wygrana~I wynosi \math{-2p+3(1-p)}. JeÅli II wybierze~\math{2}, przeciÄtna wygrana~I wynosi~\math{3p-4(1-p)}. Aby wartoÅci te byÅy równe, musi byÄ \math{p=\frac{7}{12}}. Zatem gracz~I powinien wybraÄ~\math{1} z~prawdopodobieÅstwem \math{\frac{7}{12}}, a~\math{2} z~prawdopodobieÅstwem~\math{\frac{5}{12}}. Jego przeciÄtna wygrana wynosi
[NTG-context] itemize in two columns and pagebreaks
Hello, I encountered a weird problem with \startitemize[columns] Namely, sometimes ConTeXt (MkIV) puts a pagebreak before the itemization. I tried to distill the problem to a minimal example, until now without success, but I'll post a ME if I'm able to reproduce a problem in a small file. Anybody encountered this, too? Are there any solutions/workarounds known? Best, -- Marcin Borkowski http://mbork.pl ___ If your question is of interest to others as well, please add an 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 ___