# labelname too large

I use \usepackage{refcheck} in my thesis to show the labelnames of my figures and equations. Unfortunately, the labelnames are often too long to show them within the page margins. Is it possible to rotate the labelnames around 90 degree? Or perhaps include a line skip?

The package doesn't have an option for that but it is easy to copy the definition that puts the label in the margin and add \rotatebox the package already takes care of hiding the height of the box so the rotated box doesn't affect the rest of the layout.

\documentclass{article}
\usepackage{refcheck}
\usepackage{graphicx}
\makeatletter
\def\@setmarginlbl{%
\if@show@ref
\if@labelled
\set@fbox@par
\if@unsdlbl
\makebox[0pt][l]{\zero@height{$\,${\mark@size
{\bfseries\upshape?}\underline{\last@lbl}{k\bfseries\upshape?}}}}%
\else
\makebox[0pt][l]{\zero@height{$\,$\rotatebox{90}{\fbox{{\mark@size\last@lbl}}}}}%
\fi
\else
\if@show@unl@bld
\makebox[0pt][l]{\zero@height{$\,$\unl@bld@mark}}%
\fi\fi
\fi
\global\@labelledfalse
}
\makeatother
\begin{document}

some text

some more text
$$\label{eq:zzzzzzzzzzzzzzzzzzabcdefghijklm} 1=2$$
\ref{eq:zzzzzzzzzzzzzzzzzzabcdefghijklm}
\end{document}