我使用 showkeys 来管理我的标签。但是,有时我想使用长标签名称,但 showkeys 似乎不喜欢它们!:)
问题是标签超出了边距。我知道另外两个类似的问题
但他们的解决方案似乎对我的案例不起作用。这是一个 MWE,其中实施了 David Carlisle 在第一个问题中提出的解决方案,但结果并不令人满意。
\documentclass{article}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage[notref]{showkeys}
\renewcommand*\showkeyslabelformat[1]{%
\fbox{\parbox[t]{\marginparwidth}{\raggedright\normalfont\small\ttfamily#1}}}
\begin{document}
These are the constraint equations
\begin{align*}
\dot{x} &= \frac{R}{2}(\dot{\varphi_1}+\dot{\varphi_2})\sin\theta \\
\dot{y} &= -\frac{R}{2}(\dot{\varphi_1}+\dot{\varphi_2})\cos\theta \\
\theta-\theta_0 &= \frac{R}{2L}(\varphi_1-\varphi_2)
\tag{1}
\label{eq:constraint:final:integrated}
\end{align*}
\ref{eq:constraint:final:integrated} but the label seems to be out the paper!
\end{document}
答案1
这也许
\documentclass{article}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage[notref]{showkeys}
\renewcommand*\showkeyslabelformat[1]{%
\fbox{\parbox[t]{\marginparwidth}{\raggedright\path{#1}}}}
\begin{document}
These are the constraint equations
\begin{align*}
\dot{x} &= \frac{R}{2}(\dot{\varphi_1}+\dot{\varphi_2})\sin\theta \\
\dot{y} &= -\frac{R}{2}(\dot{\varphi_1}+\dot{\varphi_2})\cos\theta \\
\theta-\theta_0 &= \frac{R}{2L}(\varphi_1-\varphi_2)
\tag{1}
\label{eq:constraint:final:integrated}
\end{align*}
\ref{eq:constraint:final:integrated} but the label seems to be out the paper!
\end{document}