Text FormattingAll Numbers without final Dot

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

All Numbers without final Dot

Post by marie2011 »

Dear forum members,

I have a problem with the numbers=noenddot option. Every final number in my document should appear without dot. Apparently it works in the list of contents but not in the text. I tried to use pointlessnumbers, but it did not work either. I was wondering if you have an alternative.

Here is my minimal working example. I left some commands I added and which I think it might be relevant. Attached you will find "mystyle" style file. I am not sure if that is of relevance.

Code: Select all

\documentclass[
12pt,%
%  draft,%
  twoside,%
  BCOR10mm,%
%  bibtotocnumbered,% <= obsolete
bib=totoc,        % <= recommended
toc=listof,
toc=bibliography,
numbers=noenddot
]{scrreprt}


\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{mystyle}
\usepackage[titles]{tocloft}
\cftpagenumbersoff{part}
\captionsetup[table]{labelsep=quad}
\captionsetup[figure]{labelsep=quad}

\addto\captionsspanish{%
\renewcommand{\listfigurename}{Índice de Figuras}
\renewcommand{\listtablename}{Índice de Tablas}
\renewcommand{\figurename}{Figura}
\renewcommand{\tablename}{Tabla}
\renewcommand{\bibname}{Referencias bibliográficas}
\renewcommand{\appendixname}{Apéndices}
\renewcommand{\appendixtocname}{Apéndices}
\renewcommand{\partpagestyle}{empty}
\renewcommand{\appendixpagename}{Apéndices}}



\raggedbottom

\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}

\begin{document}

 \ifpdf
  \tableofcontents
% \fi




{\listoftables
\let\cleardoublepage\relax
\let\clearpage\relax
\listoffigures
\let\cleardoublepage\relax
\let\clearpage\relax
}

\newpage{\pagestyle{empty}\cleardoublepage}
\addtocontents{toc}{\protect\cftpagenumbersoff{chapter}}

\section{First Chapter}
\label{sec:first-chapter-1}
\subsection{First Subsection}
\label{sec:first-subsection-1}

\end{document}
Many, many thanks in advance.

Regards,

Marie
Attachments
mystyle.sty
(1.09 KiB) Downloaded 563 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

All Numbers without final Dot

Post by cgnieder »

Can you please make this into a minimal example?! The currently presented code is over 60 lines long (I'm sure about 10 should suffice), requires a custom package (which has nothing to do with the issue) and does not run without errors. What's more: in the PDF that is created I cannot see the behaviour you describe.

Best
site moderator & package author
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

All Numbers without final Dot

Post by marie2011 »

Hello Clemens,

Many thanks for your prompt answer.

If I delete

%\newpage{\pagestyle{empty}\cleardoublepage}
%\addtocontents{toc}{\protect\cftpagenumbersoff{chapter}}

The dots do not appear at the end of the last number. The problem is that I need the commands mentioned above. That is why I sent such a long minimal working example. Here is another one. The thing is that this one compiles right, but my document does not compile in the right way. That is the reason why I was asking for an alternative.

Code: Select all

\documentclass[
12pt,%
%  draft,%
  twoside,%
  BCOR10mm,%
%  bibtotocnumbered,% <= obsolete
bib=totoc,        % <= recommended
toc=listof,
toc=bibliography,
numbers=noenddot
]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{mystyle}
\usepackage[titles]{tocloft}
\raggedbottom
\begin{document}
\ifpdf
  \tableofcontents
% \fi
\section{First Chapter}
\label{sec:first-chapter-1}
\subsection{First Subsection}
\label{sec:first-subsection-1}
\end{document}
Many thanks in advance.

Regards,

Marie
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

All Numbers without final Dot

Post by cgnieder »

This example is much better. However, I cannot reproduce your what you're saying:
mwe.png
mwe.png (12.66 KiB) Viewed 11899 times
Maybe you can try and extend the code below until it shows the undesired behaviour:

Code: Select all

\documentclass[
numbers=noenddot
]{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tocloft}
\begin{document}

\newpage{\pagestyle{empty}\cleardoublepage}
\addtocontents{toc}{\protect\cftpagenumbersoff{chapter}}
\tableofcontents

\section{First Chapter}
\subsection{First Subsection}

\end{document}
Regards
site moderator & package author
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

Re: All Numbers without final Dot

Post by marie2011 »

Hello Clemens,

Thanks for your answer. The problem is that I cannot compile my document in the right way. I do not know if numbers=noenddot is incompatible to other commands I have in my main document.

With a small example, everything works. The problem arises when I try to compile the whole document. Then the dots do not appear in the list of contents but they do appear in the text.

Regards,

Marie
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Re: All Numbers without final Dot

Post by cgnieder »

Then you have to do what we all do: derive a minimal example from the original large one. Basically it goes like this: copy the original document into a new file. Start deleting everything and compile every now and then until the behaviour changes. You then know that the part you last deleted is responsible. Put it back in and start deleting the rest, again compiling in between. If the behaviour changes again you identified another essential part. Go on with this until the remaining file is as short as the one I posted above but still shows the erroneous behaviour. This has several huge advantages: 1) you may find the cause yourself; 2) if you don't someone here will very likely be able to help then; 3) you have learned the single most important thing for finding errors: how to create an MWE.

Regards
site moderator & package author
Post Reply