Author: José Miguel Horcas Email: horcas@uma.es License: LaTeX Project Public License (LPPL) 1.3c
The uvlhighlight package provides syntax highlighting support for the Universal Variability Language (UVL) in LaTeX documents. It is built on top of the listings package and enables expressive and customizable formatting of UVL models.
The Universal Variability Language (UVL) is described in:
Benavides et al., UVL: Feature modelling with the Universal Variability Language, Journal of Systems and Software, 2025.
The package provides:
-
Syntax highlighting for:
- Keywords
- Features
- Attributes
- Constraints
- Strings, numbers, and comments
-
Multiple visual themes:
- Default
- Flamapy
- UVLS (dark mode)
- Black & White (print-friendly)
-
Inline semantic commands for UVL elements.
-
Support for user-defined attributes.
-
Integration with the
listingspackage. -
Inclusion of external
.uvlfiles.
The package can be installed using standard tools such as TeX Live or MiKTeX.
-
Download the package
-
Place
uvlhighlight.styin your local TeX tree. -
Refresh the filename database.
Load the package in the preamble:
\usepackage{uvlhighlight}\documentclass{article}
\usepackage{uvlhighlight}
\begin{document}
\begin{lstlisting}[language=UVL]
features
Pizza
optional
Cheese
\end{lstlisting}
\end{document}The package supports several options to customize appearance:
default— standard color themeflamapy— Flamapy-inspired colorsuvls— dark theme (VS Code inspired)bw— black & white theme (print-friendly)beramono— Bera Mono font (default)inconsolata— Inconsolata fontnofont— disables automatic font loading
\UVL— typesets the UVL acronym\UVLKeyword{...}— highlights keywords\feature{...}— highlights features\attribute{...}— highlights attributes\constraint{...}— formats constraint expressions\uvlattributes{...}— defines custom attributes
lstlistingwithlanguage=UVLfor code blocks\inputuvlto include external.uvlfiles
Full documentation is available in:
uvlhighlight-doc.pdf
- LaTeX (pdfLaTeX, XeLaTeX, or LuaLaTeX)
listingspackage- Standard font encodings
This work is distributed under the terms of the LaTeX Project Public License (LPPL), version 1.3c.
https://www.latex-project.org/lppl/
- Added
\UVLinline command
- Improved typography compatibility
- Added inline commands
- Initial release