Text Formatting ⇒ Dot after Number in Heading
Dot after Number in Heading
Hi there!
A short, simple question: how can I add a dot in the section numbering? I have "1.1" and I want to have "1.1."
Thank you very much!
Bye
Jeffrey
A short, simple question: how can I add a dot in the section numbering? I have "1.1" and I want to have "1.1."
Thank you very much!
Bye
Jeffrey
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Stefan Kottwitz
- Site Admin
- Posts: 10320
- Joined: Mon Mar 10, 2008 9:44 pm
Dot after Number in Heading
Hi,
with a KOMA-class you could use the option numbers=enddot, or, in case of older KOMA-classes, pointednumbers.
With LaTeX standard classes you could redefine \thesection or just add a dot by
Stefan
with a KOMA-class you could use the option numbers=enddot, or, in case of older KOMA-classes, pointednumbers.
With LaTeX standard classes you could redefine \thesection or just add a dot by
Code: Select all
\makeatletter
\g@addto@macro\thesection.
\makeatother
LaTeX.org admin
Re: Dot after Number in Heading
Thank you!
Best regards,
Jeff.
Best regards,
Jeff.
Dot after Number in Heading
Hi,
To avoid this situation, I would prefer a redefinition of all the commands associated to the sectioning counters, as the following example illustrates:
But this will produce undesired results in lower sectional units, as the following simple example demonstrates:Stefan_K wrote:...
With LaTeX standard classes you could redefine \thesection or just add a dot byStefanCode: Select all
\makeatletter \g@addto@macro\thesection. \makeatother
Code: Select all
\documentclass{book}
\makeatletter
\g@addto@macro\thesection.
\makeatother
\setcounter{secnumdepth}{5}
\begin{document}
\chapter{Test chapter}
\section{Test section}
\subsection{Test subsection}
\subsubsection{Test subsubsection}
\paragraph{Test paragraph}
\subparagraph{Test subparagraph}
\end{document}
Code: Select all
\documentclass{book}
\renewcommand\thesection{\thechapter.\arabic{section}.}
\renewcommand\thesubsection{\thesection\arabic{subsection}.}
\renewcommand\thesubsubsection{\thesubsection\arabic{subsubsection}.}
\renewcommand\theparagraph{\thesubsubsection\arabic{paragraph}.}
\renewcommand\thesubparagraph{\theparagraph\arabic{subparagraph}.}
\setcounter{secnumdepth}{5}
\begin{document}
\chapter{Test chapter}
\section{Test section}
\subsection{Test subsection}
\subsubsection{Test subsubsection}
\paragraph{Test paragraph}
\subparagraph{Test subparagraph}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Dot after Number in Heading
Us it appropriate to quote the FAQ here? If so, take a look at this.jgaspard wrote:A short, simple question: how can I add a dot in the section numbering? I have "1.1" and I want to have "1.1."
http://www.tex.ac.uk/cgi-bin/texfaq2htm ... =seccntfmt
Otherwise, please ignore that, and accept my apologies.
-
- Posts: 8
- Joined: Tue May 10, 2011 10:31 pm
Dot after Number in Heading
Hi!
I have small problem with numbering. Of course I use code from this page.
In my document I use algorithm environment. Every algorithm has number of section and number of algorithm eg. "Algorithm 3.1". I want add dot after last number eg. "Algorithm 3.1.". If I use
I'll get what i want, but in list of algorithms i have double dot ("3.1.. Algorithm of...")
How to solve this problem?
I have small problem with numbering. Of course I use code from this page.
Code: Select all
\def\@seccntformat#1{\csname the#1\endcsname.\quad}
\def\numberline#1{\hb@xt@\@tempdima{#1\if&\else.\fi\hfil}}
Code: Select all
\renewcommand{\thealgorithm}{\thesection.{\arabic{algorithm}.}}
How to solve this problem?
- Stefan Kottwitz
- Site Admin
- Posts: 10320
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Dot after Number in Heading
Hi krasnal1988,
welcome to the board!
Generally it would be good to open a new thread for a new question, so more people may read your question. A link to an earlier question would be good of course. This thread is already marked as solved.
I would split the thread later on.
Regarding your problem: numbering and dots may be determined by document class, class options, packages and settings, so it would be good if you would post your complete preamble.
Stefan
welcome to the board!
Generally it would be good to open a new thread for a new question, so more people may read your question. A link to an earlier question would be good of course. This thread is already marked as solved.
I would split the thread later on.
Regarding your problem: numbering and dots may be determined by document class, class options, packages and settings, so it would be good if you would post your complete preamble.
Stefan
LaTeX.org admin
Dot after Number in Heading
Hi,
I'm new to LaTeX and your question was mine too. Always searching for the shortest and simplest answer, I should tell that Stefan's answer is the shortest one with one small modification.
Now by changing
I'm new to LaTeX and your question was mine too. Always searching for the shortest and simplest answer, I should tell that Stefan's answer is the shortest one with one small modification.
Code: Select all
\makeatletter
\g@addto@macro\thesubsection.
\makeatother
\thesection
to \thesubsection
you will get the desired result!