Back to Skills

latex-to-md

verified

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.

View on GitHub

Marketplace

mearman

Mearman/marketplace

Plugin

tex

Repository

Mearman/marketplace
2stars

plugins/tex/skills/latex-to-md/SKILL.md

Last Verified

January 23, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/Mearman/marketplace/blob/main/plugins/tex/skills/latex-to-md/SKILL.md -a claude-code --skill latex-to-md

Installation paths:

Claude
.claude/skills/latex-to-md/
Powered by add-skill CLI

Instructions

# LaTeX to Markdown Converter

Convert LaTeX documents to Markdown format with support for common LaTeX commands and environments.

## Usage

```bash
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
```latex
\begin{verbatim}
code here
\end{verbatim}
```
→
````markdown
```
code here
```
````

Also supports `lstlisting` environment.

### Lists

**Itemize (unordered):**
```latex
\begin{itemize}
\item First item
\item Second item
\end{itemize}
```
→
```markdown
- First item
- Second item
```

**Enumerate (ordered):**
```latex
\begin{enumerate}
\item First
\item Second
\end{enumerate}
```
→
```markdown
1. First
2. Second
```

### Links
- `\href{url}{text}` → `[text](url)`
- `\url{url}` → `<url>`

### Images

**With caption (figure environment):**
```latex
\begin{figure}
\includegraphics{image.png}
\caption{Description}
\end{figure}
```
→
```markdown
![Description](image.png)
```

**Without caption:**
- `\includegraphics{image.png}` → `![](image.png)`
- `\includegraphics[width=5cm]{image.png}` → `![](image.png)` (options stripped)

### Blockquotes
```latex
\begin{quote}
This is a quote
\end{quote}
```
→
```markdown
> 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` 

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3495 chars