I want to make myself a math portofolio (as a quick reference) and I have a part where I have to 'amplify' a fraction like here:

But I don't know how can I do this thing, can you help me? Thank you.

**Edit:** The "4)" in the upper left-hand corner means "amplify", the process of expanding both numerator and denominator by explicitly stating the value indicated as a multiplication factor. Similarly, a "(4" in the upper right-hand corner means "simplify", or merge the separate values in the numerator and denominator to a single value.

## Best Answer

You should define a set of custom markup commands (see [1], [2]) for those fraction types, where you employ the

`xcolor`

package and the`\prescript`

command from`mathtools`

to do the needed formatting:Regarding your request for a more sophisticated coloring macro that is able to color the numerator and the denominator indipendantly you could define:

`\coloredfrac`

can now be calledwith two optional arguments; the first one for the color of the numerator and the second one for the color of the denominator