$\mathrlap{\cdot}\lrcorner$

$\mathrlap{\cdot}\lrcorner$

我正在使用

\newcommand*{\pb}{\mbox{\LARGE{$\mathrlap{\cdot}\lrcorner$}}}

并把

\arrow[dr, phantom, "\pb", very near start]

tikz-cd代码中表示回拉方块。它在我之前的 LaTeX 中运行良好,但现在不行了,它看起来像:

在此处输入图片描述

点应该位于中间,但是却向左移动太多lrcorner。如何修复?

答案1

您应该收到有关未定义控制序列的错误:

<recently read> \mathrlap 
                          
l.8 \end{tikzcd}
                
The control sequence at the end of the top line
of your error message was never \def'ed.

缺少mathtools提供的包。\mathrlap


因为\LARGE它也不是一个接受参数的宏,而只是切换字体大小,所以我相应地调整了它的定义\pb

代码

\documentclass{article}
\usepackage{amssymb}   % for \lrcorner
\usepackage{mathtools} % for \mathrlap
\usepackage{tikz-cd}
\newcommand*{\pb}{\mbox{\LARGE$\mathrlap{\cdot}\lrcorner$}}
\begin{document}
\begin{tikzcd}
  A \arrow[dr, phantom, "\pb", very near start] \\
& B
\end{tikzcd}
\end{document}

输出

在此处输入图片描述

相关内容