I am trying to circle a text under my math equation. I used
\tikz
and \circled
but it didn't work. Can you please help me as how to circle a text while using \underbrace
. thanks\tikz
and \circled
but it didn't work. Can you please help me as how to circle a text while using \underbrace
. thanksNEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
What did you try? We could improve or fix it. TikZ is usually fine for this.feryee wrote:i used \tikz and \circled but it didn't work.
Sure! In an abstract theoretical way? Or show simply your text sample with your approach so we could work on this.feryee wrote:can you please help me as how to circle a text while using underbrace.
Code: Select all
\begin{eqnarray}
\gamma E\Bigg[\underbrace{\bigg(\textbf{x}(k)\textbf{x}^T(k)\otimes \textbf{I})vec\left(\boldsymbol\delta(k)\boldsymbol\delta^T(k)\right)\bigg)\left(\sum\limits_{i=0}^{k-2}\alpha^i e^2(k-i-1)\right)}_\text{1}\Bigg]
\end{eqnarray}
_{\textcircled{1}
as here:Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\gamma E\Bigg[\underbrace{\bigg(\textbf{x}(k)\textbf{x}^T(k)\otimes
\textbf{I})vec\left(\boldsymbol\delta(k)\boldsymbol
\delta^T(k)\right)\bigg)\left(\sum\limits_{i=0}^{k-2}\alpha^i e^2(k-
i-1)\right)}_{\textcircled{1}}\Bigg]
\end{equation}
\end{document}
\mycircle
for this:Code: Select all
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\newcommand{\mycircle}[1]{%
\tikz[baseline]\node[draw,shape=circle,anchor=base,inner sep=0.4ex] {#1} ;}
\begin{document}
\begin{equation}
\gamma E\Bigg[\underbrace{\bigg(\textbf{x}(k)\textbf{x}^T(k)\otimes
\textbf{I})vec\left(\boldsymbol\delta(k)\boldsymbol
\delta^T(k)\right)\bigg)\left(\sum\limits_{i=0}^{k-2}\alpha^i e^2(k-
i-1)\right)}_{\mycircle{1}}\Bigg]
\end{equation}
\end{document}
eqnarray
, better equation
or align
. For reasons, see eqnarray vs. align.still,feryee wrote:The reason that i use \eqnarray is due to many terms of similar form exist. So, i would be not be practical to center all of such a terms.
align
, flalign
or related environments would be better. And if there's no relation sign, as above, I would even use array
for positioning math formula parts.Today most people use pdfLaTeX, which produces PDF directly without the way over DVI or PS. I used it, and it worked fine with the circle.feryee wrote:However, unfortunately my DVI viewer gives rendering error and the circle disappears.I took PS, but the problem stands.do you have any idea what this happens.
epstopdf
script. I expect the quality to be the same, if PDF is the final result anyway, so there's the same kind of conversion necessary.Code: Select all
\usepackage{epstopdf}
Code: Select all
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes,positioning,quotes,arrows.meta}
\pgfdeclarelayer{bg}% background layer
\pgfsetlayers{bg,main}% order of the layers
\tikzset{
block/.style = {draw, rectangle, align = center,
text width = 5em, fill = white},
bullet/.style = {draw, circle, inner sep = 0.3ex,
fill = black},
round/.style = {draw, circle},
> = {Triangle[width = 1.5ex, length = 1.5ex]}
}
\usepackage{sfmath}
\renewcommand*{\familydefault}{\sfdefault}
\begin{document}
\begin{tikzpicture}
\coordinate (start);
\node (left) [bullet, right = 3em of start] {};
\node (block1) [block, right = 2em of left] {Unknown System};
\node (block2) [block, below = 3em of block1] {Adaptive Filter};
\node (sigma) [round, right = 5em of block1] {$\Sigma$};
\node (right) [bullet, right = 2em of sigma] {};
\node (stop) [right = 3em of right] {};
\node [above left = -0.5em and -0.3 em of sigma] {$+$};
\node [below left = -0.5em and -0.3 em of sigma] {$-$};
\draw (start) edge ["$x(n)$", near start, ->] (block1);
\draw (left) -- (left|-block2) edge[->] (block2);
\draw (block2) to["$y(n)$", near end] (block2-|sigma) edge[->] (sigma);
\draw (block1) edge["$d(n)$", ->] (sigma);
\draw (sigma) edge["$e(n)$", near end, ->] (stop);
\begin{pgfonlayer}{bg}% on background layer
\draw (right) -- ++ (0em,-9em) -- ++ (-14.8em,0em)
-- ++ (0em,1em) edge[->] ++(5.5em,5.5em);
\end{pgfonlayer}
\end{tikzpicture}
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p