[NTG-context] itemize in two columns and pagebreaks

2012-06-29 Thread 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?

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

2012-06-29 Thread Marcin Borkowski
Dnia 2012-06-29, o godz. 23:30:13
Marcin Borkowski mb...@wmi.amu.edu.pl 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 

[NTG-context] List without bullets

2012-06-29 Thread Gilbert Houtekamer
Hi,

I am would like to make \startitemize list with \head that 
has no bullets, e.g.

Topic 

  My text for topic

Another Topic

  Text for another topic.

With \startitemize and \head I get bullets before Topic 
and Another Topic, how can get rid of these?

Thanks!

Gilbert Houtekamer








___
If your question is of interest to others as well, please add an 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

2012-06-29 Thread Otared Kavian
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 mb...@wmi.amu.edu.pl 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
 itemize-columns-test.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] List without bullets

2012-06-29 Thread Otared Kavian
Hi,

You can customize the symbol appearing in your items, and set it to nothing…

  \definesymbol[NoSymbol][{}]
  \definesymbol[MySymbol][{$\heartsuit$}]

\starttext

  \startitemize[Nosymbol]
  \item foo
  \item bar
  \item baz
  \stopitemize

  \startitemize[MySymbol,packed]
  \item foo
  \item bar
  \item baz
  \stopitemize

\stoptext

Best regards: OK

On 30 juin 2012, at 00:49, Gilbert Houtekamer wrote:

 Hi,
 
 I am would like to make \startitemize list with \head that 
 has no bullets, e.g.
 
 Topic 
 
  My text for topic
 
 Another Topic
 
  Text for another topic.
 
 With \startitemize and \head I get bullets before Topic 
 and Another Topic, how can get rid of these?
 
 Thanks!
 
 Gilbert Houtekamer
 
 
 
 
 
 
 
 
 ___
 If your question is of interest to others as well, please add an 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

2012-06-29 Thread Marcin Borkowski
Dnia 2012-06-30, o godz. 05:05:31
Otared Kavian ota...@gmail.com 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

2012-06-29 Thread Otared Kavian
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 ota...@gmail.com 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
___