Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve wording: use uncertainty instead of error #43

Merged
merged 5 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/api/console_stringifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ def _modify_unit(self, unit: str) -> str:
Returns the modified unit.
"""
unit = (
unit.replace(r"\squared", "^2")
unit.replace(" ", "")
.replace(r"\squared", "^2")
.replace(r"\cubed", "^3")
.replace("\\percent", "\\%")
.replace("\\per\\", "/")
.replace(r"\per", "/")
.replace("\\", " ")
Expand Down
4 changes: 2 additions & 2 deletions src/application/latex_commandifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def result_to_latex_cmd(self, result: Result) -> str:

# Without error
if len(result.uncertainties) > 0:
builder.add_branch("withoutError", self.result_to_latex_str_without_error(result))
builder.add_branch("withoutUncert", self.result_to_latex_str_without_uncert(result))

# Single uncertainties
for i, u in enumerate(result.uncertainties):
Expand Down Expand Up @@ -82,7 +82,7 @@ def result_to_latex_str_value(self, result: Result) -> str:
"""
return self.s.create_str(result.value, [], "")

def result_to_latex_str_without_error(self, result: Result) -> str:
def result_to_latex_str_without_uncert(self, result: Result) -> str:
"""
Returns the result without error as LaTeX string making use of the siunitx package.
"""
Expand Down
Loading