{
  "schemaVersion": "1.0",
  "item": {
    "slug": "typetex",
    "name": "Compile LaTex & Typst into PDF with TypeTex",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/gregm711/typetex",
    "canonicalUrl": "https://clawhub.ai/gregm711/typetex",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/typetex",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=typetex",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "examples/compile_typst.py",
      "examples/compile_latex.py",
      "SKILL.md",
      "openapi.yaml"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/typetex"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/typetex",
    "agentPageUrl": "https://openagent3.xyz/skills/typetex/agent",
    "manifestUrl": "https://openagent3.xyz/skills/typetex/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/typetex/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Typst & LaTeX Compiler",
        "body": "Compile Typst (.typ) and LaTeX (.tex) documents to PDF using the TypeTex compilation API."
      },
      {
        "title": "API Endpoint",
        "body": "Base URL: https://studio-intrinsic--typetex-compile-app.modal.run"
      },
      {
        "title": "Compile Typst",
        "body": "POST /public/compile/typst\nContent-Type: application/json\n\nRequest Body:\n\n{\n  \"content\": \"#set page(paper: \\\"a4\\\")\\n\\n= Hello World\\n\\nThis is a Typst document.\",\n  \"main_filename\": \"main.typ\",\n  \"auxiliary_files\": {}\n}\n\nResponse (Success):\n\n{\n  \"success\": true,\n  \"pdf_base64\": \"JVBERi0xLjQK...\"\n}\n\nResponse (Failure):\n\n{\n  \"success\": false,\n  \"error\": \"error: file not found: missing.typ\"\n}"
      },
      {
        "title": "Compile LaTeX",
        "body": "POST /public/compile/latex\nContent-Type: application/json\n\nRequest Body:\n\n{\n  \"content\": \"\\\\documentclass{article}\\n\\\\begin{document}\\nHello World\\n\\\\end{document}\",\n  \"main_filename\": \"main.tex\",\n  \"auxiliary_files\": {}\n}\n\nResponse (Success):\n\n{\n  \"success\": true,\n  \"pdf_base64\": \"JVBERi0xLjQK...\"\n}\n\nResponse (Failure):\n\n{\n  \"success\": false,\n  \"error\": \"! LaTeX Error: Missing \\\\begin{document}.\",\n  \"log_output\": \"This is pdfTeX...\"\n}"
      },
      {
        "title": "Health Check",
        "body": "GET /public/compile/health\n\nReturns {\"status\": \"ok\", \"service\": \"public-compile\"} if the service is running."
      },
      {
        "title": "Simple Typst Document",
        "body": "import requests\nimport base64\n\nresponse = requests.post(\n    \"https://studio-intrinsic--typetex-compile-app.modal.run/public/compile/typst\",\n    json={\n        \"content\": \"\"\"\n#set page(paper: \"a4\", margin: 2cm)\n#set text(font: \"New Computer Modern\", size: 11pt)\n\n= My Document\n\nThis is a paragraph with *bold* and _italic_ text.\n\n== Section 1\n\n- Item 1\n- Item 2\n- Item 3\n\"\"\",\n        \"main_filename\": \"main.typ\"\n    }\n)\n\nresult = response.json()\nif result[\"success\"]:\n    pdf_bytes = base64.b64decode(result[\"pdf_base64\"])\n    with open(\"output.pdf\", \"wb\") as f:\n        f.write(pdf_bytes)\n    print(\"PDF saved to output.pdf\")\nelse:\n    print(f\"Compilation failed: {result['error']}\")"
      },
      {
        "title": "Simple LaTeX Document",
        "body": "import requests\nimport base64\n\nresponse = requests.post(\n    \"https://studio-intrinsic--typetex-compile-app.modal.run/public/compile/latex\",\n    json={\n        \"content\": r\"\"\"\n\\documentclass[11pt]{article}\n\\usepackage[margin=1in]{geometry}\n\\usepackage{amsmath}\n\n\\title{My Document}\n\\author{Author Name}\n\n\\begin{document}\n\\maketitle\n\n\\section{Introduction}\n\nThis is a LaTeX document with math: $E = mc^2$\n\n\\end{document}\n\"\"\",\n        \"main_filename\": \"main.tex\"\n    }\n)\n\nresult = response.json()\nif result[\"success\"]:\n    pdf_bytes = base64.b64decode(result[\"pdf_base64\"])\n    with open(\"output.pdf\", \"wb\") as f:\n        f.write(pdf_bytes)\nelse:\n    print(f\"Compilation failed: {result['error']}\")\n    if result.get(\"log_output\"):\n        print(f\"Log: {result['log_output']}\")"
      },
      {
        "title": "Multi-File Project (Typst)",
        "body": "import requests\nimport base64\n\nresponse = requests.post(\n    \"https://studio-intrinsic--typetex-compile-app.modal.run/public/compile/typst\",\n    json={\n        \"content\": \"\"\"\n#import \"template.typ\": *\n\n#show: project.with(title: \"My Report\")\n\n= Introduction\n\n#include \"chapter1.typ\"\n\"\"\",\n        \"main_filename\": \"main.typ\",\n        \"auxiliary_files\": {\n            \"template.typ\": \"\"\"\n#let project(title: none, body) = {\n  set page(paper: \"a4\")\n  set text(font: \"New Computer Modern\")\n\n  align(center)[\n    #text(size: 24pt, weight: \"bold\")[#title]\n  ]\n\n  body\n}\n\"\"\",\n            \"chapter1.typ\": \"\"\"\n== Chapter 1\n\nThis is the first chapter.\n\"\"\"\n        }\n    }\n)\n\nresult = response.json()\nif result[\"success\"]:\n    pdf_bytes = base64.b64decode(result[\"pdf_base64\"])\n    with open(\"report.pdf\", \"wb\") as f:\n        f.write(pdf_bytes)"
      },
      {
        "title": "Including Images",
        "body": "For binary files like images, base64-encode them:\n\nimport requests\nimport base64\n\n# Read and encode an image\nwith open(\"figure.png\", \"rb\") as f:\n    image_base64 = base64.b64encode(f.read()).decode(\"utf-8\")\n\nresponse = requests.post(\n    \"https://studio-intrinsic--typetex-compile-app.modal.run/public/compile/typst\",\n    json={\n        \"content\": \"\"\"\n#set page(paper: \"a4\")\n\n= Document with Image\n\n#figure(\n  image(\"figure.png\", width: 80%),\n  caption: [A sample figure]\n)\n\"\"\",\n        \"main_filename\": \"main.typ\",\n        \"auxiliary_files\": {\n            \"figure.png\": image_base64\n        }\n    }\n)"
      },
      {
        "title": "Using curl",
        "body": "# Typst compilation\ncurl -X POST https://studio-intrinsic--typetex-compile-app.modal.run/public/compile/typst \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"content\": \"#set page(paper: \\\"a4\\\")\\n\\n= Hello World\\n\\nThis is Typst.\",\n    \"main_filename\": \"main.typ\"\n  }' | jq -r '.pdf_base64' | base64 -d > output.pdf\n\n# LaTeX compilation\ncurl -X POST https://studio-intrinsic--typetex-compile-app.modal.run/public/compile/latex \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"content\": \"\\\\documentclass{article}\\n\\\\begin{document}\\nHello World\\n\\\\end{document}\",\n    \"main_filename\": \"main.tex\"\n  }' | jq -r '.pdf_base64' | base64 -d > output.pdf"
      },
      {
        "title": "Typst",
        "body": "Full Typst language support\nMulti-file projects with imports\nImages (PNG, JPG, SVG)\nCustom fonts (New Computer Modern, etc.)\nMath equations\nTables and figures\nBibliography (using Hayagriva format)"
      },
      {
        "title": "LaTeX",
        "body": "Full TeX Live distribution via Tectonic\nMulti-file projects (\\input, \\include)\nBibTeX/BibLaTeX bibliography\nCustom style files (.sty, .cls)\nAll standard packages (amsmath, graphicx, etc.)\nTikZ/PGFPlots graphics\nImages (PNG, JPG, PDF, EPS)"
      },
      {
        "title": "Error Handling",
        "body": "When compilation fails, the response includes:\n\nsuccess: false\nerror: Human-readable error message\nlog_output (LaTeX only): Full compilation log for debugging\n\nCommon errors:\n\nSyntax errors: Check your source code for typos\nMissing files: Ensure all imported/included files are in auxiliary_files\nPackage not found: Most common packages are available; contact support for additions\nTimeout: Complex documents may timeout after 60 seconds"
      },
      {
        "title": "Rate Limits",
        "body": "No authentication required\nPlease be respectful of shared resources\nFor high-volume usage, contact support"
      },
      {
        "title": "Tips for Agents",
        "body": "Always check success before accessing pdf_base64\nParse errors to provide helpful feedback to users\nUse minimal documents when testing - complex documents take longer\nCache results if compiling the same content multiple times\nInclude all dependencies in auxiliary_files for multi-file projects"
      },
      {
        "title": "Related Resources",
        "body": "Typst Documentation\nLaTeX Wikibook\nTypeTex - Full document editor with AI assistance"
      }
    ],
    "body": "Typst & LaTeX Compiler\n\nCompile Typst (.typ) and LaTeX (.tex) documents to PDF using the TypeTex compilation API.\n\nAPI Endpoint\n\nBase URL: https://studio-intrinsic--typetex-compile-app.modal.run\n\nEndpoints\nCompile Typst\nPOST /public/compile/typst\nContent-Type: application/json\n\n\nRequest Body:\n\n{\n  \"content\": \"#set page(paper: \\\"a4\\\")\\n\\n= Hello World\\n\\nThis is a Typst document.\",\n  \"main_filename\": \"main.typ\",\n  \"auxiliary_files\": {}\n}\n\n\nResponse (Success):\n\n{\n  \"success\": true,\n  \"pdf_base64\": \"JVBERi0xLjQK...\"\n}\n\n\nResponse (Failure):\n\n{\n  \"success\": false,\n  \"error\": \"error: file not found: missing.typ\"\n}\n\nCompile LaTeX\nPOST /public/compile/latex\nContent-Type: application/json\n\n\nRequest Body:\n\n{\n  \"content\": \"\\\\documentclass{article}\\n\\\\begin{document}\\nHello World\\n\\\\end{document}\",\n  \"main_filename\": \"main.tex\",\n  \"auxiliary_files\": {}\n}\n\n\nResponse (Success):\n\n{\n  \"success\": true,\n  \"pdf_base64\": \"JVBERi0xLjQK...\"\n}\n\n\nResponse (Failure):\n\n{\n  \"success\": false,\n  \"error\": \"! LaTeX Error: Missing \\\\begin{document}.\",\n  \"log_output\": \"This is pdfTeX...\"\n}\n\nHealth Check\nGET /public/compile/health\n\n\nReturns {\"status\": \"ok\", \"service\": \"public-compile\"} if the service is running.\n\nUsage Examples\nSimple Typst Document\nimport requests\nimport base64\n\nresponse = requests.post(\n    \"https://studio-intrinsic--typetex-compile-app.modal.run/public/compile/typst\",\n    json={\n        \"content\": \"\"\"\n#set page(paper: \"a4\", margin: 2cm)\n#set text(font: \"New Computer Modern\", size: 11pt)\n\n= My Document\n\nThis is a paragraph with *bold* and _italic_ text.\n\n== Section 1\n\n- Item 1\n- Item 2\n- Item 3\n\"\"\",\n        \"main_filename\": \"main.typ\"\n    }\n)\n\nresult = response.json()\nif result[\"success\"]:\n    pdf_bytes = base64.b64decode(result[\"pdf_base64\"])\n    with open(\"output.pdf\", \"wb\") as f:\n        f.write(pdf_bytes)\n    print(\"PDF saved to output.pdf\")\nelse:\n    print(f\"Compilation failed: {result['error']}\")\n\nSimple LaTeX Document\nimport requests\nimport base64\n\nresponse = requests.post(\n    \"https://studio-intrinsic--typetex-compile-app.modal.run/public/compile/latex\",\n    json={\n        \"content\": r\"\"\"\n\\documentclass[11pt]{article}\n\\usepackage[margin=1in]{geometry}\n\\usepackage{amsmath}\n\n\\title{My Document}\n\\author{Author Name}\n\n\\begin{document}\n\\maketitle\n\n\\section{Introduction}\n\nThis is a LaTeX document with math: $E = mc^2$\n\n\\end{document}\n\"\"\",\n        \"main_filename\": \"main.tex\"\n    }\n)\n\nresult = response.json()\nif result[\"success\"]:\n    pdf_bytes = base64.b64decode(result[\"pdf_base64\"])\n    with open(\"output.pdf\", \"wb\") as f:\n        f.write(pdf_bytes)\nelse:\n    print(f\"Compilation failed: {result['error']}\")\n    if result.get(\"log_output\"):\n        print(f\"Log: {result['log_output']}\")\n\nMulti-File Project (Typst)\nimport requests\nimport base64\n\nresponse = requests.post(\n    \"https://studio-intrinsic--typetex-compile-app.modal.run/public/compile/typst\",\n    json={\n        \"content\": \"\"\"\n#import \"template.typ\": *\n\n#show: project.with(title: \"My Report\")\n\n= Introduction\n\n#include \"chapter1.typ\"\n\"\"\",\n        \"main_filename\": \"main.typ\",\n        \"auxiliary_files\": {\n            \"template.typ\": \"\"\"\n#let project(title: none, body) = {\n  set page(paper: \"a4\")\n  set text(font: \"New Computer Modern\")\n\n  align(center)[\n    #text(size: 24pt, weight: \"bold\")[#title]\n  ]\n\n  body\n}\n\"\"\",\n            \"chapter1.typ\": \"\"\"\n== Chapter 1\n\nThis is the first chapter.\n\"\"\"\n        }\n    }\n)\n\nresult = response.json()\nif result[\"success\"]:\n    pdf_bytes = base64.b64decode(result[\"pdf_base64\"])\n    with open(\"report.pdf\", \"wb\") as f:\n        f.write(pdf_bytes)\n\nIncluding Images\n\nFor binary files like images, base64-encode them:\n\nimport requests\nimport base64\n\n# Read and encode an image\nwith open(\"figure.png\", \"rb\") as f:\n    image_base64 = base64.b64encode(f.read()).decode(\"utf-8\")\n\nresponse = requests.post(\n    \"https://studio-intrinsic--typetex-compile-app.modal.run/public/compile/typst\",\n    json={\n        \"content\": \"\"\"\n#set page(paper: \"a4\")\n\n= Document with Image\n\n#figure(\n  image(\"figure.png\", width: 80%),\n  caption: [A sample figure]\n)\n\"\"\",\n        \"main_filename\": \"main.typ\",\n        \"auxiliary_files\": {\n            \"figure.png\": image_base64\n        }\n    }\n)\n\nUsing curl\n# Typst compilation\ncurl -X POST https://studio-intrinsic--typetex-compile-app.modal.run/public/compile/typst \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"content\": \"#set page(paper: \\\"a4\\\")\\n\\n= Hello World\\n\\nThis is Typst.\",\n    \"main_filename\": \"main.typ\"\n  }' | jq -r '.pdf_base64' | base64 -d > output.pdf\n\n# LaTeX compilation\ncurl -X POST https://studio-intrinsic--typetex-compile-app.modal.run/public/compile/latex \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"content\": \"\\\\documentclass{article}\\n\\\\begin{document}\\nHello World\\n\\\\end{document}\",\n    \"main_filename\": \"main.tex\"\n  }' | jq -r '.pdf_base64' | base64 -d > output.pdf\n\nSupported Features\nTypst\nFull Typst language support\nMulti-file projects with imports\nImages (PNG, JPG, SVG)\nCustom fonts (New Computer Modern, etc.)\nMath equations\nTables and figures\nBibliography (using Hayagriva format)\nLaTeX\nFull TeX Live distribution via Tectonic\nMulti-file projects (\\input, \\include)\nBibTeX/BibLaTeX bibliography\nCustom style files (.sty, .cls)\nAll standard packages (amsmath, graphicx, etc.)\nTikZ/PGFPlots graphics\nImages (PNG, JPG, PDF, EPS)\nError Handling\n\nWhen compilation fails, the response includes:\n\nsuccess: false\nerror: Human-readable error message\nlog_output (LaTeX only): Full compilation log for debugging\n\nCommon errors:\n\nSyntax errors: Check your source code for typos\nMissing files: Ensure all imported/included files are in auxiliary_files\nPackage not found: Most common packages are available; contact support for additions\nTimeout: Complex documents may timeout after 60 seconds\nRate Limits\nNo authentication required\nPlease be respectful of shared resources\nFor high-volume usage, contact support\nTips for Agents\nAlways check success before accessing pdf_base64\nParse errors to provide helpful feedback to users\nUse minimal documents when testing - complex documents take longer\nCache results if compiling the same content multiple times\nInclude all dependencies in auxiliary_files for multi-file projects\nRelated Resources\nTypst Documentation\nLaTeX Wikibook\nTypeTex - Full document editor with AI assistance"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/gregm711/typetex",
    "publisherUrl": "https://clawhub.ai/gregm711/typetex",
    "owner": "gregm711",
    "version": "1.5.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/typetex",
    "downloadUrl": "https://openagent3.xyz/downloads/typetex",
    "agentUrl": "https://openagent3.xyz/skills/typetex/agent",
    "manifestUrl": "https://openagent3.xyz/skills/typetex/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/typetex/agent.md"
  }
}