adsfolio.bibtex.formatter

Journal name formatting utilities.

adsfolio.bibtex.formatter.change_journal_name(bibtex_text, format='ads')[source]

Change journal name format in BibTeX.

Parameters:
  • bibtex_text (str) – BibTeX content.

  • format (str, optional) – Output format: - “ads”: Keep ADS output (with macros like aj) - “full”: Expand to full journal names - “iso4”: Use ISO4 abbreviations

Returns:

BibTeX with modified journal names.

Return type:

str

adsfolio.bibtex.formatter.expand_macros(bibtex_text)[source]

Expand LaTeX journal macros to full names.

Parameters:

bibtex_text (str) – BibTeX content with macros like aj.

Returns:

BibTeX with expanded journal names.

Return type:

str

Examples

>>> expand_macros("journal = {\aj}")
'journal = {Astronomical Journal}'
adsfolio.bibtex.formatter.iso4_abbreviate(text, periods=True)[source]

Apply ISO4 abbreviations to journal name.

Delegates to journal_utils.format_journal.

Parameters:
  • text (str) – Full journal name.

  • periods (bool, optional) – Ignored (handled by cached/standard logic).

Returns:

ISO4 abbreviated journal name.

Return type:

str