Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
95d09f2
Improve processing of MathMLForm for Input and Output Form
mmatera Jan 29, 2026
842fc58
remove trailing print
mmatera Jan 29, 2026
466bc6e
remove space from extra_operators, and add a comment
mmatera Jan 29, 2026
8f0f52b
add a comment about mathml multiline output. Give a more consistent o…
mmatera Jan 29, 2026
2d98ca7
Merge remote-tracking branch 'origin/master' into mathml_tweaks
Jan 30, 2026
f513083
indentation
Jan 30, 2026
d26de0d
mathml indent
Jan 30, 2026
cbceb63
update docs
Jan 30, 2026
e556ec9
update tests. adjust more indentation
Jan 30, 2026
9e816d2
Merge branch 'master' into mathml_tweaks
mmatera Jan 30, 2026
ada2900
Merge branch 'mathml_tweaks' into mathml_tweaks_indent
mmatera Jan 30, 2026
2951a17
restore Makefile
mmatera Jan 30, 2026
81689de
Merge branch 'master' into mathml_tweaks
mmatera Jan 31, 2026
a5e3104
improve Expression.sameQ to deal with BoxExpressions. Add tests for B…
mmatera Feb 2, 2026
270f82d
add a test involving FractionBox
mmatera Feb 2, 2026
cb3ff7a
Merge branch 'improve_Expression_sameQ' into mathml_tweaks
mmatera Feb 2, 2026
70f84ed
Improve processing of MathMLForm for Input and Output Form
mmatera Jan 29, 2026
5b89c3f
remove trailing print
mmatera Jan 29, 2026
e88108d
remove space from extra_operators, and add a comment
mmatera Jan 29, 2026
5295f48
add a comment about mathml multiline output. Give a more consistent o…
mmatera Jan 29, 2026
1831e6b
improve Expression.sameQ to deal with BoxExpressions. Add tests for B…
mmatera Feb 2, 2026
6c529bd
Add Box type annotations to render routines.
rocky Feb 3, 2026
3c53f98
Fix type errors found by mypy
rocky Feb 3, 2026
942752a
More mypy/type work.
rocky Feb 3, 2026
6d25078
Merge branch 'master' into mathml_tweaks
rocky Feb 3, 2026
bddeb7a
merge
Feb 3, 2026
e57789a
merge
mmatera Feb 5, 2026
5bc5469
merge. adjust indentation in gridbox. adjust test accordingly.
mmatera Feb 5, 2026
ddfdb17
ordering functions
mmatera Feb 6, 2026
17413ed
merge
Feb 6, 2026
1e50e58
fix
Feb 6, 2026
cc1afde
merge
mmatera Feb 6, 2026
b7a4c79
merge
mmatera Feb 6, 2026
262b628
merge
Feb 6, 2026
76bee53
merge
Feb 6, 2026
5488a13
fix mypy
Feb 6, 2026
5be081a
merge
mmatera Feb 6, 2026
a07cac9
removing unused inner function
mmatera Feb 6, 2026
63728da
merge
mmatera Feb 6, 2026
e520721
ruff
mmatera Feb 6, 2026
684e474
ruff
mmatera Feb 6, 2026
4fc0fe9
Merge branch 'mathml_tweaks' into mathml_tweaks_indent
mmatera Feb 6, 2026
7dbc388
Merge branch 'master' into mathml_tweaks
rocky Feb 7, 2026
0b49738
Merge branch 'mathml_tweaks' into mathml_tweaks_indent
rocky Feb 7, 2026
351eee1
Update mathics/format/render/mathml.py
mmatera Feb 7, 2026
18abb93
Update mathics/format/render/mathml.py
mmatera Feb 7, 2026
8e17b74
fix syntactic typo
rocky Feb 7, 2026
42c6226
Apply suggestion from @rocky
rocky Feb 7, 2026
0d4c08c
Update mathics/format/render/mathml.py
mmatera Feb 7, 2026
b626638
Merge branch 'mathml_tweaks' into mathml_tweaks_indent
mmatera Feb 7, 2026
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
1 change: 0 additions & 1 deletion mathics/builtin/forms/print.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ class OutputForm(FormBaseClass):
in_outputforms = True
in_printforms = True

formats = {"OutputForm[s_String]": "s"}
summary_text = "format expression in plain text"


Expand Down
1 change: 0 additions & 1 deletion mathics/doc/doc_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import logging
import re
from abc import ABC
from os import getenv
from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Sequence, Tuple

from mathics.core.evaluation import Message, Print, _Out
Expand Down
14 changes: 10 additions & 4 deletions mathics/format/box/outputforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def eval_mathmlform(expr: BaseElement, evaluation: Evaluation) -> BoxElementMixi

boxes = format_element(expr, evaluation, SymbolTraditionalForm)
try:
mathml = boxes.boxes_to_mathml(evaluation=evaluation)
mathml = boxes.boxes_to_mathml(evaluation=evaluation, _indent_level=1)
except BoxError:
evaluation.message(
"General",
Expand All @@ -44,9 +44,15 @@ def eval_mathmlform(expr: BaseElement, evaluation: Evaluation) -> BoxElementMixi
# #convert_box(boxes)
query = evaluation.parse("Settings`$UseSansSerif")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticing now that it was a mistake to add $UseSansSerif.

WMA uses CurrentValue[$DefaultFrontEnd, DefaultFontProperties].

I guess for now, we have to live with this.

usesansserif = query.evaluate(evaluation).to_python()
if not is_a_picture:
if isinstance(usesansserif, bool) and usesansserif:
mathml = '<mstyle mathvariant="sans-serif">%s</mstyle>' % mathml
if is_a_picture:
usesansserif = False
elif not isinstance(usesansserif, bool):
usesansserif = False

if usesansserif:
mathml = '<mstyle mathvariant="sans-serif">\n%s\n</mstyle>' % mathml
else:
mathml = "\n%s\n" % mathml

mathml = '<math display="block">%s</math>' % mathml # convert_box(boxes)
return InterpretationBox(
Expand Down
Loading