Numbering Theorems/Definitions together, by section and without section symbol

I am fairly new to LaTeX and I am looking for a particular style: I want to number my theorems/propositions/corollaries/definitions together and by section. For example, Definition 1.1, Theorem 1.2, Corollary 1.3, Theorem 1.4 etc. for results that are all in the first section. However, I would like to use the $\S$ symbol in the section heading, eg:

But this means that I get Theorems and Propositions which include the $\S$ symbol:

Which obviously, looks awful. Can anybody explain to me how I might get what I want? Thanks in advance

-
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  karlkoeller Mar 7 '14 at 11:43
Do you want § also before subsection numbers? –  egreg Mar 7 '14 at 11:44

Load the package titlesec and add this line to your preamble:

\titleformat{\section}{\normalfont\Large\bfseries}{\S\thesection}{1em}{}[]


MWE:

\documentclass{article}
\usepackage{titlesec}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{defn}[theorem]{Definition}

\titleformat{\section}{\normalfont\Large\bfseries}{\S\thesection}{1em}{}[]

\begin{document}

\section{A section}

\begin{defn}
definition
\end{defn}
\begin{proposition}
proposition
\end{proposition}
\begin{theorem}
theorem
\end{theorem}

\end{document}


Output

-

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.

-

An option which produces the same result as in karlkoeller's answer, but without using titlesec:

\documentclass{article}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{defn}[theorem]{Definition}

\makeatletter
\renewcommand*\@seccntformat[1]{%
}
\makeatother

\begin{document}

\section{A section}

\begin{defn}
definition
\end{defn}
\begin{proposition}
proposition
\end{proposition}
\begin{theorem}
theorem
\end{theorem}

\end{document}


The above redefinitin of \@seccntformat will add \S just to sections; if you want to prepend the symbol to all sectional units, the redefinition would be

\makeatletter
\renewcommand*\@seccntformat[1]{%