LaTeX Compilation¶
MergDown2TeX generates .tex files for manual compilation.
How it works¶
graph TD
A[Note] --> B[WASM Engine]
B --> C[.tex File]
C --> D[Manual Edit]
D --> E[Your Compiler]
Generate .tex file¶
Option A: Command Palette¶
- Open command palette (
Ctrl/Cmd + P) - Type "MergDown2TeX"
- Select "MergDown2TeX: Convertir la note active en LaTeX (.tex)"
Option B: Button¶
Click the LaTeX button in the ribbon.
Output structure¶
Basic structure¶
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{cite}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{minted}
\usepackage{tcolorbox}
\title{Document Title}
\author{Author Name}
\begin{document}
\maketitle
\tableofcontents
\section{Introduction}
Content here...
\section{Methods}
Content here...
\section{Results}
Content here...
\bibliographystyle{plain}
\bibliography{references}
\end{document}
With custom preamble¶
\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% Custom preamble
\usepackage{tikz}
\usepackage{siunitx}
\usepackage{booktabs}
\title{Document Title}
\begin{document}
\maketitle
\section{Introduction}
Content here...
\end{document}
Manual compilation¶
Using TeX Live¶
# First pass
pdflatex document.tex
# Bibliography
bibtex document
# Second pass
pdflatex document.tex
# Third pass
pdflatex document.tex
Using Overleaf¶
- Upload
.texfile - Upload
.bibfile - Click "Recompile"
Using online compiler¶
Customization¶
Edit .tex file¶
- Open generated
.texfile - Make changes
- Compile with your preferred method
Add packages¶
Modify preamble¶
Change document class¶
Tips¶
Best practices¶
- Edit the .tex file for final touches
- Use version control (git)
- Keep backup of important documents
- Test changes incrementally
Common modifications¶
- Add custom commands
- Modify styles
- Include additional packages
- Adjust margins
- Change fonts
Troubleshooting¶
Compilation errors¶
Error:
Solution: - Check math mode - Escape special characters
Undefined references¶
Error:
Solution: - Run pdflatex multiple times - Check label/cite syntax
Next steps¶
- PDF Compilation - Automated PDF output
- DOCX Compilation - Word document output
- Configuration - Customize settings