1

The MWE is modelled on 21-indexing-multiple.tex but has two issues. Firstly, the author and title indexes have trailing commas. Secondly, I'd prefer to have only the first author et al of a work go into the author index (e.g. Chidiac, P. et al, 2, 3 only and neither Beaucourt nor Quantin)

MWE

%
%   latex        file
%   bibtex/biber file
%   latex        file
%   makeindex -o file.ind file.idx (= makeindex file)
%   makeindex -o file.nnd file.ndx
%   makeindex -o file.tnd file.tdx
%   latex        file
\documentclass{article}

\usepackage[style=authoryear,indexing,backend=biber,datamodel=\jobname]{biblatex}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}

@article{doe1981,
    Author = {Doe, John Jack},
    indexname = {Doe, John Jack},
    Journal = {Journal of Nothing},
    Pages = {164--178},
    Title = {More Great Stuff},
    Volume = {4},
    Year = {1981}}

    @book{CHID2004,
       Author = {Chidiac, P. and Quantin, J.-C. and Beaucourt, D.},
       indexname = {Chidiac, P.},
       title = {{Un standard pour l'an 2000 - Tome 2}},
       language = {francais},
       publisher = {Fédération Française de Bridge},
       month=jui,
       date = {2004}
}
@book{RODW2012,
       Author = {Rodwell, E.},
       indexname = {Rodwell, E.},
       title = {{Eric Rodwell: The Bridge World Interview}},
       publisher =  {The Bridge World},
       page={26},
       date = {2012}
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\usepackage{index}
\newindex{default}{idx}{ind}{Index}
\newindex{names}{ndx}{nnd}{Index des auteurs}
\newindex{titles}{tdx}{tnd}{Ouvrages cités}

\RequirePackage[unicode=true, psdextra, colorlinks=true, linktoc=all]{hyperref}

\makeatletter
\@ifpackageloaded{biblatex_legacy}
  {\DeclareIndexNameFormat{default}{%
     \usebibmacro{index:name}{\index[names]}{#1}{#3}{#5}{#7}}}
  {\DeclareIndexNameFormat{default}{%
     \usebibmacro{index:name}{\index[names]}
       {\namepartfamily}
       {\namepartgiven}
       {\namepartprefix}
       {\namepartsuffix}}}
\makeatother

\DeclareIndexFieldFormat{indextitle}{%
  \usebibmacro{index:title}{\index[titles]}{#1}%
}

\renewbibmacro*{bibindex}{%
  \ifbibindex
    {\indexnames{author}%
     \indexnames{editor}%
     \indexnames{translator}%
     \indexnames{commentator}%
     \indexfield{indextitle}}
    {}}

\DeclareNameFormat{mygiveninit-family}{%
\usebibmacro{name:given-family}%
  {\namepartfamily}%
  {\namepartgiveni}%
  {\namepartprefix}%
  {\namepartsuffix}%
\usebibmacro{name:andothers}}%

\newbibmacro*{cite:fullpartcite}{%
  \printnames[mygiveninit-family]{labelname}%
  \setunit*{\printdelim{nametitledelim}}%
  \printfield[citetitle]{title}%
  \setunit{.}%
}%

\DeclareCiteCommand{\Bridgecite}[\mkbibfootnote]%
{\usebibmacro{prenote}}%
{\usebibmacro{citeindex}%
 \usebibmacro{cite:fullpartcite}}%
 {\multicitedelim}%
{\usebibmacro{postnote}}%       


\begin{document}

Cette convention était popularisée par l'équipe Meckwell.  \Bridgecite{RODW2012}  

\newpage

On suit le livre de \Bridgecite{CHID2004} 

\newpage

% We print the printbibliography...
\printbibliography
% ...and the indexes
\raggedright
\printindex         % the general index
\printindex[names]  % the name index
\printindex[titles] % the title index
\end{document} 
  • I presume this punctuation style is intentional, but I'd prefer e.g. a colon rather than a comma. – DLyons Apr 24 '18 at 5:53
0

The man page https://www.systutorials.com/docs/linux/man/1-makeindex/ documents that

"Delimiter to be inserted between a level 0 key and its first page number is delim_0 <string> ", "(default: comma followed by a blank)"

So changing this to delim_0 ": " in a .ist file should work.

Here's myfile.ist for example:

preamble

    "\\documentstyle[11pt]{book}
    \\begin{document}
    \\begin{theindex}
    {\\small\n"
    postamble
    delim_0 ": "
    "\n\n}
    \\end{theindex}
    \\end{document}\n"

Running that as makeindex -s myfile.ist authors for the author index gives the required result

Index des auteurs
Lévy, A.: 5
Fédération Française de Bridge: 3
Rodwell, E.: 11

Re the second question of how to index authors and titles - one would like to have a single command that did both the citations and the author/title indexing. There must be a way to do that within BibLaTeX but I went for a simpler solution along the lines of

\newcommand{\Bridgeciteindex}[1]{\Bridgecite{#1}\sindex[aut]{\authorGet{#1}}\sindex[tit]{\titleGet{#1}}}

The first element is a customized footnote citation and the second two use \usepackage[makeindex]{splitidx} for authors and titles respectively. They take key-val pairs from a pre-generated lookup table which can be generated from the .bib file. These look like e.g

\authorPut{RODW2012}{{Rodwell, E.}} 
\titlePut{RODW2012}{{Eric Rodwell: The Bridge World Interview}}

and the whole table becomes an input file.

The Put/Get code is copied from Capacity exceeded while implementing lookup table

Output looks like

Ouvrages cités                    
Eric Rodwell: The Bridge World Interview, 1        
Un standard pour l’an 2000 - Tome 2, 5

Still had the probably correct, but misleading, trailing comma. That's now corrected :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.