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.27-cp314-cp314-win_amd64.whl (3.8 MB view details)

Uploaded CPython 3.14Windows x86-64

fabricatio_typst-0.1.27-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.27-cp314-cp314-manylinux_2_34_aarch64.whl (3.8 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

fabricatio_typst-0.1.27-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.27-cp313-cp313-manylinux_2_34_aarch64.whl (3.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

fabricatio_typst-0.1.27-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.27-cp312-cp312-manylinux_2_34_aarch64.whl (3.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

fabricatio_typst-0.1.27-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.27-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: fabricatio_typst-0.1.27-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.11.16 {"installer":{"name":"uv","version":"0.11.16","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.27-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 e5af0999cb4092b1aba59063c7a2e54db768a027a7ef68d221a95af5574e8f46
MD5 b70706559eefd1ae10e7914fab5e5a06
BLAKE2b-256 546536eb2436c4d1ec290e61a3d7da30bd5f3acf702a8be13d88ea13e5f3c115

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.27-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.11.16 {"installer":{"name":"uv","version":"0.11.16","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.27-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c81187383f80d526ee0562fe43a6ed600d436e400bc9e1fd053a757e7d63f3ff
MD5 0750a6bcaca1d436a2733c4d32d6c031
BLAKE2b-256 5da93f286629e43e48e34194c6761290d43c93f7e06a66238ea57a4f6eb9f91a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.27-cp314-cp314-manylinux_2_34_aarch64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.14, manylinux: glibc 2.34+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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.27-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 e125881fa64db2b58ffd4d1966847c69f2b1eca9120f19012be2bff641fb9f61
MD5 117097aab4339c442c69316da8bb652c
BLAKE2b-256 44275d69cb5ac83e3f91be46941266d09ace37a4951b953417a32213f9d4f884

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.27-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.11.16 {"installer":{"name":"uv","version":"0.11.16","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.27-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6a4f36a353a968a72083c450a4608aff304f37d55c6e2392494940cf5aa47a7b
MD5 fbc86924d4b2869c7117ffeb112fd000
BLAKE2b-256 a0e486307c4e26d48d0ef48a16afab4aea9ec8b220ff1ca7af5fbce008548cf4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.27-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.11.16 {"installer":{"name":"uv","version":"0.11.16","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.27-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 94e765b355d3e41f145b3311fc4a9e71cf4b94c7c75ff9edfdd592766bbb51e4
MD5 611528ddeadf0a8e478552b36eb98e64
BLAKE2b-256 4ad4f66a4fa44b192c758244bac575db4adb50cbfbde3c4639c5b448ca453809

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.27-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.11.16 {"installer":{"name":"uv","version":"0.11.16","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.27-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7ec72961e8bad23e99ac5f9147e141b4c17691aebaec95dc1588cabaafeee924
MD5 7032962608307aa496b368ede2f6eff3
BLAKE2b-256 31e82228629ad990a365754255195dfd275d252f25c03edf4c2e435e182c55d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.27-cp313-cp313-manylinux_2_34_aarch64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.13, manylinux: glibc 2.34+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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.27-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 2002587646c467f9c0982fc3fa1756917585d0a4e0f08bd23a2fe877f891a6a1
MD5 53ea074d54f94b9c3e9b2ea0cefd3db3
BLAKE2b-256 9ad7ec2cc34014a1aa7103d880649dd2e6807be8b582a4708b725e8a304c5169

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.27-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.11.16 {"installer":{"name":"uv","version":"0.11.16","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.27-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 560653db65f7294fab3dfad65559e4e3cf41d5e663487f56ea265e92a2621224
MD5 50b427acaac73a40f337fe4e142f2411
BLAKE2b-256 7b647809f40b1867df7d671fd633d322f6fc052f31a238c4cde9aaa3c0bf6712

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.27-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.11.16 {"installer":{"name":"uv","version":"0.11.16","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.27-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 042a698dbe3ee12478c1b0a86371d6a9b5e9adfca0ed7bd3fab9abb6465e4aa7
MD5 676729f6ca8440d05995762817fe636a
BLAKE2b-256 5eeb7a20f57125daaaa46d9bfe4d061ec99e414f952560eb66f6380aaaf27a2c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.27-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.11.16 {"installer":{"name":"uv","version":"0.11.16","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.27-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 92430bd192e622c43f47954043f58f5f694ef61397904cc3f5e6063a76127882
MD5 57e0c5c4c831fed941d63f2256087e9c
BLAKE2b-256 41eb9cf10c3da490ea9fd62a705bcf13eaed8631c5fe4975d97f4ed06112977d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.27-cp312-cp312-manylinux_2_34_aarch64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 3.12, manylinux: glibc 2.34+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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.27-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 f699374304bb4bd56f8be2339edb26df88d305fd1283fd8a2e391d5091bba5ab
MD5 b34c135dd8a32e238a2565a13c747f63
BLAKE2b-256 a1710377dd6d19b96f4908100fca8fc996cf6c191a706835fe2509e9012c96c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.27-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.11.16 {"installer":{"name":"uv","version":"0.11.16","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.27-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0ca34925c4c19a9052f0ac134c4599c49db8ae853ada2a57527025324a0140e8
MD5 559eab3359ff50c250a7310b00bf31da
BLAKE2b-256 4e9896110312eb5690dc9d8c4f5d652d97d32096587c74427c6c88451f2cbfa8

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