You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed: Library.render (and the render CLI command) no longer drops the editors of an entry that has an editor but no author (e.g. an edited volume; a proceedings entry in particular can never have an author). The editors now render in the authors position, marked with an (ed.)/(eds.) suffix, e.g. E. Andersson and P. Öhberg (eds.); the edited by ... piece of the published-in segment (for inproceedings and book-family entries) is correspondingly only rendered when the entry also has authors. [[#25], [#32]]
Fixed: Library.render (and the render CLI command) no longer drops most fields of book-family entries: an inbook entry previously rendered as author/title/year only (dropping publisher, series, volume, chapter, pages, and booktitle), and an incollection entry dropped its editor, pages, series, and volume. The book family (book, inbook, incollection, and the previously unhandled proceedings) now renders uniformly as series Vol. N, publisher, address (year), Chapter N, pp. N1–N2 (each piece only if present), prefixed for inbook/incollection by In: *booktitle* and, when there are editors, by edited by .... [[#25], [#32]]
Fixed: TeX commands stored in field values (typically in note, occasionally in a title) no longer leak into the markdown/html output of Library.render (and the render CLI command). \url{...} and \href{...}{...} now render as hyperlinks, \texttt{...} as monospace text (a markdown code span / <code>), \textit{...} and \emph{...} as italics, and \textbf{...} as bold, recursively in their arguments; the escaped characters \&, \%, \$, \#, and \_ lose their backslash, and the TeX non-breaking space ~ becomes a plain space. In particular, a \texttt{...} in a title is no longer mangled by the title-protection brace stripping (previously \texttt{JAX} rendered as \textttJAX); an unrecognized command now passes through verbatim, with its braced argument intact. TeX output (format="tex") is unchanged and passes all TeX markup through. [[#25], [#32]]
Added: a read-only check CLI command, running the standing audits over the library (or, with KEY... arguments, over just the given entries) and reporting every problem found, one per line, followed by a PASS/FAIL summary line; the exit code is 0 if all audits pass and 1 otherwise, making the command a pass/fail gate, e.g. for an agent after a batch of edits. The audits: the file parses cleanly (no skipped blocks); no citation key occurs more than once; every article that is not a preprint has a doi (a defined-but-empty doi marks an entry verified to have none, and passes); every journal field references a defined @string macro (a literal journal value is a problem, unless it is a recognized preprint pseudo-journal like arXiv:2205.15044); every author and editor field parses as names; and every @string macro defined in the file is referenced by some entry. In per-key mode, the unused-macros audit is skipped and the duplicate-key audit reports only the given keys, while parse problems are always reported. With --json, the report is an object with passed, entries_checked, and problems members, each problem carrying the audit name, the citation key (null for a problem not tied to an entry), and a message. [[#31]]
Fixed: reading Entry.author/Entry.editor for an unparseable name field (e.g. a name with too many commas) now raises bibtexparser's descriptive InvalidNameError (a ValueError subclass, as documented), instead of an IndexError with no useful message. [[#31]]
Added: preprint-only entries are now a first-class concept, covering arXiv and other preprint servers (see the new "Preprints" documentation page). An entry is preprint-only if its journal is a pseudo-journal<Archive>:<identifier> (e.g. {arXiv:2205.15044}, {bioRxiv:2022.09.09.507322}, {HAL:hal-00640217}) with a recognized archive, or if it is a misc or unpublished entry with an eprint from a recognized archive (e.g. arXiv's own BibTeX export). The built-in archives are arXiv, bioRxiv, medRxiv, ChemRxiv, HAL, and SSRN; a new preprint_archives table in bibdeskparser.toml (exposed as Library.config.preprint_archives) adds further archives, mapping the archive's canonical spelling to a URL template for its preprint pages. Library.import_bibtex (and Library.add) normalize a preprint-only entry to its canonical stored form: an @unpublished entry with the pseudo-journal in the archive's canonical spelling (hal: → HAL:; synthesized from the eprint if absent), the eprint (version suffix stripped) and archiveprefix fields derived from the pseudo-journal if missing, and the doi extracted from a https://doi.org/... value in the url field or (for arXiv) derived as 10.48550/arXiv.<identifier>; a url that merely restates the archive's page for the identifier is dropped when the entry carries a doi; the preprint citation-key format (Goerz2205.15044) applies to all archives. An archive field holding the link base derivable from the eprint/archiveprefix is dropped on import (exports regenerate it), for preprint-only and published entries alike. The publication-status note recommended by the documentation ("preprint only", "submitted to Phys. Rev. Lett.", "lecture notes") is never filled in automatically: a missing note is the signal to record the status by hand. A pseudo-journal whose archive is not recognized is rejected as a validation problem instead of being mangled into a nonsense @string macro (this also catches URLs pasted into the journal field). Library.add for an arXiv query now also records the primaryclass (the arXiv category). [[#30]]
Added: a keep_journals argument to Library.import_bibtex (--keep-journals/--no-keep-journals on the import CLI command; default off), preserving every incoming journal field as-is instead of converting it to an @string macro reference, and keeping the incoming entry type (preprint-only entries are still recognized for the eprint/archiveprefix derivation and the citation key, and unrecognized archive prefixes are then no error). [[#30]]
Added: a preprint argument to Library.export (--preprint on the export CLI command), selecting the form a preprint-only entry is exported as, independent of its stored form: "unpublished" or "misc" -- the structured eprint-field forms, for BibTeX styles that render the eprint field (REVTeX, elsarticle, biblatex); "unpublished" guarantees the entry type's required note field in minimal exports, writing the stored note or the text "preprint" (full exports never synthesize it, so a full-export round trip cannot plant a note in a library) -- "article" -- the pseudo-journal form, with the DOI written as its resolver address in url, for classic styles (plain, unsrt, IEEEtran, ...) that would silently drop an eprint -- or "stored" for no transformation. Minimal exports reduce to the essential fields of the chosen form, always including eprint/archiveprefix for the structured forms and keeping a stored note; an explicit --field list always exports the stored fields. The default is the new preprint_export setting in bibdeskparser.toml ("unpublished" unless configured; exposed as Library.config.preprint_export). [[#30]]
Changed: Library.render (and the render CLI command) now renders a preprint-only entry's preprint reference (arXiv:2205.15044, with the category tag from a stored primaryclass appended) in the journal position of the citation, linked to the DOI, the entry's first URL, or the archive's page for the identifier, without a separate trailing eprint link. For all other entries (e.g. a published article with a recorded preprint), the eprint segment still renders after the journal reference. [[#30]]
Changed: fields="minimal" exports of an article now include the eprint, archiveprefix, and primaryclass fields, so the bibliography of a published paper keeps its preprint link (rendered by eprint-aware styles like REVTeX, ignored by classic styles). [[#30]]
Added: exports emit the SPIRES-era archive BibTeX field -- the link base that REVTeX's apsrev4-x/aipnum4-x styles use for a rendered eprint, defaulting to arXiv's https://arxiv.org/abs -- whenever the structured eprint fields of a non-arXiv preprint are written (both for preprint-only entries and in full and minimal exports of published entries with e.g. a HAL or bioRxiv eprint), so the eprint hyperlink points at the right server. The base URL is derived from the archive's URL template in preprint_archives when it has the form <base>/{id}; a stored archive field is always written as-is. [[#30]]
Fixed: rendering an entry whose archiveprefix is not arXiv (e.g. a HAL or bioRxiv eprint) no longer mislabels the eprint as arXiv:<identifier> with a broken arxiv.org link; the eprint segment now names the actual archive in its canonical spelling and links to that archive's page (an unrecognized archiveprefix renders verbatim, without a link; a missing one still defaults to arXiv). [[#30]]
Changed: a search match applied by Entry.add_preprint/Library.add_preprint (and the add_preprint CLI command, including via add --add-preprint) now also stores the preprint's arXiv primary category (e.g. quant-ph) in the primaryclass field, replacing any existing value (which, under overwrite/--overwrite, described the replaced identifier); the returned named tuple, the per-key report, and the --json output gain a primaryclass member. An explicitly given identifier (--eprint) still stores only eprint/archiveprefix, since without network access the category is unknown, and mark_empty/--mark-empty now clears a stale primaryclass alongside the emptied eprint and the stale archiveprefix. [[#30]]
Added: read-only files KEY and urls KEY CLI commands, listing an entry's file attachments and linked URLs, one per line (corresponding to the Entry.files and Entry.urls properties). files prints each attachment as an absolute path by default; --relative prints the stored form, relative to the .bib file's directory. [[#28]]
Added: a read-only path CLI command, printing the absolute path of the .bib file being operated on (the given BIBFILE, or the configured default_bib_file; corresponding to the Library.path property), and a read-only config_path CLI command, printing the absolute path of the discovered bibdeskparser.toml configuration file in effect for that .bib file (failing with an error when none is found). [[#28]]
Changed: Library.export and the export CLI command no longer take a format parameter. The formerly bundled aspects of the output are now controlled independently: unicode=True|False (--unicode/--no-unicode) selects Unicode or TeX-encoded field values, expand_strings=True|False (--expand-strings/--no-expand-strings) selects whether @string macro references are replaced by their values or kept bare with the needed @string definitions prepended, and fields -- "full", "minimal", or a list of field names (--minimal, --field) -- selects which fields are exported. To adapt: format="default" becomes no arguments (the defaults); format="raw" becomes unicode=False (which now consistently TeX-encodes the @string definitions as well, and re-encodes deterministically instead of exposing the in-memory stored form); format="minimal" becomes fields="minimal" (which now also prepends the needed @string definitions; add expand_strings=True for a standalone snippet without them, with the references replaced by their values instead of left dangling). [[#27]]
Changed: all exports now use a single layout, previously used only by format="minimal": 4-space indentation, capitalized field names (Author, Bdsk-File-1), a comma after every field, and the closing brace on its own line. Reproducing the byte-exact BibDesk file layout remains the job of Library.save. [[#27]]
Changed: Library.edit, the underlying editing functions, and the edit CLI command no longer take a format parameter; editing always uses the default export form. [[#27]]
Changed: the show and get_field CLI commands now render field values: @string macro references are replaced by the macro's value (--no-expand-strings shows the bare macro name instead; in JSON output, every field value then uniformly becomes a {"macro": ..., "value": ...} object -- macro is null for a literal value -- so a macro reference remains distinguishable from a literal value while all fields share one shape), and --no-unicode shows TeX-encoded values. [[#27]]
Fixed: Library.export no longer turns a literal field value that happens to look like a macro name (a ValueString) into a bare @string macro reference; the stored literal-vs-macro distinction is now preserved on export. [[#27]]