scrreprt에서 장 번호와 장 제목 사이의 수평 공간 늘리기

scrreprt에서 장 번호와 장 제목 사이의 수평 공간 늘리기

장 번호와 장 텍스트 사이의 거리를 변경하고 싶습니다. 좋지 않은 방법은 renew 이지만 \thechapter이는 섹션 제목에도 영향을 미칩니다. 다른 답변은 또는 를 .cls통해 파일을 수정하는 것을 제안하는 것 같지만 실제로는 디버깅이 더 읽기 쉽고 더 간단한 것 같습니다 . 이를 수행하는 '자연스러운' 방법은 무엇입니까?etoolbox\renewcommand\renewcommand\thesection...

\documentclass{scrreprt}
\renewcommand\thechapter{\arabic{chapter}\ \ }

\begin{document}
 \chapter{Blah}
\end{document}

답변1

필요에 따라 값(여기에서는 4cm)을 변경합니다.

\documentclass{scrreprt}

\renewcommand*{\chapterformat}{%
  \mbox{\chapappifchapterprefix{\nobreakspace}\thechapter\autodot
  \IfUsePrefixLine{}{\hspace{4cm}}}%
}
\begin{document}
\chapter{Canh chua}
\end{document}

이것은 복잡해 보일 수 있습니다. 더 간단하게 만들어도 여전히 동일한 결과를 볼 수 있습니다.

\documentclass[chapterprefix]{scrreprt}
\renewcommand*{\chapterformat}{\thechapter\hspace{4cm}}
\begin{document}
\chapter{Canh chua}
\end{document}

나중에 접두사 줄의 KOMA 기능을 사용하여 모양을 표준 클래스와 일치시키고 chapterprefix. 또한 KOMA 스크립트가 이제 독일어 정의와 일치하도록 숫자 끝에 점을 설정한다는 것을 알고 부록을 갖기로 결정했습니다.두덴.

\documentclass[chapterprefix]{scrreprt}
\renewcommand*{\chapterformat}{\thechapter\hspace{4cm}}
\begin{document}
\chapter{Canh chua}
\appendix
\chapter{Pho King Crazy}
\end{document}

우리가 얻는 것은 이것이다:

포킹크레이지

자, 그 물건들은 다 어디로 갔나요? 부록(appendix)이라는 단어는 사용 당시 바벨 언어로 인쇄되었을 것입니다. 점은 어디에 있습니까?
우리는 그것을 삭제했습니다. 그렇게 간단합니다.
원래 정의에서는 KOMA가 제공하는 다양한 옵션을 처리하기 위해 조건문을 사용합니다. 공간을 바꾸고 싶다면 공간만 바꾸면 됩니다.

\documentclass[chapterprefix]{scrreprt}
\renewcommand*{\chapterformat}{%
      \mbox{\chapappifchapterprefix{\nobreakspace}\thechapter\autodot
        \IfUsePrefixLine{}{\hspace{4cm}}}%
    }
\begin{document}
\chapter{Canh chua}
\appendix
\chapter{Pho King Crazy}
\end{document}

phoKinCrazy확장

관련 정보