-1

We noted the following TeX code support in mathjax in referring in the net but it is undefined while compiling in latex, what package I should used here?

$$\enclose{circle}[mathcolor="red"]{\color{black}{x}}$$
Saravanan
  • 1,475
Rajesh N
  • 829

1 Answers1

2

You can use the new circledsteps package. Please use \[ ... \] instead of $$ ... $$, see the answers to this question.

\documentclass{article}
\usepackage{xcolor}
\usepackage{circledsteps}
\newcommand{\CCircled}[2][]{\begingroup
\pgfkeys{/csteps/.cd,inner color=.,#1}%
\ifmmode
\Circled{$#2$}%
\else
\Circled{#2}%
\fi
\endgroup}
\begin{document}
\[\CCircled[outer color=red]{x}\]
\end{document}

enter image description here

  • What standard package to support \enclose tex code? – Rajesh N Dec 31 '19 at 06:40
  • @RajeshN I am not aware of any. See this related answer: https://tex.stackexchange.com/a/229010. –  Dec 31 '19 at 06:44
  • Thank you Schrödinger's, I copied tex code from above mentioned site, but what package to support \enclose command info not given. – Rajesh N Dec 31 '19 at 06:53
  • @RajeshN Why do you think that every MathJax command is realized as a LaTeX command of the same name? As I said, I do not think there is a standard package that defines \enclose in LaTeX, but of course I may be wrong. (The downvote is not from me, I do not downvote.) –  Dec 31 '19 at 06:57
  • In my understanding MathJax support latex coding that defined in the style file or standard tex coding. – Rajesh N Dec 31 '19 at 07:09
  • 3
    @RajeshN I have only very limited experience with MathJax, but according to what I know this is not the case. MathJax mimics LaTeX in many regards, but not all. Well, let's see if someone else finds the \enclose command in some standard package. (To be clear, there is no problem in defining a command that does what \enclose does. I am just doubting that there is a standard package that carries this command.) –  Dec 31 '19 at 07:13
  • 5
    @RajeshN Remember, this is important: MathJax has absolutely nothing to do with LaTeX. They are two different projects, unrelated to each other. MathJax may use TeX math commands but they can also invent their own. Your understanding is wrong. – fractal Dec 31 '19 at 07:23
  • 2
    @RajeshN adding to the above comments, mathjax, in general, is out-of-scope of this site. – Raaja_is_at_topanswers.xyz Dec 31 '19 at 07:25
  • 1
    Thank you Fractal for your explanation. – Rajesh N Dec 31 '19 at 07:27