Module:Instruction set table builder: Difference between revisions

Reduced font size for instruction table to shrink table width
(Changed font size and padding)
(Reduced font size for instruction table to shrink table width)
 
(3 intermediate revisions by the same user not shown)
Line 29:
str = str:gsub("rs", "r<sub>s</sub>")
str = str:gsub("rt", "r<sub>t</sub>")
str = str:gsub("r'd", "rd")
str = str:gsub("r't", "rt")
str = str:gsub("r's", "rs")
return str
Line 66 ⟶ 70:
function p.set( frame )
local args = getArgs(frame)
local s = "{| class=\"wikitable\" style=\"text-align: center; font-size: 9085%;\"\n! Mnemonic !! Description !! 32-bit Instruction Word\n"
local arr = {}
Line 75 ⟶ 79:
for i = 1, #arr, 4 do
local mnemonic = formatMnemonic( string.gsub(string.format("%-10s", arr[i]), " ", "&nbsp;") .. arr[i + 1] )
mnemonic = mnemonic:gsub(arr[i], "[[#"..arr[i].."|"..arr[i].."]]")
local descrip = formatDescription( arr[i + 2] )
local word = string.addSpacing(string.gsub(arr[i + 3], " ", ""), 4)