diff options
Diffstat (limited to 'files/es/web/mathml')
-rw-r--r-- | files/es/web/mathml/attribute/index.html | 485 | ||||
-rw-r--r-- | files/es/web/mathml/authoring/index.html | 377 | ||||
-rw-r--r-- | files/es/web/mathml/elemento/index.html | 97 | ||||
-rw-r--r-- | files/es/web/mathml/elemento/math/index.html | 162 | ||||
-rw-r--r-- | files/es/web/mathml/examples/index.html | 24 | ||||
-rw-r--r-- | files/es/web/mathml/examples/mathml_pythagorean_theorem/index.html | 9 | ||||
-rw-r--r-- | files/es/web/mathml/index.html | 75 |
7 files changed, 1229 insertions, 0 deletions
diff --git a/files/es/web/mathml/attribute/index.html b/files/es/web/mathml/attribute/index.html new file mode 100644 index 0000000000..671bb7ddf7 --- /dev/null +++ b/files/es/web/mathml/attribute/index.html @@ -0,0 +1,485 @@ +--- +title: MathML attribute reference +slug: Web/MathML/Attribute +translation_of: Web/MathML/Attribute +--- +<p>Esta es una lista alfabetica de atributos de MathML. Más detalles de cada atributo está disponible en cada <a href="/en-US/docs/MathML/Element" title="/en-US/docs/MathML/Element">página de los elementos</a>.</p> +<p>Notas:</p> +<ul> + <li>Los elementos MathML {{ MathMLElement("mstyle") }} y {{ MathMLElement("math") }} {{ gecko_minversion_inline("7.0") }} aceptan todos los atributos de todos los elementos de presentacion.</li> + <li>Vea los <a href="/en-US/docs/MathML/Attributes/Values" title="/en-US/docs/MathML/Attributes/Values">valores</a> de las notas sobre los valores y unidades en MathML.</li> +</ul> +<table class="standard-table"> + <thead> + <tr> + <th>Nombre</th> + <th>Atributos aceptados</th> + <th>Descripción</th> + </tr> + </thead> + <tbody> + <tr id="accent"> + <td><code>accent</code></td> + <td>{{ MathMLElement("mo") }}, {{ MathMLElement("mover") }}, {{ MathMLElement("munderover") }}</td> + <td>Un valor booleano que especifíca si el operador debe ser tratado como un acento.</td> + </tr> + <tr id="accentunder"> + <td><code>accentunder</code></td> + <td>{{ MathMLElement("munder") }}, {{ MathMLElement("munderover") }}</td> + <td>Un valor booleano que especifíca si el operador debe ser tratado como un acento.</td> + </tr> + <tr id="actiontype"> + <td><code>actiontype</code></td> + <td>{{ MathMLElement("maction") }}</td> + <td>Un valor de cadena que especifica la acción pasada al elemento.</td> + </tr> + <tr id="align"> + <td><code>align</code></td> + <td>{{ MathMLElement("mtable") }}<br> + {{ MathMLElement("munder") }}, {{ MathMLElement("mover") }}, {{ MathMLElement("munderover") }}<br> + {{ MathMLElement("mstack") }}</td> + <td>Especifica diferentes alineaciones de varios elementos (consulte la página de elementos para más detalles)</td> + </tr> + <tr id="alignmentscope"> + <td>{{ unimplemented_inline() }} <code>alignmentscope</code></td> + <td>{{ MathMLElement("mtable") }}</td> + <td>Un valor booleano que especifica si las columnas de la tabla deben actuar como ámbitos de alineación o no.</td> + </tr> + <tr id="alt-*"> + <td>{{ unimplemented_inline() }}<br> + <code>altimg</code><br> + <code>altimg-width</code><br> + <code>altimg-height</code><br> + <code>altimg-valign</code><br> + <code>alttext</code></td> + <td>{{ MathMLElement("math") }}</td> + <td>Opciones visuales y textuales de repliegue</td> + </tr> + <tr id="bevelled"> + <td><code>bevelled</code></td> + <td>{{ MathMLElement("mfrac") }}</td> + <td>Especifica el estilo de como se debe mostrar la fracción.</td> + </tr> + <tr id="charalign"> + <td>{{ unimplemented_inline() }} <code>charalign</code></td> + <td>{{ MathMLElement("mstack") }}</td> + <td>Especifica la alineación horizontal de los dígitos.</td> + </tr> + <tr id="close"> + <td><code>close</code></td> + <td>{{ MathMLElement("mfenced") }}</td> + <td>Una cadena para el delimitador de cierre.</td> + </tr> + <tr id="columnalign"> + <td><code>columnalign</code></td> + <td>{{ MathMLElement("mtable") }}, {{ MathMLElement("mtd") }}, {{ MathMLElement("mtr") }}, {{ MathMLElement("mlabeledtr") }}</td> + <td>Especifica la alineación horizontal de las celdas de la tabla.</td> + </tr> + <tr id="columnlines"> + <td><code>columnlines</code></td> + <td>{{ MathMLElement("mtable") }}</td> + <td>Especifica los bordes de la columna de la tabla.</td> + </tr> + <tr id="columnspacing"> + <td>{{ unimplemented_inline() }} <code>columnspacing</code></td> + <td>{{ MathMLElement("mtable") }}</td> + <td>Especifica el espacio entre las columnas de la tabla.</td> + </tr> + <tr id="columnspan"> + <td><code>columnspan</code></td> + <td>{{ MathMLElement("mtd") }}</td> + <td>Un valor entero no negativo que indica a cuantas columnas se extiende las celdas de la tabla.</td> + </tr> + <tr id="columnwidth"> + <td>{{ unimplemented_inline() }} <code>columnwidth</code></td> + <td>{{ MathMLElement("mtable") }}</td> + <td>Especifica el ancho de las columnas de la tabla.</td> + </tr> + <tr id="crossout"> + <td>{{ unimplemented_inline() }} <code>crossout</code></td> + <td>{{ MathMLElement("mscarry") }}</td> + <td>Especifica el tipo de linea que se dibuja para tachar.</td> + </tr> + <tr id="decimalpoint"> + <td>{{ unimplemented_inline() }} <code>decimalpoint</code></td> + <td>{{ MathMLElement("mstyle") }}</td> + <td>Si el valor de <code>decimalpoint</code> es usado para especificar la <a href="#align">alineación</a>, este atributo especifica el caracter del punto de alineación dentro de las columnas de {{ MathMLElement("mstack") }} y {{ MathMLElement("mtable") }} .</td> + </tr> + <tr id="denomalign"> + <td><code>denomalign</code></td> + <td>{{ MathMLElement("mfrac") }}</td> + <td>La alineación del denominador bajo la fracción.</td> + </tr> + <tr id="depth"> + <td><code>depth</code></td> + <td>{{ MathMLElement("mpadded") }}</td> + <td>Establece o incrementa la profundidad. Ver <a href="/en-US/docs/MathML/Attributes/Values" title="/en-US/docs/MathML/Attributes/Values">longitud</a>.</td> + </tr> + <tr id="dir"> + <td><code>dir</code></td> + <td>{{ MathMLElement("math") }}, {{ MathMLElement("mi") }}, {{ MathMLElement("mo") }}, {{ MathMLElement("mrow") }}, {{ MathMLElement("ms") }}, {{ MathMLElement("mtext") }}</td> + <td>La dirección del texto. Posibles valores son ltr (izquierda a derecha) o rtl (derecha a izquierda).</td> + </tr> + <tr id="display"> + <td><code>display</code></td> + <td>{{ MathMLElement("math") }}</td> + <td>Especifica el modo de renderizado. Los valores <code>block</code> e <code>inline</code> son permitidos.</td> + </tr> + <tr id="displaystyle"> + <td><code>displaystyle</code></td> + <td>{{ MathMLElement("mstyle") }}, {{ MathMLElement("mtable") }}</td> + <td> + <p>Un valor booleano que especifica si un espacio más vertical es usado para las ecuaciones mostradas o, si se establece como <code>false</code>, un diseño más compacto se utiliza para mostrar las formulas.</p> + </td> + </tr> + <tr id="edge"> + <td>{{ unimplemented_inline() }} <code>edge</code></td> + <td>{{ MathMLElement("malignmark") }}</td> + <td> </td> + </tr> + <tr id="equalcolumns"> + <td>{{ unimplemented_inline() }} <code>equalcolumns</code></td> + <td>{{ MathMLElement("mtable") }}</td> + <td> + <p>Un valor booleano que indica si se debe obligar a las columnas a tener la misma altura total.</p> + </td> + </tr> + <tr id="equalrows"> + <td>{{ unimplemented_inline() }} <code>equalrows</code></td> + <td>{{ MathMLElement("mtable") }}</td> + <td>Un valor booleano que indica si se debe obligar a las filas a tener la misma altura total.</td> + </tr> + <tr id="fence"> + <td><code>fence</code></td> + <td>{{ MathMLElement("mo") }}</td> + <td> + <p>Un valor booleano que indica si el operador está cercado (como parentesis). No hay efecto visual de este atributo.</p> + </td> + </tr> + <tr id="form"> + <td>{{ unimplemented_inline() }} <code>form</code></td> + <td>{{ MathMLElement("mo") }}</td> + <td> + <p>Especifica el rol del operador en una expresión cerrada.</p> + </td> + </tr> + <tr id="frame"> + <td><code>frame</code></td> + <td>{{ MathMLElement("mtable") }}</td> + <td> + <p>Especifica bordes de toda una {{ MathMLElement("mtable") }}. Posibles valores son: <code>none</code> (default), <code>solid</code> y <code>dashed</code>.</p> + </td> + </tr> + <tr id="framespacing"> + <td>{{ unimplemented_inline() }} <code>framespacing</code></td> + <td>{{ MathMLElement("mtable") }}</td> + <td>Especifica espacio adicional agregado entre la tabla y el frame.</td> + </tr> + <tr id="groupalign"> + <td>{{ unimplemented_inline() }} <code>groupalign</code></td> + <td>{{ MathMLElement("maligngroup") }}, {{ MathMLElement("mtable") }}, {{ MathMLElement("mtd") }}, {{ MathMLElement("mtr") }}</td> + <td> </td> + </tr> + <tr id="height"> + <td><code>height</code></td> + <td>{{ MathMLElement("mglyph") }}, {{ MathMLElement("mpadded") }}, {{ MathMLElement("mspace") }}</td> + <td>Especifica la altura deseada. Ver <a href="/en-US/docs/MathML/Attributes/Values#Lengths" title="/en-US/docs/MathML/Attributes/Values#Lengths">longitudes</a> para los posibles valores.</td> + </tr> + <tr id="href"> + <td><code>href</code></td> + <td><em>All</em></td> + <td>Usado para estableces un hyperlink para determinada URL.</td> + </tr> + <tr id="id"> + <td><code>id</code></td> + <td><em>All</em></td> + <td>Establece un unico identificador asociado con el elemento.</td> + </tr> + <tr id="indentalign"> + <td>{{ unimplemented_inline() }} <code>indentalign</code></td> + <td>{{ MathMLElement("mo") }}, {{ MathMLElement("mspace") }}</td> + <td> </td> + </tr> + <tr id="indentalignfirst"> + <td>{{ unimplemented_inline() }} <code>indentalignfirst</code></td> + <td>{{ MathMLElement("mo") }}, {{ MathMLElement("mspace") }}</td> + <td> </td> + </tr> + <tr id="indentalignlast"> + <td>{{ unimplemented_inline() }} <code>indentalignlast</code></td> + <td>{{ MathMLElement("mo") }}, {{ MathMLElement("mspace") }}</td> + <td> </td> + </tr> + <tr id="indentshift"> + <td>{{ unimplemented_inline() }} <code>indentshift</code></td> + <td>{{ MathMLElement("mo") }}, {{ MathMLElement("mspace") }}</td> + <td> </td> + </tr> + <tr id="indentshiftfirst"> + <td>{{ unimplemented_inline() }} <code>indentshiftfirst</code></td> + <td>{{ MathMLElement("mo") }}, {{ MathMLElement("mspace") }}</td> + <td> </td> + </tr> + <tr id="indentshiftlast"> + <td>{{ unimplemented_inline() }} <code>indentshiftlast</code></td> + <td>{{ MathMLElement("mo") }}, {{ MathMLElement("mspace") }}</td> + <td> </td> + </tr> + <tr id="indenttarget"> + <td>{{ unimplemented_inline() }} <code>indenttarget</code></td> + <td>{{ MathMLElement("mo") }}, {{ MathMLElement("mspace") }}</td> + <td> </td> + </tr> + <tr id="infixlinebreakstyle"> + <td>{{ unimplemented_inline() }} <code>infixlinebreakstyle</code></td> + <td>{{ MathMLElement("mstyle") }}</td> + <td>Especifica el valor por defecto de <code>linebreakstyle</code> a usar para los operadores infijos.</td> + </tr> + <tr id="largeop"> + <td><code>largeop</code></td> + <td>{{ MathMLElement("mo") }}</td> + <td>Especifica si el operador debe dibujarse más grande de lo normal.</td> + </tr> + <tr id="length"> + <td><code>length</code></td> + <td>{{ MathMLElement("msline") }}</td> + <td> </td> + </tr> + <tr id="linebreak"> + <td>{{ unimplemented_inline() }} <code>linebreak</code></td> + <td>{{ MathMLElement("mo") }}, {{ MathMLElement("mspace") }}</td> + <td> </td> + </tr> + <tr id="linebreakmultchar"> + <td>{{ unimplemented_inline() }} <code>linebreakmultchar</code></td> + <td>{{ MathMLElement("mo") }}, {{ MathMLElement("mspace") }}</td> + <td> </td> + </tr> + <tr id="linebreakstyle"> + <td>{{ unimplemented_inline() }} <code>linebreakstyle</code></td> + <td>{{ MathMLElement("mo") }}, {{ MathMLElement("mspace") }}</td> + <td> </td> + </tr> + <tr id="lineleading"> + <td>{{ unimplemented_inline() }} <code>lineleading</code></td> + <td>{{ MathMLElement("mo") }}, {{ MathMLElement("mspace") }}</td> + <td> </td> + </tr> + <tr id="linethickness"> + <td><code>linethickness</code></td> + <td>{{ MathMLElement("mfrac") }}</td> + <td>El grosor de la linea de fracción horizontal.</td> + </tr> + <tr id="location"> + <td>{{ unimplemented_inline() }} <code>location</code></td> + <td>{{ MathMLElement("mscarries") }}</td> + <td> </td> + </tr> + <tr id="longdivstyle"> + <td>{{ unimplemented_inline() }} <code>longdivstyle</code></td> + <td>{{ MathMLElement("mlongdiv") }}</td> + <td>Controla el estilo del diseño de la división larga.</td> + </tr> + <tr id="lspace"> + <td><code>lspace</code></td> + <td>{{ MathMLElement("mo") }}, {{ MathMLElement("mpadded") }}</td> + <td>La cantidad de espacio antes del operador(ver <a href="/en-US/docs/MathML/Attributes/Values#Lengths" title="/en-US/docs/MathML/Attributes/Values#Lengths">length</a> para valores y unidades).</td> + </tr> + <tr id="lquote"> + <td><code>lquote</code></td> + <td>{{ MathMLElement("ms") }}</td> + <td>El carácter de apertura de citas que encierra el contenido. El valor predeterminado es "<code>&quot;</code>".</td> + </tr> + <tr id="mathbackground"> + <td><code>mathbackground</code></td> + <td><em>All</em></td> + <td>El colo de fondo. Puedes usar <code>#rgb</code>, <code>#rrggbb</code> y <a href="/en-US/docs/CSS/color_value#HTML.2fSVG.2fX11.c2.a0_Color_Keywords" title="/en-US/docs/CSS/color_value#HTML.2fSVG.2fX11.c2.a0_Color_Keywords">nombres de color HTML</a>.</td> + </tr> + <tr id="mathcolor"> + <td><code>mathcolor</code></td> + <td><em>All</em></td> + <td>El color de texto. Puedes usar <code>#rgb</code>, <code>#rrggbb</code> y <a href="/en-US/docs/CSS/color_value#HTML.2fSVG.2fX11.c2.a0_Color_Keywords" title="/en-US/docs/CSS/color_value#HTML.2fSVG.2fX11.c2.a0_Color_Keywords">nombres de color HTML</a>.</td> + </tr> + <tr id="mathsize"> + <td><code>mathsize</code></td> + <td>{{ MathMLElement("mi") }}, {{ MathMLElement("mn") }}, {{ MathMLElement("mo") }}, {{ MathMLElement("ms") }}, {{ MathMLElement("mtext") }}</td> + <td>El tamaño del contenido. Comenzando con Gecko 20.0 {{geckoRelease("20")}} valores sin unidades están permitidos y se interpretan como N veces el tamaño predeterminado.</td> + </tr> + <tr id="mathvariant"> + <td><code>mathvariant</code></td> + <td>{{ MathMLElement("mi") }}, {{ MathMLElement("mn") }}, {{ MathMLElement("mo") }}, {{ MathMLElement("ms") }}, {{ MathMLElement("mtext") }}</td> + <td>La clase logica del identificador, la cual varia en tipografia.</td> + </tr> + <tr id="maxsize"> + <td><code>maxsize</code></td> + <td>{{ MathMLElement("mo") }}</td> + <td>El tamaño máximo del operador.</td> + </tr> + <tr id="minlabelspacing"> + <td>{{ unimplemented_inline() }} <code>minlabelspacing</code></td> + <td>{{ MathMLElement("mtable") }}</td> + <td>Un <a href="/en-US/docs/MathML/Attributes/Values" title="/en-US/docs/MathML/Attributes/Values">valor de longitud</a> espcificando el minimo espacio entre una <a href="Element/mlabeledtr" rel="internal" title="/en-US/docs/MathML/Element/mlabeledtr">etiqueta</a> y la celda adjacente en la fila.</td> + </tr> + <tr id="minsize"> + <td><code>minsize</code></td> + <td>{{ MathMLElement("mo") }}</td> + <td>El tamaño mínimo del operador.</td> + </tr> + <tr id="movablelimits"> + <td><code>movablelimits</code></td> + <td>{{ MathMLElement("mo") }}</td> + <td>Especifica si los guiones bajos y altos se mueven a las posiciones de sub-índice o super-índice.</td> + </tr> + <tr id="notation"> + <td><code>notation</code></td> + <td>{{ MathMLElement("menclose") }}</td> + <td>Una lista de anotaciones, separado por espacios en blanco, para aplicar a los elementos secundarios.</td> + </tr> + <tr id="numalign"> + <td><code>numalign</code></td> + <td>{{ MathMLElement("mfrac") }}</td> + <td>La alineación del numerador en la fracción.</td> + </tr> + <tr id="open"> + <td><code>open</code></td> + <td>{{ MathMLElement("mfenced") }}</td> + <td>Una cadena para el delimitador de apertura.</td> + </tr> + <tr id="overflow"> + <td>{{ unimplemented_inline() }} <code>overflow</code></td> + <td>{{ MathMLElement("math") }}</td> + <td> + <p>Si una expresión es demasiado larga para encajar en el ancho definido, este atributo establece el tratamiendo preferido.</p> + </td> + </tr> + <tr id="position"> + <td>{{ unimplemented_inline() }} <code>position</code></td> + <td>{{ MathMLElement("msgroup") }}, {{ MathMLElement("msrow") }}, {{ MathMLElement("mscarries") }}, {{ MathMLElement("msline") }}</td> + <td> </td> + </tr> + <tr id="rowalign"> + <td><code>rowalign</code></td> + <td>{{ MathMLElement("mtable") }}, {{ MathMLElement("mtd") }}, {{ MathMLElement("mtr") }}</td> + <td>Especifica la alineación vertical de las celdas de la tabla.</td> + </tr> + <tr id="rowlines"> + <td><code>rowlines</code></td> + <td>{{ MathMLElement("mtable") }}</td> + <td>Especifica los bordes de las filas de la tabla.</td> + </tr> + <tr id="rowspacing"> + <td><code>rowspacing</code></td> + <td>{{ MathMLElement("mtable") }}</td> + <td>Especifica el espacio entre las filas de la tabla.</td> + </tr> + <tr id="rowspan"> + <td><code>rowspan</code></td> + <td>{{ MathMLElement("mtd") }}</td> + <td>Un valor entero no negativo que indica el númerp de filas que se extiende las celdas.</td> + </tr> + <tr id="rspace"> + <td><code>rspace</code></td> + <td>{{ MathMLElement("mo") }}</td> + <td>La cantidad de espacios luego del operador.</td> + </tr> + <tr id="rquote"> + <td><code>rquote</code></td> + <td>{{ MathMLElement("ms") }}</td> + <td>La marca de cierre de cita que encierra el contenido. El valor predeterminado es "<code>&quot;</code>".</td> + </tr> + <tr id="scriptlevel"> + <td><code>scriptlevel</code></td> + <td>{{ MathMLElement("mstyle") }}</td> + <td>Controles sobre el tamaño de la fuente. Cuando mayor sea el nivel del script, menor el tamaño de la fuente.</td> + </tr> + <tr id="scriptminsize"> + <td><code>scriptminsize</code></td> + <td>{{ MathMLElement("mstyle") }}</td> + <td>Especifica el minimo tamaño de fuente permitidos debido a cambios en <code>scriptlevel</code>.<br> + Comenzando con Gecko 20.0 {{geckoRelease("20")}} valores sin unidades y porcentajes son permitidos y se interpretan como multiplos de "8pt".</td> + </tr> + <tr id="scriptsizemultiplier"> + <td><code>scriptsizemultiplier</code></td> + <td>{{ MathMLElement("mstyle") }}</td> + <td>Especifica el multiplicador a ser utilizado para ajustar el tamaño de fuente debidp a cambios en <code>scriptlevel</code>.</td> + </tr> + <tr id="selection"> + <td><code>selection</code></td> + <td>{{ MathMLElement("maction") }}</td> + <td>El elemento secundario al cual se dirige la acción.</td> + </tr> + <tr id="separator"> + <td><code>separator</code></td> + <td>{{ MathMLElement("mo") }}</td> + <td>No existe efecto visual para este elemento, pero especifica si el operador es un separador (como las comas).</td> + </tr> + <tr id="separators"> + <td><code>separators</code></td> + <td>{{ MathMLElement("mfenced") }}</td> + <td>Una secuencia de ceros o más caracteres a ser usados por diferentes separadores.</td> + </tr> + <tr id="shift"> + <td>{{ unimplemented_inline() }} <code>shift</code></td> + <td>{{ MathMLElement("msgroup") }}</td> + <td> </td> + </tr> + <tr id="side"> + <td>{{ unimplemented_inline() }} <code>side</code></td> + <td>{{ MathMLElement("mtable") }}</td> + <td>Especifica la posición donde los elementos{{ MathMLElement("mlabeledtr") }} deberían ser posicionados.</td> + </tr> + <tr id="src"> + <td>{{ unimplemented_inline() }} <code>src</code></td> + <td>{{ MathMLElement("mglyph") }}</td> + <td>La ubicación de la imagen.</td> + </tr> + <tr id="stackalign"> + <td>{{ unimplemented_inline() }} <code>stackalign</code></td> + <td>{{ MathMLElement("mstack") }}</td> + <td> </td> + </tr> + <tr id="stretchy"> + <td><code>stretchy</code></td> + <td>{{ MathMLElement("mo") }}</td> + <td>Especifica si el operador se extiende hasta el tamaño del elemento adyacente.</td> + </tr> + <tr id="subscriptshift"> + <td><code>subscriptshift</code></td> + <td>{{ MathMLElement("mmultiscripts") }}, {{ MathMLElement("msub") }}, {{ MathMLElement("msubsup") }}</td> + <td>El espacio mínimo por el que se desplace el subíndice por debajo de la línea de base de la expresión.</td> + </tr> + <tr id="supscriptshift"> + <td><code>supscriptshift</code></td> + <td>{{ MathMLElement("mmultiscripts") }}, {{ MathMLElement("msup") }}, {{ MathMLElement("msubsup") }}</td> + <td>El espacio mínimo por el que se desplace el superíndice por encima de la línea de base de la expresión.</td> + </tr> + <tr id="symmetric"> + <td><code>symmetric</code></td> + <td>{{ MathMLElement("mo") }}</td> + <td> + <p>Si <code>stretchy</code> es <code>true</code>, este atributo especifica si el operador debe estar simetrico verticalmente al eje imaginario de matemáticas (linea centrada de fracción).</p> + </td> + </tr> + <tr id="voffset"> + <td><code>voffset</code></td> + <td>{{ MathMLElement("mpadded") }}</td> + <td>Ajusta la posición vertical del contenido secundario.</td> + </tr> + <tr id="width"> + <td><code>width</code></td> + <td>{{ MathMLElement("mglyph") }}, {{ MathMLElement("mpadded") }}, {{ MathMLElement("mspace") }}, {{ MathMLElement("mtable") }}</td> + <td>Especifica el ancho deseado. Ver <a href="/en-US/docs/MathML/Attributes/Values#Lengths" title="/en-US/docs/MathML/Attributes/Values#Lengths">longitudes</a> para posibles valores.</td> + </tr> + <tr id="xlink-href"> + <td><code>xlink:href</code></td> + <td><em>All</em></td> + <td>Puede ser usado para establecer un hyperlink para determinada URL. Sin embargo, se ainma a los autores a usar el atributo <code>href</code> en su lugar.</td> + </tr> + <tr id="xmlns"> + <td><code>xmlns</code></td> + <td>{{ MathMLElement("math") }}</td> + <td>Especifica la URL para el espacio de nombres MathML (<code><a class="external" href="http://www.w3.org/1998/Math/MathML" rel="freelink">http://www.w3.org/1998/Math/MathML</a></code>)</td> + </tr> + </tbody> +</table> +<p> </p> diff --git a/files/es/web/mathml/authoring/index.html b/files/es/web/mathml/authoring/index.html new file mode 100644 index 0000000000..774c910cea --- /dev/null +++ b/files/es/web/mathml/authoring/index.html @@ -0,0 +1,377 @@ +--- +title: Redacción de MathML +slug: Web/MathML/Authoring +translation_of: Web/MathML/Authoring +--- +<p>Este artículo explica como redactar funciones matemáticas utilizando el lenguaje MathML. Al igual que HTML, MathML puede describirse con etiquetas y atributos. HTML puede volverse interminable cuando tu documento contiene estructuras avanzadas como listas o tablas pero afortunadamente existen varios generadores, desde simple notaciones, editores WYSIWYG y otros Sistemas de Administración de Contenido (CMS) utilizados para la creación de páginas web.</p> + +<p>Las notaciones Matemáticas son aún más complejas con estructuras que contienen fracciones, raíces cuadradas o matrices que seguramente requerirán sus propias etiquetas. Como consecuencia, las buenas herramientas de redacción de MathML son importantes y más adelante describimos algunas opciones. En particular, el équipo MathML de Mozilla ha creado <a href="https://github.com/fred-wang/TeXZilla/">TeXZilla</a>, un convertor de LaTeX a MathML compatible con Unicode, para ser utilizado en muchos scenari descrito ahí. Desde luego, la lista no es de ninguna manera definitiva y estás invitado a revisar la <a class="external" href="http://www.w3.org/Math/Software/">Lista de Software MathML de W3C</a> donde puedes encontrar diferentes herramientas.</p> + +<p>Hay que señalar que por diseño, MathML está bien integrado en HTML5 y particularmente puedes utilizar las características Web comunes como CSS, DOM, Javascript o SVG. Esto está fuera del ámbito de este artículo pero cualquiera con conocimientos básicos de lenguajes Web será capaz de combinar fácilmente estas características con MathML. Revisa <a href="/en-US/docs/Mozilla/MathML_Project#Sample_MathML_Documents" title="/en-US/docs/Mozilla/MathML_Project#Sample_MathML_Documents">nuestros demos</a> y <a href="https://developer.mozilla.org/en-US/docs/Web/MathML" title="en/MathML/Element">referencias de MathML</a> para más detalles.</p> + +<h2 id="Fundamentos">Fundamentos</h2> + +<h4 id="Example_in_HTML5_(text/html)" name="Example_in_HTML5_(text/html)">Utilizar MathML en páginas HTML</h4> + +<p>Puedes utilizar MathML dentro de un documento HTML5:</p> + +<pre class="brush: html"><!DOCTYPE html> +<html> +<head> + <title>MathML in HTML5</title> +</head> +<body> + + <h1>MathML in HTML5</h1> + + <p> + Square root of two: + <math> + <msqrt> + <mn>2</mn> + </msqrt> + </math> + </p> + +</body> +</html> </pre> + +<p>Content MathML no esta soportado por el navegador. Es recomendable convertir tu content MathML markup en Presentation MathML antes de publicarlo, por ejemplo con la ayuda de la hoja de calculo <a class="external external-icon" href="http://code.google.com/p/web-xslt/source/browse/trunk/#trunk/ctop">ctop.xsl</a> . Las herramientas mencionadas en esta pagina generan Presentation MathML.</p> + +<h4 id="sect1"> </h4> + +<h4 id="Para_navegadores_sin_soporte_a_MathML">Para navegadores sin soporte a MathML</h4> + +<p>Desafortunadamente, algunos navegadores no son capaces de renderizar ecuaciones MathML o tienen un soporte limitado. Por lo tanto necesitará usar MathML polyfill para proveer el renderizado. Si necesita solo construcciones matematicas básicas tales como las utilizadas en esta wiki de MDN entonces una pequeña hoja de cálculo <a href="https://github.com/fred-wang/mathml.css">mathml.css</a> podria ser suficiente. Para usarlo, solo inserta una linea en el header de tu documento:</p> + +<pre class="brush: html language-html"><code class="language-html"><span class="script token"><span class="tag token"><span class="tag token"><span class="punctuation token"><</span>script</span> <span class="attr-name token">src</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>http://fred-wang.github.io/mathml.css/mspace.js<span class="punctuation token">"</span></span><span class="punctuation token">></span></span><span class="tag token"><span class="tag token"><span class="punctuation token"></</span>script</span><span class="punctuation token">></span></span></span></code></pre> + +<p>If you need more complex constructions, you might instead consider using the heavier <a href="http://www.mathjax.org" title="http://www.mathjax.org">MathJax</a> library as a MathML polyfill:</p> + +<pre class="brush: html language-html"><code class="language-html"><span class="script token"><span class="tag token"><span class="tag token"><span class="punctuation token"><</span>script</span> <span class="attr-name token">src</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>http://fred-wang.github.io/mathjax.js/mpadded.js<span class="punctuation token">"</span></span><span class="punctuation token">></span></span><span class="tag token"><span class="tag token"><span class="punctuation token"></</span>script</span><span class="punctuation token">></span></span></span></code></pre> + +<p>Note that these two scripts perform feature detection of the <a href="https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mspace">mspace</a> or <a href="https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mpadded">mpadded</a> elements (see the browser compatibility table on these pages). If you don't want to use this link to GitHub but instead to integrate these polyfills or others in your own project, you might need the detection scripts to verify the level of MathML support. For example the following function verifies the MathML support by testing the mspace element (you may replace <code>mspace</code> with <code>mpadded</code>):</p> + +<pre class="brush: js language-js"><code class="language-js"> <span class="keyword token">function</span> <span class="function token">hasMathMLSupport<span class="punctuation token">(</span></span><span class="punctuation token">)</span> <span class="punctuation token">{</span> + <span class="keyword token">var</span> div <span class="operator token">=</span> document<span class="punctuation token">.</span><span class="function token">createElement<span class="punctuation token">(</span></span><span class="string token">"div"</span><span class="punctuation token">)</span><span class="punctuation token">,</span> box<span class="punctuation token">;</span> + div<span class="punctuation token">.</span>innerHTML <span class="operator token">=</span> <span class="string token">"<math><mspace height='23px' width='77px'/></math>"</span><span class="punctuation token">;</span> + document<span class="punctuation token">.</span>body<span class="punctuation token">.</span><span class="function token">appendChild<span class="punctuation token">(</span></span>div<span class="punctuation token">)</span><span class="punctuation token">;</span> + box <span class="operator token">=</span> div<span class="punctuation token">.</span>firstChild<span class="punctuation token">.</span>firstChild<span class="punctuation token">.</span><span class="function token">getBoundingClientRect<span class="punctuation token">(</span></span><span class="punctuation token">)</span><span class="punctuation token">;</span> + document<span class="punctuation token">.</span>body<span class="punctuation token">.</span><span class="function token">removeChild<span class="punctuation token">(</span></span>div<span class="punctuation token">)</span><span class="punctuation token">;</span> + <span class="keyword token">return</span> Math<span class="punctuation token">.</span><span class="function token">abs<span class="punctuation token">(</span></span>box<span class="punctuation token">.</span>height <span class="operator token">-</span> <span class="number token">23</span><span class="punctuation token">)</span> <span class="operator token"><</span><span class="operator token">=</span> <span class="number token">1</span> <span class="operator token">&&</span> Math<span class="punctuation token">.</span><span class="function token">abs<span class="punctuation token">(</span></span>box<span class="punctuation token">.</span>width <span class="operator token">-</span> <span class="number token">77</span><span class="punctuation token">)</span> <span class="operator token"><</span><span class="operator token">=</span> <span class="number token">1</span><span class="punctuation token">;</span> +<span class="punctuation token">}</span></code></pre> + +<p>Alternatively, the following UA string sniffing will allow to detect the rendering engines with native MathML support (Gecko and WebKit). Note that UA string sniffing is not the most reliable method and might break from version to version:</p> + +<pre class="brush: js language-js"><code class="language-js"><span class="keyword token">var</span> ua <span class="operator token">=</span> navigator<span class="punctuation token">.</span>userAgent<span class="punctuation token">;</span> +<span class="keyword token">var</span> isGecko <span class="operator token">=</span> ua<span class="punctuation token">.</span><span class="function token">indexOf<span class="punctuation token">(</span></span><span class="string token">"Gecko"</span><span class="punctuation token">)</span> <span class="operator token">></span> <span class="operator token">-</span><span class="number token">1</span> <span class="operator token">&&</span> ua<span class="punctuation token">.</span><span class="function token">indexOf<span class="punctuation token">(</span></span><span class="string token">"KHTML"</span><span class="punctuation token">)</span> <span class="operator token">==</span><span class="operator token">=</span> <span class="operator token">-</span><span class="number token">1</span> <span class="operator token">&&</span> ua<span class="punctuation token">.</span><span class="function token">indexOf<span class="punctuation token">(</span></span><span class="string token">'Trident'</span><span class="punctuation token">)</span> <span class="operator token">==</span><span class="operator token">=</span> <span class="operator token">-</span><span class="number token">1</span><span class="punctuation token">;</span> +<span class="keyword token">var</span> isWebKit <span class="operator token">=</span> ua<span class="punctuation token">.</span><span class="function token">indexOf<span class="punctuation token">(</span></span><span class="string token">'AppleWebKit'</span><span class="punctuation token">)</span> <span class="operator token">></span> <span class="operator token">-</span><span class="number token">1</span> <span class="operator token">&&</span> ua<span class="punctuation token">.</span><span class="function token">indexOf<span class="punctuation token">(</span></span><span class="string token">'Chrome'</span><span class="punctuation token">)</span> <span class="operator token">==</span><span class="operator token">=</span> <span class="operator token">-</span><span class="number token">1</span><span class="punctuation token">;</span></code></pre> + +<h4 id="sect2"> </h4> + +<p>Mathematical fonts</p> + +<p><strong>Note: browsers can only use a limited set of mathematical fonts to draw stretchy MathML operators. However, implementation of the OpenType MATH table is in progress in Gecko & WebKit. This will provide a generic support for mathematical fonts and simplify the settings described in this section.</strong></p> + +<p>To get a good mathematical rendering in browsers, some <a href="https://developer.mozilla.org/docs/Mozilla/MathML_Project/Fonts" title="/docs/Mozilla/MathML_Project/Fonts">MathML fonts</a> are required. It's a good idea to provide to your visitors a link to the <a href="https://developer.mozilla.org/docs/Mozilla/MathML_Project/Fonts" title="/docs/Mozilla/MathML_Project/Fonts">MDN page that explains how to install MathML fonts</a>. Alternatively, you can just make them available as Web fonts. You can get these fonts from the <a href="https://addons.mozilla.org/en-US/firefox/addon/mathml-fonts/" title="https://addons.mozilla.org/en-US/firefox/addon/mathml-fonts/">MathML-fonts add-on</a> ; the xpi is just a zip archive that you can fetch and extract for example with the following command:</p> + +<pre class="brush: bash language-html"><code class="language-html">wget https://addons.mozilla.org/firefox/downloads/latest/367848/addon-367848-latest.xpi -O mathml-fonts.zip; \ +unzip mathml-fonts.zip -d mathml-fonts</code></pre> + +<p>Then copy the <code>mathml-fonts/resource/</code> directory somewhere on your Web site and ensure that the woff files are served with the correct MIME type. Finally, include the <code>mathml-fonts/resource/mathml.css</code> style sheet in your Web pages, for example by adding the following rule to the default style sheet of your Web site:</p> + +<pre class="brush: css language-css"><code class="language-css"><span class="atrule token">@import url('/path/to/resource/mathml.css')</span><span class="punctuation token">;</span></code></pre> + +<p><span>You then need to modify the font-family on the <math> elements and</span>, for Gecko, the on ::-moz-math-stretchy pseudo element too. For example to use STIX fonts:</p> + +<pre class="language-html"><span class="brush: css"><span class="brush: css">math { + font-family: STIXGeneral; +} + +</span>::-moz-math-stretchy { + font-family: STIXNonUnicode, STIXSizeOneSym, STIXSize1, STIXGeneral; +} +</span></pre> + +<p><span>Try the <a href="https://developer.mozilla.org/docs/Mozilla/MathML_Project/MathML_Torture_Test" title="/docs/Mozilla/MathML_Project/MathML_Torture_Test">MathML torture test</a></span> to compare the rendering of various fonts and the CSS rules to select them.</p> + +<h4 id="Utilizar_MathML_en_documentos_XML_(XHTML_EPUB_etc.)">Utilizar MathML en documentos XML (XHTML, EPUB, etc.)</h4> + +<p>Si por alguna razón necesitas utilizar MathML en documentos XML, asegúrate de cumplir con los requisitos habituales: documentos bien realizados, el uso correcto de la especificación MIME, el prefijo MathML <code>"http://www.w3.org/1998/Math/MathML"</code> en la raíz<code> <math></code>. Por ejemplo, la versión XHTML del ejemplo anterior luce de esta manera:<br> + </p> + +<pre class="brush: xml"><?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" + "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>XHTML+MathML Example</title> +</head> +<body> + +<h1>XHTML+MathML Example</h1> + + <p> + Square root of two: + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <msqrt> + <mn>2</mn> + </msqrt> + </math> + </p> + +</body> +</html> </pre> + +<p>Note that if you use MathML as a standalone .mml or .svg documents or inside an EPUB book, it may not always be possible to use MathJax as a polyfill for rendering engines without MathML support. Hence whether MathML can be handled will vary according to the tools used to read these documents.</p> + +<h4 id="Utilizar_MathML_en_correos_electrónicos">Utilizar MathML en correos electrónicos</h4> + +<p>Los clientes de correos modernos pueden enviar y recibir correos electrónicos en el formato HTML5 y por lo tanto pueden manejar expresiones de tipo MathML. Asegúrate de tener las opciones de "Enviar como HTML" y "Ver como HTML" habilitadas. En Thunderbird, puedes utilizar el comando "Insertar HTML" para pegar tu código HTML+MathML. <a href="http://disruptive-innovations.com/zoo/MathBird/" title="http://disruptive-innovations.com/zoo/MathBird/">MathBird</a> es un complemento conveniente de Thunderbird para insertar este tipo de expresiones MathML utilizando la sintaxis AsciiMath.<br> + <br> + De nuevo, la forma en como MathML es manejada y la calidad de cómo se muestran estas expresiones <a href="http://www.maths-informatique-jeux.com/blog/frederic/?post/2012/11/14/Writing-mathematics-in-emails#c121" title="http://www.maths-informatique-jeux.com/blog/frederic/?post/2012/11/14/Writing-mathematics-in-emails#c121">depende del cliente de correo electrónico</a>. Aún si tu navegador es compatible con MathML, tu servicio de correo electrónico puede evitar que envíes o recibas correos con expresiones MathML.</p> + +<h2 id="Conversion_from_a_Simple_Syntax">Conversion from a Simple Syntax</h2> + +<p>There are many simple notations (e.g. wiki or markdown syntaxes) to generate HTML pages. The same is true for MathML: for example ASCII syntaxes as used in calculators or the more powerful LaTeX language, very popular among the scientific community. In this section, we present some of these tools to convert from a simple syntax to MathML.</p> + +<ul> + <li>pros: + <ul> + <li>Writing mathematical expressions may only require a standard text editor.</li> + <li>Many tools are available, some of them are compatible with the classical LaTeX-to-pdf workflow.</li> + <li>This gives access to advanced features of LaTeX like macros.</li> + </ul> + </li> + <li>cons: + <ul> + <li>This may be harder to use: people must learn a syntax, typos in the code may easily lead to parsing or rendering errors etc</li> + <li>The interface is not user-friendly: only code editor without immediate display of the mathematical expression.</li> + <li>None of the syntax has been standardized, making cross-compatibility between converters difficult. Even the popular LaTeX language keeps having new packages added.</li> + </ul> + </li> +</ul> + +<h3 id="Client-side_Conversion">Client-side Conversion</h3> + +<p>In a Web environment, the most obvious method to convert a simple syntax into a DOM tree is to use Javascript and of course many libraries have been developed to perform that task.</p> + +<ul> + <li>pros: + <ul> + <li>This is very easy setup: only a few Javascript and CSS files to upload and/or a link to add to your document header.</li> + <li>This is a pure Web-based solution: everything is done by the browsers and no other programs must be installed or compiled.</li> + </ul> + </li> + <li>cons: + <ul> + <li>This won't work if the visitor has Javascript disabled.</li> + <li>The MathML code is not exposed to Web crawlers (e.g. those of math search engines or feed aggregators). In particular, your content won't show up properly on Planet.</li> + <li>The conversion must be done at each page load, may be slow and may conflict with the HTML parsing (e.g. "<" for tags or "$" for money amounts)</li> + <li>You may need to synchronize the Javascript converter with other Javascript programs on your page.</li> + </ul> + </li> +</ul> + +<p><a href="https://github.com/fred-wang/TeXZilla">TeXZilla</a> has an <a href="https://github.com/fred-wang/x-tex"><x-tex></a> custom element, that can be used to write things like</p> + +<pre class="language-html"><span class="brush: html"><<span class="start-tag">x-tex</span>></span><span>\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1</span><span class="brush: html"></<span class="end-tag">x-tex</span>></span></pre> + +<p>and get it automatically converted into MathML. This is still a work-in-progress, but could be improved in the future thanks to Web Components and shadow DOM. Alternatively, you can use the more traditional <a href="https://github.com/fred-wang/TeXZilla/wiki/Advanced-Usages#parsing-tex-expressions-in-your-web-page">Javascript parsing of expressions at load time</a> as all the other tools in this section do.</p> + +<p>One simple client-side conversion tools is <a href="http://www1.chapman.edu/%7Ejipsen/mathml/asciimath.html" title="http://www1.chapman.edu/~jipsen/mathml/asciimath.html">ASCIIMathML</a>. Just download the <a href="http://mathcs.chapman.edu/%7Ejipsen/mathml/ASCIIMathML.js" title="http://mathcs.chapman.edu/~jipsen/mathml/ASCIIMathML.js">ASCIIMathML.js</a> script and copy it to your Web site. Then on your Web pages, add a <code><script></code> tag to load ASCIIMathML and the mathematical expressions delimited by <code>`</code> (grave accent) will be automatically parsed and converted to MathML:</p> + +<pre class="brush: html language-html"><code class="language-html"><span class="tag token"><span class="tag token"><span class="punctuation token"><</span>html</span><span class="punctuation token">></span></span> +<span class="tag token"><span class="tag token"><span class="punctuation token"><</span>head</span><span class="punctuation token">></span></span> +... +<span class="script token"><span class="tag token"><span class="tag token"><span class="punctuation token"><</span>script</span> <span class="attr-name token">type</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>text/javascript<span class="punctuation token">"</span></span> <span class="attr-name token">src</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>ASCIIMathML.js<span class="punctuation token">"</span></span><span class="punctuation token">></span></span><span class="tag token"><span class="tag token"><span class="punctuation token"></</span>script</span><span class="punctuation token">></span></span></span> +... +<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>head</span><span class="punctuation token">></span></span> +<span class="tag token"><span class="tag token"><span class="punctuation token"><</span>body</span><span class="punctuation token">></span></span> +... +<span class="tag token"><span class="tag token"><span class="punctuation token"><</span>p</span><span class="punctuation token">></span></span>blah blah `x^2 + y^2 = r^2` blah ... +...</code></pre> + +<p><a href="http://math.etsu.edu/LaTeXMathML/" title="http://math.etsu.edu/LaTeXMathML/">LaTeXMathML</a> is a similar script that allows to parse more LaTeX commands. The installation is similar: copy <a href="http://math.etsu.edu/LaTeXMathML/LaTeXMathML.js" title="http://math.etsu.edu/LaTeXMathML/LaTeXMathML.js">LaTeXMathML.js</a> and <a href="http://math.etsu.edu/LaTeXMathML/LaTeXMathML.standardarticle.css" title="http://math.etsu.edu/LaTeXMathML/LaTeXMathML.standardarticle.css">LaTeXMathML.standardarticle.css</a>, add links in the header of your document and the LaTeX content of your Web page marked by the "LaTeX" class will be automatically parsed and converted to HTML+MathML:</p> + +<pre class="brush: html language-html"><code class="language-html"><span class="tag token"><span class="tag token"><span class="punctuation token"><</span>head</span><span class="punctuation token">></span></span> +... +<span class="script token"><span class="tag token"><span class="tag token"><span class="punctuation token"><</span>script</span> <span class="attr-name token">type</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>text/javascript<span class="punctuation token">"</span></span> <span class="attr-name token">src</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>LaTeXMathML.js<span class="punctuation token">"</span></span><span class="punctuation token">></span></span><span class="tag token"><span class="tag token"><span class="punctuation token"></</span>script</span><span class="punctuation token">></span></span></span> +<span class="tag token"><span class="tag token"><span class="punctuation token"><</span>link</span> <span class="attr-name token">rel</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>stylesheet<span class="punctuation token">"</span></span> <span class="attr-name token">type</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>text/css<span class="punctuation token">"</span></span> <span class="attr-name token">href</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>LaTeXMathML.standardarticle.css<span class="punctuation token">"</span></span> <span class="punctuation token">/></span></span> +... +<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>head</span><span class="punctuation token">></span></span> + +<span class="tag token"><span class="tag token"><span class="punctuation token"><</span>body</span><span class="punctuation token">></span></span> +... + +<span class="tag token"><span class="tag token"><span class="punctuation token"><</span>div</span> <span class="attr-name token">class</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>LaTeX<span class="punctuation token">"</span></span><span class="punctuation token">></span></span> +\documentclass[12pt]{article} + +\begin{document} + +\title{LaTeXML Example} +\maketitle + +\begin{abstract} +This is a sample LaTeXML document. +\end{abstract} + +\section{First Section} + + $$ \sum_{n=1}^{+\infty} \frac{1}{n^2} = \frac{\pi^2}{6} $$ + +\end{document} +<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>div</span><span class="punctuation token">></span></span> +...</code></pre> + +<p><a href="http://mathscribe.com/author/jqmath.html" title="http://mathscribe.com/author/jqmath.html">jqMath</a> is another script to parse a simple LaTeX-like syntax but which also accepts non-ASCII characters like <code>√{∑↙{n=1}↖{+∞} 6/n^2} = π</code> to write <math> <mrow> <msqrt> <mrow> <munderover> <mo>∑</mo> <mrow> <mi>n</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mo>+</mo> <mi>∞</mi> </mrow> </munderover> <mfrac> <mn>6</mn> <msup> <mi>n</mi> <mn>2</mn> </msup> </mfrac> </mrow> </msqrt> <mo>=</mo> <mi>π</mi> </mrow> </math>. The installation is similar: download and copy the relevant <a href="http://mathscribe.com/downloads/mathscribe-unix-0.4.0.zip" title="http://mathscribe.com/downloads/mathscribe-unix-0.4.0.zip">Javascript and CSS files</a> on your Web site and reference them in your page header (see the <code>COPY-ME.html</code> file from the zip archive for an example). One of the advantage of jqMath over the previous scripts is that it will automatically add some simple CSS rules to do the mathematical layout and make the formulas readable on browsers with limited MathML support.</p> + +<p><a name="mathjax"></a>Another way to work around the lack of MathML support in some browsers is to use <a href="http://www.mathjax.org/" title="http://www.mathjax.org/">MathJax</a>. However, note that you may find conflicts and synchronization issues between MathJax and the Javascript libraries previously mentioned. So if you really want to use MathJax as a MathML polyfill, you'd better use its own LaTeX/ASCIIMath parsers too. Note that on the one hand MathJax has better parsing and rendering support but on the other hand it is much bigger, more complex and slower than the previous Javascript libraries. Fortunately, you can use MathJax's CDN so that you don't need to install it on your Web server. Also, the slowest part of MathJax is currently its HTML-CSS / SVG output modes so we recommend to use the Native MathML output for Gecko-based browsers. Hence a typical configuration to use the AMS-LaTeX input is:</p> + +<pre class="brush: html language-html"><code class="language-html">... + <span class="script token"><span class="tag token"><span class="tag token"><span class="punctuation token"><</span>script</span> <span class="attr-name token">type</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>text/x-mathjax-config<span class="punctuation token">"</span></span><span class="punctuation token">></span></span> + MathJax<span class="punctuation token">.</span>Hub<span class="punctuation token">.</span><span class="function token">Config<span class="punctuation token">(</span></span><span class="punctuation token">{</span> + MMLorHTML<span class="punctuation token">:</span> <span class="punctuation token">{</span> prefer<span class="punctuation token">:</span> <span class="punctuation token">{</span> Firefox<span class="punctuation token">:</span> <span class="string token">"MML"</span> <span class="punctuation token">}</span> <span class="punctuation token">}</span> + <span class="punctuation token">}</span><span class="punctuation token">)</span><span class="punctuation token">;</span> + <span class="tag token"><span class="tag token"><span class="punctuation token"></</span>script</span><span class="punctuation token">></span></span></span> + <span class="script token"><span class="tag token"><span class="tag token"><span class="punctuation token"><</span>script</span> <span class="attr-name token">type</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>text/javascript<span class="punctuation token">"</span></span> + <span class="attr-name token">src</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>http://cdn.mathjax.org/mathjax/latest/MathJax.js?config<span class="punctuation token">=</span>TeX-AMS-MML_HTMLorMML<span class="punctuation token">"</span></span><span class="punctuation token">></span></span> + <span class="tag token"><span class="tag token"><span class="punctuation token"></</span>script</span><span class="punctuation token">></span></span></span> + <span class="tag token"><span class="tag token"><span class="punctuation token"></</span>head</span><span class="punctuation token">></span></span> + <span class="tag token"><span class="tag token"><span class="punctuation token"><</span>body</span><span class="punctuation token">></span></span> + \[ \tau = \frac{x}{y} + \sqrt{3} \] +...</code></pre> + +<p>Note that <a href="http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-math-delimiters" title="http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-math-delimiters">the dollar delimiters are not used by default</a>. To use the ASCIIMathML input instead, just replace <code>TeX-AMS-MML_HTMLorMML</code> by <code>AM-MML_HTMLorMML</code>. MathJax has many other features, see the <a href="http://docs.mathjax.org/en/latest/" title="http://docs.mathjax.org/en/latest/">MathJax documentation</a> for further details.</p> + +<h3 id="Command-line_Programs">Command-line Programs</h3> + +<p>An alternative way is to parse the simple syntax before publishing your web pages. That is, you use command-line programs to generate them and publish these static pages on your server.</p> + +<ul> + <li>pros: + <ul> + <li>You get static Web pages: the LaTeX source don't need to be parsed at each page load, the MathML code is exposed to Web crawlers and you can put them easily on any Web server.</li> + <li>Binary programs may run faster than Javascript programs and can be more sophisticated e.g. have a much complete LaTeX support or generate other formats like EPUB.</li> + <li>You can keep compatibility with other tools to generate pdf e.g. you can use the same .tex source for both latex and latexml.</li> + </ul> + </li> + <li>cons: + <ul> + <li>This requires to install programs on your computer, which may be a bit more difficult or they may not be available on all platforms.</li> + <li>You must run the programs on your computer and have some kind of workflow to get the Web pages at the end ; that may be a bit tedious.</li> + <li>Binary programs are not appropriate to integrate them in a Mozilla extension or XUL application.</li> + </ul> + </li> +</ul> + +<p><a href="https://github.com/fred-wang/TeXZilla">TeXZilla</a> can be used <a href="https://github.com/fred-wang/TeXZilla/wiki/Using-TeXZilla#usage-from-the-command-line">from the command line</a> and will essentially have the same support as itex2MML described below. However, the stream filter behavior is not implemented yet.</p> + +<p>If you only want to parse simple LaTeX mathematical expressions, you might want to try tools like <a href="http://golem.ph.utexas.edu/%7Edistler/blog/itex2MML.html" title="http://golem.ph.utexas.edu/~distler/blog/itex2MML.html">itex2MML</a> or <a href="http://gva.noekeon.org/blahtexml/" title="http://gva.noekeon.org/blahtexml/">Blahtex</a>. The latter is often available on Linux distributions. Let's consider the former, which was originally written by Paul Gartside at the beginning of the Mozilla MathML project and has been maintained by Jacques Distler since then. It's a small stream filter written in C/C++ and generated with flex and bison ; in particular it is very fast. Install flex/bison as well as the classical compiler and make tools. On Unix, you can then download itex2MML, build and install it:</p> + +<pre class="brush: bash language-html"><code class="language-html">wget http://golem.ph.utexas.edu/~distler/blog/files/itexToMML.tar.gz; \ +tar -xzf itexToMML.tar.gz; \ +cd itex2MML/itex-src; +make +sudo make install</code></pre> + +<p>Now suppose that you have a HTML page with TeX fragments delimited by dollars:</p> + +<pre class="brush: html language-html"><code class="language-html">input.html + +... +<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>head</span><span class="punctuation token">></span></span> +<span class="tag token"><span class="tag token"><span class="punctuation token"><</span>body</span><span class="punctuation token">></span></span> + <span class="tag token"><span class="tag token"><span class="punctuation token"><</span>p</span><span class="punctuation token">></span></span>$\sqrt{a^2-3c}$<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>p</span><span class="punctuation token">></span></span> + <span class="tag token"><span class="tag token"><span class="punctuation token"><</span>p</span><span class="punctuation token">></span></span>$$ {\sum_{i=1}^N i} = \frac{N(N+1)}{2} $$<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>p</span><span class="punctuation token">></span></span> +<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>body</span><span class="punctuation token">></span></span> +<span class="tag token"><span class="tag token"><span class="punctuation token"></</span>html</span><span class="punctuation token">></span></span></code></pre> + +<p>Then to generate the HTML page input.html with TeX expressions replaced by MathML expressions, just do</p> + +<pre class="language-html">cat input.html | itex2MML > output.html</pre> + +<p>There are even more sophisticated tools to convert arbitrary LaTeX documents into HTML+MathML. For example <a href="https://www.tug.org/tex4ht/">TeX4ht</a> is often included in TeX distributions and has an option to use MathML instead of PNG images. This command will generate an XHTML+MathML document foo.xml from a foo.tex LaTeX source:</p> + +<pre class="language-html"> mk4ht mzlatex foo.tex # Linux/Mac platforms + mzlatex foo.tex # Windows platform +</pre> + +<p><a href="http://dlmf.nist.gov/LaTeXML/">LaTeXML</a> is another tool that is still actively developed but the release version is rather old, so you'd better <a href="https://github.com/KWARC/LaTeXML">install the development version</a>. In particular, this version can generate HTML5 and EPUB documents. Here is the command to execute in order to create a foo.html Web page from the foo.tex LaTeX source:</p> + +<pre class="language-html"> latexml --dest foo.xml foo.tex + latexmlpost --dest foo.html --format=html5 foo.xml +</pre> + +<p>If you want to have a MathJax fallback for non-Gecko browsers, copy the <a href="https://developer.mozilla.org/es/docs/Web/MathML/Authoring$edit#mathjax-fallback">Javascript lines given above</a> into a <code>mathjax.js</code> file and use the <code>--javascript</code> parameter to tell LaTeXML to include that file:</p> + +<pre class="language-html"> latexmlpost --dest foo.html --format=html5 --javascript=mathjax.js foo.xml +</pre> + +<p>If your LaTeX document is big, you might want to split it into several small pages rather putting everything in a single page. This is especially true if you use the MathJax fallback above, since in that case MathJax will take a lot of time to render the equations in non-Gecko browsers. Use the <code>--splitat</code> parameter for that purpose. For example, this will split the pages at the <code>\section</code> level:</p> + +<pre class="language-html"> latexmlpost --dest foo.html --format=html5 --splitat=section foo.xml +</pre> + +<p>Finally, to generate an EPUB document, you can do</p> + +<pre class="language-html"> latexmlc --dest foo.epub --splitat=section foo.xml +</pre> + +<h3 id="Server-side_Conversion">Server-side Conversion</h3> + +<ul> + <li>pros: + <ul> + <li>Conversion is done server-side and the MathML output can be cached, which is more efficient and cleaner than client-side conversion.</li> + </ul> + </li> + <li>cons: + <ul> + <li>This might be a bit more difficult to set up, since you need some admin right on your server.</li> + </ul> + </li> +</ul> + +<p><a href="https://github.com/fred-wang/TeXZilla">TeXZilla</a> can be <a href="https://github.com/fred-wang/TeXZilla/wiki/Advanced-Usages#using-texzilla-as-a-web-server">used as a Web server</a> in order to perform server-side LaTeX-to-MathML conversion. <a href="http://dlmf.nist.gov/LaTeXML/">LaTeXML</a> can also be used as a deamon to run server-side. <a href="https://github.com/gwicke/mathoid">Mathoid</a> is another tool based on MathJax that is also able to perform additional MathML-to-SVG conversion.</p> + +<p><a href="http://instiki.org/show/HomePage">Instiki</a> is a Wiki that integrates itex2MML to do server-side conversion. In future versions, <a href="https://www.mediawiki.org/wiki/MediaWiki">MediaWiki</a> will support server-side conversion too.</p> + +<h2 id="Graphical_Interface">Graphical Interface</h2> + +<h3 id="Input_Box">Input Box</h3> + +<p><a href="https://github.com/fred-wang/TeXZilla">TeXZilla</a> has several interfaces, including a <a href="http://ckeditor.com/addon/texzilla">CKEditor plugin</a> used on MDN, an <a href="http://fred-wang.github.io/TeXZilla/">online demo</a>, a <a href="https://addons.mozilla.org/en-US/firefox/addon/texzilla/">Firefox add-on</a> or a <a href="http://r-gaia-cs.github.io/TeXZilla-webapp/">FirefoxOS Webapp</a>. <a href="http://abisource.org/">Abiword</a> contains a small equation editor, based on itex2MML.<a href="http://www.bluegriffon.com/"> Bluegriffon</a> is a mozilla-based Wysiwyg HTML editor and has an add-on to insert MathML formulas in your document, using ASCII/LaTeX-like syntax.</p> + +<p style="text-align: center;"><img alt="BlueGriffon" src="http://www.bluegriffon.com/public/shots/mathml-shot1.png" style="height: 467px; width: 358px;"></p> + +<h3 id="WYSIYWG_Editors">WYSIYWG Editors</h3> + +<p><a href="http://www.firemath.info/">Firemath</a> is an extension for Firefox that provides a WYSIWYG MathML editor. A preview of the formula is displayed using the rendering engine of Mozilla. The generated MathML code is available at the bottom. Use the text field for token elements and buttons to build advanced constructions. Once you are done, you can save your document as a XHTML page.</p> + +<p><a href="http://www.openoffice.org/">OpenOffice</a> and <a href="http://libreoffice.org/">LibreOffice</a> have an equation editor (File → New → Formula). It is semi-WYSIWYG: you enter the source of the formula using the equation panel/keyboard and a preview of the formula is regularly refreshed. The editor uses its own syntax "StarMath" for the source but MathML is also generated when the document is saved. To get the MathML code, save the document as mml and open it with any text editor. Alternatively, you can extract the odf file (which is actually a zip archive) and open an xml file called <code>content.xml</code>.</p> + +<p style="text-align: center;"><img alt="Open Office Math" src="https://developer.mozilla.org/@api/deki/files/4261/=openoffice.png" style="height: 527px; width: 483px;"></p> + +<p><a href="http://www.w3.org/Amaya/">Amaya</a> is the W3C's web editor, which is able to handle MathML inside XHTML documents. Use the Elements and the Special Chars panels to create various advanced mathematical constructs. Simple text such as <code>a+2</code> is automatically parsed and the appropriate MathML markup is generated. Once you are done, you can directly save your XHTML page and open it in Mozilla.</p> + +<h2 id="Optical_Character_Handwriting_Recognition">Optical Character & Handwriting Recognition</h2> + +<p><a href="http://www.inftyreader.org/">Inftyreader</a> is able to perform some Optical Character Recognition, including translation of mathematical equations into MathML. Other tools can do handwriting recognition such as the <a href="http://windows.microsoft.com/en-za/windows7/use-math-input-panel-to-write-and-correct-math-equations">Windows Math Input Panel</a></p> + +<p style="text-align: center;"><img alt="Windows Math Input Panel" src="http://res1.windows.microsoft.com/resbox/en/windows%207/main/50f56cb9-478c-48e9-867e-8de06e1d4190_46.jpg" style="height: 385px; width: 410px;"></p> + +<p>or the online converter <a href="http://webdemo.visionobjects.com/" title="http://webdemo.visionobjects.com/portal.html">Web Equation</a>.</p> + +<p>Original Document Information</p> + +<div class="originaldocinfo"> +<ul> + <li>Author(s): Frédéric Wang</li> + <li>Other Contributors: Florian Scholz</li> + <li>Last Updated Date: April 2, 2011</li> + <li>Copyright Information: Portions of this content are © 2010 by individual mozilla.org contributors; content available under a Creative Commons license | <a class="external" href="http://www.mozilla.org/foundation/licensing/website-content.html">Details</a>.</li> +</ul> +</div> + +<p> </p> diff --git a/files/es/web/mathml/elemento/index.html b/files/es/web/mathml/elemento/index.html new file mode 100644 index 0000000000..aa75307fa3 --- /dev/null +++ b/files/es/web/mathml/elemento/index.html @@ -0,0 +1,97 @@ +--- +title: Referencia de elementos de MathML +slug: Web/MathML/Elemento +translation_of: Web/MathML/Element +--- +<p>A continuación se muestra una lista alfabética de elementos de <strong>presentación</strong> en MathML.<br> + La <em>etiqueta de presentación</em> es usada para describir la estructura y el diseño de la notación matemática mientras que la <em>etiqueta de contenido</em> proporciona el significado matemático subyacente y se supone que no se renderiza a través del parseador de MathML (ver {{ bug(276028) }}). Si quieres aprender más sobre la etiqueta de contenido deberías echar un vistazo al <a href="http://www.w3.org/TR/MathML3/chapter4.html" title="http://www.w3.org/TR/MathML3/chapter4.html">Capítulo 4</a> en la <a href="http://www.w3.org/TR/MathML3/" title="http://www.w3.org/TR/MathML3/">especificación de MathML 3</a>.</p> +<h3 id="math">math</h3> +<ul> + <li>{{ MathMLElement("math") }} (Elemento raíz)</li> +</ul> +<h3 id="A">A</h3> +<ul> + <li>{{ MathMLElement("maction") }} (Acciones enlazadas a sub-expresiones)</li> + <li>{{ MathMLElement("maligngroup") }} (Grupo de alineación) {{ unimplemented_inline(122253) }}</li> + <li>{{ MathMLElement("malignmark") }} (Puntos de alineación) {{ unimplemented_inline(122253) }}</li> +</ul> +<h3 id="E">E</h3> +<ul> + <li>{{ MathMLElement("menclose") }} (Enclosed contents)</li> + <li>{{ MathMLElement("merror") }} (Enclosed syntax error messages)</li> +</ul> +<h3 id="F">F</h3> +<ul> + <li>{{ MathMLElement("mfenced") }} (Paréntesis)</li> + <li>{{ MathMLElement("mfrac") }} (Fracción)</li> +</ul> +<h3 id="G">G</h3> +<ul> + <li>{{ MathMLElement("mglyph") }} (Mostrar símbolos no estándar) {{ unimplemented_inline(297465) }}</li> +</ul> +<h3 id="I">I</h3> +<ul> + <li>{{ MathMLElement("mi") }} (Identificador)</li> +</ul> +<h3 id="L">L</h3> +<ul> + <li>{{ MathMLElement("mlabeledtr") }} (Fila etiquetada en una tabla o matriz) {{ unimplemented_inline(689641) }}</li> + <li>{{ MathMLElement("mlongdiv") }} (Notación de la división larga) {{ unimplemented_inline(534967) }}</li> +</ul> +<h3 id="M">M</h3> +<ul> + <li>{{ MathMLElement("mmultiscripts") }} (Prescripts and tensor indices)</li> +</ul> +<h3 id="N">N</h3> +<ul> + <li>{{ MathMLElement("mn") }} (Número)</li> +</ul> +<h3 id="O">O</h3> +<ul> + <li>{{ MathMLElement("mo") }} (Operador)</li> + <li>{{ MathMLElement("mover") }} (Overscript)</li> +</ul> +<h3 id="P">P</h3> +<ul> + <li>{{ MathMLElement("mpadded") }} (Espacio alrrededor del contenido)</li> + <li>{{ MathMLElement("mphantom") }} (Contenido invisible con espacio reservado)</li> +</ul> +<h3 id="R">R</h3> +<ul> + <li>{{ MathMLElement("mroot") }} (Radical con índice especificado)</li> + <li>{{ MathMLElement("mrow") }} (Sub-expressiones agrupadas)</li> +</ul> +<h3 id="S">S</h3> +<ul> + <li>{{ MathMLElement("ms") }} (String literal)</li> + <li>{{ MathMLElement("mscarries") }} (Annotations such as carries) {{ unimplemented_inline(534967) }}</li> + <li>{{ MathMLElement("mscarry") }} (Single carry, child element of {{ MathMLElement("mscarries") }}) {{ unimplemented_inline(534967) }}</li> + <li>{{ MathMLElement("msgroup") }} (Grouped rows of {{ MathMLElement("mstack") }} and {{ MathMLElement("mlongdiv") }} elements) {{ unimplemented_inline(534967) }}</li> + <li>{{ MathMLElement("msline") }} (Horizontal lines inside {{ MathMLElement("mstack") }} elements) {{ unimplemented_inline(534967) }}</li> + <li>{{ MathMLElement("mspace") }} (Space)</li> + <li>{{ MathMLElement("msqrt") }} (Square root without an index)</li> + <li>{{ MathMLElement("msrow") }} (Rows in {{ MathMLElement("mstack") }} elements) {{ unimplemented_inline(534967) }}</li> + <li>{{ MathMLElement("mstack") }} (Stacked alignment) {{ unimplemented_inline(534967) }}</li> + <li>{{ MathMLElement("mstyle") }} (Style change)</li> + <li>{{ MathMLElement("msub") }} (Subscript)</li> + <li>{{ MathMLElement("msup") }} (Superscript)</li> + <li>{{ MathMLElement("msubsup") }} (Subscript-superscript pair)</li> +</ul> +<h3 id="T">T</h3> +<ul> + <li>{{ MathMLElement("mtable") }} (Table or matrix)</li> + <li>{{ MathMLElement("mtd") }} (Cell in a table or a matrix)</li> + <li>{{ MathMLElement("mtext") }} (Text)</li> + <li>{{ MathMLElement("mtr") }} (Row in a table or a matrix)</li> +</ul> +<h3 id="U">U</h3> +<ul> + <li>{{ MathMLElement("munder") }} (Underscript)</li> + <li>{{ MathMLElement("munderover") }} (Underscript-overscript pair)</li> +</ul> +<h3 id="Other_elements">Other elements</h3> +<ul> + <li>{{ MathMLElement("semantics") }} (Container for semantic annotations)</li> + <li><a href="/en-US/docs/MathML/Element/semantics"><code><annotation></code></a> (Data annotations)</li> + <li><a href="/en-US/docs/MathML/Element/semantics"><code><annotation-xml></code></a> (XML annotations)d</li> +</ul> diff --git a/files/es/web/mathml/elemento/math/index.html b/files/es/web/mathml/elemento/math/index.html new file mode 100644 index 0000000000..c7ecf0f0ab --- /dev/null +++ b/files/es/web/mathml/elemento/math/index.html @@ -0,0 +1,162 @@ +--- +title: <math> +slug: Web/MathML/Elemento/math +translation_of: Web/MathML/Element/math +--- +<div>{{MathMLRef}}</div> + +<p class="summary"><code><math></code> es el elemento superior en MathML. Cada instancia válida de MathML debe estar rodeada de etiquetas <code><math></code>. Además, no debes anidar un segundo elemento <code><math></code> dentro de un primero, pero puedes tener un número arbitrario de otros elementos hijos en él.</p> + +<h2 id="Atributos">Atributos</h2> + +<p>Además de los siguientes atributos, el elemento <code><math></code> acepta cualquier atributo del elemento {{ MathMLElement("mstyle") }}.</p> + +<dl> + <dt id="attr-class-id-style">class, id, style</dt> + <dd>Disponibles para el uso con <a href="/es/docs/Web/CSS" lang="es" title="es/docs/Web/CSS">hojas de estilo</a>.</dd> + <dt id="attr-dir">dir</dt> + <dd>La dirección general de las fórmulas. Sus valores posibles son <code>ltr</code> (izquierda a derecha) o bien <code>rtl</code> (derecha a izquierda).</dd> + <dt id="attr-href">href</dt> + <dd>Usado para definir un hipervínculo a un URI (<strong>I</strong>dentificador de <strong>R</strong>ecurso <strong>U</strong>nificado) especificado.</dd> + <dt id="attr-mathbackground">mathbackground</dt> + <dd>El color de fondo. Puedes usar <code>#rgb</code>, <code>#rrggbb</code> y <a href="/es/docs/Web/CSS/color_value#Palabras_clave_de_colores" lang="es" title="/es/docs/Web/CSS/color_value">palabras clave de colores</a>.</dd> + <dt id="attr-mathcolor">mathcolor</dt> + <dd>El color de texto. Puedes usar <code>#rgb</code>, <code>#rrggbb</code> y <a href="/es/docs/Web/CSS/color_value#Palabras_clave_de_colores" lang="es" title="/es/docs/Web/CSS/color_value">palabras clave de colores</a>.</dd> + <dt id="attr-display">display</dt> + <dd>Este atributo enumerado especifica de qué manera el marcado MathML debería ser renderizado. Puede tomar uno de los siguientes valores: + <ul> + <li><code>block</code>, el cual indica que este elemento será incluido fuera del fragmento de texto actual , en forma de bloque individual que puede ser posicionado en cualquier sitio sin cambiar el significado del texto;</li> + <li><code>inline</code>, el cual indica que este elemento será incluido en el fragmento de texto actual, y no puede ser sacado del mismo sin cambiar el significado del texto.</li> + </ul> + + <p>De no estar presente, toma <code>inline</code> por defecto.</p> + </dd> + <dt id="attr-mode">mode {{deprecated_inline}}</dt> + <dd>Deprecado a favor del <a href="/es/docs/MathML/Element/math#attr-display" lang="es">atributo display</a>.<br> + Sus valores posibles son: <code>display</code> (que tiene el mismo efecto que <code>display="block"</code>) e <code>inline</code>.</dd> + <dt id="attr-overflow">overflow</dt> + <dd>Especifica el comportamiento de una expresión si es demasiado larga para caber en el ancho asignado.<br> + Sus valores posibles son: <code>linebreak</code> (por defecto), <code>scroll</code>, <code>elide</code>, <code>truncate</code>, <code>scale</code>.</dd> +</dl> + +<h2 id="Ejemplos">Ejemplos</h2> + +<p><img alt="Theorem of Pythagoras" src="/files/3157/math.jpg"></p> + +<h3 id="Notación_HTML5">Notación HTML5</h3> + +<pre class="brush: html"><!DOCTYPE html> +<html> + <head> + <title>MathML en HTML5</title> + </head> + <body> + + <math> + <mrow> + <mrow> + <msup> + <mi>a</mi> + <mn>2</mn> + </msup> + <mo>+</mo> + <msup> + <mi>b</mi> + <mn>2</mn> + </msup> + </mrow> + <mo>=</mo> + <msup> + <mi>c</mi> + <mn>2</mn> + </msup> + </mrow> + </math> + + </body> +</html> +</pre> + +<h3 id="Notación_XHTML">Notación XHTML</h3> + +<pre class="brush: xml"><?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>MathML en XHTML</title> +</head> +<body> + + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <mrow> + <mrow> + <msup> + <mi>a</mi> + <mn>2</mn> + </msup> + <mo>+</mo> + <msup> + <mi>b</mi> + <mn>2</mn> + </msup> + </mrow> + <mo>=</mo> + <msup> + <mi>c</mi> + <mn>2</mn> + </msup> + </mrow> + </math> + +</body> +</html></pre> + +<p><strong>Notas</strong>: Los documentos XHTML con MathML deben servirse como <code>application/xhtml+xml</code>. Puedes lograrlo facilmente añadiendo la extensión <code>.xhtml</code> a tus archivos locales. Para servidores Apache puedes <a class="external" href="http://httpd.apache.org/docs/2.4/mod/mod_mime.html#addtype">configurar tu archivo <code>.htaccess</code></a> para direccionar extensiones al tipo Mime correcto. Ya que estás escribiendo tu MathML en un archivo XML, asegurate también de escribir un documento XML bien formado.</p> + +<h2 id="Especificaciones">Especificaciones</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Especificación</th> + <th scope="col">Estado</th> + <th scope="col">Comentario</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{ SpecName('MathML3', 'chapter2.html#interf.toplevel', 'The Top-Level math Element') }}</td> + <td>{{ Spec2('MathML3') }}</td> + <td>Especificación actual</td> + </tr> + <tr> + <td>{{ SpecName('MathML2', 'chapter7.html#interf.toplevel', 'The Top-Level math Element') }}</td> + <td>{{ Spec2('MathML2') }}</td> + <td>Especificación inicial</td> + </tr> + </tbody> +</table> + +<h2 id="Compatibilidad_de_navegadores">Compatibilidad de navegadores</h2> + +<p> </p> + + + +<p>{{Compat("mathml.elements.math")}}</p> + +<p> </p> + +<h2 id="Notas_específicas_a_Firefox">Notas específicas a Firefox</h2> + +<p>Firefox 7 introdujo soporte para aceptar todos los atributos MathML en el elemento superior <code>math</code> (por ejemplo, el mismo comportamiento que el elemento {{ MathMLElement("mstyle") }}). Sin embargo, el atributo <code>displaystyle</code> no fue tomado en cuenta y <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=669719">ha sido añadido</a> en Firefox 8.</p> + +<p>Texto de respaldo (<code>alttext</code>) o referir a una imagen alternativa usando los atributos <code>altimg</code>, <code>altimg-width</code>, <code>altimg-height</code> o <code>altimg-valign</code> no se encuentra actualmente implementado en Firefox.</p> + +<h2 id="Véase_también">Véase también</h2> + +<ul> + <li>Elemento <strong>HTML</strong> superior: {{ HTMLElement("html") }}</li> + <li>Elemento <strong>SVG</strong> superior: {{ SVGElement("svg") }}</li> + <li>Prueba MathML para navegadores: Para <a class="link-https" href="https://www.eyeasme.com/Joe/MathML/MathML_browser_test">XHTML</a> y <a class="link-https" href="https://eyeasme.com/Joe/MathML/HTML5_MathML_browser_test">HTML5</a></li> +</ul> diff --git a/files/es/web/mathml/examples/index.html b/files/es/web/mathml/examples/index.html new file mode 100644 index 0000000000..0bbd27bf96 --- /dev/null +++ b/files/es/web/mathml/examples/index.html @@ -0,0 +1,24 @@ +--- +title: Examples +slug: Web/MathML/Examples +tags: + - MathML + - NeedsTranslation + - TopicStub +translation_of: Web/MathML/Examples +--- +<p>Below you'll find some examples you can look at to help you to understand how to use MathML to display increasingly complex mathematical concepts in Web content.</p> +<dl> + <dt> + <a href="/en-US/docs/Web/MathML/Examples/MathML_Pythagorean_Theorem">Pythagorean Theorem</a></dt> + <dd> + Small example showing a proof of the Pythagorean Theorem.</dd> + <dt> + <a href="/en-US/docs/Web/MathML/Examples/Deriving_the_Quadratic_Formula">Deriving the Quadratic Formula</a></dt> + <dd> + Outlines the derivation of the Quadratic Formula.</dd> + <dt> + <a href="/en-US/docs/Mozilla/MathML_Project/MathML_Torture_Test">MathML Torture Test</a></dt> + <dd> + Large set of test markup.</dd> +</dl> diff --git a/files/es/web/mathml/examples/mathml_pythagorean_theorem/index.html b/files/es/web/mathml/examples/mathml_pythagorean_theorem/index.html new file mode 100644 index 0000000000..46ec3444f8 --- /dev/null +++ b/files/es/web/mathml/examples/mathml_pythagorean_theorem/index.html @@ -0,0 +1,9 @@ +--- +title: MathML Pythagorean Theorem +slug: Web/MathML/Examples/MathML_Pythagorean_Theorem +translation_of: Web/MathML/Examples/MathML_Pythagorean_Theorem +--- +<p><math 1ex"="" height="0.5ex" side="left" style="font-size: 16pt; font-family: arial; mspace depth=" width="2.5ex"> <mtable columnalign="left"> <mtr> <mtd> <mrow> <mrow> <mrow> <mrow> <mspace depth="1ex" height="0.5ex" width="2.5ex"></mspace> <msup> <mi>a</mi><mn>2</mn> </msup> </mrow> <mo> + </mo> <msup> <mi>b</mi> <mn>2</mn> </msup> <mo> = </mo> <msup> <mi>c</mi> <mn>2</mn> </msup> </mrow> </mrow></mrow></mtd> </mtr> <mtr> <mtd> <mrow> <mrow> <mrow> <mspace depth="1ex" height="0.5ex" width="2.5ex"></mspace> <mrow><mtext mathcolor="black" mathsize="12pt"> Podemos demostrar el teorema algebraicamente mostrando que el area del cuadrado grande<br> + es igual al area del cuadrado interno (hipotenusa al cuadrado) mas el area de los cuatro triangulos: </mtext></mrow></mrow></mrow></mrow></mtd></mtr><br> + <br> + <mtr> <mtd> <mrow> <mrow> <mrow> <mrow> <mspace depth="1ex" height="0.5ex" width="2.5ex"></mspace> <mo>(</mo><mi>a</mi><mo> + </mo> <mi>b</mi><msup><mo>)</mo><mn>2</mn></msup><mo> = </mo> <msup><mi>c</mi><mn>2</mn></msup><mo> + </mo> <mn>4</mn><mo>(</mo><mfrac><mrow><mn>1</mn></mrow> <mn>2</mn></mfrac><mo>)</mo><mi>a</mi> <mi>b</mi> </mrow> </mrow> </mrow></mrow></mtd> </mtr> <mtr> <mtd> <mrow> <mrow> <mrow> <mrow> <mspace depth="1ex" height="0.5ex" width="2.5ex"></mspace> <msup><mi>a</mi><mn>2 </mn></msup><mo> + </mo> <mn>2</mn><mi>a</mi><mi>b</mi><mo> + </mo><msup><mi>b</mi><mn>2 </mn></msup> <mo> =</mo> <msup><mi>c</mi><mn>2</mn></msup><mo> + </mo> <mn>2</mn><mi>a<mi>b</mi> </mi></mrow> </mrow> </mrow></mrow></mtd> </mtr> <mtr> <mtd> <mrow> <mrow> <mrow> <mrow> <mspace depth="1ex" height="0.5ex" width="2.5ex"></mspace> <msup><mi>a</mi><mn>2 </mn></msup><mo> + </mo> <msup><mi>b</mi><mn>2</mn></msup> <mo> =</mo> <msup><mi>c</mi><mn>2</mn></msup> </mrow> </mrow> </mrow></mrow></mtd> </mtr> </mtable></p> diff --git a/files/es/web/mathml/index.html b/files/es/web/mathml/index.html new file mode 100644 index 0000000000..811aa9b05e --- /dev/null +++ b/files/es/web/mathml/index.html @@ -0,0 +1,75 @@ +--- +title: MathML +slug: Web/MathML +tags: + - Landing + - MathML + - NeedsTranslation + - Reference + - Référence(2) + - TopicStub +translation_of: Web/MathML +--- +<p class="summary"><strong>Lenguaje de Marcado Matemático (MathML)</strong> es un lenguaje de marcado <a href="/es/docs/Introducción_a_XML" lang="es" title="/es/docs/Introducción_a_XML">XML</a> para describir expresiones matemáticas capturando tanto su contenido como su estructura.</p> + +<p>Aquí encontrarás enlaces a documentación, ejemplos y herramientas que te ayudarán a trabajar con esta tecnología poderosa. Para un resumen, vea la <a href="https://fred-wang.github.io/MozSummitMathML/index.html" lang="es">presentación</a> que se preparó para Mozilla Summit <time datetime="2013-10-04">2013</time>.</p> + +<div class="row topicpage-table"> +<div class="section"> +<h2 id="Referencia_de_MathML">Referencia de MathML</h2> + +<dl> + <dt><a href="/es/docs/Web/MathML/Elemento" lang="es">Referencia de elementos de MathML</a></dt> + <dd>Detalles sobre cada elemento de MathML e información sobre compatibilidad con navegadores móviles y de escritorio.</dd> + <dt><a href="/es/docs/Web/MathML/Attribute" lang="es">Referencia de atributos de MathML</a></dt> + <dd>Información sobre los atributos que modifican el aspecto y comportamiento de los elementos.</dd> + <dt><a href="/es/docs/Web/MathML/Examples" lang="es">Ejemplos de MathML</a></dt> + <dd>Muestras y ejemplos en MathML para ayudarte a comprender cómo funciona.</dd> + <dt><a href="/es/docs/Web/MathML/Authoring" lang="es">Creando MathML</a></dt> + <dd>Sugerencias y consejos al momento de escribir MathML, incluyendo editores de MathML sugeridos y cómo integrar sus productos a contenido Web.</dd> +</dl> + +<p><a href="/es/docs/tag/MathML" lang="es">Ver todo lo etiquetado con MathML en español...</a></p> +</div> + +<div class="section"> +<h2 id="Obteniendo_ayuda_de_la_comunidad">Obteniendo ayuda de la comunidad</h2> + +<ul> + <li>Ver los foros de Mozilla...<br> + {{ DiscussionList("dev-tech-mathml", "mozilla.dev.tech.mathml") }}</li> + <li><a href="irc://irc.mozilla.org/%23mathml" rel="external" title="#mathml">Canal IRC</a></li> + <li><a href="https://wiki.mozilla.org/MathML:Home_Page">Wiki usada por contribuyentes de Mozilla</a></li> + <li><a href="https://www.w3.org/Math/" title="http://www.w3.org">W3C Math Home</a></li> + <li><a href="https://lists.w3.org/Archives/Public/www-math/" title="http://lists.w3.org">www-math w3.org mail archive</a></li> +</ul> + +<h2 id="Herramientas">Herramientas</h2> + +<ul> + <li><a href="https://validator.w3.org" title="http://validator.w3.org">Validador W3C</a></li> + <li><a href="https://addons.mozilla.org/en/firefox/addon/8969/">FireMath Firefox add-on</a></li> + <li><a href="https://addons.mozilla.org/firefox/collections/fred_wang/mathzilla/">Mathzilla Firefox add-on collection</a></li> + <li><a href="https://github.com/fred-wang/TeXZilla">TeXZilla</a> — Conversor Javascript de LaTeX a MathML (<a href="https://fred-wang.github.io/TeXZilla/" title="http://fred-wang.github.io">live demo</a>, <a href="https://r-gaia-cs.github.io/TeXZilla-webapp/" title="http://r-gaia-cs.github.io">Firefox OS webapp</a>, <a href="https://addons.mozilla.org/en-US/firefox/addon/texzilla/">add-on Firefox</a>, <a href="https://github.com/fred-wang/TeXZilla/wiki/Using-TeXZilla">using in a Web Page, JS program etc</a>)</li> + <li><a href="http://dlmf.nist.gov/LaTeXML/" title="http://dlmf.nist.gov">LaTeXML</a> - Convierte documentos LaTeX a páginas web HTML+MathML</li> + <li><a href="http://webdemo.visionobjects.com/home.html#equation" title="http://webdemo.visionobjects.com">Web Equation</a> - Convierte ecuaciones manuscritas a MathML o LaTeX</li> + <li><a href="https://www.mathjax.org/" title="http://www.mathjax.org">MathJax</a> - Motor de representación matemática en JavaScript navegador-independientes. Para forzar MathJax a usar MathML nativo, prueba <a href="https://addons.mozilla.org/en-US/firefox/addon/mathjax-native-mathml/">este add-on Mozilla</a>, esta <a href="https://fred-wang.github.io/mathjax-native-mathml-safari/mathjax-native-mathml.safariextz" title="http://fred-wang.github.io">extensión Safari</a> o este <a href="https://openuserjs.org/scripts/fred.wang/MathJax_Native_MathML/">script en GreaseMonkey</a>.</li> +</ul> + +<h2 id="Temas_relacionados">Temas relacionados</h2> + +<ul> + <li><a href="/en-US/docs/Web/CSS">CSS</a></li> + <li><a href="/en-US/docs/Web/HTML">HTML</a></li> + <li><a href="/en-US/docs/Web/SVG">SVG</a></li> +</ul> +</div> +</div> + +<h2 id="Compatibilidad_de_navegadores">Compatibilidad de navegadores</h2> + + + +<p>{{Compat("mathml.elements.math", 0)}}</p> + +<p>{{ HTML5ArticleTOC() }}</p> |