Problems with itemize with several columns
Hi, I try to solve this, but I could not. Can you please help me. I make a math problem sheet. In "Exercici 1.2", I put a itemize with three columns, but the 'c' exercise jumps to second column. I want that a, b, c remains in the first column, d, e, f in the second and g, h, i in the third. I tried \column command but it's worse. I attached the source and generated pdf. My version of context is: context --version mtx-context | ConTeXt Process Management 1.04 mtx-context | mtx-context | main context file: /usr/share/texmf-dist/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2021.03.05 19:11 mtx-context | main context file: /usr/share/texmf-dist/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2021.03.05 19:11 Thanks in advance, Xavier PS: Please CCme
In my previous post [https://mailman.ntg.nl/pipermail/ntg-context/2022/105138.html], I don't know the reason, but the attached code des not display very well in mailing list. I put it here:
\defineenumeration
[exercici]
[alternative=serried, before={\blank[medium]\testpage[1]}, text={Exercici}, stopper={.\space}, width=fit, headstyle=\ss, distance=0.25em, width=fit, headcolor=exercici_color, title=yes, titlestyle=\ss, titledistance=0em, left={\bgroup\bf}, right={\egroup}, after={\blank[big]}, prefix=yes, prefixsegments=section, way=section]
\starttext
\section{Operacions amb fraccions}
\subject{Preguntes}
\startexercici[exercici:operacions-amb-fraccions-1]{suma i resta} Opereu:
\startitemize[a, columns, three]
\item \startformula \frac{2}{7} + \frac{6}{7} - \frac{1}{7} \stopformula
\item \startformula \frac{5}{8} + \frac{9}{8} \stopformula
\item \startformula \frac{1}{4} + 5 - \frac{1}{4} \stopformula
\item \startformula \frac{3}{5} - \frac{2}{5} + \frac{11}{5} \stopformula
\item \startformula \frac{2}{3} + \frac{1}{4} \stopformula
\item \startformula 5 + \frac{4}{5} \stopformula
\item \startformula \frac{2}{3} + \frac{5}{8} - \frac{1}{9} \stopformula
\item \startformula 10 - \frac{1}{6} + \frac{6}{8} \stopformula
\item \startformula \frac{3}{10} + \frac{7}{12} \stopformula
\stopitemize
\stopexercici
\startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i divisió} Opereu:
\startitemize[a, columns, three]
\item \startformula 3 \cdot \frac{5}{3} \stopformula
\item \startformula \frac{3}{4} \cdot \frac{2}{5} \stopformula
\item \startformula \frac{1}{3} \cdot \frac{3}{4} \div \frac{1}{5} \stopformula
%\column
\item \startformula 5 \div \frac{7}{10} \cdot 7 \div \frac{2}{5} \stopformula
\item \startformula \frac{1}{2} \cdot \frac{1}{2} \stopformula
\item \startformula \frac{3}{2} \div \frac{2}{3} \div \frac{5}{4} \stopformula
%\column
\item \startformula \frac{2}{3} \colon \frac{2}{5} \stopformula
\item \startformula \frac{3}{4} \colon \frac{1}{2} \cdot 6 \stopformula
\item \startformula \frac{2}{3} \colon \frac{3}{4} \cdot \frac{1}{2} \stopformula
\stopitemize
\stopexercici
\startexercici[exercici:operacions-amb-fraccions-3]{operacions combinades}
\startitemize[a, columns, three]
\item \startformula \frac{3}{4} + \frac{2}{5} \cdot \frac{1}{2} \stopformula
\item \startformula \frac{2}{5} \div \frac{3}{5} - \frac{1}{4} \stopformula
\item \startformula \left( 2 + \frac{3}{5} \right) \div \frac{4}{3} \stopformula
\item \startformula \frac{2}{3} - \frac{5}{6}\cdot 8 \stopformula
\item \startformula 4 + \frac{3}{5} - \left(2 - \frac{1}{2}\right) \stopformula
\item \startformula 4 \cdot \left(\frac{5}{6} - \frac{1}{4} + \frac{4}{9}\right) \stopformula
\item \startformula \frac{5}{6} - \left(\frac{1}{5} + \frac{1}{3}\right) \stopformula
\item \startformula \frac{5}{6} \div \left( \frac{2}{5} - \frac{1}{10}\right) \stopformula
\item \startformula 4 \cdot \frac{2}{3} \cdot \left(\frac{2}{4} \div \frac{8}{10}\right) \stopformula
\item \startformula \frac{3}{4} + \frac{1}{2} \cdot \frac{4}{10} \stopformula
\item \startformula \frac{10}{12} - \left(\frac{1}{10} + \frac{3}{8}\right) \stopformula
\item \startformula \left(\frac{1}{2} + 2\right) \cdot \left(2 - \frac{1}{4}\right) \stopformula
\item \startformula \left(\frac{3}{4} + \frac{1}{4}\right) \div \left(\frac{5}{6} - \frac{1}{3}\right) \stopformula
\item \startformula 5 + 10 - \frac{1}{10} + 25 \stopformula
\item \startformula \frac{1}{3} + \frac{1}{2} - \frac{2}{5} \stopformula
\item \startformula \left(\frac{1}{2} + \frac{2}{10}\right) \cdot \frac{2}{6} \stopformula
\item \startformula 5 + \frac{1}{3} \cdot \frac{5}{3} \stopformula
\item \startformula \left( 5 + \frac{1}{3} \right) \cdot \frac{5}{3} \stopformula
\stopitemize
\stopexercici
\stoptext
I re-attach the resulting pdf
Thanks,
On Wed, 23 Feb 2022 09:59:58 +0100
"Xavier B."
Hi,
I try to solve this, but I could not. Can you please help me. I make a math problem sheet. In "Exercici 1.2", I put a itemize with three columns, but the 'c' exercise jumps to second column. I want that a, b, c remains in the first column, d, e, f in the second and g, h, i in the third.
I tried \column command but it's worse.
I attached the source and generated pdf.
My version of context is: context --version mtx-context | ConTeXt Process Management 1.04 mtx-context | mtx-context | main context file: /usr/share/texmf-dist/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2021.03.05 19:11 mtx-context | main context file: /usr/share/texmf-dist/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2021.03.05 19:11
Thanks in advance,
Xavier
PS: Please CCme
On 23 Feb 2022, at 11:28, Xavier B. via ntg-context
wrote: In my previous post [https://mailman.ntg.nl/pipermail/ntg-context/2022/105138.html], I don't know the reason, but the attached code des not display very well in mailing list. I put it here:
\defineenumeration [exercici] [alternative=serried, before={\blank[medium]\testpage[1]}, text={Exercici}, stopper={.\space}, width=fit, headstyle=\ss, distance=0.25em, width=fit, headcolor=exercici_color, title=yes, titlestyle=\ss, titledistance=0em, left={\bgroup\bf}, right={\egroup}, after={\blank[big]}, prefix=yes, prefixsegments=section, way=section] [snip]
Removing "alternative=serried" gives a more grid like layout and (possibly coincidentally) the problem of the 'c' and 'h' labels being orphaned at the bottom of the page goes away. However the Exercici 1.3 heading is now too close to the end of the previous set. Perhaps changing your "before=" setting might improve things. This is on version 2022.01.10 08:36 — Bruce Horrocks Hampshire, UK
On Wed, 23 Feb 2022 17:52:08 +0000
Bruce Horrocks
On 23 Feb 2022, at 11:28, Xavier B. via ntg-context
wrote: In my previous post [https://mailman.ntg.nl/pipermail/ntg-context/2022/105138.html], I don't know the reason, but the attached code des not display very well in mailing list. I put it here:
\defineenumeration [exercici] [alternative=serried, before={\blank[medium]\testpage[1]}, text={Exercici}, stopper={.\space}, width=fit, headstyle=\ss, distance=0.25em, width=fit, headcolor=exercici_color, title=yes, titlestyle=\ss, titledistance=0em, left={\bgroup\bf}, right={\egroup}, after={\blank[big]}, prefix=yes, prefixsegments=section, way=section] [snip]
Removing "alternative=serried" gives a more grid like layout and (possibly coincidentally) the problem of the 'c' and 'h' labels being orphaned at the bottom of the page goes away.
However the Exercici 1.3 heading is now too close to the end of the previous set. Perhaps changing your "before=" setting might improve things.
This is on version 2022.01.10 08:36 — Bruce Horrocks Hampshire, UK
Thanks, Bruce, but removing alternative=serried is not an option. I don't understand that 'e' fits the space and 'c' doesn't. @Luis: joinedup does not produce changes In conclusion, I have the same problem ;-)
Could you define this in the preamble %\unprotect \defineitemgroup [Ex] \setupitemgroup [Ex] [each] [before={\blank[medium]\testpage[1]},after={\blank[big]},option={a, columns,three,fit}] %\protect \startexercici[exercici:operacions-amb-fraccions-1]{suma i resta} Opereu: \startEx %\startitemize[a, columns, three] ... \stopEx \stopexercici Good luck, L. Montgomery El mié., 23 de febrero de 2022 15:04, Xavier B. via ntg-context < ntg-context@ntg.nl> escribió:
On Wed, 23 Feb 2022 17:52:08 +0000 Bruce Horrocks
ha escrit: On 23 Feb 2022, at 11:28, Xavier B. via ntg-context <
In my previous post [
https://mailman.ntg.nl/pipermail/ntg-context/2022/105138.html], I don't know the reason, but the attached code des not display very well in mailing
\defineenumeration [exercici] [alternative=serried, before={\blank[medium]\testpage[1]},
text={Exercici}, stopper={.\space}, width=fit, headstyle=\ss, distance=0.25em, width=fit, headcolor=exercici_color, title=yes,
[snip]
Removing "alternative=serried" gives a more grid like layout and (possibly coincidentally) the problem of the 'c' and 'h' labels being orphaned at the bottom of the page goes away.
However the Exercici 1.3 heading is now too close to the end of the
ntg-context@ntg.nl> wrote: list. I put it here: titlestyle=\ss, titledistance=0em, left={\bgroup\bf}, right={\egroup}, after={\blank[big]}, prefix=yes, prefixsegments=section, way=section] previous set. Perhaps changing your "before=" setting might improve things.
This is on version 2022.01.10 08:36 — Bruce Horrocks Hampshire, UK
Thanks, Bruce, but removing alternative=serried is not an option.
I don't understand that 'e' fits the space and 'c' doesn't.
@Luis: joinedup does not produce changes
In conclusion, I have the same problem ;-)
___________________________________________________________________________________ If your question is of interest to others as well, please add an 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
___________________________________________________________________________________
Even if I change \startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i divisió} Opereu: \startitemize[a, columns, three] for \startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i divisió} Opereu: \startitemize[a, columns] the 'c' jumps. Isn't ConTeXt capable of handle that?
Avoid using \startformula \stopformula in itemize. Use \dfrac to get
display style fraction.
\defineenumeration
[exercici]
[alternative=serried, before={\blank[medium]\testpage[1]},
text={Exercici}, stopper={.\space}, width=fit, headstyle=\ss,
distance=0.25em, width=fit, headcolor=exercici_color, title=yes,
titlestyle=\ss, titledistance=0em, left={\bgroup\bf}, right={\egroup},
after={\blank[big]}, prefix=yes, prefixsegments=section, way=section]
\starttext
\section{Operacions amb fraccions}
\subject{Preguntes}
\startexercici[exercici:operacions-amb-fraccions-1]{suma i resta} Opereu:
\startitemize[a, columns, three]
\item\m{\dfrac{2}{7} + \dfrac{6}{7} - \dfrac{1}{7}}
\item\m{\dfrac{5}{8} + \dfrac{9}{8}}
\item\m{\dfrac{1}{4} + 5 - \dfrac{1}{4}}
\item\m{\dfrac{3}{5} - \dfrac{2}{5} + \dfrac{11}{5}}
\item\m{\dfrac{2}{3} + \dfrac{1}{4}}
\item\m{5 + \dfrac{4}{5}}
\item\m{\dfrac{2}{3} + \dfrac{5}{8} - \dfrac{1}{9}}
\item\m{10 - \dfrac{1}{6} + \dfrac{6}{8}}
\item\m{\dfrac{3}{10} + \dfrac{7}{12}}
\stopitemize
\stopexercici
\startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i
divisió} Opereu:
\startitemize[a, columns, three]
\item\m{3 \cdot \dfrac{5}{3}}
\item\m{\dfrac{3}{4} \cdot \dfrac{2}{5}}
\item\m{\dfrac{1}{3} \cdot \dfrac{3}{4} \div \dfrac{1}{5}}
%\column
\item\m{5 \div \dfrac{7}{10} \cdot 7 \div \dfrac{2}{5}}
\item\m{\dfrac{1}{2} \cdot \dfrac{1}{2}}
\item\m{\dfrac{3}{2} \div \dfrac{2}{3} \div \dfrac{5}{4}}
%\column
\item\m{\dfrac{2}{3} \colon \dfrac{2}{5}}
\item\m{\dfrac{3}{4} \colon \dfrac{1}{2} \cdot 6}
\item\m{\dfrac{2}{3} \colon \dfrac{3}{4} \cdot \dfrac{1}{2}}
\stopitemize
\stopexercici
\startexercici[exercici:operacions-amb-fraccions-3]{operacions combinades}
\startitemize[a, columns, three]
\item\m{\dfrac{3}{4} + \dfrac{2}{5} \cdot \dfrac{1}{2}}
\item\m{\dfrac{2}{5} \div \dfrac{3}{5} - \dfrac{1}{4}}
\item\m{\left( 2 + \dfrac{3}{5} \right) \div \dfrac{4}{3}}
\item\m{\dfrac{2}{3} - \dfrac{5}{6}\cdot 8}
\item\m{4 + \dfrac{3}{5} - \left(2 - \dfrac{1}{2}\right)}
\item\m{4 \cdot \left(\dfrac{5}{6} - \dfrac{1}{4} + \dfrac{4}{9}\right)}
\item\m{\dfrac{5}{6} - \left(\dfrac{1}{5} + \dfrac{1}{3}\right)}
\item\m{\dfrac{5}{6} \div \left( \dfrac{2}{5} - \dfrac{1}{10}\right)}
\item\m{4 \cdot \dfrac{2}{3} \cdot \left(\dfrac{2}{4} \div
\dfrac{8}{10}\right)}
\item\m{\dfrac{3}{4} + \dfrac{1}{2} \cdot \dfrac{4}{10}}
\item\m{\dfrac{10}{12} - \left(\dfrac{1}{10} + \dfrac{3}{8}\right)}
\item\m{\left(\dfrac{1}{2} + 2\right) \cdot \left(2 - \dfrac{1}{4}\right)}
\item\m{\left(\dfrac{3}{4} + \dfrac{1}{4}\right) \div \left(\dfrac{5}{6} -
\dfrac{1}{3}\right)}
\item\m{5 + 10 - \dfrac{1}{10} + 25}
\item\m{\dfrac{1}{3} + \dfrac{1}{2} - \dfrac{2}{5}}
\item\m{\left(\dfrac{1}{2} + \dfrac{2}{10}\right) \cdot \dfrac{2}{6}}
\item\m{5 + \dfrac{1}{3} \cdot \dfrac{5}{3}}
\item\m{\left( 5 + \dfrac{1}{3} \right) \cdot \dfrac{5}{3}}
\stopitemize
\stopexercici
\stoptext
Xavier B. via ntg-context
Even if I change \startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i divisió} Opereu: \startitemize[a, columns, three]
for
\startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i divisió} Opereu: \startitemize[a, columns]
the 'c' jumps.
Isn't ConTeXt capable of handle that?
___________________________________________________________________________________ If your question is of interest to others as well, please add an 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
___________________________________________________________________________________
On 24 Feb 2022, at 22:10, Xavier B. via ntg-context
wrote: Even if I change \startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i divisió} Opereu: \startitemize[a, columns, three]
for
\startexercici[exercici:operacions-amb-fraccions-2]{multiplicació i divisió} Opereu: \startitemize[a, columns]
the 'c' jumps.
Isn't ConTeXt capable of handle that?
Please see the attached PDF which is your sample with the command \showmakeup[vbox] added after \starttext The green line shows how much space is needed to fully print item (b). Item (c) will need the same amount of space, shown by the red line. However, this would take you into the footer area (shown by the blue arrows), so item (c) is split: the item label fits into the space at the bottom of the column and so is printed there; the fraction doesn't fit and so is moved to the next column. We can confirm this theory by setting the footer to nothing with the command \setuplayout[footer=0mm] and then the columns are as you wish. However that only works for this example and the situation would inevitably arise again. The solution to your problem would be some way of forcing the item body to stay with the label. I don't know what that command is - hopefully someone here can tell us. — Bruce Horrocks Hampshire, UK
Try joinedup option in \startitemize. Space problem? L. Montgomery El mié., 23 de febrero de 2022 3:09, Xavier B. via ntg-context < ntg-context@ntg.nl> escribió:
Hi,
I try to solve this, but I could not. Can you please help me. I make a math problem sheet. In "Exercici 1.2", I put a itemize with three columns, but the 'c' exercise jumps to second column. I want that a, b, c remains in the first column, d, e, f in the second and g, h, i in the third.
I tried \column command but it's worse.
I attached the source and generated pdf.
My version of context is: context --version mtx-context | ConTeXt Process Management 1.04 mtx-context | mtx-context | main context file: /usr/share/texmf-dist/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2021.03.05 19:11 mtx-context | main context file: /usr/share/texmf-dist/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2021.03.05 19:11
Thanks in advance,
Xavier
PS: Please CCme
___________________________________________________________________________________ If your question is of interest to others as well, please add an 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
___________________________________________________________________________________
participants (4)
-
Bruce Horrocks
-
fv leung
-
Luis Montgomery
-
Xavier B.