I built a tool to generate academic PDFs from Markdown without
installing LaTeX on your system. LaTeX, Pandoc, and all dependencies
run isolated inside a Docker container.
The tool works via command line, but you don't need to memorize any
commands. It's similar to using btop or htop in the terminal:
you open it, navigate with the arrow keys, choose options from the
menus, and press a key to execute. No mouse, no syntax to memorize.
If you've used any of those tools in the terminal before, you already
know how to use it.
If you've ever tried to deliver a research paper formatted in IEEE
or APA style, you probably know the pain.
You install a 4 GB LaTeX distribution. You spend hours reading
documentation for packages nobody has updated since the early 2000s.
You try to compile. You get a 200-line error log that looks like it
was written in another language. You give up and format it manually
in Word.
That cycle repeated itself one more time than I was willing to
tolerate. So I built Mark2TeX.
The problem it solves
LaTeX produces documents with unmatched typographic quality. No
other tool comes close when it comes to rigorous academic formatting,
whether for IEEE conference papers, ACM articles, or any
institution-specific style guide.
But the barrier to entry is too high for most people. You don't want
to learn LaTeX. You want to write your content and get back a
properly formatted PDF.
Mark2TeX solves exactly that: you write in plain Markdown, the tool
handles the entire compilation process internally, and you get back
a LaTeX-quality PDF without having touched a single line of LaTeX
code.
How I came up with this interface
The terminal interface came from a dual inspiration.
Working with claude code, I saw how a well-built UI inside the
terminal can be genuinely productive. Then, using btop to monitor
my system on Ubuntu, I realized how visually beautiful and
informative a terminal interface can be. Obsidian had already gotten
me used to writing everything in Markdown, so closing the loop with
a terminal tool that gives me back a formatted PDF made complete
sense.
Mark2TeX was my attempt to bring that same experience to academic
productivity tools. CLI means command-line interface (you run
commands in the terminal). TUI means terminal user interface (a
visual interface inside the terminal, with menus, buttons, and
arrow-key navigation).
If you've used btop, htop, or any other tool in the terminal with
interactive menus, you already know how to use Mark2TeX.
How it compares to what already exists
This is not the first tool to try to simplify PDF generation from
text. But each alternative has an important limitation.
Overleaf solves the installation problem by running everything in
the cloud, but it locks you into a subscription, requires an internet
connection to work, and still makes you write in LaTeX.
Plain Pandoc is powerful, but it's a command-line tool that requires
you to configure templates, manage LaTeX packages locally, and know
exactly which flags to pass on each compilation. For non-technical
users, the learning curve is steep.
Tools like Typora or iA Writer export to PDF, but the result is
basic. They don't understand what an IEEE citation is, they don't
know what a list of figures is, and they won't generate a properly
formatted academic paper.
Mark2TeX fills a space none of these tools address: LaTeX quality,
Markdown writing, with an interface anyone can use.
How it works
The requirement is simple: have Python 3.10 or higher and Docker
installed and running on your machine. If you work with development,
you probably already have both. If not, both have straightforward
installers for Linux, macOS, and Windows.
Installation is done with a single command (pipx installs Python CLI
tools in isolated environments without polluting your system Python):
pipx install mark2tex
On the first run, Mark2TeX automatically pulls the Docker image
containing XeLaTeX, Pandoc, the fonts, and all required packages.
This happens only once. On subsequent runs, everything is already
cached.
From the user's Python and terminal perspective, nothing was
installed on the host system. The Docker image is self-contained
and does not touch your system libraries.
To use it, navigate to the folder where your Markdown files are and
open the interface:
mark2tex
The interface
The TUI was built with the Textual framework. It runs entirely in
the terminal, without needing any graphical window or browser.
On the left panel you navigate your Markdown files. On the bottom
panel you follow the compilation logs in real time. In the center
you choose the template and the document font. On the right panel
you see a preview of your Markdown file.
Available templates include IEEE conference paper, technical
documentation, and project proposal. Each template comes
pre-configured with the margins, fonts, spacing, and structure that
format requires.
You select the file, choose the template, and press c to compile.
The PDF appears in the same folder as your Markdown file.
The details that make a difference
Watch mode recompiles the document automatically every time you save
the file. The 1.5-second debounce prevents double compilations in
editors like Obsidian, which do two-stage saves. You write, save,
and the PDF updates.
Incremental builds reduce recompilation time from 18 seconds to
about 6 seconds on a 15-page document after a single-line edit.
latexmk keeps intermediate files cached between compilations.
XeLaTeX logs are translated into plain language. Instead of
receiving a message like:
! LaTeX Error: File `ieeetran.cls' not found.
l.23 \documentclass{IEEEtran}
You get:
LaTeX package not found: ieeetran.cls
The Docker image may be outdated.
Run: mark2tex uninstall and then mark2tex again.
Checking that everything works
Before compiling for the first time, you can run:
bash
mark2tex check
This runs a full environment diagnostic and prints a visual report
showing whether Docker is running, whether the image has been pulled,
the Python version, and available disk space.
Who this is for
If you are a student, Mark2TeX means you can write your thesis or
research paper in any text editor you prefer, including Obsidian,
and generate the final IEEE or APA-formatted PDF without learning LaTeX.
If you are a researcher, it means your Markdown notes can become a
formatted IEEE article with a few commands, without copying and
pasting anything into Overleaf.
If you are an engineer, physicist, or mathematician, it means your
notes with formulas, equations, and calculations in Markdown can
become professionally typeset documents, ready for a technical
report, presentation, or project documentation.
If you are a developer writing technical documentation, it means
your repository's Markdown files can become professional PDFs with
a single command, and that can be automated in your CI pipeline.
Windows and macOS support
The project was designed from the start to run on Linux, Windows,
and macOS. The goal is for anyone, regardless of their operating
system, to be able to compile an academic PDF from Markdown.
I primarily develop and test on Ubuntu. Windows and macOS support
is planned and partially implemented, but I have not fully validated
the experience on those systems yet.
If you test on Windows or macOS and run into any issues, opening
an issue with details, screenshots, or logs would help a lot. That
feedback is exactly what is needed to make Mark2TeX truly
cross-platform.
How to contribute or get started
The project is on PyPI and GitHub, MIT licensed, with a full
contribution guide following GitFlow and Conventional Commits, issue
and PR templates, and CI workflows already configured.
To get started, the only requirements are Python 3.10+ and Docker:
`
pipx install mark2tex
mark2tex check
mark2tex
Open items on the roadmap include new academic templates, improved
Windows and macOS support, TUI integration tests, and a GitHub
Actions workflow that builds a demo PDF on each PR. The repository
has a Discussions tab and labeled issues open for contributions.
Every contribution is welcome, whether you are a Python developer,
a LaTeX enthusiast, a TUI fan, or just someone willing to test and
suggest improvements.
The repository is at github.com/Hylbert/Mark2TeX.







Top comments (0)