Skip to main content

A Python library for generating, validating and converting academic content using Typst format.

Project description

fabricatio-typst

MIT Python Versions PyPI Version PyPI Downloads PyPI Downloads Bindings: PyO3 Build Tool: uv + maturin

A Python library for generating, validating and converting academic content using Typst format.

📦 Installation

This package is part of the fabricatio monorepo and can be installed as an optional dependency:

pip install fabricatio[typst]

Or install all components:

pip install fabricatio[full]

🔍 Overview

Provides tools for:

  • Generating academic article proposals and outlines This feature uses natural language processing and machine learning techniques to generate well - structured academic article proposals and outlines. It analyzes the research topic and relevant literature to come up with a comprehensive proposal that includes a proposed title, research problem, technical approaches, and an outline of the article's structure. For example, given a research topic on "The impact of climate change on coastal ecosystems", it can generate a proposal with a clear statement of the problem, possible methods for data collection and analysis, and an outline of the main sections of the article.
  • Writing full articles using RAG (Retrieval-Augmented Generation) The RAG - based article writing feature combines retrieval and generation capabilities. It retrieves relevant information from a knowledge base, such as academic papers, reports, and datasets, and uses this information to generate high - quality article content. For example, it can search for existing research on a particular topic, extract relevant facts and figures, and incorporate them into the article while maintaining a coherent narrative.
  • Converting LaTeX math to Typst format This feature is designed to help users convert LaTeX math expressions to the Typst format. It parses the LaTeX math code and translates it into the equivalent Typst syntax. This is useful for users who are migrating from LaTeX to Typst or want to use Typst for academic writing with math content. For example, it can convert a LaTeX equation like " (E = mc^2)" to the Typst format.
  • Managing bibliographies and citations The bibliography and citation management feature allows users to easily manage references in their academic articles. It can import bibliographic data from various sources, such as BibTeX files, and generate formatted citations and bibliographies in the desired style. For example, it can generate APA, MLA, or Chicago style citations and bibliographies based on the user's requirements.
  • Validating and improving article structure This feature checks the structure of the academic article for coherence and logical flow. It can identify issues such as missing sections, inconsistent headings, or weak transitions between paragraphs. It then provides suggestions for improving the structure, such as adding or reordering sections, and strengthening the connections between different parts of the article.

Built on top of Fabricatio's agent framework with support for asynchronous execution.

🧩 Usage Example

from fabricatio_typst.actions.article import GenerateArticleProposal
The `GenerateArticleProposal` class is responsible for generating article proposals. It takes a research topic or article briefing as input and uses a set of algorithms and templates to generate a detailed proposal. It interacts with other components of the library, such as the data models and retrieval mechanisms, to ensure the proposal is comprehensive and relevant.
from fabricatio_typst.models.article_proposal import ArticleProposal
The `ArticleProposal` model represents the generated article proposal. It contains attributes such as the title, research problem, technical approaches, and outline of the article. It provides methods for accessing and manipulating these attributes, as well as for validating the proposal's structure.


async def create_proposal():
    # Create a proposal based on a research topic
    proposer = GenerateArticleProposal()
    This line creates an instance of the `GenerateArticleProposal` class. Once created, the instance can be used to generate an article proposal by calling its `_execute` method with an appropriate article briefing.
    proposal: ArticleProposal = await proposer._execute(
    The `_execute` method of the `GenerateArticleProposal` class takes an article briefing as input and generates an `ArticleProposal` object. It performs a series of operations, such as retrieving relevant information, analyzing the topic, and applying templates, to generate the proposal.
        article_briefing="Research topic: The impact of climate change on coastal ecosystems"
    )

    print(f"Proposed title: {proposal.title}")
    print(f"Research problem: {proposal.focused_problem}")
    print(f"Technical approaches: {proposal.technical_approaches}")

📁 Structure

fabricatio-typst/
├── actions/          - Article generation workflows
│   ├── article.py    - Core article generation actions
│   └── article_rag.py- RAG-based content creation
├── capabilities/     - Citation and reference management
│   └── citation_rag.py
├── models/           - Data models for academic content
│   ├── article_base.py - Base classes for article components
│   ├── article_outline.py - Outline structure definitions
│   ├── article_proposal.py - Research proposal model
│   └── article_essence.py - Semantic fingerprint of papers
├── workflows/        - Predefined content generation pipelines
└── rust.pyi          - Rust extension interfaces

🔗 Dependencies

Built on top of other Fabricatio modules:

  • fabricatio-core - Core interfaces and utilities
  • fabricatio-rag - Retrieval-Augmented Generation capabilities
  • fabricatio-capabilities - Base capability patterns

Includes Rust extensions for:

  • TeX-to-Typst conversion
  • Bibliography management
  • Language detection
  • Text processing

📄 License

MIT – see LICENSE

Project details


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 Distributions

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

fabricatio_typst-0.1.25-cp314-cp314-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.14Windows x86-64

fabricatio_typst-0.1.25-cp314-cp314-manylinux_2_34_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

fabricatio_typst-0.1.25-cp314-cp314-manylinux_2_34_aarch64.whl (3.9 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

fabricatio_typst-0.1.25-cp314-cp314-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

fabricatio_typst-0.1.25-cp313-cp313-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.13Windows x86-64

fabricatio_typst-0.1.25-cp313-cp313-manylinux_2_34_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

fabricatio_typst-0.1.25-cp313-cp313-manylinux_2_34_aarch64.whl (3.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

fabricatio_typst-0.1.25-cp313-cp313-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

fabricatio_typst-0.1.25-cp312-cp312-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.12Windows x86-64

fabricatio_typst-0.1.25-cp312-cp312-manylinux_2_34_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

fabricatio_typst-0.1.25-cp312-cp312-manylinux_2_34_aarch64.whl (3.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

fabricatio_typst-0.1.25-cp312-cp312-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file fabricatio_typst-0.1.25-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: fabricatio_typst-0.1.25-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fabricatio_typst-0.1.25-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 f03b9c716c4505c1621bea04b152392ff09018bd923f8ece051f83dba6984f7c
MD5 8f557c1fc4dea1c52ab3677853514c2b
BLAKE2b-256 db704939ff13ad4508ff692e2325af21f199dd483d6c90851aba56edddefd454

See more details on using hashes here.

File details

Details for the file fabricatio_typst-0.1.25-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: fabricatio_typst-0.1.25-cp314-cp314-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 4.3 MB
  • Tags: CPython 3.14, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fabricatio_typst-0.1.25-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f4cc257a77b3ee026732d5337409b7756399881ff577dd8f22781fa3dcfee313
MD5 081f7560bdf975fa0903f787798fa1ee
BLAKE2b-256 cb1a3851910bf1a1163534a59a36dacfa90e4c24823378e50a2e70846062a630

See more details on using hashes here.

File details

Details for the file fabricatio_typst-0.1.25-cp314-cp314-manylinux_2_34_aarch64.whl.

File metadata

  • Download URL: fabricatio_typst-0.1.25-cp314-cp314-manylinux_2_34_aarch64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.14, manylinux: glibc 2.34+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fabricatio_typst-0.1.25-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 60fa2083a07189a524964bad9d8c32e7c838b7d70de664dce13f75f21d51fd76
MD5 66748bfeb18163ace3c74d21d8f3123d
BLAKE2b-256 b6980abd619fcedaaa2229f23310306be5c55e427c35e635f98c65db3f7acfd9

See more details on using hashes here.

File details

Details for the file fabricatio_typst-0.1.25-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

  • Download URL: fabricatio_typst-0.1.25-cp314-cp314-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.14, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fabricatio_typst-0.1.25-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1cf8b096595d9123766dc38b9cc160446dfb7edf2ed92193a4ab9cd1299ec2bc
MD5 f1addcd56abcefd87db8436ef790ca38
BLAKE2b-256 eb2c0a670687214c85ddb5be362e993aa0113fd5e45d1e1c3bfe373969e735e4

See more details on using hashes here.

File details

Details for the file fabricatio_typst-0.1.25-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: fabricatio_typst-0.1.25-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fabricatio_typst-0.1.25-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 af410a52c0170b4c8f6aa2c98439356b4989fe325bf79c2954b57922e20772bb
MD5 3d19db0685d892ff854413c716254502
BLAKE2b-256 44b74fb72a72b11834eade29f133d0afd0066b61293c8552afe4bed1447aa2e6

See more details on using hashes here.

File details

Details for the file fabricatio_typst-0.1.25-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: fabricatio_typst-0.1.25-cp313-cp313-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 4.3 MB
  • Tags: CPython 3.13, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fabricatio_typst-0.1.25-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d438494d0bda6c34710fe10865e6966a9eadb845a3f33f1d49fc31afe8120368
MD5 c885fd11028268d53130dc6bb0af5673
BLAKE2b-256 dbf3456be8aa2d84da9f848692351f8366cf22ee0fe028dbf5e3d99ab82f7600

See more details on using hashes here.

File details

Details for the file fabricatio_typst-0.1.25-cp313-cp313-manylinux_2_34_aarch64.whl.

File metadata

  • Download URL: fabricatio_typst-0.1.25-cp313-cp313-manylinux_2_34_aarch64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.13, manylinux: glibc 2.34+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fabricatio_typst-0.1.25-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 7cbd8035c943c4b57e783073a40596a3f9adb9a188cdc82e966b5040da80a462
MD5 af21c4a36afef77a2711d9725bf0ade4
BLAKE2b-256 eef00a3249225e7ac0f7b5d432a3a60288adcdf4d8fb93a3573ad6b136f92061

See more details on using hashes here.

File details

Details for the file fabricatio_typst-0.1.25-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

  • Download URL: fabricatio_typst-0.1.25-cp313-cp313-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.13, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fabricatio_typst-0.1.25-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c0dd4371c98a6abff255a0bfd70e24661304c1b491aefdffa092842834b334bf
MD5 c7a343a308477c39507cc14dac4e8449
BLAKE2b-256 cf3fce3f3b5d2804dd56a780c0d53d16718108163ed79f23c4fea4b8f9d19d15

See more details on using hashes here.

File details

Details for the file fabricatio_typst-0.1.25-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: fabricatio_typst-0.1.25-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fabricatio_typst-0.1.25-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f694cd307cd81e651828d9f44de0fa3f4b7e8be7332ad13b910be3edc9008aac
MD5 8b6526fac0412b10ef25157909af27a5
BLAKE2b-256 4ead3c4ba9abd30afef1571ac8265424f366819ff81ffa3ce3a1204ea1c9820f

See more details on using hashes here.

File details

Details for the file fabricatio_typst-0.1.25-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

  • Download URL: fabricatio_typst-0.1.25-cp312-cp312-manylinux_2_34_x86_64.whl
  • Upload date:
  • Size: 4.3 MB
  • Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fabricatio_typst-0.1.25-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e7fb8dcee32e61caae8313f423ea92c039a9e0c564511d66331aa67e8070219e
MD5 ca012ce6d2af600b00e4b76b98a9bff5
BLAKE2b-256 54a6e92bd7df3ccca9de7b9b0a733bd97f12bfb4e251016f76bf7b2d30b696b7

See more details on using hashes here.

File details

Details for the file fabricatio_typst-0.1.25-cp312-cp312-manylinux_2_34_aarch64.whl.

File metadata

  • Download URL: fabricatio_typst-0.1.25-cp312-cp312-manylinux_2_34_aarch64.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: CPython 3.12, manylinux: glibc 2.34+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fabricatio_typst-0.1.25-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 45424a91bafc7f86cd0be350ce5fdb13d438e839c3ba5fbda836a53504b7d429
MD5 290de5257db96f852068610f60200d7b
BLAKE2b-256 c48948b73df43fa3b63747a65976399855d99eb13582280a32a34e3c474c1c86

See more details on using hashes here.

File details

Details for the file fabricatio_typst-0.1.25-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

  • Download URL: fabricatio_typst-0.1.25-cp312-cp312-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.12, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fabricatio_typst-0.1.25-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c3bfe39329084b18a7fdcac5720675dc266b2134fcd94465282767c355c3b69d
MD5 509a57670f0c51708ef5c7bd6e252793
BLAKE2b-256 a11981fb227f08b867c35743304b28d1218e62b9988562f25154bf6d3fb7e00f

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