I would like to reduce each fraction i/n
to its irreproducible form (and let's assume i is less than n) and displayed not as a \frac
fraction but like it is used e.g. in the frame numbers used in latex beamer, i.e. also as j/m
When using pgfmath
the result is a little surprisig and the terms are usual fractions, MWE:
\documentclass[border=4pt]{standalone}
\usepackage{pgfmath,fp}
\usetikzlibrary{calc}
\pgfkeys{/pgf/number format/frac}
\newcommand{\fractions}[1]{%
\foreach \x in {1,...,#1}
{\pgfmathparse{\x/#1}\pgfmathprintnumber{\pgfmathresult}\hspace{1em}}
}
\begin{document}
\fractions{16}
\end{document}
which results in
How can i get that to
1/16 1/8 3/16 1/4 5/16 3/8 7/16
... ?