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.5.tar.gz (118.3 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.5-cp311-abi3-win_amd64.whl (275.5 kB view details)

Uploaded CPython 3.11+Windows x86-64

turnip_text-0.0.5-cp311-abi3-win32.whl (265.1 kB view details)

Uploaded CPython 3.11+Windows x86

turnip_text-0.0.5-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

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

turnip_text-0.0.5-cp311-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.3 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ s390x

turnip_text-0.0.5-cp311-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.3 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ppc64le

turnip_text-0.0.5-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARMv7l

turnip_text-0.0.5-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

turnip_text-0.0.5-cp311-abi3-manylinux_2_5_i686.manylinux1_i686.whl (1.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.5+ i686

turnip_text-0.0.5-cp311-abi3-macosx_11_0_arm64.whl (398.4 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

turnip_text-0.0.5-cp311-abi3-macosx_10_12_x86_64.whl (400.7 kB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for turnip_text-0.0.5.tar.gz
Algorithm Hash digest
SHA256 789bad8abee689990e073c3af354c9a7512f0ec991be663595a7556608d16692
MD5 39f89ebaecf003cc481d9a696c81e5c7
BLAKE2b-256 ffbe1622fae81810158f7c6cf19d4c42855d7c23ec2516bf0ba883278c7515f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turnip_text-0.0.5-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d6bdfbb39dcf610ef6083067d1b804e7688f98876ebcce2e9a6aa73c001e5997
MD5 5d62f326362f8fceef688816e27dde86
BLAKE2b-256 7a31ac265d2cb90c168b08ac34cad2b01568835dbd38ea4cda7cd78284c2bfdc

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for turnip_text-0.0.5-cp311-abi3-win32.whl
Algorithm Hash digest
SHA256 630f8545a3da3ec3752f2743edcef60c917b42de75a64ac19f0dfc9e5fbb0f82
MD5 5d9c5cd411eb377c27960dc9f3d04bd1
BLAKE2b-256 678888a3e795a7fe5bfebf5d3dbafb4784d7e67dfc97e57cda1a3140e2e28301

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turnip_text-0.0.5-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f2eb761ffd0a87800ea18d240640a014459f73172bbb0c2e2aa1c3302389dc20
MD5 f7917b5367c84600b007943c8a701207
BLAKE2b-256 866b8fe5838f95424ec8e89f8b8110745042f2d432fbe6aee4c5056602d4ae02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turnip_text-0.0.5-cp311-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 345347a4b2145c286c1b4118bcabacda728dc1c8abb8f5118d062146cf24de37
MD5 4a3450239ca4d12b37a432281356d261
BLAKE2b-256 5cf12b151f673cfc828434d146fd38c9ec7a77fe3d0250f50c5192aab3627889

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turnip_text-0.0.5-cp311-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 785e083f083479a2d08dfcc0172964a143f2b75ddba78e778d7b092a79b0ebd4
MD5 d7b57ee855a7bc74d067de0cc006149a
BLAKE2b-256 cbdb3caae805d61fcffd7f3526299723efbaa3a7bbff4e6e3e432ce3a28a32b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turnip_text-0.0.5-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 861279e046635249f3065f920d09b39a0eef1a40217806c93f1e8e08212a7458
MD5 0433a1de475dc6d1b4d29000656fde5b
BLAKE2b-256 097da766d3e9aae3ae987e1fac2495c465363197e1cf6aea86d46a97df6cdd48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turnip_text-0.0.5-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 59a484d7e8531d2e886ea2e2e363eb583ac1019da6da610cbcfe80780f04a99a
MD5 24f03d4b358ccc689c158f77b445bf53
BLAKE2b-256 3ce55def27eb0e2e6e4a51dfa91def37bb4eb58e6ef061d312c06f042a919cd8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turnip_text-0.0.5-cp311-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 6f201d687ffbdc87a8f31ba0d577bd8d8cce6261a90368b73ae3988cdcfea03b
MD5 8f62342f9b995a766e169fa0a8ea1eca
BLAKE2b-256 6cf835a470e364d2a8d054472fc2dba36347e01a478fef7d2b5a1712eaa2b721

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turnip_text-0.0.5-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3cef96527c6678cd6dc8beb806727c5bc85cbb62f43533e1d32639e2a9f610b
MD5 9e42261ed940536c5beaff69f2961e69
BLAKE2b-256 3a1fd9ffd9e15148d61eb487f128f52b8e1a782804c26e2c03ee23a08a4b8ec9

See more details on using hashes here.

File details

Details for the file turnip_text-0.0.5-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for turnip_text-0.0.5-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 530d5c58024f8f9aef6fe2ac14162a7359aedd122e790c7efc1c98f292768e07
MD5 3ae1ac2aed32020739931d06dbc514f7
BLAKE2b-256 c070ff0abeb636a4809cb899e39d358e48cb5d86ea5e3a59b955ab535cd2191f

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