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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14manylinux: glibc 2.34+ ARM64

fabricatio_typst-0.1.28-cp314-cp314-macosx_11_0_arm64.whl (3.7 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.34+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.34+ ARM64

fabricatio_typst-0.1.28-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.28-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: fabricatio_typst-0.1.28-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.17 {"installer":{"name":"uv","version":"0.11.17","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.28-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 42eb816ae091fd855fad5119055503c8df53115d2c1da37efa526ffea0e317f3
MD5 d3dd88c2d5ad36bd22223353e9face10
BLAKE2b-256 641c6d7c97d0cfedb7e0f279bf3d5583002d6c3bb3508f4a11303ee1368b3c16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.28-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.17 {"installer":{"name":"uv","version":"0.11.17","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.28-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0341b913c12318822a357d012ba65bc5253c2d088c0b70ecdf5815885e721bd7
MD5 1470781d7b104fe2bac621b5685712b9
BLAKE2b-256 4601b87ed8ea00f6370237562e11391a73c909f42d5bf7721068cc1b3ee4899a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.28-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.17 {"installer":{"name":"uv","version":"0.11.17","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.28-cp314-cp314-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 e2457d3689b0ac42c6b9216f8912978ceeaffca5295e9214d1c0d2ec38acf89e
MD5 459d345c70a14089522dd84e15217c0f
BLAKE2b-256 cc6303d72ac6703ef9f5986f96b0f2ae4469adb82e286e0f6ffeec4034832488

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.28-cp314-cp314-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.14, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","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.28-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 aad8b8218653842cdd55bb13c9733984727d6a0485666bc1a552435dda43c52f
MD5 b7ae1a91dcf1a1e5e418936c35e325ce
BLAKE2b-256 5bf5bef498e7c1220c8c1729d0204ff79a667aa91c8aa1eab2d0c8b03e1baa39

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.28-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.17 {"installer":{"name":"uv","version":"0.11.17","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.28-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 39d79bc85f255ee8c2a7700c5f6d8fc1034b6529474751e94730a0501bc7c5ac
MD5 68c032ac98725b546290f5c35ad05d38
BLAKE2b-256 720ca3184b03292277a4015f788eb64728e64c103231154862c952f89d681df9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.28-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.17 {"installer":{"name":"uv","version":"0.11.17","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.28-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 14d99e22199471fff121b1b08a0f2b0dfdba1294650a90cd8d18544de0195615
MD5 9e32ce45772831d60fa26570a3b888ec
BLAKE2b-256 3c40e94dc0a41eaba15cc56dddb3f2d115854bdb8a72f6b7a87dad439aee6588

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.28-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.17 {"installer":{"name":"uv","version":"0.11.17","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.28-cp313-cp313-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 a7c39ee9d16a63e87ca447c6efd3dd83ee82c49d7f9bdfc33d72b27e7c2c43b4
MD5 fa20b7deb5e27d4a62692f299aa240eb
BLAKE2b-256 7b134cf3ecb3b3b710dae12e3d5ad8a7227dc2a4b951e68d455756c01a29db6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.28-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.17 {"installer":{"name":"uv","version":"0.11.17","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.28-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 524727db7be7815bbfee266e69fbd413125af209ea1c633514856fef568c33aa
MD5 ae4a390927f97be8ec23adddfbd13c71
BLAKE2b-256 6339601f4f6c875a1e232f241994614be18b0ee4dc9762839aef70dcd12a48c2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.28-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.17 {"installer":{"name":"uv","version":"0.11.17","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.28-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c229a62ad1eaee38268076b1c4f383aed8002855aa50037a83fa89134b75c11a
MD5 c27a384ceb711591ed084ce0565733eb
BLAKE2b-256 d132f0eb07cb14d5cb7b5cb40ae0cf242e8db5d24ce990f6e545a8e016fd569c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.28-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.17 {"installer":{"name":"uv","version":"0.11.17","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.28-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 44d0c09d6b36788e3133a47e55eb6304766e50281acbe597fa60dd1e4427ba13
MD5 d58fc90b3a1ca0c6c391a60f0645bab1
BLAKE2b-256 b37111f27cd632cbfdae4c08fe4c6faaefcf97a420bce928b69d5606adcee164

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.28-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.17 {"installer":{"name":"uv","version":"0.11.17","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.28-cp312-cp312-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 c5b7eea018213c7589c373941439ca4ee87a0bfacb71222d90253fba47679dd9
MD5 6b4cf2fa4aca7e785cd6cc16ae43c606
BLAKE2b-256 497de7670b9297fb6fea15e23102e2d816926072bec7f4240677d8dbe971decc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fabricatio_typst-0.1.28-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.17 {"installer":{"name":"uv","version":"0.11.17","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.28-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ba0eb29ddc25cf8fd32988b7ac25721ed15ba7ed39f42fe99edfde466859ed59
MD5 1c84920fc76f85155e7ccb0d2d14ac3c
BLAKE2b-256 c91c9159bd03d30c309d531d230b61b535f33748f0b460655eee974527bcb610

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