Verzeichnis macros/latex/contrib/import-citation-cff
import-citation-cff: Import CFF metadata into LaTeX
With import-citation-cff, you don't need to write your metadata twice.
Requirements
- LuaLaTeX, or pdfLaTeX with
--shell-escape - The
lt3luabridgeandlua-tinyyamlpackages - TeX Live 2025 or later
Installation
Install import-citation-cff.sty, cfflatex-style-*.def, cfflatex.lua, and cfflatex-data.lua in a local TeX tree such as ~/texmf/tex/latex/import-citation-cff/. The support files use the short prefix cfflatex. Alternatively, you can put them next to your document.
To install both the package and the cfflatexpand command from a source checkout:
l3build install --texmfhome "$HOME/texmf"
The CTAN archive also includes import-citation-cff.tds.zip. As an alternative to installing from source, extract that archive into your local TeX tree:
mkdir -p "$HOME/texmf" unzip import-citation-cff.tds.zip -d "$HOME/texmf"
Both methods place the package and Lua modules in tex/latex/import-citation-cff/ and the command in scripts/import-citation-cff/. To make the command available in a POSIX shell:
export PATH="$HOME/texmf/scripts/import-citation-cff:$PATH" cfflatexpand --help
Add the export line to your shell configuration to keep it for future sessions. You can also run the script with texlua and its full path, without changing PATH.
Quick start
Given a CITATION.cff containing:
cff-version: 1.2.0
message: Please cite the paper in preferred-citation.
type: software
title: My Paper Code
authors:
- family-names: Doe
given-names: John
preferred-citation:
type: article
title: My Paper
abstract: My paper abstract.
authors:
- family-names: Doe
given-names: Jane
- family-names: Doe
given-names: John
Write:
\documentclass{article} \usepackage[T1]{fontenc} \usepackage{import-citation-cff} %\includecff{CITATION.cff} % reads fields in top level \includecff[source=preferred-citation]{CITATION.cff} % reads fields in preferred-citation \title{\cff{title}} \author{ \cffauthor{1}{given-names}~\cffauthor{1}{family-names} \and \cffauthor{2}{given-names}~\cffauthor{2}{family-names} } \date{} \begin{document} \maketitle \begin{abstract} \cff{abstract} \end{abstract} \end{document}
Compile with either:
pdflatex --shell-escape manuscript.tex lualatex manuscript.tex
To expand CFF variables:
cfflatexpand manuscript.tex > submission.tex
Documentation
The latest document can be found at:
https://jss95.github.io/cfflatex/import-citation-cff.pdf
Building the document
Run:
l3build doc
The manual is import-citation-cff.pdf.
Development
Lint
Requires:
badness format . badness lint . explcheck --warnings-are-errors import-citation-cff.sty cfflatex-style-*.def luacheck . cfflatexpand ruff format . ruff check . python3 .ci/check_versions.py
Test
Run the LaTeX regression tests and the standalone export CLI tests:
l3build check # tests with pdfLaTeX and LuaLaTeX texlua tests/test_cfflatexpand.lua # export CLI tests texlua tests/test_cfflatexpand.lua --installed # temporary TeX-tree installation
Build
l3build builds the manual and the CTAN archive:
l3build doc # import-citation-cff.pdf l3build ctan # import-citation-cff-<version>.zip
The CTAN archive includes the ready-to-install import-citation-cff.tds.zip, which is also written beside it. Test that archive with:
texlua tests/test_cfflatexpand.lua --tds import-citation-cff.tds.zip
License
import-citation-cff is distributed under the MIT License. Report bugs at https://github.com/JSS95/cfflatex/issues.
Herunterladen des vollständigen Inhalts dieses Pakets in einem Zip-Archiv (195.4k).
Import citation CFF – Import Citation File Format metadata into LaTeX
The package reads metadata from a Citation File Format (CFF) file of a research software repository, into a LaTeX document. It works with LuaLaTeX, and with pdfLaTeX when shell escape is enabled.
| Paket | Import citation CFF |
| Fehlermeldungen | |
| Repository | |
| Version | 0.3.0 2026-11-08 |
| Lizenzen | MIT License |
| Copyright | 2026 import-citation-cff contributors |
| Betreuer | Jisoo Song |
| Themen | Meta-Daten Datenimport |