Skip to main content

Document description language that allows embedded Python to describe document structure

Project description

turnip_text

This is a WIP language that aims to address two gripes I have with LaTeX:

  1. The LaTeX macro engine is horrible to work and program with
  2. LaTeX typesetting output is heavily dependent on how content is laid out in the LaTeX source file
    • i.e. a lack of separation between content and formatting

Key features include:

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Project Structure

Based on the recommended structure from [github.com/PyO3/maturin].

FAQs

Why output LaTeX source code?

Because LaTeX is still in many cases the lingua franca of scientific papers, it is unreasonable to expect to replace it. The TeX typesetting engine is also still great for laying out raw text, and I have no intention of reinventing that wheel. My problem with LaTeX is that it's finnicky, not that it produces bad output. With all this in mind, I'd like this language to create idiomatic LaTeX source files that can then be adjusted manually and passed on to journals.

Why output source code for other text languages, e.g. Markdown?

Recently I had to convert my masters thesis to plain text for a contest submission. I used Pandoc, which is an excellent piece of software, but I ran into issues. First, the LaTeX to Markdown conversion was extremely messy, with Pandoc-specific {:: ::} blocks strewn throughout the code to retain as much information as possible. After cleaning that up I decided to work in Markdown rather than LaTeX, and use Pandoc to convert to plain text and handle footnotes and citations. This was mostly fine, until I realized I wanted to publish the summary on my blog as well.

My blog uses Jekyll and GitHub Pages so it can't handle all of Pandoc's markdown features, particularly citations. I was hoping to get Pandoc to take my Markdown, resolve the footnotes and citations, add a ToC, add section numbering, and save that output to Markdown again. To my knowledge, this is impossible - I ended up having to Pandoc to raw HTML. I would like my language to use the same front-end syntax and output to plain, everything-can-read-it Markdown, plain text, and perhaps more.

Why not use Markdown instead?

I'm not against using Pandoc for some conversions, e.g. I'd be happy to have my language create Markdown which Pandoc turns into HTML, but Markdown isn't a suitable replacement language for LaTeX by itself. Pandoc extensions can make it theoretically possible for Markdown to represent the same documents as LaTeX, but it's too cumbersome to work with directly imo.

Why replace LaTeX macros with Python?

While the LaTeX macro engine is horrible to work with, it is still useful to embed a programming language into text. This allows for e.g. smart citations and collecting TODO messages and notes. The annoyance of LaTeX is that I spend more time figuring out the macro language than I do figuring out any code. With that in mind, I'd like the language to allow embedding a proper programming language like Python or Lua (see notes/code_syntax.md for notes on which languages to embed).

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

turnip_text-0.0.4.tar.gz (87.8 kB view details)

Uploaded Source

Built Distributions

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

turnip_text-0.0.4-cp311-abi3-win_amd64.whl (238.5 kB view details)

Uploaded CPython 3.11+Windows x86-64

turnip_text-0.0.4-cp311-abi3-win32.whl (225.3 kB view details)

Uploaded CPython 3.11+Windows x86

turnip_text-0.0.4-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

turnip_text-0.0.4-cp311-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.5 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ s390x

turnip_text-0.0.4-cp311-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.4 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ppc64le

turnip_text-0.0.4-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.3 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARMv7l

turnip_text-0.0.4-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.3 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

turnip_text-0.0.4-cp311-abi3-manylinux_2_5_i686.manylinux1_i686.whl (1.3 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.5+ i686

turnip_text-0.0.4-cp311-abi3-macosx_11_0_arm64.whl (379.9 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

turnip_text-0.0.4-cp311-abi3-macosx_10_7_x86_64.whl (387.3 kB view details)

Uploaded CPython 3.11+macOS 10.7+ x86-64

File details

Details for the file turnip_text-0.0.4.tar.gz.

File metadata

  • Download URL: turnip_text-0.0.4.tar.gz
  • Upload date:
  • Size: 87.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.2.3

File hashes

Hashes for turnip_text-0.0.4.tar.gz
Algorithm Hash digest
SHA256 921abdacb7120310fe723f60fcc25a991861ebd57df0ce0d63970b600d25e0b8
MD5 ec2e4629cb894088353742c9222bef78
BLAKE2b-256 79df642c401d716fefb7a8072106b52f6c5603997e7ee085258b1d4fe75bdaf1

See more details on using hashes here.

File details

Details for the file turnip_text-0.0.4-cp311-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for turnip_text-0.0.4-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8d236709a4678c126e35890d3d7d500f6f3873b969b82232aecc4d462a651333
MD5 01ef3a38dd2ed68855c0d01b0982f1f6
BLAKE2b-256 7058f956ad12550f23da352a66b1669508ec90ee247435b020b8edd9b12a2b7a

See more details on using hashes here.

File details

Details for the file turnip_text-0.0.4-cp311-abi3-win32.whl.

File metadata

  • Download URL: turnip_text-0.0.4-cp311-abi3-win32.whl
  • Upload date:
  • Size: 225.3 kB
  • Tags: CPython 3.11+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.2.3

File hashes

Hashes for turnip_text-0.0.4-cp311-abi3-win32.whl
Algorithm Hash digest
SHA256 3b1f30312c5256d88296e687accbb0b86fa3260591904943d1281b1caa73a48d
MD5 7e7722fad8862de71c355d0832748ceb
BLAKE2b-256 7413049fba74e1cf8b73d0ef8a22306d1bb3b82c51348d341cda86d299d9d114

See more details on using hashes here.

File details

Details for the file turnip_text-0.0.4-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for turnip_text-0.0.4-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2692c358d3458d23721f383ac3e829fd29a94ed1327b30865de3ee1b7e5cc5b7
MD5 21f2c43ddebd42db6f8faeee53a83b7b
BLAKE2b-256 fb150a064bca8b9b2fe9071bd59a8a0e199f7737a2cb9f445b154fc3b8475911

See more details on using hashes here.

File details

Details for the file turnip_text-0.0.4-cp311-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for turnip_text-0.0.4-cp311-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 19daf1b6a61c7306438b73c29a44fb530cb371a852eb7510ae7010d3b554ca00
MD5 8c2c11a487fa5103088c658630926242
BLAKE2b-256 cc92cd024e1a1106598efa5146dcb7130c34712d5ce12032579c978f76f32a07

See more details on using hashes here.

File details

Details for the file turnip_text-0.0.4-cp311-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for turnip_text-0.0.4-cp311-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 a697258dd9f4e87da33a7c0592a0e1cb744be397668ea97ed16faece8bd3c144
MD5 1dd03a783f67cf7b77b99f05ca1f1f74
BLAKE2b-256 87e54336b667d98e8583edc55c2d07b56f32644de909f6bcb1b57204b6429700

See more details on using hashes here.

File details

Details for the file turnip_text-0.0.4-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for turnip_text-0.0.4-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 0f4937664238b8944d67a92028d04350cac3200675748ec373a5107090714001
MD5 bd995c72333d434de60db6f437af3563
BLAKE2b-256 2e05ec5f44fee165e724edd89ae26499c8e6710a61b25568690fed09e59b719d

See more details on using hashes here.

File details

Details for the file turnip_text-0.0.4-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for turnip_text-0.0.4-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7f974f889c0b56c8c7d5f072d704711a8fb1cc2ea696051ef236352295637c66
MD5 fbba981ad052afa21475481b683e9027
BLAKE2b-256 6844484514582a52dda9877abcc5b54cc313f8b85a3f67eb53c3a737582b7288

See more details on using hashes here.

File details

Details for the file turnip_text-0.0.4-cp311-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for turnip_text-0.0.4-cp311-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 67fbf7d5df1c085b979362546425edae35108de5ce64d6ad5181f63a9a58275f
MD5 d96f368462492726ff82ed4e8eeeb416
BLAKE2b-256 9a492a5c6c923131351161087a4bbc0b045bc29e0fa8c3e2f6ee4e6b8f187f7e

See more details on using hashes here.

File details

Details for the file turnip_text-0.0.4-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for turnip_text-0.0.4-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a4386418911793ccbca575fc913a877683c3001b54a346f9c0b2a63a9ef41522
MD5 b0b9911d4c7f4e83840964351dddcefe
BLAKE2b-256 e688f42b08cb55f3dcc960661173fbe955e739282d575c0508ec276d19b6566d

See more details on using hashes here.

File details

Details for the file turnip_text-0.0.4-cp311-abi3-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for turnip_text-0.0.4-cp311-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 29b8b15452c50d5a694ed8a2ff4df42c5f919f7fb255d8675e712fe9997cfdc9
MD5 54d9418fdee149c7b9f50f44ac0811eb
BLAKE2b-256 4f3db683c104049817d1933b466e2fdb7d714ed44d59e82529d5ce46cd33696b

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