I use the System Preferences : Keyboard panel : Text to replace typed fractions (e.g. 2 1/2) with 2 ½.
From the System Preferences : Edit menu, select Emoji's & Symbols to launch the Character panel. In its search window, type in the word vulgar. This will locate the Unicode vulgar fractions, and display them center panel. You can also type the word fraction in the search window. If you do not have the Unicode category in the left Character panel, click the faint gear icon in the Toolbar, and select Customize List… to locate and add Unicode, or other categories.
In the left Replace section of the Keyboard Text panel, you select the + symbol to add the 1/2. Tab over to the With field, and then double-click the 1/2 fraction in the center of the character panel. It will be inserted into the With field. Press return to set it. Repeat with other fractions. Quit System Preferences.

For Pages to automatically transform the fraction, you will need to visit the Pages Edit menu : Substitutions. Enable Text Substitutions on that sub-menu. Then type 2 1/2 to see the change. When you see the prompt below just press space as you would before typing the next character. Only clicking on the x will prevent the substitution, or turning that feature off in the previously mentioned menu location.
