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 can automatize the generation of the marginal note:
Thus each
\index
command will print in the margin the argument "as is". I believe this is better than trying to replicate the final aspect: all the information is there and in a very distinctive way.The patching can be made depend on the
draft
option but not in a very robust way, as that option, in the standard classes, just sets\overfullrule
:A more robust way might be to check if
draft
appears in the expansion of\@classoptionslist
or putting the code inside a personal package, saymargind.sty
:A possible "definitive" solution that takes into account the suggestions in comments could be
The argument to the
\index
command will be written in the margin only when the documentclass optiondraft
is specified.