I'm looking for this double-X symbol. Is this available in some package? If not, would it somehow be possible to recreate this symbol by creating a new symbol which consists of two Xs printed on top of each other?
Asked
Active
Viewed 2,039 times
2 Answers
8
You should define a macro for that symbol, say \XX that inserts a negative space between the two X's. This space should depend on where it's used inside math mode (using \mathchoice):
\documentclass{article}
\usepackage{amsmath}
\newcommand{\XX}{% Space between XX varies depending on where it's used
\mathchoice% https://tex.stackexchange.com/q/148740/5764
{X\mskip-12.5mu X}% \displaystyle
{X\mskip-12.5mu X}% \textstyle
{X\mskip-12mu X}% \scriptstyle
{X\mskip-11.5mu X}% \scriptscriptstyle
}
\begin{document}
\[
\text{Var} \bigl( \hat{\beta} \,\vert\, \XX \bigr) \quad \XX^{\XX^{\XX}}
\]
\end{document}
Werner
- 603,163
-
Funny. Just after I commented, that one should use math choices your answer pops up :) – Skillmon Dec 07 '17 at 16:34
-
You should add an additional grouping around the definition of
\XXfor super- and subscripts. – Skillmon Dec 07 '17 at 16:46
5
The correct spacing here is to be inserted with \mspace, so it automatically works also in subscripts and superscripts.
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\Var}{Var}
\newcommand{\doubleX}{{%
X%
\mathchoice{\mspace{-12.5mu}}{\mspace{-12.5mu}}{\mspace{-12mu}}{\mspace{-11mu}}%
X%
}}
\begin{document}
\[
\Var(\hat{\beta} \mid \doubleX)
\,
\doubleX^{\doubleX^\doubleX}_{\doubleX}
\]
\end{document}
Different choices have to be made for the different styles; the values may change if you use a different font.
egreg
- 1,121,712
-
-
-
In this case the
muis not needed (not bad, but not the key part) because of\mathchoice, right? – Manuel Dec 07 '17 at 17:08 -
-



\smashtimesinunicode-math), but i think it isn't meant to be that. and i don't remember seeing it in any of the "usual" symbol fonts. can you provide more context -- source, meaning, ... -- if it's a "recognized" symbol, it can be requested from unicode if proper documentation is provded. (it's easy enough to construct, but i'd prefer some clarification first.) – barbara beeton Dec 07 '17 at 16:46