I'm writing a large document where I'm using pretty much every level of sectioning from Part right down to paragraph.
I've been using varioref in conjunction with hyperref and cleverref to 'intelligently' handle all my referencing (I probably shouldn't be using all three, but it's given me the desired effect so far.
The only problem is, the referencing doesn't seem to work with paragraphs as I would expect. The references resolve to automatically insert the word "Section" when referencing a (sub(sub))section, "Figure" when referencing a figure and so on, but they don't insert the word "Paragraph" or "Section" when referencing a paragraph.
I had thought the problem would be because I have defined a custom paragraph format, but you should be able to see from the MWE below that it happens with the 'normal' paragraph too.
Is there something I'm missing to make these packages respect paragraphs like they do for everything else?
\documentclass[a4paper, oneside, 11pt]{report}
\usepackage[left=4cm, right=2cm, top=1.5cm, bottom=2.5cm]{geometry}
\usepackage{lipsum}
\usepackage{varioref}
\usepackage[hidelinks]{hyperref}
\usepackage[capitalise,noabbrev]{cleveref}
\usepackage{tocloft}
\setcounter{secnumdepth}{5} % Number deeper sections
\setcounter{tocdepth}{5}% Number deeper sections
\newcommand{\myparagraph}[1]{\paragraph{#1}\mbox{}\vspace{0.3cm}\\} % adds a new paragraph environment called by \myparagraph
\begin{document}
\tableofcontents
\chapter{My First Chapter}\label{chapterone}
\section{My First Section}\label{sectionone}
\subsection{My First Subsection}\label{subsectionone}
\subsubsection{My First Subsubsection}\label{subsubsectionone}
\paragraph{My First Standard Paragraph}\label{mystandardparagraph}
\lipsum[1]
\myparagraph{My First Custom Paragraph}\label{mycustomparagraph}
\lipsum[2]
\chapter{My Second Chapter}
\section{My Second Section}
I can reference \vref{chapterone} and \vref{sectionone} and \vref{subsectionone} and \vref{subsubsectionone}
\subsection{My Second Subsection}
But not \vref{mystandardparagraph} and \vref{mycustomparagraph}...
\end{document}

\myparagraphwould be\@startsection{paragraph}{4}{\z@}{-3.25ex \@plus1ex \@minus.2ex}{1ex \@plus .2ex}{\normalfont\normalsize\bfseries}. The vertical spacing (5th argument) can be trimmed to suit your needs. With your current definition you need a%to suppress the spurious space after the\label. – campa Jul 09 '18 at 13:01You can't use \spacefactor in vertical mode...– Joe Healey Jul 09 '18 at 14:39\makeatletterand\makeatother. – campa Jul 09 '18 at 14:53