Skip to content

Commit

Permalink
Rename to to_latex_str & add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Mar 15, 2024
1 parent 06a3d21 commit 1a735c8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/api/printable_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ def print(self):
"""Prints the result to the console."""
print(Stringifier.result_to_str(self._result))

def get_latex_str(self) -> str:
"""Returns LaTeX string."""
def to_latex_str(self) -> str:
"""Converts the result to a string that can be used in LaTeX documents.
Note that you might also want to use the `export` method to export
all your results to a file, which can then be included in your LaTeX
document.
"""
latexer = _LaTeXer(c.configuration.to_latex_config())
return latexer.result_to_latex_str(self._result)

0 comments on commit 1a735c8

Please sign in to comment.