From 59111b4ccfb5831b5253086fa2305f507159c36d Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Thu, 31 Jul 2025 12:41:27 +0200 Subject: [PATCH] Fix BibTeX template format to avoid parsing errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change template to use @article type with proper escaping - Use triple braces {{{ }}} to properly escape BibTeX field values - Remove problematic dynamic type field {doc[type]} - Add back doi and url fields that were accidentally removed 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- modules/papis.nix | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/modules/papis.nix b/modules/papis.nix index a3e30a4..2de2ffe 100644 --- a/modules/papis.nix +++ b/modules/papis.nix @@ -48,20 +48,17 @@ # Papis BibTeX template home.file."Library/Application Support/papis/templates/bibtex.template".text = '' - @{doc[type]}{doc[ref], - author = {doc[author]}, - title = {doc[title]}, - year = {doc[year]}, - journal = {doc[journal]}, - booktitle = {doc[booktitle]}, - publisher = {doc[publisher]}, - volume = {doc[volume]}, - number = {doc[number]}, - pages = {doc[pages]}, - doi = {doc[doi]}, - url = {doc[url]}, - abstract = {doc[abstract]} - } + @article{{{doc[ref]}, + author = {{{doc[author]}}}, + title = {{{doc[title]}}}, + year = {{{doc[year]}}}, + journal = {{{doc[journal]}}}, + volume = {{{doc[volume]}}}, + number = {{{doc[number]}}}, + pages = {{{doc[pages]}}}, + doi = {{{doc[doi]}}}, + url = {{{doc[url]}}} + }} ''; # Shell aliases for papis workflow