我使用showlabels
带有选项的包,[inline]
通过以下命令调用它
\usepackage[inline]{showlabels}
在这种情况下,与环境标签(如定理等)或命令相对应的注释\bibitem
(如果我使用\showlabels{bibitem}
)相对应的注释是排版齐平的。正确的有没有办法改变这种行为并将它们排版齐平左边反而?
编辑这是一个最小的工作示例:thmlabel、biblabel1、biblabel2 右对齐,而我希望它们左对齐(如下图红色标记)。
\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}
答案1
您可以通过重新定义来控制标签的格式\showlabelsetlabel
。文档中有一个例子,但你可以尝试(未经测试)
\renewcommand{\showlabelsetlabel}[1]
{\hbox to 0pt{\hss\showlabelfont #1}}
如果这不是您想要的,那么最小工作示例可能会有用。