Convert LaTeX to Markdown format. Use when the user asks to convert, transform, or change LaTeX files to Markdown, or mentions converting .tex files to .md files.
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
npx agent-skills-cli listSkill Instructions
name: latex-to-md description: Convert LaTeX to Markdown format. Use when the user asks to convert, transform, or change LaTeX files to Markdown, or mentions converting .tex files to .md files.
LaTeX to Markdown Converter
Convert LaTeX documents to Markdown format with support for common LaTeX commands and environments.
Usage
npx tsx plugins/tex/scripts/latex-to-md.ts <text>
npx tsx plugins/tex/scripts/latex-to-md.ts --file <input.tex>
npx tsx plugins/tex/scripts/latex-to-md.ts --file <input.tex> --output <output.md>
Supported Conversions
Sections/Headers
\chapter{Title}β# Title\section{Title}β## Title\subsection{Title}β### Title\subsubsection{Title}β#### Title\paragraph{Title}β##### Title\subparagraph{Title}β###### Title
Text Formatting
\textbf{bold}β**bold**\textit{italic}β*italic*\emph{emphasis}β*emphasis*\texttt{code}β`code`\verb|code|β`code`
Code Blocks
\begin{verbatim}
code here
\end{verbatim}
β
```
code here
```
Also supports lstlisting environment.
Lists
Itemize (unordered):
\begin{itemize}
\item First item
\item Second item
\end{itemize}
β
- First item
- Second item
Enumerate (ordered):
\begin{enumerate}
\item First
\item Second
\end{enumerate}
β
1. First
2. Second
Links
\href{url}{text}β[text](url)\url{url}β<url>
Images
With caption (figure environment):
\begin{figure}
\includegraphics{image.png}
\caption{Description}
\end{figure}
β

Without caption:
\includegraphics{image.png}β\includegraphics[width=5cm]{image.png}β(options stripped)
Blockquotes
\begin{quote}
This is a quote
\end{quote}
β
> This is a quote
Horizontal Rules
\hrulefillβ---\hlineβ---
Unicode Character Decoding
LaTeX special characters are automatically decoded to Unicode:
\'{e}βΓ©\"{a}βΓ€\c{c}βΓ§\aeβΓ¦\oeβΕ\ssβΓ- And ~100 more LaTeX commands
See tex-decode skill for complete list of supported characters.
Math Preservation
LaTeX math notation is preserved as-is:
- Inline math:
$...$remains$...$ - Display math:
$$...$$remains$$...$$
Many Markdown renderers support this syntax natively.
Arguments
- Positional arguments: Text to convert (if no
--fileflag) --file: Read input from file--output <file>: Write output to file (default: stdout)
Examples
Convert inline text
npx tsx plugins/tex/scripts/latex-to-md.ts "\\section{Hello}\n\nThis is \\textbf{bold}."
Convert file
npx tsx plugins/tex/scripts/latex-to-md.ts --file paper.tex --output paper.md
Extract plain text from LaTeX
npx tsx plugins/tex/scripts/latex-to-md.ts --file document.tex | npx tsx plugins/tex/scripts/strip.ts
Limitations
- Does not handle complex LaTeX packages or custom commands
- Tables are not automatically converted (LaTeX tables vary widely in structure)
- Cross-references (
\ref,\cite) are not resolved - Bibliographies require separate handling
- Complex math environments may need manual adjustment
- Nested environments beyond simple cases may not convert perfectly
Related Skills
- md-to-latex: Convert Markdown to LaTeX
- tex-decode: Decode LaTeX commands to Unicode (used internally)
- tex-strip: Remove all LaTeX formatting for plain text
- tex-protect: Protect text from LaTeX interpretation
More by Mearman
View allSearch for Common Vulnerabilities and Exposures (CVEs) by ID (e.g., CVE-2024-1086) or by product name (e.g., OpenSSL, Apache Tomcat). Get detailed vulnerability information including severity scores, affected software versions, and references. Use when the user wants to look up CVE information, check if a product has known vulnerabilities, or research security issues.
Scan project dependencies for known vulnerabilities. Automatically detect and parse package files (package.json, requirements.txt, Gemfile, go.mod, pom.xml) and check all dependencies against the CVE database. Use when you want to audit a project for security vulnerabilities, check if dependencies have known CVEs, or generate a vulnerability report for compliance.
Analyze npm package quality using NPMS.io scores for quality, popularity, and maintenance. Use when the user asks for package quality analysis, NPMS scores, or package evaluation metrics.
Create bibliography citations from web page URLs with automatic Wayback Machine archival and metadata extraction. Use when the user asks to cite a website, create a citation for a URL, archive and cite a web page, or generate a bibliography entry from a web address.
