![删除参考书目的章节编号](https://linux22.com/image/419631/%E5%88%A0%E9%99%A4%E5%8F%82%E8%80%83%E4%B9%A6%E7%9B%AE%E7%9A%84%E7%AB%A0%E8%8A%82%E7%BC%96%E5%8F%B7.png)
我的参考书目有点问题。在目录中,我的参考书目显示正确(没有章节号)。但在文本中,它显示单词“章节”和上一章的章节号。但它不应该这样(见截图)。(我使用 overleaf 进行写作)。
% ============= Dokumentklasse =============
\documentclass[a4paper,12pt]{scrreprt}
% ============= Packages =============
% Standard Packages
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{fancyhdr}
\usepackage{lmodern}
% ============= Zitation =============
\usepackage{csquotes}
\usepackage[backend = biber, style = apa, sortcites = true, alldates=short]{biblatex}
\addbibresource{Literatur.bib}
\setquotestyle[quotes]{german}
% ============= Überschriften =============
\makeatletter
\def\@makechapterhead#1{%
\vspace*{10\p@}%
{\parindent \z@ \reset@font
\LARGE \scshape \@chapapp{} \thechapter\vspace*{-15\p@}
\par\nobreak
\interlinepenalty\@M\hrulefill\newline\vspace*{-5\p@}
\raggedleft \Large \bfseries #1\par\nobreak
\vspace*{-8\p@}%
\hrulefill
\par\nobreak
\vskip 30\p@
}}
\def\@makeschapterhead#1{%
\vspace*{4\p@}%
{\parindent \z@ \raggedleft \reset@font
\scshape
\interlinepenalty\@M\hrulefill\newline\vspace*{-5\p@}
\Large \bfseries #1\par\nobreak
\vspace*{-8\p@}%
\hrulefill
\par\nobreak
\vskip 30\p@
}}
\makeatother
\setkomafont{sectioning}{\normalfont\normalcolor\bfseries}
\begin{document}
\tableofcontents
\chapter{TESTT}
TEXT
\chapter{TEST}
TEXT
\printbibliography[heading=bibintoc,title={Literaturverzeichnis}]
\nocite{*}
\end{document}
文学范例
@inbook{Rhomberg.2005,
author = {Rhomberg, Markus},
title = {{Wirklich die \glqq vierte Gewalt\grqq?}},
pages = {123--140},
bookpagination = {page},
publisher = {{Springer VS}},
isbn = {978-3-531-14561-7},
editor = {Jansen, Stephan A. and Priddat, Birger P.},
booktitle = {{Korruption}},
year = {2005},
abstract = {},
subtitle = {{Funktionsverstiindnisse fUr die Massenmedien in der Gesellschaft}},
location = {Wiesbaden},
booksubtitle = {{Unaufgekl{\"a}rter Kapitalismus --- Multidisziplin{\"a}re Perspektiven zu Funktionen und Folgen der Korruption}}
}
@inbook{Rossler.2013,
author = {R{\"o}ssler, Patrick and Geise, Stephanie},
title = {{Standardisierte Inhaltsanalyse: Grundprinzipien, Einsatz und Anwendung}},
pages = {269--288},
bookpagination = {page},
publisher = {{Springer VS}},
isbn = {978-3-531-18775-4},
editor = {M{\"o}hring, Wiebke and Schl{\"u}tz, Daniela},
booktitle = {{Handbuch standardisierte Erhebungsverfahren in der Kommunikationswissenschaft}},
year = {2013},
abstract = {},
location = {Wiesbaden}
}
答案1
使用 KOMA-Script 类时,不要重新定义内部命令如\@makechapterhead
或\@smakechapterhead
。您可以重新定义\chapterlineswithprefixformat
并\RedeclareSectionCommand
使用chapter
。
例子:
\documentclass[a4paper,12pt,chapterprefix]{scrreprt}
%\usepackage[utf8]{inputenc}% needed with outdated TeX distributions
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
%\usepackage{fancyhdr}% not recommended with a KOMA-Script class
\usepackage{lmodern}
\usepackage{csquotes}
\usepackage[backend = biber, style = apa, sortcites = true, alldates=short]{biblatex}
\addbibresource{Literatur.bib}
\setquotestyle[quotes]{german}
\makeatletter
\renewcommand*{\chapterlineswithprefixformat}[3]{%
\Ifstr{#1}{chapter}
{%
\Ifstr{#2}{}{}{\vspace*{6\p@}}
{\raggedright#2}%
\interlinepenalty\@M\hrulefill\newline\vspace*{-5\p@}
#3\par\nobreak
\vspace*{-8\p@}%
\hrulefill
\par\nobreak
}
}
\makeatother
\RedeclareSectionCommand[
beforeskip=4pt,
afterindent=false,
innerskip=-15pt,
afterskip=30pt,
font=\scshape\Large,
prefixfont=\mdseries\LARGE
]{chapter}
\renewcommand*{\raggedchapter}{\raggedleft}
\setkomafont{sectioning}{\normalfont\normalcolor\bfseries}
\begin{document}
\tableofcontents
\chapter{TESTT}
TEXT
\chapter{TEST}
TEXT
\printbibliography[heading=bibintoc,title={Literaturverzeichnis}]
\nocite{*}
\end{document}
结果: