bib.bibtexparser.bibtex_format¶
Classes¶
BibtexFormat ¶
Definition of formatting (alignment, ...) when writing a BibTeX file.
For more manual, GUI-based formatting, see the bibtex-tidy tool:
Source code in pybibtexer/bib/bibtexparser/bibtex_format.py
Attributes¶
block_separator property writable ¶
Character(s) for separating BibTeX entries.
Default: Two lines breaks, i.e., two blank lines.
indent property writable ¶
Character(s) for indenting BibTeX field-value pairs. Default: single space.
parsing_failed_comment property writable ¶
Comment to use for blocks that could not be parsed.
trailing_comma property writable ¶
Use the trailing comma syntax for BibTeX entries. Default: True.
BibTeX syntax allows an optional comma at the end of the last field in an entry.
value_column property writable ¶
Controls the alignment of field- and string-values. Default: no alignment.
This impacts String and Entry blocks.
An integer value x specifies that spaces should be added before the " = ", such that, if possible, the value is written at column len(self.indent) + x. Note that for long keys, the value may be written at a later column.
Thus, a value of 0 means that the value is written directly after the " = ".
The special value "auto" specifies that the bibtex field value should be aligned based on the longest key in the library.