Pregunta

How can I view latex symbols in html like the following:

enter image description here

¿Fue útil?

Solución

You won't get this with vanilla Markdown; it simply doesn't have any support for math.

The best solution depends on your use case, of course, and without more information it's hard to say what your best bet is. But MathJax is likely a good starting point.

In general, using MathJax looks something like this example from the docs:

<!DOCTYPE html>
<html>
<head>
<title>MathJax TeX Test Page</title>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>
<script type="text/javascript"
  src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</head>
<body>
When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
</body>
</html>

Otros consejos

There are latex to html converters. Check out this link:

http://en.wikibooks.org/wiki/LaTeX/Export_To_Other_Formats#Convert_to_HTML

Also this question might prove useful:

What is the best way to embed LaTeX in a webpage?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top