Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
A ! why not ! for the change history, it's not problematic. –  Maïeul Sep 25 '12 at 20:52
add comment

2 Answers

up vote 9 down vote accepted

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.

share|improve this answer
    
thank a lot ! it's working github.com/maieul/ledmac/commit/4592be0 –  Maïeul Oct 1 '12 at 12:48
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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