[OS X TeX] Entering specially formatted items in the index

Alain Schremmer Schremmer.Alain at gmail.com
Tue Aug 29 12:15:59 EDT 2006


Alex Scorpan wrote:

> Well, you could make your own showidx-like thing, using \marginpar's  
> and such.  Won't be as sophisticated or robust as shoidx, but might  
> just be enough for your needs.  As first draft, I'd try:
>
>     \newcommand\Index[1]{\marginpar{\fbox{#1}}\index{#1}\ignorespaces}

It almost works. In the following

    Some text or the other and there is
    \textbf{darkness}\index{darkness} but then tbehold the
    \textbf{\{\;\}} \Index{\{\;\}} and then there is
    \textbf{light}\index{light} at the end of the tunnel.

the three index entries are properly ordered in the index and in the 
margin. However, \Index{\{\;\}} places two copies of the entry \{\;\} in 
the margin. The first copy is where it should be, that is exactly 
between darkness and light, but there is a second copy, in a box, that 
is right under the first one but a little off to the right.

Unfortunately, I have no idea how to get rid of the second, boxed copy. 
Nor, not that it matters, do I understand why the \index in the 
newcommand does not trigger \showindex! But then there are things I was 
never meant to understand.

> Of course, if you have too many calls to this in a short space, it'll  
> get messy...

I don't undestand why but it doesn't matter since I would use \Index 
only whenever \showindex wouldn't work properly.

Grateful regards
--schremmer

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the MacOSX-TeX mailing list