TeXdoc online

texdoc-online is the project behind texdoc.org, the most common online TeX documentation search.

Language: Kotlin Minimum JRE: 21 Current version

Introduction

TeXdoc online is an online TeX and LaTeX documentation lookup system developed and maintained by the Island of TeX. The project provides a RESTful API and a self-updating Docker container.

The package documentation lookup relies on the Island's TeXdoc API. For topic and package listings, as well as recommendations, the system relies on the CTAN JSON API, properly cached and updated twice a day to save external queries.

Details on the provided RESTful API and deployment may be found on our Wiki:

To cut a long story short: You can run the application from the CI-built JAR files, the Docker container provided in our registry and for real deployment using Docker compose built on the docker-compose.yml file in the repo.

License

This application is licensed under the New BSD License. Please note that the New BSD License has been verified as a GPL-compatible free software license by the Free Software Foundation, and has been vetted as an open source license by the Open Source Initiative.

The team

TeXdoc online is brought to you by the Island of TeX. If you want to support TeX development by a donation, the best way to do this is donating to the TeX Users Group.

Development

Development takes place on GitLab; use the development branch for ongoing work. The pinned Nix shell follows the Island of TeX conventions used by arara:

nix develop
java -version
./gradlew --no-daemon spotlessCheck detekt allTests processSmoke

The shell supplies JDK 21 (the build JVM and minimum runtime), Node.js, Yarn, Chromium, formatting tools and archive utilities. It preserves existing GRADLE_OPTS and registers the Nix JDK explicitly, disabling downloaded/discovered toolchains. Gradle and application dependency versions live in the wrapper and gradle/libs.versions.toml, not in Nix. Commit flake.lock; update it deliberately with nix flake update. Format the flake with nix fmt.

A fresh shell still needs network access to resolve Gradle/Maven/npm dependencies. The environment does not include a full TeX Live installation; normal tests must use deterministic fixtures. Real TeX integration belongs in a separate explicit gate. See AGENTS.md for the development and verification rules.

Documentation selection

/texdoc/{name}, /serve/{name}/{index} and the /pkg/{name} shortcut use one ordering: descending TeXdoc score, then normalized absolute path and description. Undetermined scores come last. Numeric links are re-evaluated against the installed TeX tree; they do not pin a document across TeX Live updates. A missing exact-name manual or unexpected upstream ranking still needs reproduction with the installed texdoc -l -M name, its version and the matching TeX Live data.

Run the separate real-TeX probe with nix develop .#texIntegration -c ./gradlew texIntegration. The pinned shell includes TeX Live documentation. It compares CLI ranking, HTML and JSON results, and served bytes for latex and maltese, recording versions and raw results under build/reports/texIntegration. Maltese documentation is not guaranteed to be present in that TeX Live subset; the probe records its actual matches rather than claiming that an unrelated fuzzy match is a Maltese manual.

Restricted browsers

Essential document, topic and project links have visible text. Decorative icons are bundled SVG images, served by this application without JavaScript or external icon services. Blocking images does not remove action labels. The mobile navigation toggle is a native button with an accessible name and expanded state. Search and browsing work without JavaScript; scripts enhance the homepage with featured topics and version information.

Search and crawler entry points

The homepage submits a normal GET form to /search?q=latex. Search results, /packages/latex, /topics and /topics/fonts render complete HTML with ordinary links and work without JavaScript or external icon services. Topic pages continue to use the CTAN API adapter and its cache. A missing package, topic or route returns HTTP 404, including /missing.html; this deliberately replaces the former redirect to a page returning 200. Upstream I/O failures on browse pages return 503. Existing JSON endpoints and the /pkg/{name} shortcut remain available.

Set TEXDOC_PUBLIC_URL=https://texdoc.org to the public HTTP(S) origin when launching the server. Canonical links then use this origin, independently of request Host headers. Without it, canonicals use relative paths and /sitemap.xml returns 404. The bounded sitemap contains only /index.html and /topics; their HTML links lead to topic and package pages without enumerating CTAN or executing TeX to generate the sitemap. /robots.txt advertises it when configured and excludes arbitrary search queries. Search pages also carry noindex, follow; package and topic pages have their own canonical URLs. Custom index.html overrides should include an equivalent GET search form.

Packaged verification runs as Kotlin/JVM tests in server/src/packagedTest, using Gradle's build JDK and JUnit reports. processSmoke launches the shaded application with bounded startup, requests and shutdown, without TeX or CTAN.

The separate texIntegration task also uses this source set, capturing per-query raw output and version evidence in build/reports/texIntegration/*-lookup.json. It remains outside allTests and requires the explicit real-TeX shell.

Edit this page on GitLab