${preview.innerHTML}

About This Tool

Convert LaTeX markup to PDF documents directly in your browser. Write or paste LaTeX code and generate a downloadable PDF, useful for math papers, academic documents, and technical writing.

How to Use

  1. Write or paste your LaTeX code in the editor.
  2. Click Compile to generate the PDF.
  3. Download or preview the resulting document.

Frequently Asked Questions

Can I write math equations in LaTeX online?

Yes. This tool supports standard LaTeX math mode. Use $ for inline math and $$ for display equations, with full support for symbols, fractions, and matrices.

Do I need to install LaTeX to use this tool?

No. The compilation happens in your browser. You don't need to install TeX Live, MiKTeX, or any other LaTeX distribution.

`); printWindow.document.close(); setTimeout(() => { printWindow.print(); }, 500); } // ---- Sample Document ---- function loadSample() { editor.value = `\\documentclass{article} \\usepackage{amsmath} \\title{Introduction to LaTeX} \\author{Solid Utils Tools} \\date{\\today} \\begin{document} \\maketitle \\begin{abstract} This sample document demonstrates the key features supported by the Solid Utils LaTeX to PDF converter, including sections, math equations, lists, tables, and text formatting. \\end{abstract} \\section{Getting Started} LaTeX is a typesetting system widely used for scientific and technical documents. It excels at producing \\textbf{beautiful mathematics}, structured documents, and professional-quality output. This converter parses your LaTeX source and renders it directly in the browser --- no installation required. \\section{Mathematics} LaTeX handles both inline math like $E = mc^2$ and display equations: \\begin{equation} \\int_{-\\infty}^{\\infty} e^{-x^2} \\, dx = \\sqrt{\\pi} \\end{equation} The quadratic formula gives us: $$x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}$$ And here is Euler's identity: $e^{i\\pi} + 1 = 0$. \\section{Lists and Structure} \\subsection{Bullet Points} \\begin{itemize} \\item Write LaTeX in the editor pane \\item Click \\textbf{Compile} or press \\texttt{Ctrl+Enter} \\item View the rendered output on the right \\item Download as PDF when ready \\end{itemize} \\subsection{Numbered Lists} \\begin{enumerate} \\item Paste or type your LaTeX source code \\item Upload a \\texttt{.tex} file from your computer \\item Try a sample document to explore features \\end{enumerate} \\section{Tables} \\begin{table}[h] \\centering \\caption{Feature Comparison} \\begin{tabular}{|l|c|c|} \\hline Feature & Supported & Notes \\\\ \\hline Sections & Yes & All levels \\\\ Math & Yes & Inline \\& display \\\\ Tables & Yes & With captions \\\\ Lists & Yes & Itemize \\& enumerate \\\\ Formatting & Yes & Bold, italic, code \\\\ \\hline \\end{tabular} \\end{table} \\section{Text Formatting} You can use \\textbf{bold}, \\textit{italic}, \\underline{underlined}, and \\texttt{monospace} text. You can also \\emph{emphasize} important concepts. \\begin{quote} ``The purpose of computing is insight, not numbers.'' --- Richard Hamming \\end{quote} \\section{Conclusion} This browser-based LaTeX renderer handles the most common LaTeX constructs. For full TeX compilation with packages, consider pairing this tool with a TeX Live installation. \\end{document}`; document.getElementById('charCount').textContent = editor.value.length + ' chars'; compile(); } // ---- Resizable Divider ---- const divider = document.getElementById('divider'); let dragging = false; divider.addEventListener('mousedown', () => { dragging = true; document.body.style.cursor = 'col-resize'; }); document.addEventListener('mousemove', e => { if (!dragging) return; const pct = (e.clientX / window.innerWidth) * 100; if (pct > 20 && pct < 80) { document.querySelector('.editor-pane').style.width = pct + '%'; document.querySelector('.preview-pane').style.width = (100 - pct) + '%'; } }); document.addEventListener('mouseup', () => { dragging = false; document.body.style.cursor = ''; }); // Load MathJax for proper math rendering (function loadMathJax() { window.MathJax = { tex: { inlineMath: [['\\(','\\)']], displayMath: [['\\[','\\]']] }, startup: { typeset: false } }; const script = document.createElement('script'); script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js'; script.async = true; document.head.appendChild(script); })(); // Auto-compile on load if there's content if (editor.value.trim()) compile();