Making a thicker \cdot for dot product (that is thinner than \bullet)
May be you find a better name like \dotp
or something like that.
\documentclass{scrartcl}
\usepackage{graphicx}
\makeatletter
\newcommand*\bigcdot{\mathpalette\bigcdot@{.5}}
\newcommand*\bigcdot@[2]{\mathbin{\vcenter{\hbox{\scalebox{#2}{$\m@th#1\bullet$}}}}}
\makeatother
\begin{document}
$a \bigcdot b$
\end{document}
Here is a simple trick which needs the amsmath
package.
\[
a \boldsymbol{\cdot} b = 0
\]
and the result is
The following example extends Manuel's answer in two ways:
- The vertical position is fixed to center the symbol vertically around the
math axis as
\cdot
and\bullet
do. - The width of the symbol is not the scaled down width of the
\bullet
(with scaled down side bearings), but a little larger width of\cdot
.
The scale and width factor can be configured by macros \bigcdot@scalefactor
and \bigcdot@widthfactor
.
\documentclass{scrartcl}
\usepackage{color}
\usepackage{graphicx}
\makeatletter
\newcommand*{\bigcdot}{}% Check if undefined
\DeclareRobustCommand*{\bigcdot}{%
\mathbin{\mathpalette\bigcdot@{}}%
}
\newcommand*{\bigcdot@scalefactor}{.5}
\newcommand*{\bigcdot@widthfactor}{1.15}
\newcommand*{\bigcdot@}[2]{%
% #1: math style
% #2: unused
\sbox0{$#1\vcenter{}$}% math axis
\sbox2{$#1\cdot\m@th$}%
\hbox to \bigcdot@widthfactor\wd2{%
\hfil
\raise\ht0\hbox{%
\scalebox{\bigcdot@scalefactor}{%
\lower\ht0\hbox{$#1\bullet\m@th$}%
}%
}%
\hfil
}%
}
\makeatother
\begin{document}
\[ a \bigcdot b \]
%
% Comparison with \cdot and \bullet
\[ a \cdot b \bigcdot c \bullet d \]
%
% Different math styles
\[ a \bigcdot b \quad
\scriptstyle a \bigcdot b \quad
\scriptscriptstyle a \bigcdot b
\]
%
% Visualization of the math axis
\[
\sbox0{${-}{\cdot}{\bigcdot}{\bullet}{-}$}
\rlap{\copy0}%
\vcenter{%
\hbox{%
\textcolor{red}{%
\vrule width\wd0 height .05pt depth .05pt\relax
}%
}%
}
\]
\end{document}