11

From Dot Derivative Discrepancy, I have tried the using \hspace{0pt} and

\makeatletter
\renewcommand{\dddot}[1]{%
  {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@
   \hbox{\normalfont ...}\vss}}}}
\renewcommand{\ddddot}[1]{%
  {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@
   \hbox{\normalfont....}\vss}}}}
\makeatother

after loading mathtools but the problem still persists.

enter image description here

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
\dot{\mathbf{r}}\times\ddot{\mathbf{r}}\times\dddot{\mathbf{r}}
\]
\end{document}

In the case the font scheme I am using has any affect as well, the fonts are:

\usepackage[utf8]{inputenx}
\renewcommand{\rmdefault}{ppl}                 
\linespread{1.05}                  
\usepackage[scaled]{helvet}
\usepackage{courier}              
\usepackage{eulervm}
\normalfont      
\usepackage[T1]{fontenc}           
\usepackage{textcomp} 
  • The construction of \dot and \ddot is completely different from \dddot and \ddddot. You might be interested in redefining \dot and \ddot to be similar to \dddot and \ddddot. – Werner Sep 4 '13 at 18:00
  • I've updated my answer introducing some improvements. – Gonzalo Medina Sep 4 '13 at 18:15
  • 1
    the \dot and \ddot come directly from a font; the triple and quadruple dots are cobbled together from pieces, so it's not surprising that they behave differently. the best solution, of course, would be for triple and quadruple dots to be in a font, as they should be in a full unicode font. – barbara beeton Sep 4 '13 at 18:18
11

The definitions of \dddot and \ddddot need some modifications: the dots need to be lowered a bit and to be scaled down so they are at the same height as in \ddot and \dot. I also used a \makebox of 0pt width so as to "hide" the extra width added by the dots, the separation between dots was also a little bit reduced.

Using TikZ I drew some horizontal rules to check the alignment:

\documentclass{article}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage[utf8]{inputenx}
\usepackage{tikz}


\renewcommand{\rmdefault}{ppl}                 
\linespread{1.05}                  
\usepackage[scaled]{helvet}
\usepackage{courier}              
\usepackage{eulervm}
\normalfont      
\usepackage[T1]{fontenc}           
\usepackage{textcomp} 

\newcommand\scaleddot{\scalebox{.89}{.}}

\makeatletter
\renewcommand{\dddot}[1]{%
  {\mathop{\kern\z@#1}\limits^{\makebox[0pt][c]{\vbox to-2.2\ex@{\kern-\tw@\ex@
   \hbox{\normalfont\scaleddot\kern-0.5pt\scaleddot\kern-0.5pt\scaleddot}\vss}}}}}
\renewcommand{\ddddot}[1]{%
  {\mathop{\kern\z@#1}\limits^{\makebox[0pt][c]{\vbox to-2.2\ex@{\kern-\tw@\ex@
   \hbox{\normalfont\scaleddot\kern-0.5pt\scaleddot\kern-0.5pt\scaleddot\kern-0.5pt\scaleddot}\vss}}}}}
\makeatother

\begin{document}
\Huge

\[
\dot{\mathbf{r}}\times\ddot{\mathbf{r}}\times\dddot{\mathbf{r}}\times\ddddot{\mathbf{r}}
\]

\[
\dot{r}\times\ddot{r}\times\dddot{r}\times\ddddot{r}
\]

\begin{tikzpicture}[remember picture,overlay]
\draw ([yshift=230.5pt]current page.west) -- +(\paperwidth,0pt);
\draw ([yshift=161.5pt]current page.west) -- +(\paperwidth,0pt);
\end{tikzpicture}

\end{document}

enter image description here

Since, in this case, mathtools is loaded used, one could've used \mathclap{...} instead of \makebox[0pt][c]{...}; I went with the latter, since in this way the redefinition is also valid without mathtools.

  • my eyes may be going, but it looks to me like the three-dot embellishment has the dots farther apart than the two-dot version. in any event, there's more space between the times sign and the third "r" than in any other similar location (which was true also in the original question). – barbara beeton Sep 4 '13 at 18:04
  • @barbarabeeton yes; I've reduced a bit the distance between the dots, and fixed the spacing between the times and the third "r". God bless your eyes! – Gonzalo Medina Sep 4 '13 at 18:09
  • sorry to be a pain, gonzalo, but it seems that the dots in the triple and quadruple embellishments are just a hair "fatter" than the single and double ones. getting matching dots isn't easy; i know -- i constructed the first version used at ams, and i think it's still not completely rignt in amsfonts. – barbara beeton Sep 4 '13 at 18:24
  • @barbarabeeton by no means! Thanks to your comments and keen observations answers are a lot better. I've now scaled down a bit the dots; I can only zoom to 400% and they seem to be OK now. What do you think? – Gonzalo Medina Sep 4 '13 at 18:31
  • Your last edit raised the r up. – dustin Sep 4 '13 at 18:37
7

Package amsmath uses math accents for \dot and \ddot, but constructs \dddot and \ddddot manually as upper limit of a math operator with some disadvantages:

  • The argument/symbol is set as math operator, causing a single symbol to be vertically centered around the math axis.
  • The dots are set with font \normalfont, thus they do not scale in smaller math styles.
  • The upper border of the bounding box is different, the accent is included, the manual dots are more or less excluded by the construction.

The mathabx fonts have \dddot and \ddddot as math accents. Because package mathabx does change many fonts, the following example defines only the font, needed for the accents and redefines \dot up to \ddddot to use the mathabx fonts:

\documentclass{article}
\usepackage{amsmath}

% from mathabx:
\DeclareFontFamily{U}{mathb}{\hyphenchar\font45}
\DeclareFontShape{U}{mathb}{m}{n}{
      <5> <6> <7> <8> <9> <10> gen * mathb
      <10.95> mathb10 <12> <14.4> <17.28> <20.74> <24.88> mathb12
      }{}
\DeclareSymbolFont{mathb}{U}{mathb}{m}{n}
\DeclareFontSubstitution{U}{mathb}{m}{n}

\let\dot\relax
\DeclareMathAccent{\dot}{0}{mathb}{"39}
\let\ddot\relax
\DeclareMathAccent{\ddot}{0}{mathb}{"3A}
\let\dddot\relax
\DeclareMathAccent{\dddot}{0}{mathb}{"3B}
\let\ddddot\relax
\DeclareMathAccent{\ddddot}{0}{mathb}{"3C}

\begin{document}
\[
  \dot{r}, \ddot{r}, \dddot{r}, \ddddot{r}
\]
\end{document}

Result

Remarks:

  • The example uses an italics r to show that accents (and upper limits) are following the slanting of the symbol.

  • The dot accents are a little higher in the mathabx font.

  • This answer was intended as answer to this question. But the question was closed as duplicate and redirected here, before I could answer. – Heiko Oberdiek Jul 16 '14 at 19:38
  • Don't you agree that the other question was a duplicate of this one? – egreg Jul 16 '14 at 19:52
  • @egreg: I would have called it related rather than a duplicate. But never mind, the answer covers an intersection of both questions. – Heiko Oberdiek Jul 16 '14 at 20:25
  • Thank you @HeikoOberdiek ! This is exactly what I needed. – Spenser Jul 16 '14 at 22:23
5

Here's the stackengine approach. I have kerned -1mu between the dots, but that could be changed if you found them wrongly spaced. I also set the dots 1pt above the object... that too could be customized.

\documentclass{article}
%\usepackage[utf8]{inputenx}
%\renewcommand{\rmdefault}{ppl}                 
%\linespread{1.05}                  
%\usepackage[scaled]{helvet}
%\usepackage{courier}              
%\usepackage{eulervm}
%\normalfont      
%\usepackage[T1]{fontenc}           
%\usepackage{textcomp} 
\usepackage{mathtools}
\usepackage{stackengine}
\renewcommand\dot[1]{\stackMath\stackengine{1pt}{#1}{.}{O}{c}{F}{T}{S}}
\renewcommand\ddot[1]{\stackMath\stackengine{1pt}{#1}{.\mkern-1mu.}{O}{c}{F}{T}{S}}
\renewcommand\dddot[1]{\stackMath\stackengine{1pt}{#1}{.\mkern-1mu.\mkern-1mu.}{O}{c}{F}{T}{S}}
\begin{document}
\[
  \dot{\mathbf{r}}\times\ddot{\mathbf{r}}\times\dddot{\mathbf{r}}
\]
\[
  \dot{r}\times\ddot{r}\times\dddot{r}
\]
\[
  \frac{\dot{\mathbf{r}}\times\ddot{\mathbf{r}}\times\dddot{\mathbf{r}}}
       {\lvert \dot{\mathbf{r}} \times \ddot{\mathbf{r}} \rvert}
\]
\end{document}

enter image description here

In response to barbara's comment...

enter image description here

  • to "check" the height, compare the spacing with a macron and a hat. all of them should look well together. – barbara beeton Sep 4 '13 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.