0

I want to display this type of LaTex code on my web page, but it's not displaying.

Do I need to include any file for this?

LaTex sample:

\documentclass[letterpaper]{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{tkz-euclide}

\begin{document}
\begin{figure}[h]
\begin{tikzpicture}
   \tkzInit[xmax=5,ymax=5,xmin=-5,ymin=-5]
   \tkzGrid
   \tkzAxeXY
   \draw[ thick,latex-latex] (2,5) -- (-5,-2);
  \end{tikzpicture}

\end{figure}

\end{document}
livibetter
  • 19,832
  • 3
  • 42
  • 42
Yash
  • 11
  • 3
  • Do you want to display it literally like it is? if so - you'll probably need to put it inside 'pre' tags for it to actually show up on the page. Otherwise please be clearer by what you mean by "not displaying" and what you've tried – Taryn East Apr 17 '15 at 06:44
  • 2
    The question is not clear. Please post the relevant HTML code, including some lines of LaTex. – mins Apr 17 '15 at 06:44
  • 1
    http://stackoverflow.com/questions/3175105/how-to-insert-code-into-a-latex-doc i hope it will helps you – Mukul Kant Apr 17 '15 at 06:44
  • By 'not displaying' i meant it is being displayed as a code like it is displayed above, but i want to display the formula - for which it is written. – Yash Apr 17 '15 at 06:57
  • For displaying LaTeX *output* on a webpage you can either use MathJax to render content on-the-fly, or pre-render and export the content as an image. The former is limiting in the content you can render. The latter is, of course, not dynamic, but allows you free range on the content to be displayed. – Werner Apr 19 '15 at 17:20
  • @Werner I have source code in the above format and want to know if it can be used directly? .. in Mathjax there is no need of this type of formatting? I just don't know how to use it. Please help.. – Yash Apr 20 '15 at 03:35
  • @Yash: No. When using MathJax you don't need to entire `\documentclass` ... `\begin{document}` ... `\end{document}` setup. You just need some basic components, but it sets *only* math. So *don't* expect MathJax to interpret your `tikz` code and draw something. – Werner Apr 20 '15 at 05:51

1 Answers1

0

Based on the answer and comments on this question I used images instead of the Latex.

For converting the latex into image - used a tool called TikzEdit. This will show up the drawing that the latex code forms and you can easily include the images into your webpages.

Yash
  • 11
  • 3