7

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
10

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.

3

By far the easiest thing is to number your minor version (retrospectively if necessary) as v0.01... which means that you are OK so long as you don't have 100 minor versions before the next major version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.