Skip to content

Commit

Permalink
Create suppressed and not-suppressed render_latex function
Browse files Browse the repository at this point in the history
  • Loading branch information
timmens committed Mar 27, 2024
1 parent 7367063 commit a683ad1
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion src/estimagic/visualization/estimation_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def estimation_table(
if return_type == "render_inputs":
out = render_inputs
elif str(return_type).endswith("tex"):
out = render_latex(
out = _render_latex(
**render_inputs,
show_footer=show_footer,
append_notes=append_notes,
Expand Down Expand Up @@ -281,6 +281,39 @@ def render_latex(
latex_str (str): The resulting string with Latex tabular code.
"""
return _render_latex(
body=body,
footer=footer,
render_options=render_options,
show_footer=show_footer,
append_notes=append_notes,
notes_label=notes_label,
significance_levels=significance_levels,
custom_notes=custom_notes,
siunitx_warning=siunitx_warning,
show_index_names=show_index_names,
show_col_names=show_col_names,
show_col_groups=show_col_groups,
escape_special_characters=escape_special_characters,
)


def _render_latex(
body,
footer,
render_options=None,
show_footer=True,
append_notes=True,
notes_label="Note:",
significance_levels=(0.1, 0.05, 0.01),
custom_notes=None,
siunitx_warning=True,
show_index_names=False,
show_col_names=True,
show_col_groups=True,
escape_special_characters=True,
):
"""See docstring of render_latex for more information."""
if not pd.__version__ >= "1.4.0":
raise ValueError(
r"""render_latex or estimation_table with return_type="latex" requires
Expand Down

0 comments on commit a683ad1

Please sign in to comment.