
titlesec
私はドキュメント クラスで パッケージを使用していますscrartcl
。セクションを次のようにフォーマットしたいと思います。
講義1. セクション名
今私はコマンドを使っています
\titleformat{\section}{\fontsize{13}{13}\bfseries\sffamily}{Lecture \thesection}{1em}{}
ただし、必要な結果は得られないようです。番号とラベルは単に無視されます。
答え1
titlesec
KOMA-Script クラスと一緒にpackage を使用しないでください。 KOMA-Script コマンドを再定義して\sectionformat
プレフィックスを挿入することができますLecture
。
\renewcommand\sectionformat
{Lecture\enskip\thesection\autodot\hspace{1em}}
例:
\documentclass[numbers=withenddot]{scrartcl}
\renewcommand\sectionformat
{Lecture\enskip\thesection\autodot\hspace{1em}}
\addtokomafont{section}{\large}
\usepackage{lipsum}
\begin{document}
\section{Section name}
\lipsum
\end{document}
結果的に