Configuration
Customize NovaType with project and global configuration files.
nova.toml File
Each NovaType project can have a nova.toml file at its root:
# nova.toml - Project configuration
[project]
name = "my-article"
version = "1.0.0"
authors = ["John Doe <john@example.com>"]
[compile]
input = "main.typ"
output = "output/document.pdf"
format = "pdf" # pdf, svg, png
[fonts]
paths = ["./fonts", "~/.fonts"]
[bibliography]
file = "references.bib"
style = "ieee"
[schema]
file = "schemas/article.json"
strict = true
[watch]
debounce = 300 # ms
clear = true # Clear the terminal
[python]
python = "python"
figures_dir = "figures"
cache_dir = ".nova/cache"
timeout = 60
Configuration Sections
[project]
| Option | Type | Description |
|---|---|---|
name | string | Project name |
version | string | Document version |
authors | array | List of authors |
description | string | Project description |
[compile]
| Option | Type | Default | Description |
|---|---|---|---|
input | string | "main.typ" | Main source file |
output | string | auto | Output file path |
format | string | "pdf" | Output format |
root | string | "." | Root directory |
[fonts]
| Option | Type | Description |
|---|---|---|
paths | array | Additional font directories |
fallback | string | Fallback font |
[bibliography]
| Option | Type | Description |
|---|---|---|
file | string | Path to .bib file |
style | string | Citation style (apa, ieee, chicago...) |
crossref | bool | Enable CrossRef API |
[watch]
| Option | Type | Default | Description |
|---|---|---|---|
debounce | int | 300 | Delay in ms before recompilation |
clear | bool | false | Clear the terminal |
open | bool | false | Open PDF automatically |
[python]
Configure Python figure generation. See Python Figures for a full guide.
| Option | Type | Default | Description |
|---|---|---|---|
python | string | "python" | Python executable name or path |
figures_dir | string | "figures" | Directory containing figure scripts |
cache_dir | string | ".nova/cache" | Directory for cached SVGs |
timeout | int | 60 | Timeout per figure (seconds) |
venv | string | — | Path to virtual environment |
python_path | array | [] | Additional PYTHONPATH entries |
env | table | {} | Environment variables for Python execution |
Global Configuration
User configuration file (~/.config/nova/config.toml on Linux/macOS, %APPDATA%\nova\config.toml on Windows):
# NovaType global configuration
[defaults]
template = "article"
citation_style = "ieee"
language = "en"
[fonts]
paths = [
"~/.fonts",
"/usr/share/fonts"
]
[editor]
command = "code" # Default editor
[pdf]
viewer = "evince" # PDF viewer
Environment Variables
| Variable | Description |
|---|---|
NOVA_CONFIG | Path to global config file |
NOVA_FONT_PATH | Font directories (separated by :) |
NOVA_TEMPLATE_PATH | Template directories |
NOVA_CACHE_DIR | Cache directory |
Configuration Priority
Configurations are applied in this order (last one wins):
- NovaType default values
- Global configuration (
~/.config/nova/config.toml) - Project configuration (
nova.toml) - Command line arguments
- Environment variables
Complete Example
# nova.toml for an IEEE article
[project]
name = "ieee-paper-2024"
version = "1.0.0"
authors = [
"John Doe <john.doe@univ-paris.fr>",
"Jane Smith <jane.smith@cnrs.fr>"
]
[compile]
input = "paper.typ"
output = "build/paper.pdf"
format = "pdf"
[fonts]
paths = ["./fonts/ieee"]
[bibliography]
file = "references.bib"
style = "ieee"
crossref = true
[schema]
file = "schemas/ieee-article.json"
strict = true
[watch]
debounce = 200
clear = true
[plots]
theme = "ieee"
dpi = 300
Tip
Use nova init --template ieee-article to automatically generate a pre-configured nova.toml.