3

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?

2

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.

enter image description here

\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
\begin{equation}
  \label{eq:zzzzzzzzzzzzzzzzzzabcdefghijklm}
  1=2
\end{equation}
\ref{eq:zzzzzzzzzzzzzzzzzzabcdefghijklm}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.