How to manually correct the format of bibliography (for ~60% styles)?

whether bibliography uses a grid or not depends on the style used(!)

Good catch. It looks like ~40% style don’t use grid.

Table of styles and whether they use grid
Style Use grid?
american-anthropological-association :white_check_mark:
american-chemical-society :white_check_mark:
american-geophysical-union :x:
american-institute-of-aeronautics-and-astronautics :white_check_mark:
american-institute-of-physics :x:
american-medical-association :white_check_mark:
american-meteorological-society :x:
american-physics-society :white_check_mark:
american-physiological-society :white_check_mark:
american-political-science-association :x:
american-psychological-association :x:
american-society-for-microbiology :white_check_mark:
american-society-of-civil-engineers :x:
american-society-of-mechanical-engineers :white_check_mark:
american-sociological-association :x:
angewandte-chemie :white_check_mark:
annual-reviews :white_check_mark:
annual-reviews-author-date :x:
associacao-brasileira-de-normas-tecnicas :x:
association-for-computing-machinery :white_check_mark:
biomed-central :x:
bristol-university-press :x:
british-medical-journal :white_check_mark:
cell :white_check_mark:
chicago-author-date :x:
chicago-fullnotes :x:
chicago-notes :x:
copernicus :x:
council-of-science-editors :white_check_mark:
council-of-science-editors-author-date :x:
current-opinion :white_check_mark:
deutsche-gesellschaft-für-psychologie :x:
deutsche-sprache :x:
elsevier-harvard :x:
elsevier-vancouver :white_check_mark:
elsevier-with-titles :white_check_mark:
frontiers :x:
future-medicine :white_check_mark:
future-science :white_check_mark:
gb-7714-2005-numeric :white_check_mark:
gb-7714-2015-author-date :x:
gb-7714-2015-note :white_check_mark:
gb-7714-2015-numeric :white_check_mark:
gost-r-705-2008-numeric :white_check_mark:
harvard-cite-them-right :x:
institute-of-electrical-and-electronics-engineers :white_check_mark:
institute-of-physics-numeric :white_check_mark:
iso-690-author-date :x:
iso-690-numeric :white_check_mark:
karger :white_check_mark:
mary-ann-liebert-vancouver :white_check_mark:
modern-humanities-research-association :x:
modern-language-association :x:
modern-language-association-8 :x:
multidisciplinary-digital-publishing-institute :white_check_mark:
nature :white_check_mark:
pensoft :x:
public-library-of-science :white_check_mark:
royal-society-of-chemistry :white_check_mark:
sage-vancouver :white_check_mark:
sist02 :white_check_mark:
spie :white_check_mark:
springer-basic :white_check_mark:
springer-basic-author-date :x:
springer-fachzeitschriften-medizin-psychologie :white_check_mark:
springer-humanities-author-date :x:
springer-lecture-notes-in-computer-science :white_check_mark:
springer-mathphys :white_check_mark:
springer-socpsych-author-date :x:
springer-vancouver :x:
taylor-and-francis-chicago-author-date :x:
taylor-and-francis-national-library-of-medicine :white_check_mark:
the-institution-of-engineering-and-technology :white_check_mark:
the-lancet :white_check_mark:
thieme :white_check_mark:
trends :white_check_mark:
turabian-author-date :x:
turabian-fullnote-8 :x:
vancouver :white_check_mark:
vancouver-superscript :white_check_mark:
Python script
from subprocess import run

# Copied from https://typst.app/docs/reference/model/bibliography/#parameters-style
STYLES = """
american-anthropological-association
american-chemical-society
american-geophysical-union
american-institute-of-aeronautics-and-astronautics
american-institute-of-physics
american-medical-association
american-meteorological-society
american-physics-society
american-physiological-society
american-political-science-association
american-psychological-association
american-society-for-microbiology
american-society-of-civil-engineers
american-society-of-mechanical-engineers
american-sociological-association
angewandte-chemie
annual-reviews
annual-reviews-author-date
associacao-brasileira-de-normas-tecnicas
association-for-computing-machinery
biomed-central
bristol-university-press
british-medical-journal
cell
chicago-author-date
chicago-fullnotes
chicago-notes
copernicus
council-of-science-editors
council-of-science-editors-author-date
current-opinion
deutsche-gesellschaft-für-psychologie
deutsche-sprache
elsevier-harvard
elsevier-vancouver
elsevier-with-titles
frontiers
future-medicine
future-science
gb-7714-2005-numeric
gb-7714-2015-author-date
gb-7714-2015-note
gb-7714-2015-numeric
gost-r-705-2008-numeric
harvard-cite-them-right
institute-of-electrical-and-electronics-engineers
institute-of-physics-numeric
iso-690-author-date
iso-690-numeric
karger
mary-ann-liebert-vancouver
modern-humanities-research-association
modern-language-association
modern-language-association-8
multidisciplinary-digital-publishing-institute
nature
pensoft
public-library-of-science
royal-society-of-chemistry
sage-vancouver
sist02
spie
springer-basic
springer-basic-author-date
springer-fachzeitschriften-medizin-psychologie
springer-humanities-author-date
springer-lecture-notes-in-computer-science
springer-mathphys
springer-socpsych-author-date
springer-vancouver
taylor-and-francis-chicago-author-date
taylor-and-francis-national-library-of-medicine
the-institution-of-engineering-and-technology
the-lancet
thieme
trends
turabian-author-date
turabian-fullnote-8
vancouver
vancouver-superscript
""".strip().splitlines()


def if_use_grid(style: str) -> bool:
    result = run(
        ["typst", "compile", "-", "-", "--format=svg", "--input", f"style={style}"],
        input=r"""
        #set grid(stroke: rgb("#caffee"))
        #bibliography(
          style: sys.inputs.at("style"),
          full: true,
          bytes(
                ```bib
                @misc{CitekeyMisc,
                title        = "Pluto: The 'Other' Red Planet",
                author       = "{NASA}",
                howpublished = "\url{https://www.nasa.gov/nh/pluto-the-other-red-planet}",
                year         = 2015,
                note         = "Accessed: 2018-12-06"
            }
            ```.text,
          ),
        )
        """,
        text=True,
        check=True,
        capture_output=True,
    )
    return 'stroke="#caffee"' in result.stdout


print("| Style | Use grid? |")
print("|--|:--:|")
for style in STYLES:
    use = if_use_grid(style)
    print(f"|{style}|{'✅' if use else '❌'}|")
1 Like