재정의된 섹션으로 인해 biblatex 제목이 깨짐

재정의된 섹션으로 인해 biblatex 제목이 깨짐

나는 재정의했고 section, 어떻게든 참고문헌 제목을 망쳤습니다. MWE는 다음과 같습니다.

\documentclass{article}
\usepackage[utf8]{inputenc}

\newcommand{\linia}{\rule{\linewidth}{0.5pt}}
\renewcommand{\section}[1]{%
  \bigskip%
  {\LARGE\MakeUppercase{#1}}\\[-1ex]%
  \linia\medskip
}

\usepackage{biblatex}
\addbibresource{sample.bib}

\begin{document}
\nocite{*}

\printbibliography

\end{document}

결과는 다음과 같습니다.

여기에 이미지 설명을 입력하세요

답변1

biblatex의 기본 bibliography제목은 -like 클래스 \section*{<title>}의 참고문헌 제목을 조판하는 데 사용됩니다.article

재정의

\renewcommand{\section}[1]{%
  \bigskip%
  {\LARGE\MakeUppercase{#1}}\\[-1ex]%
  \linia\medskip
}

별표 표시된 버전을 비활성화하여 \section원하지 않는 출력을 발생시킵니다.

\section{<title>}별표 버전을 처리할 수 있는 정의를 제공하거나 다른 제목(예: )을 사용하도록 \section*{<title>}지시하십시오 . 후자는 여러 가지 방법으로 수행될 수 있습니다.biblatex\section

\documentclass{article}
\usepackage[utf8]{inputenc}

\newcommand{\linia}{\rule{\linewidth}{0.5pt}}
\renewcommand{\section}[1]{%
  \bigskip%
  {\LARGE\MakeUppercase{#1}}\\[-1ex]%
  \linia\medskip
}

\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}

\begin{document}
\nocite{sigfridsson}

\printbibliography[heading=bibnumbered]
\end{document}

동일한 작업을 수행하는 섹션 명령의 별표가 있는 버전과 별표가 없는 버전을 정의하는 한 가지 방법은 다음을 사용하는 것입니다(참조별표 표시된 명령 버전 정의(* 매크로)더 많은 옵션, 특히 최신 TeX 시스템을 사용하는 경우 xparse/ 옵션)expl3

\documentclass{article}
\usepackage[utf8]{inputenc}

\newcommand{\linia}{\rule{\linewidth}{0.5pt}}

\makeatletter
\renewcommand{\section}{\@ifstar\@section\@section}
\newcommand{\@section}[1]{%
  \bigskip%
  {\LARGE\MakeUppercase{#1}}\\[-1ex]%
  \linia\medskip
}
\makeatother

\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}

\begin{document}
\nocite{*}

\printbibliography
\end{document}

관련 정보