2

I'm working on the template for a thesis, and I was able to get it almost all the way to where I would like, even though I'm fairly new to LaTeX. I'm using Overleaf and I started with the clean thesis style, which I have successfully customized with several changes and additions.

Regarding the bibliography, I wanted to include them by chapter and also have a final complete list of references. I was able to do this using this structure:

\begin{filecontents*}{local_ref.bib}
@BOOK{reference1,
  title = {{Some title}},
  publisher = {Publisher},
  year = {2001},
  author = {{Institutional Author}},
  shortauthor = {IA},
  address = {Netherlands},
  edition = {1},
  isbn = {0 7506 5080 X}
  }

  @PHDTHESIS{reference2,
  author = {John Doe},
  title = {Another title},
  school = {{The University of Here}},
  year = {2020},
  type = {PhD {T}hesis}
  }

    @PHDTHESIS{reference3,
  author = {Name Surname},
  title = {A third title},
  school = {{Some University}},
  year = {2019},
  type = {PhD {T}hesis}
  }
\end{filecontents*}

\documentclass{scrreprt}
 \usepackage[style=apa, 
             backend=biber, 
             natbib=true,
             backref=false,
             maxnames=3,
             minnames=1,
             maxbibnames=5,
             minbibnames=3,
             maxcitenames=2,
             mincitenames=1,
             defernumbers=true,
             refsegment = chapter,
             sorting=ynt
                            ]{biblatex}

 \addbibresource{local_ref.bib}

 \begin{document}

 \tableofcontents

 \chapter{First chapter}
 \section{Section Name}
 Some text \cite{reference1}.
 \printbibliography[segment = \therefsegment, heading = subbibintoc]


 \chapter{Second chapter}
 \section{Another Section}
 Some text \cite{reference2}.
 \printbibliography[segment = \therefsegment, heading = subbibintoc]

 \printbibliography

 \end{document}

As you can see, it works well to include a single reference in chapter one, another in chapter two and then to have both of them at the reference list, while ignoring the uncited one that is part of the bib.

But now I have a problem that I cannot seem to find a solution: I want to have a final index of authors, in the following format:


Author Index

Andersen 1, 3, 5
Arbersman 2, 3, 4

Barker 3

Carpenter 2, 3
Chang 4, 5
NASA 3, 4


As you can see, I would like to have:

  • A list with just the last name of authors;
  • The short name for institutions (NASA, instead of National Agency...);
  • Page references to where they appear over the whole thesis;
  • Alphabetical grouping of names;
  • Page numbers as links to the original page.

Package AuthorIndex would do that and I've seen some other alternatives working with either BibTeX or BibLaTeX (with BibTeX in the backend). The problem is, because of all of the dependencies I have in my thesis, and the fact I have started from a ready template, if I change even the backend from biber it crashes the whole thing (as I need to use APA style, for example).

Another problem I see is that I needed to disable backref, as I do not want the chapter references to include "(cit. on pg X). With that, I don't know if the page reference in the author index would be able to link back to the citation. (I am using hyperref, by the way).

Thank you very much for any help you can give me.

André Brasil

4
  • Not that it would be relevant to the core of the question, but still something you should fix: The example .bib file contains an error. There must be a comma after shortauthor = {IA}. It should read shortauthor = {IA},.
    – moewe
    May 27, 2020 at 14:53
  • Also it's a bit odd to use the author-year style style=apa, together with sorting=none (which sorts the bibliography by citation order and not alphabetically). This makes it very hard for your readers to find the citations if the bibliography gets longer.
    – moewe
    May 27, 2020 at 14:54
  • Another thing maxnames sets maxbibnames and maxcitenames, similarly minnames sets minbibnames and mincitenames. In your example the later (min|max)(bib|cite)names override the (min|max)names, so you can just drop them.
    – moewe
    May 27, 2020 at 14:59
  • Hi @moewe. Thanks for your comments. The first two, regarding the missing comma and the sorting style, have been fixed in the example. I was trying to put my first working example together and ended up missing the comma and not replacing the sorting (as in the template it has been done by passing on a settings list to the sty file. The other settings I don't know very much about, but I have kept them because they are part of the Clean Thesis template and I don't know if they could influence any potential solution. But it is good to know I can adjust them. Thanks again. May 27, 2020 at 15:47

1 Answer 1

3

biblatex comes with a few example files for cite/bibliography indexing: 20-indexing-single.tex for simple indices and 21-indexing-multiple.tex, 22-indexing-subentry.tex for more complex setups.

If you only want a single index (namely the author index) then the following based on 20-indexing-single.tex should work.

  • Load an indexing package (here the standard LaTeX makeidx).
  • Activate indexing (here with \makeindex).
  • Tell biblatex to start indexing citations with indexing=cite,.
  • Redefine the bibmacro citeindex which executes the indexing commands to only index the name (we instruct it to index all names by telling it to index names 1-999 and to index only the family name by defining a new index name format).
  • Add the indexing printing command where you'd like to have the index (here with \printindex).

In this set-up the index is automatically grouped by letter categories and with hyperref the page numbers are linked. biblatex indexes the short author name used in citations ("IA" instead of "Institutional Author").

\documentclass{scrreprt}
\usepackage[style=apa, 
            backend=biber, 
            natbib=true,
            backref=false,
            maxbibnames=5,
            minbibnames=3,
            maxcitenames=2,
            mincitenames=1,
            defernumbers=true,
            refsegment = chapter,
            indexing=cite,
]{biblatex}

\usepackage{makeidx}
\usepackage{hyperref}

\makeindex

\renewbibmacro*{citeindex}{%
  \ifciteindex
    {\indexnames[family][1-999]{labelname}}
    {}}

\DeclareIndexNameFormat{family}{%
  \let\namepartgiven\empty
  \usebibmacro{index:name}
    {\index}
    {\namepartfamily}
    {\namepartgiven}
    {\namepartprefix}
    {\namepartsuffix}}

\begin{filecontents*}{\jobname.bib}
@BOOK{reference1,
  title       = {{Some title}},
  publisher   = {Publisher},
  year        = {2001},
  author      = {{Institutional Author}},
  shortauthor = {IA},
  address     = {Netherlands},
  edition     = {1},
  isbn        = {0 7506 5080 X},
}
@PHDTHESIS{reference2,
  author = {John Doe},
  title  = {Another title},
  school = {{The University of Here}},
  year   = {2020},
  type   = {PhD Thesis},
}
@PHDTHESIS{reference3,
  author = {Name Surname},
  title  = {A third title},
  school = {{Some University}},
  year   = {2019},
  type   = {PhD Thesis},
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}

\tableofcontents

\chapter{First chapter}
\section{Section Name}
Some text \autocite{reference1}.
\printbibliography[segment = \therefsegment, heading = subbibintoc]

\chapter{Second chapter}
\section{Another Section}
Some text \autocite{reference2}.
\printbibliography[segment = \therefsegment, heading = subbibintoc]

\printbibliography

\printindex
\end{document}

Index

5
  • Thanks for that @moewe, that is almost all the way to what I'm trying to do. I have just a couple of questions: 1. Is it possible to show just the last name of the author ("Doe", instead of "Doe, John")? 2. Running with my own bib, I notice that the script indexes only the first author of a reference. Is it possible to index all the authors and list them separately? This is important since, in some fields, the most important authors may show as the last author of the publication. Thanks. May 28, 2020 at 8:46
  • @AndréBrasil See the edit, please.
    – moewe
    May 28, 2020 at 15:26
  • That is just perfect @moewe. Thanks. At first, I was only able to make it work in an separate project and not in my thesis, but after quite some time trying to isolate what seemed to be the conflict that would make the index disappear, I noticed that I have to clear the Overleaf cache before compiling changes. But that is no problem. Best wishes! May 29, 2020 at 8:53
  • This is fantastic! I have an odd request, though. Would it be possible to list only authors who appear more than x times (e.g. 10) in the index? Alternatively, could I hand-pick the authors who must be indexed --- I am certain there should be a biblatex hack for this :) Thanks! Sep 24, 2020 at 6:20
  • @KarthikRaman Mhhh, not sure. From the biblatex side it should certainly be possible to count how often an author is referenced and only index it if it hits a threshold. But if you also want to include manual \index calls the counting would have to be done on the index side. I know next to nothing about index generation, so I can't tell you if that would be possible. Hand-picking authors would be possible, but since name comparison is a bit meh it would also come with quite a bit of code. It's probably better to ask a new question with more detailed requirements and an MWE.
    – moewe
    Sep 24, 2020 at 6:25

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.