You can use mathastext to partially obtain what you are aiming at.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[vscale=0.7]{geometry}
\usepackage[subdued,defaultmathsizes]{mathastext}
\MTnonlettersobeymathxx % math alphabets will act on (, ), [, ], etc...
\MTexplicitbracesobeymathxx % math alphabets will act on \{ and \}
\MTfamily {\ttdefault} % we will declare a math version using tt font
\Mathastext [typewriter] % the math version is called typewriter
\begin{document}\thispagestyle{empty}
So far everything is normal $ (a^n +b^n)[c^m +d^m] = \left<x_i + y_j\right>$.
Indeed, we are here in the \emph{subdued} mode of mathastext.
Let's see the effect of \string\mathtt\ or \string\mathrm\ or \string\mathbf:
\[ \mathtt{ (a^n +b^n)[c^m +d^m] = \left<x_i + y_j\right>}\]
\[ \mathrm{ (a^n +b^n)[c^m +d^m] = \left<x_i + y_j\right>}\]
\[ \mathbf{ (a^n +b^n)[c^m +d^m] = \left<x_i + y_j\right>}\]
You should compare with a document not loading mathastext, and you will see
there that the math alphabet commands do not act on parentheses, etc...
I must dwelve on a subtelty: in the \emph{subdued} mode, the \string\mathrm,
etc.. commands are not modified by \texttt{mathastext}: it defines altered
variants \string\Mathrm, etc... but does not identify the original with the new.
For some matters of font encoding, it is the variants which should be used (the
problem didn't show in the examples above, but it was just lucky):
\[ \Mathtt{\{a[1],t\}\times\{t,a[2]\}} \]
\[ \Mathbf{\{a[1],t\}\times\{t,a[2]\}} \]
\texttt{mathastext} has limited influence: we see that the \string\times{}
symbol is not affected. We now will switch to the typewriter math version using
the command \string\MTversion \{typewriter\}. In this math version, we are not
in \emph{subdued} mode anymore, and the lowercase form of the math alphabets can
be used directly. \MTversion {typewriter}
\[ (a^n +b^n)[c^m +d^m] = \left<x_i + y_j\right>\]
\[ \{a[1],t\}\times\{t,a[2]\} \]
\[ \mathit{\{a[1],t\}\times\{t,a[2]\}} \]
By default the text font is also modified. Perhaps we
don't want that, so we issue \string\MTversion [normal]\{typewriter\}.\MTversion
[normal]{typewriter} This way the text font is not affected. But the math is
automatically in typewriter font (not the delimiters though):
\[ (a^n +b^n)[c^m +d^m] = \left<x_i + y_j\right>\]
The idea of the math version is to typeset only portions of the code with the
desired fonts for the letters and simple symbols in math. We return to the
normal situation with \string\MTversion \{normal\}. Here it is:
\MTversion {normal}
\[ (a^n +b^n)[c^m +d^m] = \left<x_i + y_j\right>\]
Because we switched back to the subdued version, we have to explicitely
reactivate the action of the math alphabets on the non letters (from the ascii
range), with
\string\MTnonlettersobeymathxx{}
and \string\MTexplicitbracesobeymathxx{}
\MTnonlettersobeymathxx{}
\MTexplicitbracesobeymathxx{}
$\Mathtt{\{a[1],t\}\times\{t,a[2]\}}$
$\Mathit{\{a[1],t\}\times\{t,a[2]\}}$
$\Mathbf{\{a[1],t\}\times\{t,a[2]\}}$
And I was careful to use \string\Mathtt{} and \string\Mathit, not
\string\mathtt{} or \string\mathit.
\end{document}
And here is the effect of math alphabet without mathastext:
You can define the symbols yourself:
\documentclass{article}
\usepackage{lucimatx}
\usepackage[fleqn]{amsmath}
\usepackage{pict2e}
\makeatletter
\DeclareRobustCommand{\bigplus}{%
\mathop{\vphantom{\sum}\mathpalette\@bigplus\relax}\slimits@
}
\newcommand{\@bigplus}[2]{\vcenter{\hbox{\make@bigplus{#1}}}}
\newcommand{\make@bigplus}[1]{%
\sbox\z@{$\m@th#1\sum$}%
\setlength{\unitlength}{\wd\z@}%
\begin{picture}(1.4,1.4)
%\roundcap
\linethickness{.17ex}
\Line(.7,.14)(.7,1.26)
\Line(.14,.7)(1.26,.7)
\end{picture}%
}
\DeclareRobustCommand{\bigtimes}{%
\mathop{\vphantom{\sum}\mathpalette\@bigtimes\relax}\slimits@
}
\newcommand{\@bigtimes}[2]{\vcenter{\hbox{\make@bigtimes{#1}}}}
\newcommand{\make@bigtimes}[1]{%
\sbox\z@{$\m@th#1\sum$}%
\setlength{\unitlength}{\wd\z@}%
\begin{picture}(1,1)
%\roundcap
\linethickness{.17ex}
\Line(.1,.1)(.9,.9)
\Line(.1,.9)(.9,.1)
\end{picture}%
}
\makeatother
\begin{document}
$\bigplus_{i\in I} X_i \bigtimes_{i\in I} X_i \sum_{i\in I} X_i \prod_{i\in I} X_i$
\bigskip
$\displaystyle
\bigplus_{i\in I} X_i \bigtimes_{i\in I} X_i \sum_{i\in I} X_i \prod_{i\in I} X_i$
\end{document}
I left \roundcap
(but commented), because it would be useful when Computer Modern is used instead of Lucida.
As you see, the width of \bigtimes
is the same as \sum
, whereas \bigplus
is 40% wider (so the two symbols are essentially a rotation of each other).
Experiment with \linethickness
until you're satisfied.
Edit September 2019
This should fix the slight misalignment of the subscript, as witnessed in the last two lines, with the guide rule.
\documentclass{article}
\usepackage{lucimatx}
\usepackage[fleqn]{amsmath}
\usepackage{pict2e}
\makeatletter
\DeclareRobustCommand{\bigplus}{%
\mathop{\vphantom{\sum}\mathpalette\@bigplus\relax}\slimits@
}
\newcommand{\@bigplus}[2]{\smash{\vcenter{\hbox{\make@bigplus{#1}}}}}
\newcommand{\make@bigplus}[1]{%
\sbox\z@{$\m@th#1\sum$}%
\setlength{\unitlength}{\wd\z@}%
\begin{picture}(1.4,1.4)
%\roundcap
\linethickness{.17ex}
\Line(.7,.14)(.7,1.26)
\Line(.14,.7)(1.26,.7)
\end{picture}%
}
\DeclareRobustCommand{\bigtimes}{%
\mathop{\vphantom{\sum}\mathpalette\@bigtimes\relax}\slimits@
}
\newcommand{\@bigtimes}[2]{\vcenter{\hbox{\make@bigtimes{#1}}}}
\newcommand{\make@bigtimes}[1]{%
\sbox\z@{$\m@th#1\sum$}%
\setlength{\unitlength}{\wd\z@}%
\begin{picture}(1,1)
%\roundcap
\linethickness{.17ex}
\Line(.1,.1)(.9,.9)
\Line(.1,.9)(.9,.1)
\end{picture}%
}
\makeatother
\begin{document}
$
\bigplus_{i\in I} X_i \bigtimes_{i\in I} X_i \sum_{i\in I} X_i \prod_{i\in I} X_i
\bigcup_{i\in I} X_i
$
\bigskip
$\displaystyle
\bigplus_{i\in I} X_i \bigtimes_{i\in I} X_i \sum_{i\in I} X_i \prod_{i\in I} X_i
\bigcup_{i\in I} X_i
$
\bigskip
\def\test{\makebox[0pt][l]{\kern-2cm\vrule height 0pt depth 0.1pt width \textwidth}}
$
\bigplus_{i\in I\test} X_i \bigtimes_{i\in I} X_i \sum_{i\in I} X_i \prod_{i\in I} X_i
\bigcup_{i\in I} X_i
$
\bigskip
$\displaystyle
\bigplus_{i\in I\test} X_i \bigtimes_{i\in I} X_i \sum_{i\in I} X_i \prod_{i\in I} X_i
\bigcup_{i\in I} X_i
$
\end{document}
Best Answer
In the code below, I create a new command,
\mbeq
(short for "must be equal"...), which is a "math relational" operator (same type as the "ordinary" equal sign). Using the\overset
command in the definition of the\mbeq
operator automatically makes the new command "inherit" the type of the second argument of the\overset
command; hence, it's not necessarily to assign the type "mathrel" explicitly.Finally, I'm not aware of a commonly used term for the "must be equal" symbol (exclamation mark set over equality symbol). I searched detexify, and no predefined symbol came up.