How can I change a math symbol's size globally?
This keeps the same line thickness, but shrinks it down to .6 scale. If you need this in smaller math styles, let me know.
\documentclass{article}
\usepackage{scalerel,stackengine}
\newcommand\shortminus{\ensuremath{\hstretch{0.6}{-}}}
\newcommand\Times{\mathbin{\!\rotatebox[origin=c]{45}{\stackinset{c}{}{c}{}{%
\rotatebox[origin=c]{90}{\shortminus}}{\shortminus}}\!}}
\begin{document}
$5.12\times10^{-49}$
$5.12\Times10^{-49}$
\end{document}
You can play with scale
, margin
and raise
to form a desired output.
\documentclass{article}
\usepackage{fontspec}
\usepackage{unicode-math}
\usepackage{amsmath}
\usepackage{adjustbox}
\setmainfont{TeX Gyre Termes}
\setmathfont[FakeBold=4.0, version=bold]{TeX Gyre Termes Math}
\setmathfont[version=default]{TeX Gyre Termes Math}
\begin{document}
% use default math font
\mathversion{default}
\let\oldtimes\times
\renewcommand{\times}{%
\adjustbox{scale=0.6, margin=-0.2pt, raise=0.4pt}{$\mathversion{bold}\boldsymbol{\oldtimes}$}%
}
$a \oldtimes b$
$a \times b$
\end{document}
I'd not do it. In any case I'd not redefine \times
, but use a different name for the specific purpose.
\documentclass{article}
\usepackage{amsmath}
\usepackage{pict2e}
\usepackage{siunitx}
\makeatletter
\let\skan@times\times
\DeclareRobustCommand{\rtimes}{% you may want to redefine \times, but don't
\mathbin{%
\nonscript\mspace{-0.75\medmuskip}%
\mspace{1mu}\mathpalette\rtimes@\relax\mspace{1mu}%
\nonscript\mspace{-0.75\medmuskip}%
}%
}
\newcommand{\rtimes@}[2]{%
\vcenter{\hbox{%
\begingroup
\settoheight{\unitlength}{$#1\skan@times$}%
\setlength{\unitlength}{0.5\unitlength}%
\begin{picture}(1,1)
\roundcap
\linethickness{1\getfontdimen{8}{#1}{3}}
\Line(0,0)(1,1)\Line(1,0)(0,1)
\end{picture}%
\endgroup
}}%
}
\newcommand{\getfontdimen}[3]{%
\fontdimen#1
\ifx#2\displaystyle\textfont\else
\ifx#2\textstyle\textfont\else
\ifx#2\scriptstyle\scriptfont\else
\scriptscriptfont\fi\fi\fi #3%
}
\makeatother
\begin{document}
$5.12\times 10^{-49}$
$5.12\rtimes 10^{-49}$ $\scriptstyle5.12\rtimes 10^{-49}$
\num{5.12e-49}
\sisetup{exponent-product=\rtimes}
\num{5.12e-49}
\end{document}
This exploits that \times
in Computer Modern is a very simple geometric shape with rounded caps. With other fonts it would be different.
You should consider typing in such numbers with siunitx
that allows for a very simple syntax and doesn't require to explicitly mention the symbol for the operation, so you can change your mind anytime.
The control of the thickness is done by using the default thickness of the fraction line, which is stored in \fontdimen8
of the font in math group 3.
Note that \rtimes
won't behave properly in every context (next to a parenthesis, for instance), but for your purpose it will.