Troubleshooting
Common issues and their solutions.
Installation Issues
Package Not Found
Problem: ERROR: The following package names could not be resolved: DocumenterTypst
Solution:
using Pkg
Pkg.Registry.update()
Pkg.add("DocumenterTypst")Dependency Conflicts
Problem: Version conflicts with Documenter
Solution:
# Update to latest compatible versions
Pkg.update(["Documenter", "DocumenterTypst"])
# Or specify versions explicitly
Pkg.add(name="Documenter", version="1.11")
Pkg.add("DocumenterTypst")Compilation Issues
Typst Not Found
Problem: ERROR: typst command not found
When: Using platform="native"
Solution:
Use default
platform="typst"(recommended)Or install Typst:
# macOS brew install typst # Linux cargo install --git https://github.com/typst/typst # Windows winget install Typst.Typst
Compilation Timeout
Problem: Build hangs or takes too long
Solutions:
Check for infinite loops in custom templates
Use
platform="none"to test without compilationEnable verbose output:
export DOCUMENTER_VERBOSE="true" julia docs/make.jl
Content Issues
Math Not Rendering
Problem: Math equations don't appear or look wrong
Solutions:
Check syntax:
# Correct (LaTeX) ```math \sum_{i=1}^n i ``` # Correct (Typst) ```math typst sum_(i=1)^n i ```Escape backslashes:
# Wrong `\alpha` # Correct `\\alpha`Use mitex-supported commands - Some advanced LaTeX packages aren't supported
Images Not Found
Problem: Images don't appear in PDF
Solutions:
Use relative paths:
# If in docs/src/manual/guide.md  # ✅  # ❌Avoid absolute URLs - Download images locally instead
Check file exists:
ls docs/src/assets/image.png
Code Blocks Wrong Language
Problem: Syntax highlighting incorrect
Solution: Specify language explicitly:
```julia # Not `jl`
function hello()
println("Hello!")
end
```
```Cross-References Broken
Problem: @ref links don't work
Solutions:
Check anchor exists:
## My Section # Creates anchor "My-Section" See [My Section](@ref) # ✅ See [My Section](#my-section) # ✅ (lowercase)Use exact heading text:
## Getting Started [Getting Started](@ref) # ✅ [Get Started](@ref) # ❌
Template Issues
Custom Template Not Loading
Problem: Changes in custom.typ don't apply
Solutions:
Check file location:
docs/src/assets/custom.typ # ✅ docs/assets/custom.typ # ❌Verify syntax:
#let config = ( text-size: 12pt, # ✅ Comma )Clear cache:
rm -rf docs/build julia docs/make.jl
Fonts Not Found
Problem: Custom fonts don't work
Solutions:
Check font name:
# Correct text-font: ("Inter", "DejaVu Sans") # Wrong (use exact name) text-font: ("inter", "dejavu")Install font system-wide
Use font path:
format = DocumenterTypst.Typst( platform = "native", typst = `typst --font-path /path/to/fonts` )
CI/CD Issues
GitHub Actions Failing
Problem: CI build fails
Solutions:
Check Julia version:
- uses: julia-actions/setup-julia@v2 with: version: "1.10" # Minimum for DocumenterTypstInstall dependencies:
- name: Install dependencies run: | julia --project=docs -e ' using Pkg Pkg.develop(PackageSpec(path=pwd())) Pkg.instantiate()'Add secrets:
DOCUMENTER_KEY: For deploymentGITHUB_TOKEN: Automatic
Deploy Failing
Problem: PDF not deployed to gh-pages
Solution: Use Documenter's deploy system:
using Documenter, DocumenterTypst
makedocs(format = DocumenterTypst.Typst(), ...)
deploydocs(
repo = "github.com/user/Package.jl",
devbranch = "main",
)Performance Issues
Slow Builds
Problem: Compilation takes too long
Solutions:
Use
platform="none"for testing:format = DocumenterTypst.Typst(platform = "none")Disable doctests during development:
makedocs(doctest = false, ...)Split large documents
Use incremental compilation (Typst's default)
Large PDF Files
Problem: PDF file too large
Solutions:
- Compress images before including
- Use vector graphics (SVG/PDF) instead of PNG
- Reduce image resolution for screen viewing
Debug Mode
Enable Comprehensive Debugging
# Save generated .typ files
export DOCUMENTER_TYPST_DEBUG="debug-output"
# Verbose Documenter output
export DOCUMENTER_VERBOSE="true"
# Build
julia --project=docs docs/make.jlInspect Generated Files
cd debug-output
ls -la # See all generated files
# Compile manually to see errors
typst compile YourPackage.typGetting Help
If you can't resolve an issue:
Check existing issues: GitHub Issues
Create minimal example:
using Documenter, DocumenterTypst makedocs( sitename = "MWE", format = DocumenterTypst.Typst(), pages = ["index.md"], )Include debug output:
- Julia version:
versioninfo() - DocumenterTypst version:
Pkg.status("DocumenterTypst") - Error messages (full stack trace)
- Generated .typ file (if relevant)
- Julia version:
Open an issue: Provide all above information
Known Limitations
Not Yet Supported
- Live reload during development (use
platform="none"+ manual compile) - Interactive elements (PDF format limitation)
- Animated GIFs (use static frames)
- Some advanced LaTeX packages in math
Workarounds
For unsupported features, consider:
- Generate HTML docs for interactive content
- Use native Typst features instead of LaTeX
- Contribute a PR to add support!
Version Compatibility
| DocumenterTypst | Documenter | Julia |
|---|---|---|
| 0.1.x | 1.11+ | 1.10+ |
Always use compatible versions to avoid issues.