How to reference a paragraph with § symbol and without a dot?
I suggest you use the cleveref
package and its \cref
command to create cross-references that automatically contain the name (in this case, symbolic name) of the object being referenced. With the appropriate setup (see the MWE below), you can define both the singular and plural forms of the symbol -- §
and §§
, respectively -- and get the §
(or §§
) symbol to be included in the hyperlink automatically.
\documentclass{article}
\usepackage[colorlinks=true]{hyperref}
\usepackage[nameinlink]{cleveref}
\crefname{paragraph}{\S}{\S\S} % default is {paragraph}{paragraphs}
\setcounter{secnumdepth}{5}
\begin{document}
\section{Section 1}
\subsection{Subsection 1}
\subsubsection{Subsubsection 1}
\paragraph{Paragraph 1}\label{para:1} Some thoughts \ldots
\paragraph{Paragraph 2}\label{para:2} More thoughts \ldots
\paragraph{Paragraph 3}\label{para:3} Delusions of grandeur \ldots
\section{Section 2}
As we argued in \cref{para:1}, \ldots
\noindent
As we further argued in \cref{para:2,para:3}, \ldots
\end{document}
This seems to work:
\documentclass[11pt]{article}
\setcounter{secnumdepth}{3} % this line can be removed
\let\OLDparagraph\paragraph
\renewcommand{\paragraph}{\refstepcounter{paragraph}\OLDparagraph}
\usepackage{hyperref}
\renewcommand{\theparagraph}{\S\arabic{paragraph}}
\begin{document}
\paragraph{Name:}\label{sec:p1} Here some Text
We have seen in \ref{sec:p1}, \dots
\end{document}
If you don't want the paragraphs to be numbered, \secnumdepth
must be less than 4.