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.

I’m writing the musuos class and I’m writing the documentation with ltxdoc.cls and doc.sty which seems to work. But the documentation is in German so it’s not very nice to get (environment) in the index instead of (Umgebung).

index output

Is there a package that allows to change such entries?

BTW: Is there a better class/package to write a manual, or even one whose output looks better (like the one of the biblatex documentation)?

share|improve this question
    
Are you using a package such as enumerate or enumitem. If so, you may want to look in the definitions of those packages if there's an index entry named "environment" that you could change suitably. –  Mico Sep 20 '11 at 0:19
    
@Mico: No, the entries are generated by \DescribeEnv from doc.sty. It is pure coincidence that the examples in the picture are list environments … –  Tobi Sep 20 '11 at 0:23
    
A most useful hint! See my answer below. –  Mico Sep 20 '11 at 0:43
add comment

3 Answers

up vote 2 down vote accepted

Check out p. 32 of the file doc.pdf (which you can get by typing texdoc doc on the command line) and lines 429, 431, 439, and 440 in particular. Open the file doc.sty in your favorite text editor, change the two instances of the string (environment) to (Umgebung), and change the strings environments: to Umgebungen:. Finally, to avoid having to redo this work if and when the doc package is updated, you may want to save the file doc.sty to something like tobidoc.sty, store that file in your personal TeX directory, and run texhash if you use TeXlive (or, say, run MikTeX's filename database update routines). Oh, and be sure to load tobidoc instead of doc from now on. Happy TeXing!

share|improve this answer
    
Yes thanks, I’m my wrap this in a new package which adds my own macros for documenting packages. –  Tobi Sep 20 '11 at 0:49
add comment

I found the answer myself :-).
I copied these lines to my preamble and changed the relevant words …

\def\SpecialMainEnvIndex#1{\@bsphack\special@index{%
                                      #1\actualchar
                                      {\string\ttfamily\space#1}
                                         (environment)% <---------------------------- HERE
                                      \encapchar main}%
    \special@index{environments:\levelchar#1\actualchar{% <-------------------------- HERE
                   \string\ttfamily\space#1}\encapchar
           main}\@esphack}
\def\SpecialUsageIndex#1{\@bsphack
   {\let\special@index\index\SpecialIndex@{#1}{\encapchar usage}}%
   \@esphack}
\def\SpecialEnvIndex#1{\@bsphack
    \index{#1\actualchar{\protect\ttfamily#1}
           (environment)\encapchar usage}% <----------------------------------------- HERE
    \index{environments:\levelchar#1\actualchar{\protect\ttfamily#1}\encapchar& <---- HERE
           usage}\@esphack}

But it’s still interessting if there are better ways to do this …

share|improve this answer
1  
If you think you need to change the strings (environment) and environments: more or less permanently, you might just edit the file doc.sty accordingly and save that file under a new name. That way, you won't clutter up the preamble needlessly. –  Mico Sep 20 '11 at 0:47
add comment

Is there a better class/package to write a manual, or even one whose output looks better (like the one of the biblatex documentation)?

The manual of the biblatex documentation class is typeset, using the ltxdockit class and you are right it looks very nice.

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.