How to reference \paragraph?
Sure - if it has a number which can be referenced:
\documentclass[10pt,twocolumn]{article}
\setcounter{secnumdepth}{6}
\begin{document}
\paragraph{blub}\label{para}
abc paragraph \ref{para}
\end{document}
Here another approach which I find more direct, easy, and appropriate to the question posted above (source: wikibooks):
%The link location will be placed on the line below.
\phantomsection
\label{the_label}
The good thing is that \ref{}
will produce the number of the section the paragraph is entailed, \pageref{}
will produce the pagenumber where the paragraph is to be found and if hyperlinks are produced automatically with e.g. the hyperref
-package clicking on the link beams one to the beginning of the referenced paragraph, ... so correct, consistent, and userfriendly behaviour! :-)
If you use the hyperref
and the nameref
package and label your paragraph:
\paragraph{The Elephant}\label{para:xyz}
Than you can use \autoref{para:xyz}, \nameref{para:xyz}
within your code to get e.g.:
Subsection 3, The Elephant
Obviously I assumed that your paragraph is within subsection 3