Skip to main content

Python tools for LaTex

Project description

gkd

A set of tools to help programming in LaTex.

pip install gkd, and append contents of gkd.tex to your Tex sources.

GKDBNF: The best LaTex BNF package you've ever seen?

This relies on paperbnf.

Usage

\begin{GKDBNF}{some_unique_id}
!Expressions! <e> ::= <e> ( <e>  )
| let <n> = <e> in <e>
| !$\lambda$! <n> . <e>
| <\mathtt{atom}>

\end{GKDBNF}

capture

Remember to place a blank line in the end of GKDBNF block.

How to write this BNF?

Follow the syntax and lexer rules:

Valid BNF Syntax:

<atom> ::= NONTERMINAL
       | TERMINAL
       | TERMINAL2
       | '|'



<prod> ::= NONTERMINAL '::=' <atom>+ NEWLINE
       | TERMINAL NONTERMINAL '::=' <atom>+ NEWLINE
       | TERMINAL2 NONTERMINAL '::=' <atom>+ NEWLINE
       | '|' <atom>+ <NEWLINE>

Lexer rule by regex:

NEWLINE     = [\r\n]+
NONTERMINAL = <.*?>
TERMINAL2   = !.*?!
Term        = \S+

Whitespace tokens are ignored.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

gkd-0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file gkd-0.1-py3-none-any.whl.

File metadata

  • Download URL: gkd-0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for gkd-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 27a06e1db811f0cdf10db4b359b0ce3a23110b4c117aab8d837a157bf0703049
MD5 6c1cfc042df1e0180aa6deb1458528f1
BLAKE2b-256 50bdede5176bc35a66d5e2bba039674e30cc965fbac6f4364d801500c84c3316

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