Module:Simplified fraction: Difference between revisions

Tristanbay (talk | contribs)
seeing if using regular super- and subscripts is a good idea
Tristanbay (talk | contribs)
Seeing if using raw fraction slashes works okay
Line 23: Line 23:
ft = string.format("%d", num)
ft = string.format("%d", num)
elseif whole ~= 0 then
elseif whole ~= 0 then
ft = string.format("%d <sup>%d</sup>/<sub>%d</sub>", whole, num - whole * denom, denom)
ft = string.format("%d %d⁄%d", whole, num - whole * denom, denom)
else
else
ft = string.format("<sup>%d</sup>/<sub>%d</sub>", num, denom)
ft = string.format("%d⁄%d", num, denom)
end
end
return frame:preprocess(ft)
return frame:preprocess(ft)