ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Axel Kielhorn <tex@axelkielhorn.de>
To: "ntg-context@ntg.nl" <ntg-context@ntg.nl>
Subject: Re: Documentation of change / Evolving documents
Date: Sun, 29 Sep 2019 08:59:38 +0200	[thread overview]
Message-ID: <588C9B26-325C-4A5E-BFFF-2B8B1E6A7DC1@axelkielhorn.de> (raw)
In-Reply-To: <A4BFE9FB-6901-4A20-B540-4D0A04A2959E@axelkielhorn.de>

[-- Attachment #1: Type: text/plain, Size: 982 bytes --]


> Am 19.01.2019 um 09:06 schrieb Axel Kielhorn <tex@axelkielhorn.de>:

Earlier this year I wrote a first attempt to document evolving documents.
In the meantime this document has evolved and I included the current version here.

There is only one thing I don’t like:

Currently I write:

\ChangeA{V. 2.0}{Mit den Befehlen \type{\Changea}, \type{\Changer} und \type{\Changec} werden hinzugefügte, gelöschte oder geänderte Satzteile gekennzeichnet. Der Befehl \type{\Changec} hat zwei Argumente: alter Text und neuer Text.}

But I would prefer to write

\startChangeA{V. 2.0}
Mit den Befehlen \type{\Changea}, \type{\Changer} und \type{\Changec} werden hinzugefügte, gelöschte oder geänderte Satzteile gekennzeichnet. Der Befehl \type{\Changec} hat zwei Argumente: alter Text und neuer Text.
\stopChangeA

Or maybe:
\startChangeA[version={V. 2.0}]

Once this is fixed I’d like to translate it to english and put it into the Wiki.

Greetings
Axel


[-- Attachment #2: context_change.tex --]
[-- Type: application/octet-stream, Size: 2823 bytes --]

% !TEX TS-program = ConTeXt (LuaTeX 1.0.9)
% !TEX encoding = UTF-8 Unicode

% Copyright 2018 - 2019 Axel Kielhorn
% Lizenz: CC-BY-SA 4.0 Unported http://creativecommons.org/licenses/by-sa/4.0/deed.de

\enablemode[change]
\setuphyphenation[method=expanded]

\language[de]
\mainlanguage[de]
\setbreakpoints[compound]

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

\setupbodyfont[11pt]

% Register für Version

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

% Register für Datum

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

\def\ChangeV#1#2{\changev{#1+#2}\doifmode{change}{\inmargin{\tx #1}{\blue #2\par}}}
\def\ChangeD#1#2{\changed{#1+#2}\doifmode{change}{\inmargin{\tx #1}{\blue #2\par}}}

% Paragraph added
\def\ChangeA#1#2{\doifmode{change}{\inmargin{\tx #1}\startsidebar[rulecolor=darkgreen]}#2\doifmode{change}{\stopsidebar}}
% Paragraph removed
\def\ChangeR#1#2{\doifmode{change}{\inmargin{\tx #1}\startsidebar[rulecolor=red]#2\stopsidebar}}

\def\Changer#1{{\doifmode{change}{\red #1}}}
\def\Changea#1{{\doifmode{change}{\darkgreen}#1}}
\def\Changec#1#2{{\doifmode{change}{\red #1\darkgreen}#2}}

\starttext

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

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

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

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

In diesem Satz war ein \Changec{Fähler}{Fehler}.

\ChangeV{V. 2.0}{Farben geändert}
\ChangeA{V. 2.0}{Die Änderungskommentare werden jetzt in {\blue blau} ausgegeben, da {\red rot} für gelöschte Texte und {\darkgreen grün} für hinzugefügte Texte verwendet wird.}

\ChangeV{V. 2.0}{Neue Befehle \type{ChangeA}, \type{ChangeR}, \type{Changea}, \type{Changer} und \type{Changec}}
\ChangeA{V. 2.0}{Mit den Befehlen \type{\ChangeA} und \type{\ChangeR} werden hinzugefügte bzw. gelöschte Absätze gekennzeichnet.}

\ChangeA{V. 2.0}{Mit den Befehlen \type{\Changea}, \type{\Changer} und \type{\Changec} werden hinzugefügte, gelöschte oder geänderte Satzteile gekennzeichnet. Der Befehl \type{\Changec} hat zwei Argumente: alter Text und neuer Text.}

Ende

\startsection[title={History}]

Nach Versionsnummer:

\placechangev

\blank[big]
Nach Datum:

\placechanged

\stopsection

\stoptext

[-- Attachment #3: Type: text/plain, Size: 3 bytes --]





[-- Attachment #4: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2019-09-29  6:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-19  8:06 Axel Kielhorn
2019-09-29  6:59 ` Axel Kielhorn [this message]
2019-09-29  8:36   ` Henning Hraban Ramm
2019-09-29  8:50     ` Wolfgang Schuster
2019-09-29 12:34       ` Axel Kielhorn
2019-10-11  8:18         ` Axel Kielhorn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=588C9B26-325C-4A5E-BFFF-2B8B1E6A7DC1@axelkielhorn.de \
    --to=tex@axelkielhorn.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).