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
namestringProject name
versionstringDocument version
authorsarrayList of authors
descriptionstringProject description

[compile]

Option Type Default Description
inputstring"main.typ"Main source file
outputstringautoOutput file path
formatstring"pdf"Output format
rootstring"."Root directory

[fonts]

Option Type Description
pathsarrayAdditional font directories
fallbackstringFallback font

[bibliography]

Option Type Description
filestringPath to .bib file
stylestringCitation style (apa, ieee, chicago...)
crossrefboolEnable CrossRef API

[watch]

Option Type Default Description
debounceint300Delay in ms before recompilation
clearboolfalseClear the terminal
openboolfalseOpen PDF automatically

[python]

Configure Python figure generation. See Python Figures for a full guide.

Option Type Default Description
pythonstring"python"Python executable name or path
figures_dirstring"figures"Directory containing figure scripts
cache_dirstring".nova/cache"Directory for cached SVGs
timeoutint60Timeout per figure (seconds)
venvstringPath to virtual environment
python_patharray[]Additional PYTHONPATH entries
envtable{}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_CONFIGPath to global config file
NOVA_FONT_PATHFont directories (separated by :)
NOVA_TEMPLATE_PATHTemplate directories
NOVA_CACHE_DIRCache directory

Configuration Priority

Configurations are applied in this order (last one wins):

  1. NovaType default values
  2. Global configuration (~/.config/nova/config.toml)
  3. Project configuration (nova.toml)
  4. Command line arguments
  5. 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.