[NTG-context] Documentation of change / Evolving documents

Axel Kielhorn tex at axelkielhorn.de
Sat Jan 19 09:06:37 CET 2019

Hi,

I often have documents that are not finished but need to change over time.
A client changes their mind, laws are changed, …

While working with the document, I want to see the changes.
When the document is finally finished, I only want to see the change history.

I came up with the following.
When the mode is „change“  the date (or version) is shown in the margin and the change is printed in red.
Without mode „change“ only the change history is printed.

What I want now is to change the layout of the register.
Adding some vspace around the date and printing the date in bold.
Is there a way to achieve this or am I on the wrong way?
(Should the date be the indicator, thus giving me the layout I want?)

\enablemode[change]

\setuppapersize [A4][A4]
\setuplayout    [width=middle,  backspace=1.5in, cutspace=1.5in,
height=middle, topspace=0.75in, bottomspace=0.75in]

\setupbodyfont[11pt]

\defineregister [change]
\setupregister  [change] [
indicator=no          %% no letter
textstyle=slanted,    %% entries
pagestyle=bolditalic, %% page refs
n=1,          %% columns
]

\def\ChangeV#1#2{\change{#1+#2}\doifmode{change}{\inmargin{\tx #1}{\red #2\par}}}
\def\ChangeD#1#2{\change{#1+#2}\doifmode{change}{\inmargin{\tx #1}{\red #2\par}}}

\starttext

\ChangeV{V. 1.0}{Fertig!}
\input knuth

\ChangeD{2018-12-22}{Fertig!}

\ChangeD{2018-12-23}{Letzter Fehler beseitigt.}
\input knuth

\ChangeD{2018-12-23}{Allerletzter Fehler beseitigt.}

Ende

\startsection[title={History}]

\placechange

\stopsection

\stoptext