Embed LateX file to HTML

2.2k Views Asked by At

I am looking for a way to load a LateX file to HTML. I found several questions about that but most of them are talking about for adding LateX equations to HTML or to convert LateX to HTML or to add HTML to Latex.

I am looking for something different, I have a LateX file and I would like to embed that to my HTML file.

If you can think it like a PDF, I can embed a PDF to my HTML like that:

<embed src="somepdf.pdf" pluginspage="http://www.adobe.com/products/acrobat/readstep2.html">

Is something equivalant for LateX files?

1

There are 1 best solutions below

0
On BEST ANSWER

Honestly, it's still not clear to me if you want to embed in html your .pdf file or your .tex file, but this does not really matter. Copy and paste the following:

\documentclass[a4paper]{article}

\title{PRIMES is in P}
\author{Not Me}
\date{}

\begin{document}

\maketitle

Hello.

\end{document}

into the blank file test.tex, then compile it to produce test.pdf. Now, provided that test.tex, test.pdf and the following html are in the same folder, this

<!DOCTYPE html>
<html>
<head>
<title>iframe tag</title>
</head>
<body>
<iframe src="test.tex" width="275" height="250"></iframe>
<iframe src="test.pdf" width="400" height="566"></iframe>
</body>
</html>

should make the job. It works on Firefox, Chrome and Opera (on Windows 7). Instead - but this doesn't surprise me... - MS Internet Explorer shows the source file only if you save it as .txt (not .tex).

More about iframe tag: