考虑以下 MWE:
%!TEX TS-program = xelatex
\documentclass[ngerman]{article}
\usepackage{babel,libertine}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@Article{Alfoeldy2003,
author = {Géza Alföldy},
title = {Nuevos monumentos epigraficos del foro de Segobriga},
journaltitle = {ZPE},
pages = {217--234},
year = {2003},
}
@Article{Baumgart1935,
author = {Baumgart, Fritz},
title = {Platz und Stadt},
journaltitle = {ZKuGesch},
pages = {17--35},
year = {1935},
}
@Article{Allison2001,
author = {Allison, Penelope M.},
title = {Using the Material and Written Sources},
journaltitle = {AJA},
pages = {181--208},
year = {2001},
}
@Article{Andreae1957,
author = {Andreae, Bernard},
title = {Archäologische Funde und Grabungen},
journaltitle = {AA},
pages = {110--358},
year = {1957},
}
@Review{Frost2001,
author = {Frank Frost},
pages = {442--443},
journaltitle = {ClR},
year = {2001},
}
@Article{Krause1976,
author = {Krause, Clemens},
title = {Zur baulichen Gestalt des republikanischen Comitiums},
journaltitle = {RM},
pages = {31--69},
year = {1976},
}
@Book{Graefe1979,
author = {Graefe, Rainer},
title = {\emph{Vela erunt}},
year = {1979},
}
\end{filecontents*}
\begin{filecontents*}{index_style.ist}
headings_flag 1
heading_prefix "{\\large\\sffamily\\bfseries "
heading_suffix "}\\nopagebreak\n"
item_0 "\n \\item \\sffamily "
delim_0 " \\dotfill "
delim_1 " \\dotfill "
delim_2 " \\dotfill "
\end{filecontents*}
\usepackage[
backend=biber,
indexing=cite,
style=archaeologie,
initials,%<<-- trouble maker
]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{imakeidx}
\makeindex[
intoc,
title= Index Autoren Sekundärliteratur,
columns=2,
options={-s index_style.ist},
]
\begin{document}
\cite{Allison2001,Baumgart1935,Alfoeldy2003,Andreae1957,Frost2001,Krause1976,Graefe1979}
\clearpage
\cite{Baumgart1935,Alfoeldy2003,Frost2001,Krause1976,Graefe1979}
\textcite{Andreae1957}
\clearpage
\cite{Allison2001,Alfoeldy2003,Andreae1957,Krause1976,Graefe1979}
\clearpage
\citeauthor{Krause1976}
\citeauthor{Frost2001}
\printindex
\printbibliography
\end{document}
索引有点混乱,因为一些作者的名字被识别为›符号‹,因为 biblatex archaeologie
-optioninitials
激活了自动获取作者姓名首字母的可能性,如 @ienissei 所述https://tex.stackexchange.com/a/295486/98739。
@moewe 发现这是因为还考虑了姓氏:
\indexentry{{Fr}ost, {\relax {}Fr}ank|hyperpage}{1}
\indexentry{{Kr}ause, {\relax {}Cl}emens|hyperpage}{1}
\indexentry{{Gr}aefe, Rainer|hyperpage}{1}
有没有办法只考虑名字?或者我怎样才能省略{}
姓氏中的?
答案1
一个暂定的解决方案,假设您使用的<von> <last>, <suffix>, <first>
名称格式:
\DeclareStyleSourcemap{%
\maps[datatype=bibtex]{%
\map{%
\step[fieldsource=author,%
match={\regexp{([^,]\s)(Chr|Ch|Th|Ph|[B-DF-HJ-NP-TV-XZ](l|r))}},%
replace={\regexp{$1\{$2\}}}]% Protect last names (last, first)
\step[fieldsource=author,%
match={\regexp{([^\{])(Chr|Ch|Th|Ph|[B-DF-HJ-NP-TV-XZ](l|r))([^\}])}},%
replace={\regexp{$1\{\\relax\{\}$2\}$4}}]% Insert \relax after abbreviating
}}}%
如果您将它添加到序言中,它有望发挥作用(尚未用 测试过imakeidx
。至少它改进了 中的代码,.bbx
现在内容如下:
... {Krause}{K\bibinitperiod}{{\relax{}Cl}emens}{{\relax{}Cl}\bibinitperiod} ...
但是,我不知道如何使其与<first> <last>
名称格式一起工作,无论如何这都不是很流行(我猜)。