<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>https://guanches.org/index.php?action=history&amp;feed=atom&amp;title=M%C3%B3dulo%3AFormato_texto</id>
	<title>Módulo:Formato texto - Historial de revisiones</title>
	<link rel="self" type="application/atom+xml" href="https://guanches.org/index.php?action=history&amp;feed=atom&amp;title=M%C3%B3dulo%3AFormato_texto"/>
	<link rel="alternate" type="text/html" href="https://guanches.org/index.php?title=M%C3%B3dulo:Formato_texto&amp;action=history"/>
	<updated>2026-04-17T12:55:41Z</updated>
	<subtitle>Historial de revisiones de esta página en la wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://guanches.org/index.php?title=M%C3%B3dulo:Formato_texto&amp;diff=218599&amp;oldid=prev</id>
		<title>Admin: Importing missing dependency from es.wikipedia</title>
		<link rel="alternate" type="text/html" href="https://guanches.org/index.php?title=M%C3%B3dulo:Formato_texto&amp;diff=218599&amp;oldid=prev"/>
		<updated>2026-02-15T10:09:07Z</updated>

		<summary type="html">&lt;p&gt;Importing missing dependency from es.wikipedia&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local z = {}&lt;br /&gt;
&lt;br /&gt;
function z.enCursivas(texto, ref)&lt;br /&gt;
	if ref and texto then&lt;br /&gt;
		return &amp;#039;&amp;lt;i&amp;gt;&amp;#039; .. texto .. &amp;#039;&amp;lt;/i&amp;gt;&amp;#039; .. ref&lt;br /&gt;
	elseif texto then&lt;br /&gt;
	    return &amp;#039;&amp;lt;i&amp;gt;&amp;#039; .. texto .. &amp;#039;&amp;lt;/i&amp;gt;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Adaptado de [[:en:Module:String2]], función sentence&lt;br /&gt;
function z.enMayusculas(texto)&lt;br /&gt;
	if not texto or texto == &amp;#039;&amp;#039; then&lt;br /&gt;
		return texto&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- [[hipótesis (método científico)|hipótesis]]&lt;br /&gt;
	&lt;br /&gt;
	if texto:find(&amp;quot;^%[%[[^|]+|[^%]]+%]%]&amp;quot;) then&lt;br /&gt;
		local b, c = texto:find(&amp;quot;|%A*%a&amp;quot;) &lt;br /&gt;
		return string.sub(texto, 1, c-1) .. string.upper(string.sub(texto, c, c)) .. string.sub(texto, c+1)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local letterpos = texto:find(&amp;#039;%a&amp;#039;)&lt;br /&gt;
	if letterpos then&lt;br /&gt;
		local first = texto:sub(1, letterpos - 1)&lt;br /&gt;
		local letter = texto:sub(letterpos, letterpos)&lt;br /&gt;
		local rest = texto:sub(letterpos + 1)&lt;br /&gt;
		return first .. string.upper(letter) .. rest&lt;br /&gt;
	else&lt;br /&gt;
		return texto&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function z.enVersalitas(texto)&lt;br /&gt;
	if not texto or texto == &amp;#039;&amp;#039; then&lt;br /&gt;
		return texto&lt;br /&gt;
	end	&lt;br /&gt;
	return &amp;#039;&amp;lt;span style=&amp;quot;font-variant:small-caps&amp;quot;&amp;gt;&amp;#039; .. texto .. &amp;#039;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function z.enVariasLineas(lista)&lt;br /&gt;
	local resultado&lt;br /&gt;
	local copia={}&lt;br /&gt;
	require(&amp;#039;Módulo:Tablas&amp;#039;).insertarElementosConValor(lista, copia)&lt;br /&gt;
	&lt;br /&gt;
	-- Solo devolver algo si hay al menos un elemento&lt;br /&gt;
	if copia[1] then&lt;br /&gt;
		return table.concat(copia, &amp;#039;&amp;lt;br/&amp;gt;&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function z.entreComillas(texto, ref)&lt;br /&gt;
	if not texto or texto == &amp;#039;&amp;#039; then&lt;br /&gt;
		return texto&lt;br /&gt;
	elseif ref and ref ~=&amp;#039;&amp;#039; then&lt;br /&gt;
		return &amp;#039;«&amp;#039; .. texto .. &amp;#039;»&amp;#039; .. ref&lt;br /&gt;
	else &lt;br /&gt;
	    return &amp;#039;«&amp;#039; .. texto .. &amp;#039;»&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function z.entreParentesis(texto, calificativo)&lt;br /&gt;
	if not texto or texto == &amp;#039;&amp;#039; then&lt;br /&gt;
		return&lt;br /&gt;
	elseif calificativo and calificativo ~= &amp;#039;&amp;#039; then&lt;br /&gt;
	    return texto .. &amp;#039; (&amp;#039; .. calificativo .. &amp;#039;)&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		return texto&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function z.separadosPorComa(lista)&lt;br /&gt;
	local copia={}&lt;br /&gt;
	require(&amp;#039;Módulo:Tablas&amp;#039;).insertarElementosConValor(lista, copia)&lt;br /&gt;
	&lt;br /&gt;
	return table.concat(copia, &amp;#039;, &amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- :: Generar un enlace&lt;br /&gt;
function z.enlazar(enlace, texto, calificativo)&lt;br /&gt;
	local resultado &lt;br /&gt;
	&lt;br /&gt;
	if enlace and texto then&lt;br /&gt;
		resultado = &amp;#039;[[&amp;#039; .. enlace .. &amp;#039;|&amp;#039; .. texto .. &amp;#039;]]&amp;#039;&lt;br /&gt;
	elseif enlace then&lt;br /&gt;
		resultado = &amp;#039;[[&amp;#039; .. enlace .. &amp;#039;]]&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		resultado = texto&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if resultado and calificativo then&lt;br /&gt;
		return resultado .. &amp;#039; &amp;lt;small&amp;gt;(&amp;#039; .. calificativo .. &amp;#039;)&amp;lt;/small&amp;gt;&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		return resultado&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Generar un enlace (implementación extendida)&lt;br /&gt;
function z.enlazar2(enlace, opciones)&lt;br /&gt;
	if enlace then&lt;br /&gt;
		local etiqueta, namespace, tamano, borde, enlace2, pieImagen, debeExistir, solotexto&lt;br /&gt;
&lt;br /&gt;
		if type(opciones) == &amp;#039;table&amp;#039; then&lt;br /&gt;
			etiqueta	= opciones[&amp;#039;etiqueta&amp;#039;] or &amp;#039;&amp;#039;&lt;br /&gt;
			namespace	= tonumber(opciones[&amp;#039;namespace&amp;#039;]) or 0&lt;br /&gt;
			tamano		= opciones[&amp;#039;tamaño&amp;#039;] or &amp;#039;250px&amp;#039;&lt;br /&gt;
			borde		= opciones[&amp;#039;border&amp;#039;] or opciones[&amp;#039;borde&amp;#039;]&lt;br /&gt;
			enlace2		= opciones[&amp;#039;link&amp;#039;]&lt;br /&gt;
			pieImagen	= opciones[&amp;#039;pie&amp;#039;]&lt;br /&gt;
			debeExistir	= opciones[&amp;#039;debe existir&amp;#039;] or opciones[&amp;#039;debeExistir&amp;#039;] or opciones[&amp;#039;debeexistir&amp;#039;]&lt;br /&gt;
			solotexto	= opciones[&amp;#039;solotexto&amp;#039;]&lt;br /&gt;
		elseif type(opciones) == &amp;#039;string&amp;#039; then&lt;br /&gt;
			etiqueta = opciones&lt;br /&gt;
		elseif type(opciones) == &amp;#039;number&amp;#039; then&lt;br /&gt;
			namespace = opciones&lt;br /&gt;
		else&lt;br /&gt;
			etiqueta = enlace&lt;br /&gt;
			namespace = 0&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		local tituloObj = mw.title.new(enlace, namespace) or {}&lt;br /&gt;
&lt;br /&gt;
		local titulo2Obj = {}&lt;br /&gt;
		if enlace2 then titulo2Obj= mw.title.new(enlace2, 0) end&lt;br /&gt;
&lt;br /&gt;
		local resultado = {}&lt;br /&gt;
&lt;br /&gt;
		table.insert(resultado, tituloObj.fullText)&lt;br /&gt;
&lt;br /&gt;
		if not debeExistir and namespace ~= 6 and namespace ~= 14 then&lt;br /&gt;
			if etiqueta then table.insert(resultado, etiqueta) end&lt;br /&gt;
			if calificativo then return &amp;#039;[[&amp;#039; .. prefix .. table.concat(resultado, &amp;#039;|&amp;#039;) .. &amp;#039;]]&amp;#039; .. &amp;#039; &amp;lt;small&amp;gt;(&amp;#039; .. calificativo .. &amp;#039;)&amp;lt;/small&amp;gt;&amp;#039; end&lt;br /&gt;
			return &amp;#039;[[&amp;#039; .. table.concat(resultado, &amp;#039;|&amp;#039;) .. &amp;#039;]]&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if tituloObj.exists or tituloObj.fileExists then&lt;br /&gt;
			-- Archivo:&lt;br /&gt;
			if namespace == 6 then&lt;br /&gt;
				if solotexto then&lt;br /&gt;
					if etiqueta then table.insert(resultado, etiqueta) end&lt;br /&gt;
					return &amp;#039;[[:&amp;#039; .. table.concat(resultado, &amp;#039;|&amp;#039;) .. &amp;#039;]]&amp;#039;&lt;br /&gt;
				end&lt;br /&gt;
				&lt;br /&gt;
				if tamano then table.insert(resultado, tamano) end&lt;br /&gt;
				if borde then table.insert(resultado, &amp;#039;border&amp;#039;) end&lt;br /&gt;
				if titulo2Obj.exists then table.insert(resultado, &amp;#039;link=&amp;#039; .. titulo2Obj.fullText) end&lt;br /&gt;
				if etiqueta then table.insert(resultado, etiqueta) end&lt;br /&gt;
				if pieImagen then return &amp;#039;[[&amp;#039; .. table.concat(resultado, &amp;#039;|&amp;#039;) .. &amp;#039;]]&amp;#039; .. &amp;#039;&amp;lt;br&amp;gt;&amp;#039; .. pieImagen end&lt;br /&gt;
				return &amp;#039;[[&amp;#039; .. table.concat(resultado, &amp;#039;|&amp;#039;) .. &amp;#039;]]&amp;#039;&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			-- Categoría:&lt;br /&gt;
			if namespace == 14 then&lt;br /&gt;
				if solotexto then&lt;br /&gt;
					if etiqueta then table.insert(resultado, etiqueta) end&lt;br /&gt;
					return &amp;#039;[[:&amp;#039; .. table.concat(resultado, &amp;#039;|&amp;#039;) .. &amp;#039;]]&amp;#039;&lt;br /&gt;
				end&lt;br /&gt;
				return &amp;#039;[[&amp;#039; .. tituloObj.fullText .. &amp;#039;]]&amp;#039;&lt;br /&gt;
			end&lt;br /&gt;
&lt;br /&gt;
			-- El resto&lt;br /&gt;
			if etiqueta then table.insert(resultado, etiqueta) end&lt;br /&gt;
			return &amp;#039;[[&amp;#039; .. table.concat(resultado, &amp;#039;|&amp;#039;) .. &amp;#039;]]&amp;#039;&lt;br /&gt;
&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		return etiqueta&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function z.llamadaDesdeUnaPlantilla(frame)&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	&lt;br /&gt;
	if args[&amp;#039;tipo argumento&amp;#039;] == &amp;#039;tabla&amp;#039; then&lt;br /&gt;
		local tabla = {args[2], args[3], args[4]}&lt;br /&gt;
		return z[args[1]](tabla)&lt;br /&gt;
	else&lt;br /&gt;
		return z[args[1]](args[2], args[3], args[4])&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return z&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>