[Xy-pic] xymatrix in index
Ross Moore
ross at ics.mq.edu.au
Tue Jan 27 22:23:27 CET 2009
Hello Chris,
On 28/01/2009, at 7:03 AM, Chris Heunen wrote:
> Dear Ross,
>
> It seems the problem is compatibility with the separate makeindex
> program and/or the multind package.
You sent this:
> \indexentry{$\xymatrix{\ar@{->}[r]&}$, arrow}{1}
> This is makeindex, version 2.14 [02-Oct-2002] (kpathsea + Thai
> support).
> Scanning input file notation.idx....done (1 entries accepted, 0
> rejected).
> Sorting entries...done (0 comparisons).
> Generating output file notation.ind....done (5 lines written, 0
> warnings).
> Output written in notation.ind.
> Transcript written in notation.ilg.
> \begin{theindex}
>
> \item {->}[r]&}$, arrow, 1
>
> \end{theindex}
The problem is the @ symbol in:
\index{$\xymatrix{\ar@{->}[r]&}$, arrow}
which is interpreted as a delimiter for the sorting tag
within the Index. You need to shield this '@',
* using either: "@
OR
* by hiding it within a macro.
See the following coding example:
\usepackage[all]{xy}
\usepackage{multind}
\makeindex{A}
\begin{document}
fee\index{A}{fee}
figh\index{A}{fi}
foe\index{A}{fo}
\index{A}{$\xymatrix{ \ar"@{->}[r] & }$, arrow}
\DeclareRobustCommand{\xyindarrow}{$\xymatrix{ \ar@{->}[r] & }$}
\index{A}{\xyindarrow, arrow}
\printindex{A}{Index}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: texshop_image.jpeg
Type: image/jpeg
Size: 19434 bytes
Desc: not available
Url : http://tug.org/pipermail/xy-pic/attachments/20090128/48854afd/attachment-0001.jpeg
-------------- next part --------------
Here is my A.idx :
\indexentry{fee}{1}
\indexentry{fi}{1}
\indexentry{fo}{1}
\indexentry{$\xymatrix{ \ar"@{->}[r] & }$, arrow}{1}
\indexentry{\xyindarrow, arrow}{1}
giving the following for A.ind :
\begin{theindex}
\item $\xymatrix{ \ar@{->}[r] & }$, arrow, 1
\item \xyindarrow, arrow, 1
\indexspace
\item fee, 1
\item fi, 1
\item fo, 1
\end{theindex}
The result is as shown in the attached image.
>
> Best,
> Chris
Hope this fixes it for you.
Cheers,
Ross
------------------------------------------------------------------------
Ross Moore ross at maths.mq.edu.au
Mathematics Department office: E7A-419
Macquarie University tel: +61 (0)2 9850 8955
Sydney, Australia 2109 fax: +61 (0)2 9850 8114
------------------------------------------------------------------------
More information about the xy-pic
mailing list