Build environment
Read-only endpoints to inspect what a LaTeX-on-HTTP instance can compile: TeXLive version, available fonts and installed LaTeX packages. Useful to adapt your documents to a target instance, or to feature-detect before sending a compilation.
TeXLive installation information
/texlive/information
Get information on the TeXLive installation used for the compilations.
A JSON payload with a TeXLive installation specification (version, installation_path, installed modules, tlmgr revision).
curl https://latex.ytotech.com/texlive/information | python3 -m json.tool
http --body GET https://latex.ytotech.com/texlive/information
import requests
information = requests.get(
"https://latex.ytotech.com/texlive/information"
).json()
print(information["texlive"]["version"])
<?php
$response = json_decode(
file_get_contents("https://latex.ytotech.com/texlive/information"),
true
);
print_r($response);
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
)
func main() {
response, err := http.Get("https://latex.ytotech.com/texlive/information")
if err != nil {
log.Fatal(err)
}
defer response.Body.Close()
var result map[string]any
if err := json.NewDecoder(response.Body).Decode(&result); err != nil {
log.Fatal(err)
}
fmt.Println(result)
}
Mix.install([{:req, "~> 0.8"}])
response = Req.get!("https://latex.ytotech.com/texlive/information")
IO.inspect(response.body)
const information = await (
await fetch("https://latex.ytotech.com/texlive/information")
).json();
console.log(information.texlive.version);
(-> (js/fetch "https://latex.ytotech.com/texlive/information")
(.then (fn [response] (.json response)))
(.then (fn [data]
(js/console.log (js/JSON.stringify data nil 2)))))
Sample response
{
"texlive": {
"installation_path": "/usr/local/texlive",
"modules": [
{
"name": "TLConfig",
"value": "52745"
},
["..."]
],
"version": "2026"
},
"tlmgr": {
"revision": "52931",
"revision_date": "2019-11-27 00:04:18 +0100"
}
}
List available fonts
/fonts
Explore the fonts that can be used directly in LaTeX compilations (system-installed fonts).
A JSON payload with a list of fonts.
curl https://latex.ytotech.com/fonts | python3 -m json.tool
http --body GET https://latex.ytotech.com/fonts
import requests
fonts = requests.get(
"https://latex.ytotech.com/fonts"
).json()
for font in fonts["fonts"]:
print(font["family"])
<?php
$response = json_decode(
file_get_contents("https://latex.ytotech.com/fonts"),
true
);
print_r($response);
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
)
func main() {
response, err := http.Get("https://latex.ytotech.com/fonts")
if err != nil {
log.Fatal(err)
}
defer response.Body.Close()
var result map[string]any
if err := json.NewDecoder(response.Body).Decode(&result); err != nil {
log.Fatal(err)
}
fmt.Println(result)
}
Mix.install([{:req, "~> 0.8"}])
response = Req.get!("https://latex.ytotech.com/fonts")
IO.inspect(response.body)
const fonts = await (
await fetch("https://latex.ytotech.com/fonts")
).json();
for (const font of fonts.fonts) {
console.log(font.family);
}
(-> (js/fetch "https://latex.ytotech.com/fonts")
(.then (fn [response] (.json response)))
(.then (fn [data]
(js/console.log (js/JSON.stringify data nil 2)))))
Sample response
{
"fonts": [
{
"family": "Amiri",
"name": "Amiri",
"styles": [
"Regular"
]
},
["..."]
]
}
List installed LaTeX packages
/packages
Explore the LaTeX packages installed on the compilation environment, with CTAN links.
A JSON payload with a list of packages (name, shortdesc, installed, url_ctan, url_info).
curl https://latex.ytotech.com/packages | python3 -m json.tool
http --body GET https://latex.ytotech.com/packages
import requests
packages = requests.get(
"https://latex.ytotech.com/packages"
).json()
for package in packages["packages"]:
if package["installed"]:
print(package["name"])
<?php
$response = json_decode(
file_get_contents("https://latex.ytotech.com/packages"),
true
);
print_r($response);
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
)
func main() {
response, err := http.Get("https://latex.ytotech.com/packages")
if err != nil {
log.Fatal(err)
}
defer response.Body.Close()
var result map[string]any
if err := json.NewDecoder(response.Body).Decode(&result); err != nil {
log.Fatal(err)
}
fmt.Println(result)
}
Mix.install([{:req, "~> 0.8"}])
response = Req.get!("https://latex.ytotech.com/packages")
IO.inspect(response.body)
const packages = await (
await fetch("https://latex.ytotech.com/packages")
).json();
for (const pkg of packages.packages) {
console.log(pkg.name, pkg.installed);
}
(-> (js/fetch "https://latex.ytotech.com/packages")
(.then (fn [response] (.json response)))
(.then (fn [data]
(js/console.log (js/JSON.stringify data nil 2)))))
Sample response
{
"packages": [
{
"installed": true,
"name": "12many",
"shortdesc": "Generalising mathematical index sets",
"url_ctan": "https://ctan.org/pkg/12many",
"url_info": "/packages/12many"
},
["..."]
]
}
Get LaTeX package information
/packages/<packageName>
Get information on a LaTeX package, including whether it is installed on the compilation environment.
| Name | Type | Default | Description |
|---|---|---|---|
packageName |
string | — | CTAN package name, eg. 12many. |
A JSON payload with the package information (description, category, license, version, sizes, CTAN link).
curl https://latex.ytotech.com/packages/12many | python3 -m json.tool
http --body GET https://latex.ytotech.com/packages/12many
import requests
package = requests.get(
"https://latex.ytotech.com/packages/12many"
).json()
print(package["package"]["installed"])
<?php
$response = json_decode(
file_get_contents("https://latex.ytotech.com/packages/12many"),
true
);
print_r($response);
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
)
func main() {
response, err := http.Get("https://latex.ytotech.com/packages/12many")
if err != nil {
log.Fatal(err)
}
defer response.Body.Close()
var result map[string]any
if err := json.NewDecoder(response.Body).Decode(&result); err != nil {
log.Fatal(err)
}
fmt.Println(result)
}
Mix.install([{:req, "~> 0.8"}])
response = Req.get!("https://latex.ytotech.com/packages/12many")
IO.inspect(response.body)
const pkg = await (
await fetch("https://latex.ytotech.com/packages/12many")
).json();
console.log(pkg.package.installed);
(-> (js/fetch "https://latex.ytotech.com/packages/12many")
(.then (fn [response] (.json response)))
(.then (fn [data]
(js/console.log (js/JSON.stringify data nil 2)))))
Sample response
{
"package": {
"cat-date": [
"2016-06-24T19:18:15+02:00"
],
"cat-license": "lppl",
"cat-topics": [
"maths"
],
"cat-version": "0.3",
"category": "Package",
"collection": "collection-mathscience",
"installed": true,
"longdesc": "In the discrete branches of mathematics and the computer sciences, it will only take some seconds before you're faced with a set like {1,...,m}. [...]",
"package": "12many",
"relocatable": false,
"revision": "15878",
"shortdesc": "Generalising mathematical index sets",
"sizes": {
"run": "5k"
},
"url_ctan": "https://ctan.org/pkg/12many"
}
}
Errors
| Error code | HTTP | Meaning |
|---|---|---|
Package not found |
404 |
No CTAN package with this name. |