GeneralSection numbers w/dots + referencing

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
otoomet
Posts: 15
Joined: Sun Apr 01, 2007 9:39 am

Section numbers w/dots + referencing

Post by otoomet »

Hi,

I have to use section numbers with dots like

1. Introduction

I changed the \thesection command as following:

Code: Select all

    \def\thesection{\arabic{section}.}
However, now the while referencing to a section, I get the dot there too
e.g.

Code: Select all

\section{Introduction}
\label{sec:a}

See Section \ref{sec:a} where ...
Becomes
See Section 1. where ...


What is the smartest way to remove the dot in the text while referencing to it?

Thanks in advance,
Ott

Recommended reading 2024:

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

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

balfonsi
Posts: 93
Joined: Wed Mar 14, 2007 12:05 am

Re: Section numbers w/dots + referencing

Post by balfonsi »

I use the titlesec package, which lets you format sections and all that stuff (about) as you wish. So my def for the section number is the default one (just \arabic{section}). The package has a \titlelabel{#1} command which in your case would be, say,
\titlelabel{\thesection.\quad}
That's the simplest way to go, I think, but you can do VERY sophisticated layouts for sections, headers,tocs and so on.
Best regards,

B.A.
otoomet
Posts: 15
Joined: Sun Apr 01, 2007 9:39 am

Re: Section numbers w/dots + referencing

Post by otoomet »

Thank you,

exactly what I was looking for!
:D
Ott
Post Reply