1

I use the showlabels package with the option [inline] by invoking it with the command

\usepackage[inline]{showlabels}

In this case the notes corresponding to the labels of environments (like theorems etc.) or to the command \bibitem (if I use \showlabels{bibitem}) are typeset flush right. Is there a way to change this behaviour and to typeset them flush left instead?

EDIT Here is a minimal working example: thmlabel, biblabel1, biblabel2 are flush right, whereas I want them to be flush left (as marked in red on the picture below).

\documentclass{amsart}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book{biblabel1,
  author = {Author1, A.},
  year = {2001},
  title = {Title1},
  publisher = {Publisher1},
}
@book{biblabel2,
  author = {Author2, A.},
  year = {2002},
  title = {Title2},
  publisher = {Publisher2},
}
\end{filecontents}

\usepackage[inline]{showlabels}

\showlabels{ref}
\showlabels{cite}
\showlabels{bibitem}

\newtheorem{thm}[equation]{Theorem}

\begin{document}

\begin{thm} \label{thmlabel}
Theorem text with equation
\begin{equation} \label{eqlabel}
x^2+y^2=z^2
\end{equation}
\end{thm}

Here are Theorem~\ref{thmlabel}, equation \eqref{eqlabel}, and two bibliography items authored by Author1 \cite{biblabel1} and by Author2 \cite{biblabel2}.

\bibliographystyle{plain}
\bibliography{\jobname}

\end{document}

enter image description here

1 Answer 1

1

You can take control over the way that labels are formatted by redefining \showlabelsetlabel. There's an example in the documentation, but you might try (untested)

\renewcommand{\showlabelsetlabel}[1]
  {\hbox to 0pt{\hss\showlabelfont #1}}

If that's not what you're looking for, then a minimal-working-example might be useful.

1
  • Many thanks! Alas, this not what I had in mind. An MWE has been added.
    – R W
    Jun 10, 2020 at 19:07

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.