Section, number as a prefix of itemize list
Hello all, can somehow insert the chapter (section, subsection, ...) number as a prefix of itemize list? Thanx Jaroslav Example show exactly what I mean: \section{First section} \startitemize \item aaa \item bbb \item ccc \stopitemize \section{Second section} \startitemize \item ddd \item eee \item fff \stopitemize \section{Third section} \startitemize \item ggg \item hhh \item iii \stopitemize Requested result: 1. First section 1.1 aaa .......... (prefixsectionnumber.itemnumber) 1.2 bbb 1.3 ccc 2. Second section 2.1 ddd 2.2 eee 2.3 fff 3. Third section 3.1 ggg 3.2 hhh 3.3 iii
Am 25.03.2012 um 10:36 schrieb Jaroslav Hajtmar:
Hello all, can somehow insert the chapter (section, subsection, ...) number as a prefix of itemize list?
Thanx Jaroslav
Example show exactly what I mean:
\section{First section}
\startitemize \item aaa \item bbb \item ccc \stopitemize
\section{Second section}
\startitemize \item ddd \item eee \item fff \stopitemize
\section{Third section}
\startitemize \item ggg \item hhh \item iii \stopitemize
Requested result:
1. First section
1.1 aaa .......... (prefixsectionnumber.itemnumber) 1.2 bbb 1.3 ccc
2. Second section
2.1 ddd 2.2 eee 2.3 fff
3. Third section
3.1 ggg 3.2 hhh 3.3 iii
Don’t you have something challenging? \setupitemize[each][n,broad][prefix=yes] \starttext \section{First section} \startitemize \item aaa \item bbb \item ccc \stopitemize \section{Second section} \startitemize \item ddd \item eee \item fff \stopitemize \section{Third section} \startitemize \item ggg \item hhh \item iii \stopitemize \stoptext Wolfgang
Thanx Wolfgang. How easy! Can I also put subsection (subsubsection) number to the prefix too? It is possible eventually set the depth level? For example: \setupitemize[each][n,broad][prefix=yes, depthlevel=3] Thanx Jaroslav Hajtmar Example shows how occurence of the subsections reflects numbering of items. \starttext \setupitemize[each][n,broad][prefix=yes] \section{First section} \startitemize[n][stopper=)] \item aaa \item bbb \item ccc \stopitemize \subsection{First subsection} \startitemize[n][stopper=)] \item aaa \item bbb \item ccc \stopitemize \section{Second section} \startitemize[A][stopper=)] \item ddd \item eee \item fff \stopitemize \subsection{Second subsection} \startitemize[A][stopper=)] \item ddd \item eee \item fff \stopitemize \stoptext Dne 25.3.2012 10:45, Wolfgang Schuster napsal(a):
Am 25.03.2012 um 10:36 schrieb Jaroslav Hajtmar:
Hello all, can somehow insert the chapter (section, subsection, ...) number as a prefix of itemize list?
Thanx Jaroslav
Example show exactly what I mean:
\section{First section}
\startitemize \item aaa \item bbb \item ccc \stopitemize
\section{Second section}
\startitemize \item ddd \item eee \item fff \stopitemize
\section{Third section}
\startitemize \item ggg \item hhh \item iii \stopitemize
Requested result:
1. First section
1.1 aaa .......... (prefixsectionnumber.itemnumber) 1.2 bbb 1.3 ccc
2. Second section
2.1 ddd 2.2 eee 2.3 fff
3. Third section
3.1 ggg 3.2 hhh 3.3 iii
Don’t you have something challenging?
\setupitemize[each][n,broad][prefix=yes]
\starttext
\section{First section}
\startitemize \item aaa \item bbb \item ccc \stopitemize
\section{Second section}
\startitemize \item ddd \item eee \item fff \stopitemize
\section{Third section}
\startitemize \item ggg \item hhh \item iii \stopitemize
\stoptext
Wolfgang
Am 25.03.2012 um 11:36 schrieb Jaroslav Hajtmar:
Thanx Wolfgang. How easy! Can I also put subsection (subsubsection) number to the prefix too? It is possible eventually set the depth level?
For example: \setupitemize[each][n,broad][prefix=yes, depthlevel=3]
You can change the section levels with the “prefixsegments” key but first you have to enable prefixes for all levels (default is to show only the chapter prefix). \setupitemize[each][3*broad][prefix=yes,prefixset=all] %\setupitemize[each][width=3em,prefix=yes,prefixset=all] Wolfgang
Excellent. If works now fine! Thanx very much Wolfgang.. Jaroslav Dne 25.3.2012 12:02, Wolfgang Schuster napsal(a):
Am 25.03.2012 um 11:36 schrieb Jaroslav Hajtmar:
Thanx Wolfgang. How easy! Can I also put subsection (subsubsection) number to the prefix too? It is possible eventually set the depth level?
For example: \setupitemize[each][n,broad][prefix=yes, depthlevel=3]
You can change the section levels with the “prefixsegments” key but first you have to enable prefixes for all levels (default is to show only the chapter prefix).
\setupitemize[each][3*broad][prefix=yes,prefixset=all] %\setupitemize[each][width=3em,prefix=yes,prefixset=all]
Wolfgang
Hello Wolfgang. Once again I return to this topic. I send an example thatbehaves strangely. It's a bad set of values, or error ConTeXt? Thanx Jaroslav \starttext \setupitemize[each][width=3em,prefix=yes,prefixset=all] \section{Section} \subsection{Subsection} \startitemize[n] \item A \item B \startitemize[n] \item a \item b \stopitemize \item C \startitemize[n] \item 1 \item 2 \stopitemize \item D \stopitemize \stoptext Dne 25.3.2012 12:17, Jaroslav Hajtmar napsal(a):
Excellent. If works now fine!
Thanx very much Wolfgang..
Jaroslav
Dne 25.3.2012 12:02, Wolfgang Schuster napsal(a):
Am 25.03.2012 um 11:36 schrieb Jaroslav Hajtmar:
Thanx Wolfgang. How easy! Can I also put subsection (subsubsection) number to the prefix too? It is possible eventually set the depth level?
For example: \setupitemize[each][n,broad][prefix=yes, depthlevel=3]
You can change the section levels with the “prefixsegments” key but first you have to enable prefixes for all levels (default is to show only the chapter prefix).
\setupitemize[each][3*broad][prefix=yes,prefixset=all] %\setupitemize[each][width=3em,prefix=yes,prefixset=all]
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
___________________________________________________________________________________
Am 25.03.2012 um 16:05 schrieb Jaroslav Hajtmar:
Hello Wolfgang. Once again I return to this topic. I send an example thatbehaves strangely. It's a bad set of values, or error ConTeXt?
The output is correct because the prefix is only added in front of the normal number. I guess you want in the subitem also the number of the previous level, this can be achieved by the repeat keyword. \startitemize[n,repeat] \item 1 \startitemize[n] \item 1.1 \item 1.2 \stopitemize … \stopitemize Wolfgang
participants (2)
-
Jaroslav Hajtmar
-
Wolfgang Schuster