# dtx file and history

The \changes command of DTX file is used to record changes.

The \PrintChanges command print the list of change, sorted by number ... except when a number is greater than 10.

To see the problem, I invite you to read the change in the documentation of the eledmac package. You can see:

• v0.1
• v0.10
• v0.11
• ...
• v0.18
• v0.2

Or the version 0.2 should be after v0.1.

I tried some technics with the @ (like in index), but I could'nt solve this problem.

-
A ! why not ! for the change history, it's not problematic. –  Maïeul Sep 25 '12 at 20:52

Makeindex also supports sort keys. Entries of \changes or sorted with the style file gglo.ist. There the actual char is =:

\changes{v0.1=v0.001}...
\changes{v0.2=v0.001}...
...
\changes{v0.10=v0.010}...
\changes{v0.123=v0.123}...


This can also be automated, if \changes is redefined in the driver file:

\makeatletter
\@ifdefinable{\org@changes@}{%
\let\org@changes@\changes@
\@ifdefinable{\my@changes}{%
\def\my@changes v#1.#2\@nil{%
\org@changes@{v#1.\six@digits{#2}=v#1.#2}%
}%
\newcommand*{\six@digits}[1]{%
\ifnum#1<100000 0\fi
\ifnum#1<10000 0\fi
\ifnum#1<1000 0\fi
\ifnum#1<100 0\fi
\two@digits{#1}%
}%
\renewcommand*{\changes@}[1]{%
\my@changes#1\@nil
}%
}%
}
\makeatother


Then you can continue with

\changes{v0.1}...
\changes{v0.2}...
\changes{v0.10}...
\changes{v0.123}...


For other numbering scheme \my@changes needs to be adopted.

-
thank a lot ! it's working github.com/maieul/ledmac/commit/4592be0 –  Maïeul Oct 1 '12 at 12:48