Skip to content

Commit ba2616b

Browse files
authored
add bundle, figsize, font, fontsize, and tests for COLM 2026 (#173)
1 parent 204769f commit ba2616b

10 files changed

Lines changed: 98 additions & 0 deletions

File tree

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ The following venues are currently supported by TUEplots out of the box as pre-c
2626
- Association for the Advancement of Artificial Intelligence (AAAI)
2727
- European Conference on Computer Vision (ECCV)
2828
- International Conference on Probabilistic Numerics (ProbNum)
29+
- Conference on Language Modeling (COLM)
2930

3031

3132
For further details on the available bundles, check out the `tueplots.bundles API documentation <docs_api/tueplots.bundles.rst>`_.

tests/test_bundles_error_handling.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ def case_bundle_iclr2024():
7676
return bundles.iclr2024
7777

7878

79+
@pytest_cases.case(tags=["tex_or_not"])
80+
def case_fontsizes_colm2026():
81+
return bundles.colm2026
82+
83+
7984
@pytest_cases.case()
8085
def case_bundle_tue_ai_thesis():
8186
return bundles.tue_ai_thesis

tests/test_rc_params_cases/case_bundles.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ def case_bundles_iclr2024(usetex):
7474
return bundles.iclr2024(usetex=usetex, nrows=2, ncols=2, family="serif")
7575

7676

77+
@pytest_cases.parametrize(usetex=[True, False])
78+
def case_bundles_colm2026(usetex):
79+
return bundles.colm2026(usetex=usetex, nrows=2, ncols=2)
80+
81+
7782
@pytest_cases.parametrize(column=["full", "half"])
7883
def case_bundles_aaai2024(column):
7984
return bundles.aaai2024(column=column, nrows=2, ncols=2, family="serif")

tests/test_rc_params_cases/case_figsizes.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ def case_figsizes_iclr2024():
8383
return figsizes.iclr2024(nrows=2, ncols=3, height_to_width_ratio=1.0)
8484

8585

86+
def case_figsizes_colm2026():
87+
return figsizes.colm2026(nrows=2, ncols=3, height_to_width_ratio=1.0)
88+
89+
8690
def case_figsizes_aaai2024_half():
8791
return figsizes.aaai2024_half(nrows=2, ncols=3, height_to_width_ratio=1.0)
8892

tests/test_rc_params_cases/case_fonts.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,14 @@ def case_fonts_iclr2024_custom():
123123
return fonts.iclr2024(family="serif")
124124

125125

126+
def case_fonts_colm2026_default():
127+
return fonts.colm2026()
128+
129+
130+
def case_fonts_colm2026_tex_default():
131+
return fonts.colm2026_tex()
132+
133+
126134
def case_fonts_aaai2024_tex_default():
127135
return fonts.aaai2024_tex()
128136

tests/test_rc_params_cases/case_fontsizes.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ def case_fontsizes_iclr2024():
3939
return fontsizes.iclr2024()
4040

4141

42+
def case_fontsizes_colm2026():
43+
return fontsizes.colm2026()
44+
45+
4246
def case_fontsizes_aistats2022():
4347
return fontsizes.aistats2022()
4448

tueplots/bundles.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,19 @@ def iclr2024(*, usetex=True, rel_width=1.0, nrows=1, ncols=1, family="serif"):
263263
return {**font_config, **size, **fontsize_config}
264264

265265

266+
def colm2026(*, usetex=True, rel_width=1.0, nrows=1, ncols=1):
267+
"""COLM 2026 bundle."""
268+
if usetex is True:
269+
font_config = fonts.colm2026_tex()
270+
elif usetex is False:
271+
font_config = fonts.colm2026()
272+
else:
273+
raise ValueError(_msg_error_wrong_arg_usetex(usetex))
274+
size = figsizes.colm2026(rel_width=rel_width, nrows=nrows, ncols=ncols)
275+
fontsize_config = fontsizes.colm2026()
276+
return {**font_config, **size, **fontsize_config}
277+
278+
266279
def probnum2025(*, column="half", nrows=1, ncols=1, family="sans-serif"):
267280
"""ProbNum 2025 bundle."""
268281
if column == "half":

tueplots/figsizes.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,28 @@ def iclr2024(
624624
)
625625

626626

627+
def colm2026(
628+
*,
629+
rel_width=1.0,
630+
nrows=1,
631+
ncols=2,
632+
constrained_layout=True,
633+
tight_layout=False,
634+
height_to_width_ratio=_GOLDEN_RATIO,
635+
pad_inches=_PAD_INCHES,
636+
):
637+
"""COLM 2026 figure size."""
638+
return _neurips_and_iclr_common(
639+
rel_width=rel_width,
640+
nrows=nrows,
641+
ncols=ncols,
642+
constrained_layout=constrained_layout,
643+
tight_layout=tight_layout,
644+
height_to_width_ratio=height_to_width_ratio,
645+
pad_inches=pad_inches,
646+
)
647+
648+
627649
def _neurips_and_iclr_common(
628650
*,
629651
rel_width=1.0,

tueplots/fonts.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,16 @@ def iclr2024(*, family="serif"):
105105
return _times_text_cmodern_math(family=family)
106106

107107

108+
def colm2026_tex():
109+
"""Fonts for COLM 2026. LaTeX version."""
110+
return _palatino_tex_via_pkg_tgpagella_mathpazo()
111+
112+
113+
def colm2026():
114+
"""Fonts for COLM 2026."""
115+
return _palatino_text_stix_math()
116+
117+
108118
def cvpr2024_tex(*, family="serif"):
109119
"""Fonts for CVPR 2024. LaTeX version."""
110120
return _times_tex_via_pkg_ptm(family=family)
@@ -212,6 +222,7 @@ def roboto_condensed():
212222
# Helper functions below
213223

214224
_TIMES_LIKE = ["Times New Roman", "Times", "TeX Gyre Termes", "Nimbus Roman"]
225+
_PALATINO_LIKE = ["Palatino", "Palatino Linotype"]
215226
_HELVET_LIKE = [
216227
"Helvetica",
217228
"Helvetica Neue",
@@ -259,6 +270,26 @@ def _times_tex_via_pkg_ptm(*, family):
259270
}
260271

261272

273+
def _palatino_text_stix_math():
274+
"""Choose a Palatino-like text font with STIX math."""
275+
return {
276+
"text.usetex": False,
277+
"font.serif": _PALATINO_LIKE,
278+
"font.family": "serif",
279+
"mathtext.fontset": "stix",
280+
}
281+
282+
283+
def _palatino_tex_via_pkg_tgpagella_mathpazo():
284+
"""Choose the Palatino font for COLM."""
285+
preamble = r"\usepackage{tgpagella}\usepackage{mathpazo}\usepackage{inconsolata}"
286+
return {
287+
"text.usetex": True,
288+
"font.family": "serif",
289+
"text.latex.preamble": preamble,
290+
}
291+
292+
262293
def _times_tex_via_pkg_times(*, family):
263294
preamble = r"\usepackage{times} "
264295
if family == "serif":

tueplots/fontsizes.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ def iclr2024(*, default_smaller=1):
8787
return _from_base(base=10 - default_smaller)
8888

8989

90+
def colm2026(*, default_smaller=1):
91+
"""Font size for COLM 2026."""
92+
return _from_base(base=10 - default_smaller)
93+
94+
9095
def aistats2022(*, default_smaller=1):
9196
"""Font size for AISTATS 2022."""
9297
return _from_base(base=10 - default_smaller)

0 commit comments

Comments
 (0)