Skip to main content

Elegant TeX script in YAML style

Project description

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}

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

YeT-0.1.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

YeT-0.1.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file YeT-0.1.2.tar.gz.

File metadata

  • Download URL: YeT-0.1.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for YeT-0.1.2.tar.gz
Algorithm Hash digest
SHA256 128882be6174bf399677d8ccf6967acf7fe731de615d7c0f64e9bab1ffbc3f0c
MD5 a8e4d2a8c7af968def7b1afbeed4b736
BLAKE2b-256 271803ef7938f3cd04433c6e91685d5c25270b22a9f432f0f9fa81510050221d

See more details on using hashes here.

File details

Details for the file YeT-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: YeT-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for YeT-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bb5a988afd1023bbc0c546f7e78a4d5f4f6c4cbfdb3a74f4496165b623c2e7e6
MD5 70db4561cc8ea27ec3d2e02fd4b64c84
BLAKE2b-256 3262bc580eba75aa0cb1fb60d1b2d89a4c920ef88f2ffadef8e7570f31a16a30

See more details on using hashes here.

Supported by

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