The "already defined" error comes from the fact that the \newglossaryentry
makes its way into the ToC, which then executes it twice.
You should use the ToC-caption entry when performing such commands within section headings to avoid the duplication:
\section[<toc-entry>]{<heading>}
![enter image description here](https://i.stack.imgur.com/3kOw4.png)
\documentclass{article}
\usepackage{glossaries}% http://ctan.org/pkg/glossaries
\makeglossaries
\begin{document}
\tableofcontents
\section[somename]{\newglossaryentry{1}{name=somename,description={Description.}}\gls{1}}
\printglossaries
\end{document}
I agree with you that exploiting the document structure is a convenient choice for this end: it offers a high degree of configurability and comes with neat extras like list (read: table of contents) building by default. So the following will be a structure based solution, leaving the enumerations based approach to somebody else.
The trick is the ownnumbers key of structure headers.
It allows precise control over the counter mechanism for every head.
Headers that are defined with ownnumbers=yes
take a mandatory first argument by means of which their counter value can be set explicitly.
Counters created by \definecounter
each have their own way key that allows fine-grained control of the reset, or disabling it as required by this question (way=text
).
Once the counters are in place, all that’s left is to suppress placement of the structure title element.
This is done in two parts: First, all headers are defined to be accessed only implicitly.
The user level macros \week
, \activity
and \presentation
are wrappers that at the same time pass the headers their “ownnumbers” and an empty title string.
Second, placement method \activityhead
is defined that chooses the display string from a mapping of labels, ignoring the structure title altogether.
(Coding style is mkiv for consistency as \defineheadplacement
does not support named arguments.)
\unprotect
%% (1) define the base commands. Notice the “ownnumber” key in
%% \base_presentation and \base_activity. This lets us supply an
%% independent numbering scheme.
\definehead [base_week] [chapter]
\definehead [base_activity] [section]
\definehead [base_presentation] [section]
\setuphead [part]
[sectionresetset=default]
\setuphead [base_week]
[number=yes,alternative=activityhead,
sectionsegments=chapter]
\setuphead [base_activity]
[number=yes,alternative=activityhead,
sectionsegments=section,ownnumber=yes,
before={\blank[line]\incrementcounter[activity]},]
\setuphead [base_presentation]
[number=yes,alternative=activityhead,
sectionsegments=section,ownnumber=yes,
before={\blank[line]\incrementcounter[presentation]},]
%% (2) define a placement method for headings that omits the title.
\defineheadplacement[activityhead][vertical]#1#2{%
\labeltext{\currenthead}\hskip\numberheaddistance #1%
}
%% (3) heading text is static so we use labels.
%% The following line is cramped due to an exception in option
%% parsing.
%% Cf. http://archive.contextgarden.net/message/20120611.090327.dd9b1347.en.html
\setuplabeltext[base_week=Week,base_activity=Activity,base_presentation=Presentation]
%% (4a) define counters for use with the “presentation” and “activity”
%% heads.
\definecounter [presentation] [start=0,way=text]
\definecounter [activity] [start=0,way=text]
%% (4b) define a reset trigger for the part structural.
\definestructureresetset [default] [0] [0]
%% (5) define a set of wrappers. These compensate for the fact that you
%% can’t have a simple structure head without the mandatory
%% argument. We start with a plain one.
\define \week{\base_week{}}
%% The “\presentation” and “\activity” macros need special treatment
%% to make it respect the separate counter.
\define \activity{\base_activity {\rawcountervalue[activity]} \empty}
\define\presentation{\base_presentation{\rawcountervalue[presentation]}\empty}
%% (6) side effect: the table of contents needs a placement method on
%% its own in order to conform with the requirements. This step is
%% optional if you don’t care for a toc.
\unexpanded\def\week_list#1#2#3{%
\blank[line]%
{\tfa\word\sc\labeltext{\currentlist}}%
\space#1\hfill#3\par
}
\unexpanded\def\activity_list#1#2#3{%
\hskip\emwidth
\labeltext{\currentlist}%
\space#1\hfill#3\par
}
\setuplist [base_week] [alternative=command,command=\week_list]
\setuplist [base_activity] [alternative=command,command=\activity_list]
\setuplist [base_presentation] [alternative=command,command=\activity_list]
\protect
\starttext
\placelist[base_week, base_activity, base_presentation]\page
\part {My Life ...}
\week
\activity
Dear diary. Today I was pompous and my sister was crazy.
\activity
This is some text.
\activity
This is some text.
\week
\activity
This is some more text.
\presentation
This is some more text.
\activity
This is some more text.
\activity
This is some more text.
\part{... the Exciting Story of a Great Man}
\week
\activity
This is yet some more text.
\presentation
This is yet some more text.
\activity
This is yet some more text.
\stoptext
![example](https://i.imgur.com/zDi9G.png)
Best Answer
You may define a very tiny font just like the standard font commands:
This may be used like
\Large
or\large
. I've used 3pt here, because\tiny
is already 5pt at article without size option. So:Would show same font sizes.
BTW: Maybe package relsize would also be interesting for you:
This allows to set sizes not absolute but relative.