Content deleted Content added
a built-in unit can be an alias for a unit defined in convert |
handle Module:Su here to slightly reduce overhead, and default to align=right |
||
Line 256:
end
return result
end
local function sup_sub(sup, sub, align)
-- Return the same result as Module:Su except val defaults to align=right.
if align == 'l' or align == 'left' then
align = 'left'
elseif align == 'c' or align == 'center' then
align = 'center'
else
align = 'right'
end
return '<span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:85%;text-align:' ..
align .. '">' .. sup .. '<br />' .. sub .. '</span>'
end
Line 292 ⟶ 305:
local uncL = uncertainty.lower.clean
if uncL then
uncU = delimit('+', uncU, fmt) .. (uncertainty.upper.errend or '')
uncL = delimit('−', uncL, fmt) .. (uncertainty.lower.errend or '')
Line 299 ⟶ 311:
uncL = uncL .. unit_table.text
end
unc_text = '<span style="margin-left:0.3em;">' ..
else
if uncertainty.upper.parens then
Line 395 ⟶ 407:
suffix = args.s,
fmt = args.fmt or '',
align = args.a,
nocat = args.nocategory,
sortable = args.sortable,
|