我已经看到如何在方程式中画一个圆圈(这里)。代码如下:
\makeatletter
\newcommand\mathcircled[1]{%
\mathpalette\@mathcircled{#1}%
}
\newcommand\@mathcircled[2]{%
\tikz[baseline=(math.base)] \node[draw,circle,inner sep=1pt, blue] (math) {$\m@th#1#2$};%
}
\makeatother
Needed assumptions on F, since we know $\lambda_1^*$ must lie within $0,1$ \\
$\frac{b- \frac{F}{[\alpha(1-\gamma) - \gamma]}}{b-a} \leq 1 \iff b- \frac{F}{[\alpha(1-\gamma) - \gamma]} \leq b-a \iff \mathcircled{F \geq a \cdot [\alpha(1-\gamma) - \gamma]}$
但是,由于周期很长,因此结果在美学上并不令人满意。我希望圆形/椭圆形以适应术语的长度(就像\boxed{}
命令amsmath
那样)。例如,对于我的例子,具体如下:
答案1
该circledsteps
包(基于TiKZ
)定义了一些带有圆角小边的矩形,用于长距离。
但是,如果您确实想要一个椭圆,请为其pstricks
定义一个:\psovalbox
\documentclass{article}
\usepackage{tikz}
\usepackage{circledsteps}
\usepackage{pstricks}
\begin{document}
Needed assumptions on F, since we know $\lambda_1^*$ must lie within $0,1$
\[ \frac{b- \frac{F}{[\alpha(1-\gamma) - \gamma]}}{b-a} \leq 1 \iff b- \frac{F}{[\alpha(1-\gamma) - \gamma]} \leq b-a \iff \Circled[inner color=blue, outer color=blue]{F \geq a \cdot [\rule[-1.5ex]{0pt}{4ex}\alpha(1-\gamma) - \gamma]\:} \]
\[ \frac{b- \frac{F}{[\alpha(1-\gamma) - \gamma]}}{b-a} \leq 1 \iff b- \frac{F}{[\alpha(1-\gamma) - \gamma]} \leq b-a \iff \psovalbox[linecolor=blue, linewidth=0.5pt]{\color{blue} F \geq a \cdot [\rule[-1.5ex]{0pt}{4ex}\alpha(1-\gamma) - \gamma]} \]
\end{document}
答案2
根据您提供的解决方案,为什么不使用该shape
库来绘制椭圆而不是圆形?
\documentclass{article}
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{shapes}
\makeatletter
\newcommand\mathcircled[1]{%
\mathpalette\@mathcircled{#1}%
}
\newcommand\@mathcircled[2]{%
\tikz[baseline=(math.base)] \node[draw,ellipse,inner sep=1pt] (math) {$\m@th#1#2$};%
}
\makeatother
\begin{document}
\[
L(q+\varepsilon) = \mathcircled{L(q) + \varepsilon \frac{dL}{d\varepsilon}} + \cdots
\]
\end{document}