# Html2tex

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-phanghonghao-thu-awesome-skills-html2tex`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [phanghonghao](https://agentstack.voostack.com/s/phanghonghao)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [phanghonghao](https://github.com/phanghonghao)
- **Source:** https://github.com/phanghonghao/THU-Awesome-Skills/tree/main/skills/html2tex

## Install

```sh
agentstack add skill-phanghonghao-thu-awesome-skills-html2tex
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# html2tex

Convert HTML files to LaTeX and PDF with the bundled `html2tex.py` script.

## Run

From this skill directory, run:

```bash
python html2tex.py  [--output-dir DIR] [--no-compile]
```

## Inputs

Assume the input HTML may contain:
- tables with `colspan` and `rowspan`
- embedded images
- bold, italic, underline, and strikethrough
- MathJax-style formulas

Use this skill especially for HTML produced by a Word-to-HTML workflow.

## Outputs

Produce:
- `.tex`
- `.pdf` when compilation is enabled

If `--output-dir` is omitted, write output next to the input file.

## Workflow

1. Confirm the input file exists.
2. Run `html2tex.py`.
3. If the user asked for PDF and compilation succeeds, report both `.tex` and `.pdf`.
4. If XeLaTeX is missing or compilation fails, rerun with `--no-compile` only when needed and report that only `.tex` was generated.

## Dependencies

Require:
- Python 3
- XeLaTeX for PDF compilation

If XeLaTeX is unavailable, do not pretend PDF generation succeeded.

## Notes

- Preserve tables and images where possible.
- Prefer reporting the generated file paths instead of pasting LaTeX output into the response.
- If the HTML appears broken, mention that the converter can only preserve structure that exists in the source HTML.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [phanghonghao](https://github.com/phanghonghao)
- **Source:** [phanghonghao/THU-Awesome-Skills](https://github.com/phanghonghao/THU-Awesome-Skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-phanghonghao-thu-awesome-skills-html2tex
- Seller: https://agentstack.voostack.com/s/phanghonghao
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
