Module:TA4TK:myTest: Difference between revisions

From MaRDI portal
No edit summary
Tag: Manual revert
No edit summary
Line 2: Line 2:


local p = {}
local p = {}
 
function p.hello()
p.hello = function( frame )
local str = "Hello World!"
local str = "Hello World!"
return str
return str
end
end
 
function p.renderFormula()
p.hello_math = function( frame )
    local formula = "\\frac{a}{b}" -- LaTeX formula
local formula = "\\frac{a}{b}"
    return mw.text.nowiki(formula) -- Ensure the string isn't misinterpreted
-- Ensure the string isn't misinterpreted
return formula
--return mw.text.nowiki(formula)  
end
end
return p
return p

Revision as of 14:26, 3 January 2025

Documentation for this module may be created at Module:TA4TK:myTest/doc

-- Main table to hold all functions

local p = {}
function p.hello()
	local str = "Hello World!"
	return str
end
function p.renderFormula()
    local formula = "\\frac{a}{b}" -- LaTeX formula
    return mw.text.nowiki(formula) -- Ensure the string isn't misinterpreted
end
return p