[Tex/LaTex] Typesetting permutations with latex

math-modepackages

I split the question into two parts and included some answers.

1. Alternatives to the permute-package

The permute-package is very old (version 0.2, 1999) and can lead to problems in connection with other packages.

Is there an up-to-date package (or possibility) that generates similarly appealing results with the same ease?

Consider the following small working example, which demonstrates just a few possibilies of
permute:

\documentclass{article}
\usepackage{permute}
\begin{document}

That's what I want to have:

% $\pmt{(123)(45)}$ without star: no spacing between numbers

% $\pmt*{(123)(45)}$ with star: no difference (see note)

\renewcommand*\pmtseparator{\;} % thickspace, but see note below

% $\pmt{(123)(45)}$ without star: no spacing between numbers

$\pmt*{(123)(45)}$ with star: spaces between numbers

I do \emph{not} want to write something horrific like
$\begin{array}{llllll}(1&2&3)(4&5)\end{array}$.

Of course I could write $(123)(45)$ or $(1,2,3)(4,5)$, 
but I would like to have an apperance different from that of tuples,
and numbers greater than 10 rule out the first possibility anyway.
\end{document}

Notes:

  • Concerning \pmtseparator. The separator is included if the *-variant of \pmt is used. It is predefined as a space  . Hence, it only appears in text mode. Redefining it to \ , as the manual suggests, makes the space visible both in text and math mode.
    If you use \pmt only in math mode, it is better, as Philippe Goutet pointed out, to use
    \, for a thinspace or \; for a thickspace. (More about lengths.)
  • Verbose permutations can be created with \pmtv.

Solutions so far:

  • There seems to be no alternative, but the package permute works.
  • Alternatively, if you do not insist on a special appearance, you use one of the two possibilities from the last paragraph.

(However, the permute-package has some limitations concerning the order of multiplication and the use of numbers greater than 9, but this could be discussed later and in another question.)

2. Typesetting permutations with LaTeX

Or what do typographers or other authors say about (1 2 3)(4 5) vs. (1,2,3)(4,5) vs. (123)(45)?

Best Answer

To answer your second question, when you must choose a notation for an object, the main point is non-ambiguity: this rules out writing (123) as this could be, not knowing the context, either (1,2,3) or (12,3) or (1,23). This means that there should be a separation between the numbers.

The simplest choice is the comma (followed by a thin space, automatically added by TeX) but some people prefer avoiding any punctuation.

In this case, the rule is to use a space at least one rank above the smallest possible (in this case, that would be a thick space (which is \; in TeX), as the smallest used space in formulas is a thin one); this is to take into account the fact that there is a loss of readability without the comma to mark the separation. Using a thick space is what the Acta Mathematica (by Lansburgh, 1964) and Oxford (by Chaundy, 1957) math style guides recommend for enumerations without commas.

Another perfectly valid line of thought is that a permutation written without any commas is akin to a matrix, which would use an em space (\quad in TeX). As an em space is clearly too much for inline formulas, this would mean using a space one rank below (i.e. an en space, \enspace in TeX).

Here is a quick comparison of these solutions along with the word space one (which is \  in TeX, but you normally don't use it in formulas not containing text):

comparison of the different spacing options for permutations

Of course, the simplest solution to implement is with commas as you can just write the formula as it will appear.