我正在使用 xelatex polyglossia 和 koma 脚本包。如果有人能告诉我如何将目录标题和参考文献改为大写,例如将 Contents 改为 CONTENTS,将 References 改为 REFERECES,我将不胜感激。
\documentclass[titlepage,12pt,a4paper]{scrreprt}
\KOMAoptions{headings=small,numbers=endperiod}
\KOMAoption{toc}{bibnumbered,chapterentrywithdots}
\usepackage[backend=biber, sorting=none]{biblatex}
\addbibresource{references.bib}
\usepackage{polyglossia}
\setdefaultlanguage{turkish}
\setotherlanguages{english}
\usepackage{blindtext}
\begin{document}
\newpage
\tableofcontents
\newpage
\blinddocument
bla, bla, bla\cite{babcock_models_2002}
\printbibliography
\end{document}
我很感激任何帮助。我是新手,所以请多多包涵...
答案1
如果仅目录和参考书目标题需要大写:
\documentclass[titlepage,12pt,a4paper]{scrreprt}
\KOMAoptions{headings=small,numbers=endperiod}
\KOMAoption{toc}{
%bibnumbered,% not needed because of the own \bibheading
chapterentrywithdots}
\usepackage{polyglossia}
\setdefaultlanguage{turkish}
\setotherlanguages{english}
\usepackage[backend=biber, sorting=none]{biblatex}
\addbibresource{biblatex-examples.bib}
\renewcommand*\tableofcontents
{\listoftoc[{\MakeUppercase{\contentsname}}]{toc}}
\defbibheading{uppercasetitle}[\MakeUppercase{\bibname}]
{\chapter{#1}}
\usepackage{blindtext}% only for dummy text
\begin{document}
\tableofcontents
\blinddocument
bla, bla, bla\cite{springer}
\printbibliography[heading=uppercasetitle]
\end{document}
如果所有章节标题都应大写
\documentclass[titlepage,12pt,a4paper]{scrreprt}
\KOMAoptions{headings=small,numbers=endperiod}
\KOMAoption{toc}{bibnumbered,chapterentrywithdots}
\usepackage{polyglossia}
\setdefaultlanguage{turkish}
\setotherlanguages{english}
\usepackage[backend=biber, sorting=none]{biblatex}
\addbibresource{biblatex-examples.bib}
\let\originalchapterlinesformat\chapterlinesformat
\renewcommand\chapterlinesformat[3]{%
\ifstr{#1}{chapter}
{\originalchapterlinesformat{#1}{#2}{\MakeUppercase{#3}}}
{\originalchapterlinesformart{#1}{#2}{#3}}%
}
\let\originaladdchaptertocentry\addchaptertocentry
\renewcommand\addchaptertocentry[2]{%
\originaladdchaptertocentry{#1}{\MakeUppercase{#2}}%
}
\usepackage{blindtext}% only for dummy text
\begin{document}
\tableofcontents
\blinddocument
bla, bla, bla\cite{springer}
\printbibliography
\end{document}
答案2
确保 \defbibheading{uppercasetitle}[\MakeUppercase{\bibname}] {\chapter{#1}} 中的“uppercasetitle”为“bibliography”或 biblatex 文档中 \defbibheading 定义中所述的其他内容。可以使用这些选项。将 uppercasetitle 更改为 bibliography 的解决方案非常适合我的情况...