3

In the Wikibook about LaTeX's section on dots, it's suggested that "Instead of using \ldots and \cdots, you should use the semantically oriented commands." The author then goes on to list amsmath's semantically oriented \dots commands: \dotsc, \dotsb, etc., which respectively stand for "dots with commas", "dots with binary operators/relations", etc.

But I was just thinking that if we wanted to be really semantically oriented, since when we write \dots what we actually mean is "ellipsis" or "et cetera", perhaps we should define a collection of \ellipsis commands like:

\newcommand*{\ellipsis}{\dots}
\newcommand*{\ellipsisc}{\dotsc} % "ellipsis with commas"
\newcommand*{\ellipsisb}{\dotsb} % "ellipsis with binary operators/relations"
etc.

or, since those commands were getting rather long, we could instead define a collection of \etc commands like:

\newcommand*{\etc}{\dots}
\newcommand*{\etcc}{\dotsc} % "et cetera with commas"
\newcommand*{\etcb}{\dotsb} % "et cetera with binary operators/relations"
etc.

While I find this quite satisfying with regards to being semantically sound, I worry that defining all of these new commands amounts to semantic overkill since I haven't seen anyone else rename the \dots commands. Am I taking semantic orientation too far?

  • The amsmath dots have different spacing, it is not just semantics – MaxNoe Nov 4 '15 at 2:00
2

The reason semantic naming is recommended in LaTeX is to prevent you from doing too much work if you go back and change the definition. For example, to highlight definitions, I have \newcommand{\term}{\emph}, so I can use \term to indicate where I define a new word. But if I want to change definitions to be bold instead of emphasized, I could simply update the command once, rather than having to comb through my whole document.

Thus, you should ask yourself: is there any chance you would use something other than \dots, \dotsc, and \dotsb for ellipses? If so, make a new command, but if not, there's no reason to.

A little more information on ellipses that may help: [1] [2].

  • I see; do you mean to ask if there's any chance I would use \dots, \dotsc, and \dotsb for anything other than ellipses? – justin Nov 4 '15 at 2:21
  • 1
    No, sorry, the opposite: is there a chance that you might want to define \ellipsis to be something else later? Or will you always want \dots when you need an ellipsis? (Same thing for \ellipsisc and \dotsc, etc.) – Arun Debray Nov 4 '15 at 2:25

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.