TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to reference several times (eg. 2:30 - two minutes and thirty seconds) from a song for an assignment I am working on.

I have thought of using $2$:$30$ because I thought using 2:30 would be incorrect.

Is my method of typesetting song duration correct or is there some other method that is?

share|improve this question
Adding the $ will set it in math font, rather than text font. In many cases, they will be the same font. For music, where math and equations seems distant from the application, I would think 2:30 would suffice (without the dollars). – Steven B. Segletes Jun 25 '14 at 19:24
@StevenB.Segletes, I see. So any set of numbers that are not related to mathematics not need be set in the mathematics font? – user133987 Jun 25 '14 at 19:28
That's correct. When in math mode, other things will apply, like italic variables and extra space inserted around math operators, as in a+b versus $a+b$. But in your case, none of that is relevant. – Steven B. Segletes Jun 25 '14 at 19:30
Thank you, this helps a lot with other LaTeX projects! – user133987 Jun 25 '14 at 19:32
up vote 6 down vote accepted

2:30 will be incorrect, because of a space added between : and 30. I suggest a macro with a syntax close to what one writes: it takes 2:30 or even 2: 30 or 2 : 30 as an argument and will print something like Duration 2:30 and a correct spacing (a thin space on both sides of the colon). It requires the etoolbox and xparse packages.

In addition, if the time is, say 3:00, you just have to type 3, the 00 will be added. If the length is less than 1 minute, you just type :45, say.

I didn't implement the case of ragas, for which the length can be more than 1 h, but it would be easy to do :)

Here is an example with and without the macro:

\documentclass[12pt, a4paper]{article}

\usepackage{etoolbox, xparse}

\DeclareDocumentCommand \lgth%
{ >{\SplitArgument {1}{:}} m }


\lgth{2: 30} \qquad \lgth{: 45}\qquad\lgth{3}\\

Duration\quad2 : 30\\



enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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