The representation of fractions can already be implemented in the standard of LaTeX.

With the help of additional packages (amsmath, nicefrac and cancel) also other forms of fractions (like chain fractions, fractions within text) can be displayed.

More about this and examples can be found here: https://www.sascha-frank.com/fractions.html