2
  1. How can I draw three dots on a letter (similar to \dot, \ddot)?

  2. How can I draw {t\to\infty} over a {\longrightarrow}?

  3. How can I modify the length of a horizontal {\arrow}?

Thank you!

campa
  • 31,130
  • 3
    Can you conferm you need this in plain TeX? If yes, then please add the specific tag. – campa Feb 05 '20 at 08:32
  • 2
    Anticipating, that you actually are ok with using LaTeX, at least for your first two questions, please have a look at this answer: https://tex.stackexchange.com/a/39230/97536 For the third, maybe look here: https://tex.stackexchange.com/questions/6835/minimum-length-for-xrightarrow – Matthias Arras Feb 05 '20 at 09:27
  • @campa you might want to undelete your answer until the LaTeX or TeX question is answered. – DG' Feb 05 '20 at 12:11
  • @DG' Looking at the other questions from the OP I'm rather sure plain TeX is meant. – campa Feb 05 '20 at 12:21
  • Still, your answer is good, and Matthias Arras just pointed out that the OP accepted LaTeX answers in the past. – DG' Feb 05 '20 at 12:24
  • I do not see the command !!! – Ioan Merches Feb 06 '20 at 20:09

3 Answers3

5

The extensible arrow can be coded in plain TeX. One could basically copy and adapt the code from amsmath, but I choose here a shorter way:

\catcode`@=11
\def\xrightarrow{\futurelet\let@token\@xrightarrow}
\def\@xrightarrow{%
   \ifx\let@token[%
      \def\next{\@@xrightarrow}%
   \else
      \def\next{\@@xrightarrow[]}%
   \fi
   \next}
\def\@@xrightarrow[#1]#2{%
   \mathrel{%
      \mathop{%
        \setbox0=\hbox{\rightarrowfill}%
        \setbox1=\vbox{\hbox{\m@th$\scriptstyle\mkern5mu{#2}\mkern9mu$}
                       \hbox{\m@th$\scriptstyle\mkern5mu{#1}\mkern9mu$}
                       \copy0}
        \hbox to \wd1{\unhbox0}%
        }\limits
        \ifx&#1&\else_{#1\mkern3mu}\fi
        \ifx&#2&\else^{#2\mkern3mu} \fi
    }
}
\catcode`@=12

Caveat: The test for emptyness \ifx&#1&... is not very safe.

ORIGINAL ANSWER (LaTeX) The basic package amsmath provides tools to do all three things. The three dots can be obtained by \dddot, while \xrightarrow and \xleftarrow provide extensible arrows with possibly text above/below.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{gather*}
\dddot{x} \\
a \xrightarrow{t\to\infty}b \\
a \to b \longrightarrow c \xrightarrow{\qquad} d
\end{gather*}

\end{document}

enter image description here

campa
  • 31,130
2
  1. In Unicodeland with system fonts, unicode-math package defines a \dddot accent (as well as a \ddddot one), so not an answer if legacy font processing is required.

\dddot looks like this:

dddot accent

MWE

\documentclass[12pt,varwidth,border=6pt]{standalone}
\usepackage{xcolor}
\pagecolor{red!3}
\usepackage{unicode-math}
%\usepackage{accents}
\setmathfont{XITS Math}[Colour=blue]
\setmathfontface\masana{Asana Math}
\setmathfontface\mdejavu{DejaVu Math}
\setmathfontface\mtgdeja{TeX Gyre DejaVu Math}
\setmathfontface\mpagella{TeX Gyre Pagella Math}
\setmathfontface\mbonum{TeX Gyre Bonum Math}
\setmathfontface\mschola{TeX Gyre Schola Math}
\setmathfontface\mtermes{TeX Gyre Termes Math}
\setmathfontface\mlatin{Latin Modern Math}
\setmathfontface\mcambria{Cambria Math}
\setmathfontface\mfira{Fira Math}
\setmathfontface\mfreeserif{FreeSerif}
\setmathfontface\mlibert{Libertinus Math}
\setmathfontface\mnoto{Noto Sans Symbols}
\setmathfontface\mqui{Quivira}
\setmathfontface\mstixtwo{STIX Two Math}
\setmathfontface\mstixgen{STIXGeneral}
\setmathfontface\msymbola{Symbola}
\setmathfontface\mgaramond{\detokenize{Garamond-Math}}
\newcommand\mfsize{\Huge}
\setmainfont{Noto Serif}


\newcommand\themassym{\dddot }
\begin{document}
\section*{Sampling {\mfsize $\themassym $}}

\vspace{24pt}

\begin{tabular}{rccl}
XITS Math & \mfsize $\themassym$ & \mfsize $\mcambria \themassym$ & Cambria Math \\ 
\ &\ & \ & \ \\ 
Asana Math & \mfsize $\masana {\themassym}$ & \mfsize $\mfira \themassym$ & Fira Math \\ 
\ &\ & \ & \ \\ 
DejaVu Math & \mfsize $\mdejavu \themassym$ & \mfsize $\mfreeserif \themassym$ & FreeSerif \\
\ &\ & \ & \ \\ 
Tex Gyre Bonum Math & \mfsize $\mbonum \themassym$ & \mfsize $\mlibert \themassym$ & Libertinus Math \\
\ &\ & \ & \ \\ 
Tex Gyre DejaVu Math & \mfsize $\mtgdeja \themassym$ & \mfsize $\mnoto \themassym$ & Noto Sans Symbols \\
\ &\ & \ & \ \\ 
Tex Gyre Pagella Math & \mfsize $\mpagella \themassym$ & \mfsize $\mqui \themassym$ & Quivira \\
\ &\ & \ & \ \\ 
Tex Gyre Schola Math & \mfsize $\mschola \themassym$ & \mfsize $\mstixtwo \themassym$ &STIX Two Math \\
\ &\ & \ & \ \\ 
Tex Gyre Termes Math & \mfsize $\mtermes \themassym$ & \mfsize $\mgaramond \themassym$ & Garamond-Math \\
\ &\ & \ & \ \\ 
Latin Modern Math & \mfsize $\mlatin \themassym$ & \mfsize $\msymbola \themassym$ & Symbola \\
\end{tabular}


\end{document}
Cicada
  • 10,129
2

You could to use this code (MWE with the explanations in the comments %%%%) with a combination of \usepackage[lite]{mtpro2} and tikz-cd for example as into this screenshot:

enter image description here

%% Compile and read me!
\documentclass[a4paper,12pt]{article}
\usepackage[lite]{mtpro2}
\usepackage{tikz-cd}
\begin{document}
\[\dddotup{x},  
\begin{tikzcd}[column sep=2cm] %%%% to increase the lenght of the arrow
a \arrow[r, "t\to\infty"] & b
\end{tikzcd}\]
A chain of elements:
\begin{tikzcd}
    a \arrow[r] &[4em] b \arrow[r] &[7em]  c %%%% <---- to increase the lenght of the % arrow arbitrarily [4em] and [7em]
\end{tikzcd}
\end{document}

At the least you can see that \dddotup with mtpro2 also in lite version produces the dots on the character in an optimal way. See the guide at the page 15 (Using the MathTımeProfessional II fonts - with LATEX - Walter Schmidt 2008/1/23).

enter image description here

Sebastiano
  • 54,118