13

What's next in the following sequence of LaTeX commands: \ldots, \cdots?

That is, I want an ellipsis at the top instead of in the middle or the bottom. The specific situation I have is f^{'''\cdots''}, which renders the ellipsis too low (and with odd horizontal spacing, which I know how to tweak).

5
  • 1
    Did you try f^{'''\textsuperscript{$\cdots$}''}?
    – Sigur
    Jan 24, 2014 at 17:44
  • @Sigur, I just used your precise code, but this leaves the final '' higher than the initial ones.
    – vadim123
    Jan 24, 2014 at 17:47
  • Even outside the superscript?
    – Sigur
    Jan 24, 2014 at 17:48
  • I have no explanation, but yes it is so.
    – vadim123
    Jan 24, 2014 at 17:49
  • Note that f^{'} is already wrong, it should be f'; the same for multiple primes: f'', f''' and so on.
    – egreg
    Jan 24, 2014 at 18:21

3 Answers 3

15

you're using the right quote inside the superscript. that will make the primes too small. you should use \prime instead.

is this more like what you want?

output of example code

this was produced with

$f^{\prime\prime\prime\cdots\prime\prime}$

explanation: the right quote is a shorthand for $^\prime$, and special treatment is given to multiple right quotes so that they won't be recognized as multiple superscripts (which are considered an error).

1
  • Very nice, not only answers the question but has a good lesson.
    – vadim123
    Jan 24, 2014 at 17:59
6

You could try f'''^{\cdots}{}'':

enter image description here

\documentclass{article}
\begin{document}
$f'''^{\cdots}{}''$
\end{document}
3
  • The final primes might end up at a different height than the starting ones.
    – egreg
    Jan 24, 2014 at 18:24
  • 1
    @egreg - Under which conditions might the final primes be at a different height than the first few ones? FWIW, the five primes in the example are all on the same height.
    – Mico
    Jan 24, 2014 at 18:41
  • It depends on the height of the math atom to which the leading primes are appended to; the trailing ones are appended to an empty atom no matter what the original atom is.
    – egreg
    Jan 24, 2014 at 22:50
2

Note the use of {} to avoid some strange bug.

$f^{'''\textsuperscript{$\cdots$}{}''}$

enter image description here

Without the empty braces {} we obtain

enter image description here

As @barbara beeton said you don't need to use powers. But even in this case you have to use an empty pair of braces. Compare

$f'''\textsuperscript{$\cdots$}{}''$
$f'''\textsuperscript{$\cdots$}''$

enter image description here

3
  • 1
    What a weird hack, but I admit it works. I will wait to see if there is a more natural solution before accepting.
    – vadim123
    Jan 24, 2014 at 17:53
  • Sorry, but this is not really what I'd call a solution.
    – egreg
    Jan 24, 2014 at 18:20
  • @egreg, well it was only using my small knowledge. :) I'm always learning.
    – Sigur
    Jan 24, 2014 at 18:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .