Am Sonntag, 7. April 2013, 21:12:23 schrieb Wolfgang Engelmann:

I made up a minimal example which shows 

1. both slanted: Anagallis arvensis.  index: Anagallis arvensis

2. slanted/normal: Anagallis arvensis. index: Anagallis arvensis

3. case 2, but index box changed with ctr e: Anagallis arvensisindex:  
Anagallis arvensis

The result (on page 4) is:
Namensverzeichnis
Anagallis arvensis, 2, 3  are upright
Anagallis arvensis, 1      is slanted

although 1 and 3 are \emph in the index box.

just to clarifie what I ment in the following.


by the way, I had forgotten, that the first A in the LyX Menu indicates 
\emph, which helps to see whether a character (eg a space) is \emph. 


Wolfgang

> Am Sonntag, 7. April 2013, 10:35:44 schrieb Jürgen Spitzmüller:
> > Am Sonntag 07 April 2013, 10:27:25 schrieb Wolfgang Engelmann:
> > > I also put a macro in the preamble of the document
> > > %%macro for index nom
> > > \newcommand{\IndexDef}[1]{\textit{#1}}
> > > 
> > > and in the document itself
> > > Kalanchoe|IndexDef
> > > where Kalanchoe is a plant name which should appear in the name
> > > index as italics.
> > > However, the page number appears italic, not the plant name.
> > 
> > Yes, this is what this syntax is supposed to do.
> > 
> > > How should I change the command in the preamble to achieve that?
> > 
> > Normally, it should just work if you select the word and hit Alt+E,
> > i.e. just emphasize it as usual. LyX should then output the following
> > LaTeX code:
> > 
> > \index{Kalanchoe@\emph{Kalanchoe}}
> > 
> > Please post a minimal example file if it doesn't.
> > 
> > Jürgen
> 
> Thanks, Jürgen
> 
> so I made it unnecessarily complicated.
> However, There is one point which gives an error.
> 
> If I create a nom index entry, lets say for
> Acherontia atropos
> I usually connect both words
> {Acherontiaatropos
> create the index entry
> and in the entry I put the space back again.
> However, if the name is already in emph, the entry box becomes emph too
> without being noted. One has to ctr e the box again.
> 
> Anyway, the result in the ind file would look like:
> 
> \begin{theindex}
> 
>   \item \emph{Abraxas miranda}, \hyperpage{94}
>   \item \emph {Acherontia atropos}, \hyperpage{26}
>   \item \emph{Acherontia atropos}, \hyperpage{115}
> (note the space behind \emph {A...)
> and the two Acherontia entrances are not identical, which means, that
> the page backrefs are not put together like
>   \item \emph {Acherontia atropos}, \hyperpage{26}, \hyperpage{115}
> but two Acherontia atropos entrances.
> 
> #####
> So here is my proposal:
> if possible, the creation of the nom index entry should never be emph if
> created after an emph word
> (to avoid the necessity to de-emph it).
> 
> I tried to make a min example, but that does not work, because you need
> different pages. What you could do is put the two
>  \item \emph {Acherontia atropos}, \hyperpage{26}
>   \item \emph{Acherontia atropos}, \hyperpage{115}
> in an existing longer document, add the nom index at the end and check
> the outcome.
> An alternative would be, that the nom index entry box becomes slanted
> itself, so that one can see its state and correct it.
> 
> Wolfgang


-- 
---------------------------------
Wolfgang Engelmann
Schlossgartenstrasse 22
D-72070 Tübingen
Tel 07071 68325

Attachment: AAAX.20.lyx
Description: application/lyx

Reply via email to