\makeatletter
\newlength\@SizeOfCirc%
\newcommand{\CricArrowRight}[1]{%
\setlength{\@SizeOfCirc}{\maxof{\widthof{#1}}{\heightof{#1}}}%
\tikz [x=1.0ex,y=1.0ex,line width=.15ex, draw=black]%
\draw [->,anchor=center]%
node (0,0) {#1}%
(0,1.2\@SizeOfCirc) arc (-90:180:1.2\@SizeOfCirc);%
}%
\makeatother
这是在文档中使用的 premeable 和下面的代码,
\begin{equation}
\CricArrowRight{+}\sum M_{z})_{o}&=0
\end{equation}
我制作的是这个,
但我需要制作以下内容:
你能帮我正确写出上面的等式吗?
答案1
弧线起始于(0, 1.2\@SizeOfCirc)
,即多于符号+
。由于您希望它从 下方开始+
,因此只需将弧更改为从 开始(0, -1.2\@SizeOfCirc)
。这将产生以下结果:
要定位符号以使+
正确对齐,您必须将 选项更改baseline
为\tikz
,baseline=-\the\dimexpr\fontdimen22\textfont2\relax
如中所述这个答案。结果如下:
完整代码:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz,calc}
\makeatletter
\newlength\@SizeOfCirc%
\newcommand{\CricArrowRight}[1]{%
\setlength{\@SizeOfCirc}{\maxof{\widthof{#1}}{\heightof{#1}}}%
\tikz [x=1.0ex,y=1.0ex,line width=.15ex, draw=black, baseline=-\the\dimexpr\fontdimen22\textfont2\relax]%
\draw [->,anchor=center]%
node (0,0) {#1}%
(0,-1.2\@SizeOfCirc) arc (-90:180:1.2\@SizeOfCirc);
}%
\makeatother
\begin{document}
\begin{equation}
\CricArrowRight{+} \sum M_{z})_{o}=0
\end{equation}
\end{document}
答案2
无需tikz
,通过将amsmath
符号覆盖\circlearrowleft
在参数顶部即可完成。带圆圈的箭头被缩放和旋转。
\documentclass{article}
\usepackage{stackengine,amssymb,graphicx}
\newcommand\CircArrowLeft[1]{\stackengine{-.3ex}{#1}{\CAL}{O}{c}{F}{F}{L}}
\newcommand\CAL{\scalebox{2}{\rotatebox[origin=center]{90}{$\circlearrowleft$}}}
\stackMath
\begin{document}
\begin{equation}
\CircArrowLeft{+}\sum M_{z})_{o}=0
\end{equation}
\end{document}
答案3
与 hbaderts 类似,但有一些额外功能(例如,\DOTSB
正确的自动定位\dots
、使用pgfmath
宏来计算宽度等)
\documentclass{scrartcl}
\usepackage{mathtools,amssymb,lmodern,tikz}
\usetikzlibrary{arrows,bending}
\newcommand*\carr[1]
{\DOTSB\mathbin{\mkern2mu\tikz[x=1ex, y=1ex, line width=.1ex, line cap=round, draw=black, baseline=-\the\fontdimen22\textfont2] {
\pgfmathsetmacro\circlesize{max(width("$#1$"),height("$#1$"))*.8}
\draw[->, >=stealth', anchor=center] node (0,0) {$#1$}
++(-100:\circlesize pt) arc (-100:195:\circlesize pt);}}}
\begin{document}
\[
\Bigl( A \carr{+} \sum M_z \Bigr)_{0} = 0
\]
\end{document}
答案4
\usepackage{tikz}
\usetikzlibrary{calc,bending}
\def\CricArrowNCW#1{\tikz[baseline=(A.base)]
\draw[-stealth,line width=.035em]
(0,0) node[circle, inner sep=.05cm](A){$#1$}
let \p1=(A.center),\p2=(A.west), \n1={\x1-\x2} in
(90:\n1) arc(90:-190:\n1);}
\def\CricArrowACW#1{\tikz[baseline=(A.base)]
\draw[-stealth,line width=.035em]
(0,0) node[circle, inner sep=.05cm](A){$#1$}
let \p1=(A.center),\p2=(A.west), \n1={\x1-\x2} in
(-90:\n1) arc(-90:180:\n1);}
\begin{document}
\CricArrowNCW{+} %normal clock wise
\CricArrowACW{-} % anti clock wise
\end{document}