I patched the bibleref
module locally:
--- a/bibleref/bibleref.sty
+++ b/bibleref/bibleref.sty
@@ -800,7 +800,7 @@ defined}{}}}
\PackageError{bibleref}{Unknown book '#1'}{}%
}%
{%
- \@bv@idxsort{\csname br@#1\endcsname}%
+ \@bv@idxsort{#1}%
\def\@bv@chidxsort{}%
\BRbooktitlestyle{\csname br@#1\endcsname}%
\let\@bv@org@bookof\BRbookof
This way, it's the abbreviated form that is used for keys, which then allows me to use \biblerefmap
as:
\biblerefmap{Gn}{1@Ancien Testament!01}
\biblerefmap{Ex}{1@Ancien Testament!02}
\biblerefmap{Lv}{1@Ancien Testament!03}
etc.
which solves my problem.
Here's the simple solution. Well, not so simple, after all. :)
One small problem, that I'll solve in a next release of imakeidx
: for some reason (that I don't remember now) we decided that program=xindy
called texindy
anyway. But unfortunately, it seems that the calls
xindy -M mystyle -C utf8 -L portuguese words.idx
and
texindy -M mystyle -C utf8 -L portuguese words.idx
are not equivalent, as the latter throws up an incomprehensible error (probably a bug in the texindy
script).
Thus the following document will require to run manually xindy
(but you have Arara, so it's not a problem), until the small problems are corrected.
Notice that xindy
provides two commands for the letter groups, which should be redefined in the preamble to do what's wanted.
\begin{filecontents*}{mystyle.xdy}
(markup-locclass-list :open "\dotfill " :sep "\dotfill ")
\end{filecontents*}
\documentclass{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{imakeidx}[2012/05/09]
\newcommand*{\lettergroupDefault}[1]{}
\newcommand*\lettergroup[1]{%
\par\textit{#1}\par
\nopagebreak
}
\def\pfill{\unskip~\dotfill\penalty500
\strut\nobreak\dotfil~\ignorespaces}
\def\efill{\hfill\nopagebreak}
\def\dotfil{\leaders\hbox to.6em{\hss.\hss}\hfil}
\makeindex[name=words,columns=1,program=xindy,options=-M texindy -M mystyle -C utf8 -L portuguese]
\begin{document}
Hello world.
\index[words]{abacate}
\index[words]{ábaco}
\index[words]{alavanca}
\index[words]{árvore}
\index[words]{arte}
\index[words]{ácaro}
\index[words]{aba}
\printindex[words]
\end{document}
Best Answer
you need to give these entries a sort field. you've actually chosen the easiest approach, sorting them in with the alphabetic entries. egreg has provided good examples for the first two:
\index{k@$k$}
and\index{c@$\mathcal{C}$}
my suggestion for the
*
is\index{a sterisk@$\ast$}
including a space after the
a
to make sure it sorts at the beginning.i've been compiling a set of notes on how to prepare a "clean" index, presenting tactics for avoiding all the problems i've seen in my experience as author technical support for the ams; when it's ready for general consumption, it will be posted on the ams web site for general reference, and i'll update this answer with a link.
Addendum:
(1) Regarding the index sort: Remember that the sorting is parallel at each level, so if a symbol is subsidiary to another entry, a sort field needs to be provided at the relevant level. Say you have this two-level entry with multiple sub-entries at the second level:
Assuming you want the sub-entries in alphabetical order, you should enter the second sub-entry as
otherwise it will be sorted before the first sub-entry.
The same principle applies at the third level, if your index entries are nested that deeply.
(2) Between the time of the original answer and this addendum, I have retired, and there is no longer any question that an answer might be the "official" position of my employer. Hence any posting by me will now be in "proper" upper- and lowercase.
There is another consequence implied here. The notes I was compiling on preparing a "clean" index weren't completed before I left AMS. I do intend to complete them, but it's not certain that they will be posted on the AMS web site. They will, however, be posted to CTAN and I'll give a link when this happens.
Update:
Although the notes I was preparing were not extended to cover all topics I had planned before my retirement from AMS, the document (which does cover quite a broad range of situations) has been rescued from near oblivion and posted on the AMS website at https://www.ams.org/arc/tex/howto/index/0index-notes.pdf . I do still intend to complete it, but believe what's there now should be helpful.