In https://tex.stackexchange.com/a/552557/13492, a method is shown to create both a \bigtimes symbol (for Cartesian products of families) and a \bigplus symbol (for Cartesian sums of families).
Questions:
How can that be modified so that the
\bigtimesdoes not have a square shape, that is, so that the two strokes do not cross at right angles, thereby making the symbol narrower than its height.The answer https://tex.stackexchange.com/a/552769/13492 includes a
\scaleboxwith a horizontal\scalefactorwhose value is essentially hard-coded according to which symbol is being targeted. Can the code with\scalefactorbe modified to incorporate an additional argument, defaulting to 1, for that horizontal scale factor?Given the intended usage, where both symbols take sub- and/or super-scripts for indexing, does one not need either
\DeclareMathOperatoror\mathop? If so, how should that be incorporated; if not, why not?
Source: The code from https://tex.stackexchange.com/a/552557/13492 is supplemented by two different — commented-out — methods I tried to use to accomplish the goal of 1.
\documentclass[fleqn]{article}
\usepackage{amsmath,pict2e}
\usepackage{iftex}
\ifTUTeX
\usepackage{unicode-math}
\setmainfont{TeX Gyre Termes}[Scale=1.0]
\setmathfont{TeX Gyre Termes Math}
\else
\usepackage{newtxtext,newtxmath}
\fi
\makeatletter
\newcommand{\my@big}[1]{%
\mathop{\vphantom{\sum}\mathpalette\my@makebig{#1}}\slimits@
}
\AtBeginDocument{%
\DeclareRobustCommand{\bigplus}{\DOTSB\my@big\my@plus}%
\DeclareRobustCommand{\bigtimes}{\DOTSB\my@big\my@times}%
}
\newcommand{\my@makebig}[2]{%
\vcenter{%
\sbox\z@{$\m@th#1\sum$}%
\setlength{\unitlength}{0.9\dimexpr\ht\z@+\dp\z@}%
\hbox{\kern0.1\wd\z@\my@draw{#1}{#2}\kern0.1\wd\z@}%
}%
}
\newcommand{\my@draw}[2]{%
\begin{picture}(1,1)
\linethickness{%
\ifx#1\displaystyle 1.2\fontdimen8\textfont3\else
\ifx#1\textstyle 1.1\fontdimen8\textfont3\else
\ifx#1\scriptstyle1\fontdimen8\scriptfont3\else
1\fontdimen8\scriptscriptfont3\fi\fi\fi
}%
#2
\end{picture}%
}
\newcommand{\my@plus}{%
\roundcap
\Line(0.5,0)(0.5,1)
\Line(0,0.5)(1,0.5)
}
\newcommand{\my@times}{%
\roundcap
\Line(0,0)(1,1)
\Line(0,1)(1,0)
}
%% Attempt #1 to try to reshape \bigtimes...
%% ...leaves too much space after \bigtimes...
%% ... and displaystyle puts sub- & super-scripts off-center
%\newcommand{\my@times}{%
% \roundcap
% \Line(0,0)(0.75,1)
% \Line(0,1)(0.75,0)
%}
%% Attempt #2 to reshape \bigtimes, using \scalebox instead ...
%% ... makes lines too thin and leaves too much space after \bigtmies...
%% ... and displaystyle puts sub- & super-scripts off-center:
%\newcommand{\my@@times}{%
% \roundcap
% \Line(0,0)(1,1)
% \Line(0,1)(1,0)
%}
%\usepackage{graphicx}
%\newcommand{\my@times}{%
% \scalebox{0.85}[1]{\my@@times}%
%}
\makeatother
\begin{document}
In-line $
\bigplus_{i\in I} X_i = \bigtimes_{j\in J} Y_i = \bigcup_{i\in I} Z_{i} = \bigcap_{n\in I} Z_{i}
$ here.
[
\bigplus_{i\in I} X_i = \bigtimes_{j\in J} Y_i = \bigcup_{i\in I} Z_i = \bigcap_{n\in I} Z_{i}
]
In-line $
\bigplus_{i=0}^{\infty} X_i = \bigtimes_{j=0}^{\infty} Y_i = \bigcup_{i=0}^{\infty} Z_{i} = \bigcap_{n=0}^{\infty} Z_{i}
$ here.
[
\bigplus_{i=0}^{\infty} X_i = \bigtimes_{j=0}^{\infty} Y_i = \bigcup_{i=0}^{\infty} Z_i = \bigcap_{n=0}^{\infty} Z_{i}
]
\end{document}
Output: All output shown was produced using XeLaTeX; the results are similar if pdfLaTeX is used instead.
First is the output using the original code from https://tex.stackexchange.com/a/552557/13492.
Second, the output if my Attempt 1 is used, which leaves too much space after \bigtimesin inline mode and puts sub- & super-scripts off-center in display mode:
Third, the output if my Attempt 2 is used, which also leaves too much space after \bigtimesin inline mode and puts sub- & super-scripts off-center in display mode:




