Page Layout ⇒ Period after section number
Period after section number
could someone please tell me how I can put a period after section numbers (without then having two periods between a section and a subsection number)?
Thanks!!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Period after section number
for the standard document classes you can use the titlesec package. Take a look at the following example:
Code: Select all
\documentclass{article}
\usepackage{titlesec}
\titleformat{\section}
{\normalfont\Large\bfseries}{\thesection.}{1em}{}
\begin{document}
\section{Test section}
\subsection{Test subsection}
\end{document}Code: Select all
\documentclass{article}
\makeatletter
\renewcommand\@seccntformat[1]{\csname the#1\endcsname.\quad}
\makeatother
\begin{document}
\section{Test section}
\subsection{Test subsection}
\subsubsection{Test subsubsection}
\end{document}Code: Select all
\documentclass{article}
\makeatletter
\renewcommand\@seccntformat[1]{%
\@ifundefined{#1@cntformat}%
{\csname the#1\endcsname\quad}%
{\csname #1@cntformat\endcsname}}
\newcommand\section@cntformat{\thesection.\quad}
\newcommand\subsubsection@cntformat{\thesubsubsection.\quad}
\makeatother
\begin{document}
\section{Test section}
\subsection{Test subsection}
\subsubsection{Test subsubsection}
\end{document}Re: Period after section number
Thanks again!