Le 25 juin 07 à 18:50, Mael Hilléreau a écrit :

Le 23 juin 07 à 22:44, Jean-Marc Lasgouttes a écrit :

Mael> I don't think so, to be translatable, the code should be
Mael> something like '\listof {algorithm}{\listalgorithmname}'.

I just double checked that here it outputs
\listof{algorithm}{Liste des Algorithmes}

Just one last word on this ;) I think it would be more convenient to keep the LaTeX convention with a '\listXXXname' command (with XXX being the float name) instead of using directly a translated name. That's because one could want to
customize strings going to the output. As this is already possible for
\tableofcontents, \listoftables and \listoffigures (see below), one would appreciate to find the same logic for algorithms as well as for custom floats.

\renewcommand{\contentsname}{Contents of this document}
\renewcommand{\listfigurename}{Figures}
\renewcommand{\listtablename}{Tables}
...

Locale strings for such commands ("List of Algorithms" for '\listalgorithmname', etc.) could then be defined in the preamble, in the same place as new floats definitions, and LyX could thus translate as currently (but not in the same place), allowing customization. It would need very few programming as some code
is already generated where needed. What do you think of this?

I attached a patch for that. It adds some definitions for '\listXXXname' and '\listofXXXs' in the preamble (with 'XXX' for every non builtin float), and generates a '\listofXXXs' in place of the '\listof{XXX}{<List name>}'.

I'm waiting for your comments.

Mael.

Attachment: listofXXX.patch
Description: Binary data

Reply via email to