Yanrui Li wrote:
2009/12/31 Tad Ashlock
mailto:taashlo@cyberdude.com> The attached sample doesn't meet the original poster's criteria. It produces headings like "1.1 alpha" and "1.1.1 a" instead of the requested "1 alpha" and "1.1 a". Is there any way of achieving this? (Under "Part 1", of course. That's the trick.)
Hi Tad,
The attached sample works ok for me. Can you give me your result which the sample prodeces?
-- Best regards,
Li Yanrui
They are attached as "test.tex" (the test input), "test.pdf" and
"test.log". Notice how the chapter numbers are "x.y" (where 'x' = 'Part
#') instead of just "y" as originally requested. I point this out
because I've tried to get ConTeXt to do structure numbering like this in
the past and have had to postpone it due to lack of time.
Thanks,
Tad
\starttext
\placelist[part,chapter,section,subsection][criterium=all]
\part{first}
\chapter{alpha}
\section{a}
\section{b}
\subsection{x}
\subsection{y}
\chapter{beta}
\part{second}
\chapter{gamma}
\section{a}
\section{b}
\subsection{x}
\subsection{y}
\chapter{delta}
\stoptext
(c:/pub/projects/psicc2/book/test.tex
ConTeXt ver: 2009.12.30 20:27 MKIV fmt: 2009.12.30 int: english/english
system : cont-new loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv))
system : cont-fil loaded
(C:/context/tex/texmf-context/tex/context/base/cont-fil.tex
loading : ConTeXt File Synonyms
)
system : cont-sys.rme loaded
(C:/context/tex/texmf-context/tex/context/user/cont-sys.rme (C:/context/tex/texmf-context/tex/context/base/type-lua.tex) (C:/context/tex/texmf-context/tex/context/base/type-tmf.tex (C:/context/tex/texmf-context/tex/context/base/type-tmf.mkiv)) (C:/context/tex/texmf-context/tex/context/base/type-siz.tex (C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv)) (C:/context/tex/texmf-context/tex/context/base/type-otf.tex (C:/context/tex/texmf-context/tex/context/base/type-otf.mkiv)))
system : test.top loaded
%
% begin of optionfile
%
% % runtime options files (command line driven)
% \unprotect
% % special commands, mostly for the ctx development team
% % feedback and basic job control
% % handy for special styles
% \startluacode
% document = document or { }
% document.arguments={
% ["autopdf"]=true,
% }
% document.files={
% "c:/pub/projects/psicc2/book/test.tex",
% }
% \stopluacode
% % process info
% \setupsystem[inputfile=c:/pub/projects/psicc2/book/test.tex]
% \setupsystem[\c!n=2,\c!m=3]
% % modes
% % options (not that important)
% \startsetups *runtime:options
% \setupoutput[pdftex]
% \stopsetups
% % styles and modules
% \startsetups *runtime:modules
% \stopsetups
% % done
% \protect \endinput
%
% end of optionfile
%
(test.top)
fonts : preloading latin modern fonts
bodyfont : 12pt rm is loaded
language : language en is active
systems : begin file c:/pub/projects/psicc2/book/test.tex at line 1
fonts : resetting map file list
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-empty.map}
fonts : using map file: original-base
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-base.map}
fonts : using map file: original-ams-base
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-ams-base.map}
fonts : using map file: original-ams-euler
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-ams-euler.map}
fonts : using map file: original-public-lm
{C:/context/tex/texmf-context/fonts/map/pdftex/context/original-public-lm.map}
fonts : using map file: lm-math
{C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}
fonts : using map file: lm-rm
{C:/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
!pages : flushing realpage 1, userpage 1, subpage 1
structure : part @ level 1 : 1 -> first
!pages : flushing realpage 2, userpage 2
structure : chapter @ level 2 : 1.1 -> alpha
structure : section @ level 3 : 1.1.1 -> a
structure : section @ level 3 : 1.1.2 -> b
structure : subsection @ level 4 : 1.1.2.1 -> x
structure : subsection @ level 4 : 1.1.2.2 -> y
!pages : flushing realpage 3, userpage 3
structure : chapter @ level 2 : 1.2 -> beta
!pages : flushing realpage 4, userpage 4
structure : part @ level 1 : 2 -> second
!pages : flushing realpage 5, userpage 5
structure : chapter @ level 2 : 2.1 -> gamma
structure : section @ level 3 : 2.1.1 -> a
structure : section @ level 3 : 2.1.2 -> b
structure : subsection @ level 4 : 2.1.2.1 -> x
structure : subsection @ level 4 : 2.1.2.2 -> y
!pages : flushing realpage 6, userpage 6
structure : chapter @ level 2 : 2.2 -> delta
!pages : flushing realpage 7, userpage 7
systems : end file c:/pub/projects/psicc2/book/test.tex at line 21
system : cont-err loaded
(C:/context/tex/texmf-context/tex/context/base/cont-err.tex
systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead
) )