Problem: I am creating author, title and subject indexes using imakeidx, biblatex with indexing=true and Xindy. The indexes are being created properly but the title index contains the entries in italics which I do not want. I found code from answers by Moewe and manueltts that I adadpted to my documents needs.
What I have tried: I tried to negate the \emph with another \emph like this:
\DeclareIndexFieldFormat{indextitle}{%
\usebibmacro{index:title}{\index[titles]}{\emph #1}}
But the result from using this (in my main file) doesn't work consistently:
What I would like: The \emph command being wrote after \item in the titles.ind file to be negated or not inserted in the first place. It would be nice to know what process is causing the \emph to be added too as I cannot see where it is coming from.
MWEB:
% arara: lualatex: {options: [-halt-on-error]}
% arara: biber
% arara: lualatex: {options: [-halt-on-error]}
% arara: xindy: {modules: [basic], codepage: utf8, language: english}
% arara: lualatex: {shell: yes, options: [-halt-on-error]}}
% arara: lualatex: {options: [-halt-on-error]}
\begin{filecontents}{style.xdy}
(markup-index :open "\begin{theindex} ~n
\providecommand\lettergroupDefault[1]{}
\providecommand*\lettergroup[1]{%
\par\textbf{\large#1}\par\medskip
\nopagebreak
}"
:close "~n~n\end{theindex}~n"
:tree)
(markup-locclass-list :open "\dotfill " :sep ", ")
;; End
\end{filecontents*}
\documentclass[oneside]{book}
\usepackage[backend=biber,indexing=true,natbib=true,safeinputenc=true,style=numeric]{biblatex}
\usepackage[xindy]{imakeidx}
\usepackage{idxlayout}
\usepackage{hyperref}
\addbibresource{biblatex-examples.bib}
\makeindex[title={Subject Index},program=truexindy, options=-M texindy -C utf8 -L english -M style]
\makeindex[title={Author Index}, program=truexindy, options=-M texindy -C utf8 -L english -M style, name=names]
\makeindex[title={Title Index}, program=truexindy, options=-M texindy -C utf8 -L english -M style, name=titles]
% https://tex.stackexchange.com/a/121560/245306
\DeclareIndexNameFormat{default}{%
\usebibmacro{index:name}{\index[names]}
{\namepartfamily}
{\namepartgiven}
{\namepartprefix}
{\namepartsuffix}}
\DeclareIndexFieldFormat{indextitle}{%
\usebibmacro{index:title}{\index[titles]}{#1}}
\begin{document}
\index{test}\index{actual}\cite{doody,bertram,gillies,glashow}
\printbibliography
\begingroup
\idxlayout{columns=3}
\printindex[names]
\endgroup
\begingroup
\idxlayout{columns=2}
\printindex[titles]
\endgroup
\begingroup
\idxlayout{columns=3}
\printindex
\endgroup
\end{document}
How it currently looks:
The title index currently looks like this:
The titles.ind file being generated contains the following:
\begin{theindex}
\providecommand\lettergroupDefault[1]{}
\providecommand\lettergroup[1]{%
\par\textbf{\large#1}\par\medskip
\nopagebreak
}
\lettergroup{G}
\item \emph {Gromov invariants for holomorphic maps on {Riemann} surfaces}\dotfill \hyperpage{1}, \hyperpage{2}
\indexspace
\lettergroup{H}
\item \emph {Hemingway's Style and {Jake's} Narration}\dotfill \hyperpage{1}, \hyperpage{2}
\item \emph {Herder and the Preparation of {Goethe's} Idea of World Literature}\dotfill \hyperpage{1}, \hyperpage{2}
\indexspace
\lettergroup{P}
\item \emph {Partial Symmetries of Weak Interactions}\dotfill \hyperpage{1}, \hyperpage{2}
\end{theindex}
I would appreciate any advice on how to remove the emphasis, I cannot work out what function or process is causing the \emph to be added to the titles.ind file. Apologies if this has been asked before, I couldn't find an answer after a decent bit of searching. I am certain I am using Xindy wrong with arara and makeindex but it compiles correctly so must be okay.


