horizontal list turns into vertical list in framedtext. A bug or feature?
I am just wondering if this is a bug or feature or some lack of understanding on my part. The horizontal list turns into a vertical list inside a framedtext environment. The same happens in a background environment. \starttext \startframedtext[width=\textwidth] \startitemize[5, columns, four] \item Excellent student \item Good student \item Mediocre student \item Poor student \stopitemize \stopframedtext \stoptext -Hamid
2007/6/21, Hamid Kamrani
I am just wondering if this is a bug or feature or some lack of understanding on my part. The horizontal list turns into a vertical list inside a framedtext environment. The same happens in a background environment.
\starttext \startframedtext[width=\textwidth] \startitemize[5, columns, four] \item Excellent student \item Good student \item Mediocre student \item Poor student \stopitemize \stopframedtext \stoptext
-Hamid
Hi Hamid, this can not work because itemize use for the column option the normal column environment. I wrote a example that shows the problem and gives also a solution. \starttext \vbox{\hsize=\textwidth \startsimplecolumns \input knuth \stopsimplecolumns} \blank \vbox{\hsize=\textwidth \startcolumns \input knuth \stopcolumns} \stoptext The second column environment use the output routine to split the content and is only activated at outer level. A solution would be to include a test inside itemgroup whether we use itemize at outer level or inside a box. Wolfgang
2007/6/22, Wolfgang Schuster
2007/6/21, Hamid Kamrani
: I am just wondering if this is a bug or feature or some lack of understanding on my part. The horizontal list turns into a vertical list inside a framedtext environment. The same happens in a background environment.
[explanation and example deleted] I attached a patched version of the itemgroup macros and it works for me. Wolfgang
Hi Wolfgang,
Thanks for your explanation and patch. I appreciate it.
However, with the patch, now I have the problem of correct indentation.
As this example shows:
\input core-itm-patch
\starttext
Consider\par
\startframedtext[width=\textwidth]
\startitemize[n][style=bold]
\item As a college student, how do you rate yourself?
\startitemize[5, columns, two]
\item Excellent student \item Good student \item Mediocre student
\item Poor student
\stopitemize
\stopitemize
\stopframedtext
versus\par
\startitemize[n][style=bold]
\item As a college student, how do you rate yourself?
\startitemize[5, columns, two]
\item Excellent student \item Good student \item Mediocre student
\item Poor student
\stopitemize
\stopitemize
\stoptext
Thanks,
-Hamid
On 6/22/07, Wolfgang Schuster
2007/6/21, Hamid Kamrani
: I am just wondering if this is a bug or feature or some lack of understanding on my part. The horizontal list turns into a vertical list inside a framedtext environment. The same happens in a background environment.
\starttext \startframedtext[width=\textwidth] \startitemize[5, columns, four] \item Excellent student \item Good student \item Mediocre student \item Poor student \stopitemize \stopframedtext \stoptext
-Hamid
Hi Hamid,
this can not work because itemize use for the column option the normal column environment. I wrote a example that shows the problem and gives also a solution.
\starttext
\vbox{\hsize=\textwidth \startsimplecolumns \input knuth \stopsimplecolumns}
\blank
\vbox{\hsize=\textwidth \startcolumns \input knuth \stopcolumns}
\stoptext
The second column environment use the output routine to split the content and is only activated at outer level.
A solution would be to include a test inside itemgroup whether we use itemize at outer level or inside a box.
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 ___________________________________________________________________________________
Hamid Kamrani wrote:
Hi Wolfgang,
Thanks for your explanation and patch. I appreciate it. However, with the patch, now I have the problem of correct indentation. As this example shows:
\input core-itm-patch
\starttext \usemodule[streams] \definestreamlayer[whatever][width=12cm] \startstreamlayer[whatever] \startitemize[columns,two][after=] \item one \item two \item three \item four \stopitemize \stopstreamlayer \framed[strut=no,align=normal]{\placestreamlayer[whatever]\obeydepth} \starttextstreamlayer[whatever] \startitemize[columns,two] \item one \item two \item three \item four \stopitemize \stoptextstreamlayer \framed[strut=no]{\placetextstreamlayer[whatever]} \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 -----------------------------------------------------------------
Thank you, Hans, for directing me to use streams. Not only it takes
care of this problem it also shows me how to do some other stuff that
I had struggled with.
-Hamid
On 6/24/07, Hans Hagen
Hamid Kamrani wrote:
Hi Wolfgang,
Thanks for your explanation and patch. I appreciate it. However, with the patch, now I have the problem of correct indentation. As this example shows:
\input core-itm-patch
\starttext
\usemodule[streams]
\definestreamlayer[whatever][width=12cm]
\startstreamlayer[whatever] \startitemize[columns,two][after=] \item one \item two \item three \item four \stopitemize \stopstreamlayer
\framed[strut=no,align=normal]{\placestreamlayer[whatever]\obeydepth}
\starttextstreamlayer[whatever] \startitemize[columns,two] \item one \item two \item three \item four \stopitemize \stoptextstreamlayer
\framed[strut=no]{\placetextstreamlayer[whatever]}
\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 ___________________________________________________________________________________
Hamid Kamrani wrote:
Thank you, Hans, for directing me to use streams. Not only it takes care of this problem it also shows me how to do some other stuff that I had struggled with.
keep in mind that this otr trickery is indeed trickery; in luatex we can do real neat things 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 -----------------------------------------------------------------
participants (3)
-
Hamid Kamrani
-
Hans Hagen
-
Wolfgang Schuster