Skip to main content

Turning markdown notes with formulas into LaTeX PDFs

Project description

NoTeX

NoTeX is a CLI application to convert Markdown files into LaTeX-processed PDF files.

Installation

pip install notex

NoTeX supports Python 3.6 and 3.7, and requires pandoc.

Usage

You can generate a PDF for the markdown file notes/machine_learning.md with the command below. The output is stored in notes/machine_learning.pdf.

notex notes/machine_learning.md

The title for the LaTeX PDF is taken from the first-level header (# Header) or the metadata. Metadata is optional and is declared at the top of the markdown file using pandoc-style yaml metadata.

For example:

---
abstract: This is the abstract.
table-of-contents: true
---

# Title

Introduction.

## Paragraph Header

Paragraph body.

Philosophy

When in 2004 John Gruber created the Markdown language, he intended the language to be used both to write and read content, with simplicity in mind.

Since then Markdown has been extended, both in terms of syntax and of content. In particular, MathJax allowed to type formulas thus making Markdown a more convenient way to write scientific notes when the additional features of LaTeX were not required.

However, using (complex) formulas made reading Markdown files as they are written an overly inconvenient task. Sometimes, being able to render Markdown files into LaTeX-processed files can help strike a compromise between ease of writing and ease of reading.

Moreover, rendered files enable writers to share their formula-heavy content with others who might not be familiar with the MathJax syntax.

NoTeX was created to make writing and reading scientific Markdown files easy.

Implementation

NoTeX is Python CLI application based on pandoc, another CLI application to convert between markup file formats, including Markdown and LaTeX. NoTeX narrows down pandoc's scope so that using it becomes dead-simple, also adding support for LaTeX titles extracted from Markdown.

Development

After cloning the repo, install the application including development requirements.

make install

All Python code is formatted using black and linted using flake8.

make format
make lint

Both formatting and linting checks are performed within the test suite.

make test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

notex-0.0.3.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

notex-0.0.3-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file notex-0.0.3.tar.gz.

File metadata

  • Download URL: notex-0.0.3.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

File hashes

Hashes for notex-0.0.3.tar.gz
Algorithm Hash digest
SHA256 e14640c4d8736d244732a80ff4c0214efd83537fd278d27be77f63c9d578d710
MD5 922e642769f65963c40c9a8eb07bf0d2
BLAKE2b-256 e8f835d121664f0071a87a5044a328e0fa112adc6a8f76270c696f169cc2e9e1

See more details on using hashes here.

File details

Details for the file notex-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: notex-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

File hashes

Hashes for notex-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9b4784ac262c3f64a1ac83932e193d3fa581df897d836eeec083b7af7df08077
MD5 6b8944cb983a5fd562af58fab3f53648
BLAKE2b-256 5f1f3e8cc63ab323947c27ea4ddabc36d43f1993a549e356cd61ef614d9845dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page