6

Consider the center dots to show repeated multiplication:

\[
x \cdot x \cdot x \cdots x.
\]

I want to use five dots instead of the three from the \cdots command, and I also want to have them subtly arced like on the path of part of a downward-opening parabola or something.

Does such a command already exist? If not, is it possible to create such a command or achieve it on a one-off/as-needed basis?

pdfLaTeX user.

Mico
  • 506,678

2 Answers2

7

If the horizontal spacing needs changing, that can be done with kerns. If it is needed in smaller (script) mathstyles, let me know in a comment and I will revise my answer to provide them.

\documentclass[10pt]{article}
\usepackage{amsmath}
\newcommand\repdots{\mathbin{{\cdot}\raisebox{.75pt}{$\cdot$}%
  \raisebox{1pt}{$\cdot$}\raisebox{.75pt}{$\cdot$}{\cdot}}}
\begin{document}
$x \cdot x \cdot x \cdots x.$

$x \cdot x \cdot x \repdots x.$ \end{document}

enter image description here

SUPPLEMENT to add extra \cdot kern (also supports smaller mathstyles)

The value of \dotkern is used to space out the \cdots. The value 1\LMpt (Local Math pt) is 1 pt in text and display styles, but proportionately smaller in the smaller math styles.

\documentclass[10pt]{article}
\usepackage{amsmath,scalerel}
\newcommand\dotkern{\kern1\LMpt}
\newcommand\repdots{\mathbin{\ThisStyle{{\cdot}\dotkern%
  \raisebox{.75\LMpt}{$\SavedStyle\cdot$}\dotkern
  \raisebox{1\LMpt}{$\SavedStyle\cdot$}\dotkern%
  \raisebox{.75\LMpt}{$\SavedStyle\cdot$}\dotkern{\cdot}}}}
\begin{document}
$x \cdot x \cdot x \cdots x.$

$x \cdot x \cdot x \repdots x.$

$\scriptstyle x \cdot x \cdot x \repdots x.$

$\scriptscriptstyle x \cdot x \cdot x \repdots x.$ \end{document}

enter image description here

4

Steven's answer is excellent, but just for fun we can make a macro for arbitrary dots and curvature.

Use as follows: \repdots{# dots}{max vertical displacement in pt}.

\documentclass{article}
\usepackage{pgffor}
\usepackage[nomessages]{fp}
\newcommand\repdots[2]{\mathbin{\foreach \n in {1,...,#1}{\FPeval\temp{(-((\n-1)/(#1-1))*((\n-1)/(#1-1)-1)*4*(#2))}\raisebox{\temp pt}{$\cdot$}}}}
\begin{document}
$x \repdots{5}{1} x \repdots{4}{-3} x \repdots{30}{6} x \repdots{7}{-2} x$\\
\end{document}

enter image description here

Dan
  • 3,699