부품 제목에 줄 바꿈을 만드는 방법은 무엇입니까?

부품 제목에 줄 바꿈을 만드는 방법은 무엇입니까?

이 질문에 이어 다음과 같습니다.KOMA 스크립트 기사의 부품 제목에 tcolorbox를 중앙에 배치하는 방법, 당신이 본다면하지만 참고하세요~의이 답변이 솔루션은 줄을 나누지 않는 경우에만 좋습니다. 즉, 전체 제목을 한 줄에 넣을 수 있습니다.

그래서 제 질문은 줄바꿈을 사용하지 않고 어떻게 동일한 작업을 수행할 수 있느냐는 것입니다.

MWE는 다음과 같습니다.

\documentclass{scrartcl}
\usepackage{tcolorbox}
\renewcommand*{\raggedpart}{\centering}
\renewcommand*{\partformat}{\partname~\thepart\autodot\enskip}
\renewcommand\partlineswithprefixformat[3]{%
  \tcbox[center,width=\linewidth/2]{\underline{#2#3}}%
}
%\usepackage{showframe}% to see the page areas
\begin{document}
\part{``The quick brown fox jumped over the lazy dog''}
\end{document}

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

답변1

예를 들어 내부에 \parbox를 사용할 수 있습니다. 그러나 밑줄을 사용하지 마십시오. 처음에는 줄 바꿈이 작동하지 않으며 두 번째로 모든 곳에 줄이 있으면 끔찍해 보일 것입니다.

\documentclass{scrartcl}
\usepackage{tcolorbox}
\renewcommand*{\raggedpart}{\centering}
\renewcommand*{\partformat}{\partname~\thepart\autodot\enskip}
\renewcommand\partlineswithprefixformat[3]{%
  \tcbox[center,width=\linewidth/2]{\parbox{0.5\linewidth}{%
   \centering#2#3\par\vspace{-0.5\baselineskip}\hrulefill}}%
}
%\usepackage{showframe}% to see the page areas
\begin{document}
\part{``The quick brown fox jumped over the lazy dog''}

\part{Short}
\end{document}

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

관련 정보