Skip to main content

Yet most Elegant TeX

PyPI Version License

Elegant TeX script in YAML style

Introduction

(Note: the below paragraph is opinionated, and so is this project)

Doubtless, documents typeset with TeX are elegant from their beginning. However, TeX script are usually not. That's why you need YeT.

  • You Only Write Once: Just environ:. No more \begin{environ}~\end{environ}!
  • Syntactical Definition: Works out-of-box for any TeX packages without configuration
  • Easy Fallback: TeX script can be easily mixed into YeT script
  • Intuitive: Reading the below example will be enough for you to get the most out of YeT

Install

YeT can be installed from PyPI. (supports python>=3.6)

$ pip install YeT

Example

# examples/front.yml
documentclass: article[a4paper]
usepackage: amsmath
usepackage: amssymb

title: YeT Example
author: BayMinimum

document:
  - \maketitle  # or maketitle: ""
  - Let's begin with some math.
  - equation:
    - F = \frac{1}{4 \pi \epsilon_0} \frac{q_1 q_2}{r^2}
  - enumerate:
      item: This is enumerate
      item: Write items in dict or list
  - some_custom_environment{arg}[optional]:
    - Key with dict or list value is interpreted as environment.
    - This works syntactically, without semantics.

Compile the above YeT file with command:

$ yet examples/front.yml

Then, examples/front.tex will be generated as below.

\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\title{YeT Example}
\author{BayMinimum}
\begin{document}
\maketitle

Let's begin with some math.

\begin{equation}
F = \frac{1}{4 \pi \epsilon_0} \frac{q_1 q_2}{r^2}
\end{equation}

\begin{enumerate}
\item{This is enumerate}

\item{Write items in dict or list}
\end{enumerate}

\begin{some_custom_environment}{arg}[optional]
Key with dict or list value is interpreted as environment.

This works syntactically, without semantics.
\end{some_custom_environment}
\end{document}

Metadata

Release files for YeT 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for YeT 0.1.2
File Size Uploaded
YeT-0.1.2.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for YeT 0.1.2
File Interpreter ABI Platform
YeT-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / YeT-0.1.2.tar.gz

Download URL YeT-0.1.2.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
128882be6174bf399677d8ccf6967acf7fe731de615d7c0f64e9bab1ffbc3f0c
BLAKE2b-256 checksum
How to use checksums
271803ef7938f3cd04433c6e91685d5c25270b22a9f432f0f9fa81510050221d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

Release files / YeT-0.1.2-py3-none-any.whl

Download URL YeT-0.1.2-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb5a988afd1023bbc0c546f7e78a4d5f4f6c4cbfdb3a74f4496165b623c2e7e6
BLAKE2b-256 checksum
How to use checksums
3262bc580eba75aa0cb1fb60d1b2d89a4c920ef88f2ffadef8e7570f31a16a30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page