Re: Creating a german index revisited

1999-07-23 Thread Stephan E. Schlierf


Hi Jean-Pierre,

thanks a lot for your very useful hints. I tried it and it works great!

Regards

Stephan




Re: Creating a german index revisited

1999-07-22 Thread Jean-Pierre.Chretien


>> Date: Thu, 22 Jul 1999 10:40:33 +0200 (CEST)
>> From: "Stephan E. Schlierf" <[EMAIL PROTECTED]>
>> To: "Jean-Pierre.Chretien" <[EMAIL PROTECTED]>
>> cc: LyX-Users Mailing-Liste <[EMAIL PROTECTED]>
>> Subject: Re: Creating a german index revisited

[snip]

>> > Useful also if you want to reflect a font style in the index.
>> 
>> Can you give me a hint how I can do this, say, have a word in small
>> capitals in the text and the index entry is also in small capitals ?

Try
Schlierf@\textsc{Schlierf}
in the index entry popup

In the same line
infinity@$\infty$
will put the math symbol at the infinity alpha place (which may not be OK, 
generally symbols are at the beginning - but you will need to order 
them anyway with , aaab, usw)

>> > 
>> > Or perhaps I didn't understand the requirement ?
>> 
>> You understood it very well. The only advantage I see now working with a
>> style.ist is that you can modify the layout of the index a bit.
 
What the .ist allows is to simplify ordering in systematic cases like
umlauts or other diacritics, and to modify the appearance
(have big capitals to separate alphabetical entries e.g.),
but in most situations a particular
structuration is required (you may also construct subtrees in the index with
the ! separator and cross references with the | separator, have a look at
a makeindex doc).

IMHO, that's the reason why there are so few ist files available: the only
one I ever needed was the big capitals one, and the quality of the index
relies mostly on local instructions which are independent of the
index style.

Regards

-- 
Jean-Pierre




Re: Creating a german index revisited

1999-07-22 Thread Stephan E. Schlierf


Hi Jean-Pierre,


On Wed, 21 Jul 1999, Jean-Pierre.Chretien wrote:

> 
> >> Date: Wed, 21 Jul 1999 16:17:19 +0200 (CEST)
> >> From: "Stephan E. Schlierf" <[EMAIL PROTECTED]>
> >> To: LyX-Users Mailing-Liste <[EMAIL PROTECTED]>
> >> Subject: Creating a german index revisited
> >> 
> >> 
> >> Hi there,
> >> 
> >> a few weeks ago I asked whether somebody could help me with a problem that
> >> occured writing a manual.
> >> The Problem was to create a "german" index (that means an index that sorts
> >> german umlauts correctly).
> 
> [snip]
> 
> >> Stephan
> >> 
> >> 
> 
> 
> What about the @ separator:
> afoo@äfoo
> in the index entry popup puts the entry äfoo 
> at the alphabetical location of afoo.
> A bit more lengthy than the style.ist hacking, but allows 8 bits
> input encoding and deals with any complicated tex construct
> (including math...that you must encode in TeX in the popup however).

You are right. I didn't know the @ separator (hm, hours and hours of
fumbling around seem to be senseless now :-).

> Useful also if you want to reflect a font style in the index.

Can you give me a hint how I can do this, say, have a word in small
capitals in the text and the index entry is also in small capitals ?

> 
> Or perhaps I didn't understand the requirement ?

You understood it very well. The only advantage I see now working with a
style.ist is that you can modify the layout of the index a bit. 

> 
> Regards
> 
> -- 
> Jean-Pierre
> 

Regards

Stephan



Re: Creating a german index revisited

1999-07-21 Thread Jean-Pierre.Chretien


>> Date: Wed, 21 Jul 1999 16:17:19 +0200 (CEST)
>> From: "Stephan E. Schlierf" <[EMAIL PROTECTED]>
>> To: LyX-Users Mailing-Liste <[EMAIL PROTECTED]>
>> Subject: Creating a german index revisited
>> 
>> 
>> Hi there,
>> 
>> a few weeks ago I asked whether somebody could help me with a problem that
>> occured writing a manual.
>> The Problem was to create a "german" index (that means an index that sorts
>> german umlauts correctly).

[snip]

>> Stephan
>> 
>> 


What about the @ separator:
afoo@äfoo
in the index entry popup puts the entry äfoo 
at the alphabetical location of afoo.
A bit more lengthy than the style.ist hacking, but allows 8 bits
input encoding and deals with any complicated tex construct
(including math...that you must encode in TeX in the popup however).
Useful also if you want to reflect a font style in the index.

Or perhaps I didn't understand the requirement ?

Regards

-- 
Jean-Pierre



Creating a german index revisited

1999-07-21 Thread Stephan E. Schlierf


Hi there,

a few weeks ago I asked whether somebody could help me with a problem that
occured writing a manual.
The Problem was to create a "german" index (that means an index that sorts
german umlauts correctly).

JMarc gave me a very useful hint ("May the source be with you", :-) and as
he told me I had a look at the source code, especially LaTeX.C

Well the solution I found works as follows:

Patch LaTeX.C (around line 442):

char *lyxenv;

lyxerr.debug("idx file has been made,"
  " running makeindex on file "
  + file, Error::LATEX);

// It should be possible to set the switches for makeindex
// sorting style and such. It would also be very convenient
// to be able to make style files from within LyX. This has
// to come for a later time. (0.13 perhaps?)
LString tmp = "makeindex -c -q ";
lyxenv=getenv("LYX_MAKEINDEX");
if (lyxenv)
{
tmp += LString(lyxenv);
tmp += " ";
}

Export two variables:
 
LXY_MAKEINDEX="-s foo.ist -g"
INDEXSTYLE=/usr/share/texmf/makeindex/

foo.ist is the name of the style file, -s is the option to tell
makeindex to use a style file and -g is the option for German word
ordering.

INDEXSTYLE contains the path where makeindex will find the style 
file (please note: I work with SuSE 6.0 so the paths may vary from
distribution to distribution.

Create a style file in the directory /usr/share/texmf/makeindex. An
example for it (the style file I use) is displayed below:

quote '+'

lethead_prefix   "{\\bfseries "
lethead_suffix   "\\hfil}\\nopagebreak\n"
lethead_flag   1
heading_prefix   "{\\bfseries "
heading_suffix   "\\hrulefill}\\nopagebreak\n"
headings_flag   1


The "quote..." enables you to use the way tex recognizes german
umlauts "A instead of Ä
The "\\hrulefill" creates a line beneath the letter of every new
group of the index.

The only thing now you have to do when writing a document is to make sure
that index entries with a german umlaut as the first character
ä, Ä, ö, Ö, ü, Ü
are written like
"a, "A, "o, "O, "u, "U.

That's it.

Let me thank JMarc for immediate help and Andreas Wegmann for patching
LaTeX.C (and all the other guys who gave a helping hand).

As I mentioned above: "May the source be with you".

cu

Stephan