Skip to content

Commit

Permalink
Add bundle for AAAI 2024. (#113)
Browse files Browse the repository at this point in the history
* Add bundle for AAAI2024.

* Added test cases for AAAI2024.
  • Loading branch information
jkbjh authored Sep 4, 2023
1 parent d83ea62 commit 253847c
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_rc_params_cases/case_bundles.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ def case_bundles_iclr2023(usetex):
return bundles.iclr2023(usetex=usetex, nrows=2, ncols=2, family="serif")


@pytest_cases.parametrize(column=["full", "half"])
def case_bundles_aaai2024(column):
return bundles.aaai2024(column=column, nrows=2, ncols=2, family="serif")


@pytest_cases.parametrize(column=["full", "half"])
def case_bundles_uai2023(column):
return bundles.uai2023(column=column, nrows=2, ncols=2, family="serif")
Expand Down
8 changes: 8 additions & 0 deletions tests/test_rc_params_cases/case_figsizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ def case_figsizes_iclr2023():
return figsizes.iclr2023(nrows=2, ncols=3, height_to_width_ratio=1.0)


def case_figsizes_aaai2024_half():
return figsizes.aaai2024_half(nrows=2, ncols=3, height_to_width_ratio=1.0)


def case_figsizes_aaai2024_full():
return figsizes.aaai2024_full(nrows=2, ncols=3, height_to_width_ratio=1.0)


def case_figsizes_uai2023_half():
return figsizes.uai2023_half(nrows=2, ncols=3, height_to_width_ratio=1.0)

Expand Down
8 changes: 8 additions & 0 deletions tests/test_rc_params_cases/case_fonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ def case_fonts_iclr2023_custom():
return fonts.iclr2023(family="serif")


def case_fonts_aaai2024_tex_default():
return fonts.aaai2024_tex()


def case_fonts_aaai2024_tex_custom():
return fonts.aaai2024_tex(family="serif")


def case_fonts_uai2023_tex_default():
return fonts.uai2023_tex()

Expand Down
4 changes: 4 additions & 0 deletions tests/test_rc_params_cases/case_fontsizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def case_fontsizes_aistats2023():
return fontsizes.aistats2023()


def case_fontsizes_aaai2024():
return fontsizes.aaai2024()


def case_fontsizes_uai2023():
return fontsizes.uai2023()

Expand Down
14 changes: 14 additions & 0 deletions tueplots/bundles.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ def aistats2023(*, column="half", nrows=1, ncols=1, family="serif"):
return {**font_config, **size, **fontsize_config}


def aaai2024(*, column="half", nrows=1, ncols=1, family="serif", rel_width=1.0):
"""AAAI 2024 bundle.
Source: https://aaai.org/wp-content/uploads/2023/06/AuthorKit24.zip
"""
if column == "half":
size = figsizes.aaai2024_half(nrows=nrows, ncols=ncols, rel_width=rel_width)
elif column == "full":
size = figsizes.aaai2024_full(nrows=nrows, ncols=ncols, rel_width=rel_width)
font_config = fonts.aaai2024_tex(family=family)
fontsize_config = fontsizes.aaai2024()
return {**font_config, **size, **fontsize_config}


def uai2023(*, column="half", nrows=1, ncols=1, family="serif"):
"""UAI 2023 bundle."""
if column == "half":
Expand Down
54 changes: 54 additions & 0 deletions tueplots/figsizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,60 @@ def _icml_and_aistats_common_full(
)


def aaai2024_half(
*,
nrows=1,
ncols=1,
constrained_layout=True,
tight_layout=False,
height_to_width_ratio=_GOLDEN_RATIO,
pad_inches=_PAD_INCHES,
rel_width=1.0,
):
"""Double-column (half-width) figures for AAAI 2024."""

figsize = _from_base_in(
base_width_in=3.3,
rel_width=rel_width,
height_to_width_ratio=height_to_width_ratio,
nrows=nrows,
ncols=ncols,
)
return _figsize_to_output_dict(
figsize=figsize,
constrained_layout=constrained_layout,
tight_layout=tight_layout,
pad_inches=pad_inches,
)


def aaai2024_full(
*,
nrows=1,
ncols=1,
constrained_layout=True,
tight_layout=False,
height_to_width_ratio=_GOLDEN_RATIO,
pad_inches=_PAD_INCHES,
rel_width=1.0,
):
"""Double-column (full-width) figures for AAAI 2024."""

figsize = _from_base_in(
base_width_in=6.975,
rel_width=rel_width,
height_to_width_ratio=height_to_width_ratio,
nrows=nrows,
ncols=ncols,
)
return _figsize_to_output_dict(
figsize=figsize,
constrained_layout=constrained_layout,
tight_layout=tight_layout,
pad_inches=pad_inches,
)


def uai2023_half(
*,
nrows=1,
Expand Down
5 changes: 5 additions & 0 deletions tueplots/fonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ def uai2023_tex(*, family="serif"):
return _tex_times(family=family)


def aaai2024_tex(*, family="serif"):
"""Fonts for AAAI 2024. LaTeX version."""
return _tex_times(family=family)


def _tex_times(*, family):
preamble = r"\usepackage{times} "
if family == "serif":
Expand Down
5 changes: 5 additions & 0 deletions tueplots/fontsizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ def aistats2023(*, default_smaller=1):
return _from_base(base=10 - default_smaller)


def aaai2024(*, default_smaller=1):
"""Font size for AAAI 2024."""
return _from_base(base=10 - default_smaller)


def uai2023(*, default_smaller=1):
"""Font size for UAI 2023."""
return _from_base(base=10 - default_smaller)
Expand Down

0 comments on commit 253847c

Please sign in to comment.