变音符号索引类别

变音符号索引类别

我正在尝试创建自定义索引样式,但如果索引条目以变音符号开头,我会收到错误:

This is makeindex, version 2.15 [TeX Live 2020/W32TeX] (kpathsea + Thai support). Scanning style file ./index.ist...........done (11 attributes redefined, 0 ignored). Scanning input file main.idx....done (1 entries accepted, 0 rejected). Sorting entries...done (0 comparisons). Generating output file main.ind....done (5 lines written, 0 warnings). Output written in main.ind. Transcript written in main.ilg.
(./main.ind
! String contains an invalid utf-8 sequence.
l.2 
  Ã^^@
[2]) (./main.aux
))

我怎样才能使用变音符号?我知道这\index{\"Uberanpassung}可行,但类别将是“符号”,而这不是符号。

MWE:索引样式:

%- Listing -%
item_01 "\n \\subitem$\\bullet$ "
item_1 "\n \\subitem$\\bullet$ "
item_12 "\n \\subsubitem - "
item_2 "\n \\subsubitem - "

%- Delimiter -%
delim_0 "\\dotfill"
delim_1 "\\dotfill"
delim_2 "\\dotfill"
% Seperator between the start and end of a page area
delim_r "--"

%- Suffix -%
% Suffix for a range of 2 pages
suffix_2p "\\,f."
% Suffix for a range of 3 pages
suffix_3p "\\,ff."

%- Headings -%
headings_flag 1

% Fancy heading
heading_prefix
"
\\vspace*{\\fill}\\vspace*{-\\fill}\n
\\begin{tikzpicture}
    % Title header
    \\node[
        drop shadow={opacity=.5, shadow xshift=0pt},
        fill=accentcolor,
        minimum height=2.25em,
        rounded rectangle,
        rounded rectangle west arc=0pt,
        text=white
        ]
        (text)
        {\\large\\noindent\\bfseries " heading_suffix "};

    % Gray bar
    \\draw
        ([xshift=1.25em]text.north east)
        [color=gray, drop shadow={opacity=.5, shadow xshift=2pt}, fill=gray]
        coordinate (a) [bend right=0] to ([xshift=\\linewidth] text.north west)
        coordinate (b) [bend right] to +(0, -2.25em)
        coordinate (c) [bend right] to (a |- c) [bend right=60] to cycle;
\\end{tikzpicture}
\\nopagebreak\n
"
\documentclass{report}

\usepackage{imakeidx}
\usepackage[english, main = ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{sanitize-umlaut}
\usepackage[babel]{csquotes}
\usepackage{tikz}
\usepackage{xpatch}

\AtBeginDocument{\xpatchcmd\theindex{\begin{multicols}}{\begin{multicols*}}{}{\fail}}
\AtBeginDocument{\xpatchcmd\endtheindex{\end{multicols}}{\end{multicols*}}{}{\fail}}
\usetikzlibrary{shadows.blur, shapes}

\title{Title}

\makeindex[
    columns=3,
    intoc,
    options=-s index
    ]

\begin{document}
\maketitle

\tableofcontents

Überanpassung\index{Überanpassung} % Does not work
Unteranpassung\index{Unteranpassung} % Works fine
Kanäle\index{Kanäle} % Works fine

\printindex
\end{document}

正如您在此处看到的,Überanpassung 条目被标记为符号。

示例输出

相关内容