Can LaTex be used in HTML5? [closed]

0

You need to add equations to a code of HTML5 , for example:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
    </head>
    <body>
        <h1>El teorema de Pitágoras</h1>
        <p>El teorema de Pitágoras nos explica la relación de catetos e hipotenusa</p>

        <!--Aquí se necesita colocar la clásica ecuación, a^2+b^2=c^2, ¿se puede con latex?-->

    </body>
<html>
    
asked by Robby 18.06.2016 в 21:09
source

3 answers

3

HTML5 can upload vector images SVG , you can use a converter LaTex to SVG .
For example I found this online: tlhiv.org/ltxpreview , the download has option SVG .

    
answered by 18.06.2016 / 22:29
source
5

You can write mathematical equations in HTML5 with MathML , but the standard is not very popular, does not allow writing in Latex , and it is not supported by all browsers.

Much more powerful (lets you write directly to Latex) and popular (used in link ) is MathJax . But it's not pure HTML5, and the setup is a bit more complicated.

    
answered by 18.06.2016 в 22:30
2

I suggest two options there goes:

1) Use latex2html which allows you to pass your latex code to a basic html, but having this I think you can adapt it to your needs. Something that you may not like, is, the equations pass it as an image, but everything depends on the project you are developing. Regarding its use, you execute it from the terminal:

$latex2html codigo_latex.tex

This generates a directory with the name code_latex and inside it all you need as the * .css, * .html ... including the images that will be inserted inside your code (the mentioned equations). Here is an example of an exit.

2) I do not know if you are familiar with the R programming language , in this language you have a tool called < Markdown (a true wonder, which allows you to generate PDF documents (the most used), doc, html , html5 .... among others.

and good personally I think it's worth investing time to learn it. Here is a good example of what you can do ( see example )

As you can see, the output is not an image, as in the previous case.

Greetings!

    
answered by 19.06.2016 в 01:21