
章番号と章テキストの間の距離を変更したいと思います。 renew は不適切な方法ですが、これはセクション タイトルにも影響します。他の回答では、またはを使用してファイル\thechapter
を変更することを提案しているようですが、実際にはその方が読みやすく、デバッグも簡単になるようです。これを行う「自然な」方法は何ですか?.cls
etoolbox
\renewcommand
\renewcommand\thesection...
\documentclass{scrreprt}
\renewcommand\thechapter{\arabic{chapter}\ \ }
\begin{document}
\chapter{Blah}
\end{document}
答え1
必要に応じて値(ここでは 4 cm)を変更します。
\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}