You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/content/docs/en/integrations/latex.mdx
+70-1Lines changed: 70 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ In Sim, the LaTeX integration enables your agents to compile LaTeX source into P
27
27
28
28
## Usage Instructions
29
29
30
-
Integrates LaTeX into the workflow. Compiles LaTeX source into a PDF file with pdflatex, xelatex, lualatex, platex, uplatex, or context, and supports additional resources such as images, included .tex files, and bibliographies. Does not require OAuth or an API key.
30
+
Integrates LaTeX into the workflow. Compiles LaTeX source into a PDF file with pdflatex, xelatex, lualatex, platex, uplatex, or context, and supports additional resources such as images, included .tex files, and bibliographies. Can also look up the TeX Live packages and system fonts available to the compiler. Does not require OAuth or an API key.
31
31
32
32
33
33
@@ -55,4 +55,73 @@ Compile a LaTeX document into a PDF. Supports pdflatex, xelatex, lualatex, plate
55
55
|`fileName`| string | Name of the compiled PDF file |
56
56
|`compiler`| string | LaTeX compiler used for the build |
57
57
58
+
### `latex_search_packages`
59
+
60
+
Search the TeX Live packages available to the LaTeX compiler by name or description, e.g. to check which packages can be used in a document.
61
+
62
+
#### Input
63
+
64
+
| Parameter | Type | Required | Description |
65
+
| --------- | ---- | -------- | ----------- |
66
+
|`query`| string | Yes | Search terms matched against package names and descriptions |
67
+
|`maxResults`| number | No | Maximum number of packages to return \(default: $\{DEFAULT_MAX_RESULTS\}, max: $\{MAX_RESULTS_LIMIT\}\)|
68
+
69
+
#### Output
70
+
71
+
| Parameter | Type | Description |
72
+
| --------- | ---- | ----------- |
73
+
|`packages`| array | TeX Live packages matching the query |
| ↳ `installed`| boolean | Whether the package is installed |
77
+
| ↳ `ctanUrl`| string | CTAN page for the package |
78
+
|`totalMatches`| number | Total number of packages matching the query, before truncation |
79
+
80
+
### `latex_get_package`
81
+
82
+
Get details about a specific TeX Live package available to the LaTeX compiler, including whether it is installed, its description, license, and related packages.
83
+
84
+
#### Input
85
+
86
+
| Parameter | Type | Required | Description |
87
+
| --------- | ---- | -------- | ----------- |
88
+
|`name`| string | Yes | Exact package name, e.g. amsmath, tikz, or biblatex |
89
+
90
+
#### Output
91
+
92
+
| Parameter | Type | Description |
93
+
| --------- | ---- | ----------- |
94
+
|`package`| json | TeX Live package details |
95
+
| ↳ `name`| string | Package name |
96
+
| ↳ `installed`| boolean | Whether the package is installed |
| ↳ `relatedPackages`| array | Names of related packages |
103
+
| ↳ `homepage`| string | Package homepage URL |
104
+
| ↳ `ctanUrl`| string | CTAN page for the package |
105
+
106
+
### `latex_list_fonts`
107
+
108
+
List the system fonts available to the LaTeX compiler, optionally filtered by name, e.g. to pick a font for xelatex or lualatex documents using fontspec.
109
+
110
+
#### Input
111
+
112
+
| Parameter | Type | Required | Description |
113
+
| --------- | ---- | -------- | ----------- |
114
+
|`query`| string | No | Filter matched against font family and full font name, e.g. "Noto Serif" |
115
+
|`maxResults`| number | No | Maximum number of fonts to return \(default: $\{DEFAULT_MAX_RESULTS\}, max: $\{MAX_RESULTS_LIMIT\}\)|
116
+
117
+
#### Output
118
+
119
+
| Parameter | Type | Description |
120
+
| --------- | ---- | ----------- |
121
+
|`fonts`| array | Fonts available to the LaTeX compiler |
122
+
| ↳ `family`| string | Font family name |
123
+
| ↳ `name`| string | Full font name |
124
+
| ↳ `styles`| array | Available styles, e.g. Bold or Italic |
125
+
|`totalMatches`| number | Total number of fonts matching the filter, before truncation |
'Integrates LaTeX into the workflow. Compiles LaTeX source into a PDF file with pdflatex, xelatex, lualatex, platex, uplatex, or context, and supports additional resources such as images, included .tex files, and bibliographies. Does not require OAuth or an API key.',
11
+
'Integrates LaTeX into the workflow. Compiles LaTeX source into a PDF file with pdflatex, xelatex, lualatex, platex, uplatex, or context, and supports additional resources such as images, included .tex files, and bibliographies. Can also look up the TeX Live packages and system fonts available to the compiler. Does not require OAuth or an API key.',
prompt: `Generate a JSON array of supporting files for a LaTeX compilation based on the user's description. Each entry must have a "path" (relative file path the LaTeX source references) plus exactly one of:
@@ -66,14 +82,91 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`,
'Diagnose failed LaTeX builds from the compiler error output and iterate until the document compiles. Use when a compilation returns errors instead of a PDF.',
227
345
content:
228
-
'# Fix Compilation Errors\n\nGet a failing LaTeX document to build.\n\n## Steps\n1. Read the TeX error lines from the failed compile (lines starting with !), which name the problem and its location.\n2. Apply the targeted fix: missing packages, unescaped special characters, unmatched braces or environments, or commands needing a different compiler (e.g. fontspec requires xelatex or lualatex).\n3. Recompile and repeat until the build succeeds.\n4. Keep edits minimal — fix the errors without rewriting the document.\n\n## Output\nThe compiled PDF and a short list of the fixes that were applied.',
346
+
'# Fix Compilation Errors\n\nGet a failing LaTeX document to build.\n\n## Steps\n1. Read the TeX error lines from the failed compile (lines starting with !), which name the problem and its location.\n2. Apply the targeted fix: missing packages (verify availability with Get Package Details or Search Packages), unescaped special characters, unmatched braces or environments, or commands needing a different compiler (e.g. fontspec requires xelatex or lualatex — confirm the font exists with List Fonts).\n3. Recompile and repeat until the build succeeds.\n4. Keep edits minimal — fix the errors without rewriting the document.\n\n## Output\nThe compiled PDF and a short list of the fixes that were applied.',
Copy file name to clipboardExpand all lines: apps/sim/lib/integrations/integrations.json
+20-3Lines changed: 20 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -8244,12 +8244,29 @@
8244
8244
"slug": "latex",
8245
8245
"name": "LaTeX",
8246
8246
"description": "Compile LaTeX documents into PDFs",
8247
-
"longDescription": "Integrates LaTeX into the workflow. Compiles LaTeX source into a PDF file with pdflatex, xelatex, lualatex, platex, uplatex, or context, and supports additional resources such as images, included .tex files, and bibliographies. Does not require OAuth or an API key.",
8247
+
"longDescription": "Integrates LaTeX into the workflow. Compiles LaTeX source into a PDF file with pdflatex, xelatex, lualatex, platex, uplatex, or context, and supports additional resources such as images, included .tex files, and bibliographies. Can also look up the TeX Live packages and system fonts available to the compiler. Does not require OAuth or an API key.",
"description": "Compile a LaTeX document into a PDF. Supports pdflatex, xelatex, lualatex, platex, uplatex, and context, plus supporting resources such as images, included .tex files, and bibliographies."
8255
+
},
8256
+
{
8257
+
"name": "Search Packages",
8258
+
"description": "Search the TeX Live packages available to the LaTeX compiler by name or description, e.g. to check which packages can be used in a document."
8259
+
},
8260
+
{
8261
+
"name": "Get Package Details",
8262
+
"description": "Get details about a specific TeX Live package available to the LaTeX compiler, including whether it is installed, its description, license, and related packages."
8263
+
},
8264
+
{
8265
+
"name": "List Fonts",
8266
+
"description": "List the system fonts available to the LaTeX compiler, optionally filtered by name, e.g. to pick a font for xelatex or lualatex documents using fontspec."
0 commit comments