If you would like to have the \S
as a feature of the section number everywhere else that it occurs (such as cross-references), then you can define \thesection
to contain a \S
symbol first, and then define \thetheorem
, etc. to remove this symbol as a part of creating the theorem number.
Preamble.
Consider the following minimal preamble:
\documentclass{article}
\usepackage{amsthm}
\renewcommand\thesection{\S\arabic{section}}
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\makeatletter
\newcommand\setTheoremCounterStyle[1]{%
\expandafter\renewcommand\csname the#1\endcsname{%
\expandafter\@gobble\thesection.\arabic{#1}}}
\makeatother
\setTheoremCounterStyle{theorem}
\setTheoremCounterStyle{proposition}
\setTheoremCounterStyle{definition}
The first several commands are fairly standard. The macro \setTheoremCounterStyle
takes one argument consisting of a theorem-like environment thmenv
(though any counter name will do), and defines the command \thethmenv
to consist of \thesection
— with the first symbol of it (in this case, \S
) stripped away — followed by a dot and \arabic{thmenv}
.
Sample code.
A sample document using that preamble:
\begin{document}
\section{A section}
\label{sec:foo}
This is Section~\ref{sec:foo}.
\begin{definition} A definition. \end{definition}
\begin{proposition} A proposition. \end{proposition}
\begin{theorem} A theorem. \end{theorem}
\end{document}
Output.
