Closed gustaphe closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 77.81%. Comparing base (
6af2a54
) to head (1577e93
). Report is 2 commits behind head on master.:exclamation: Current head 1577e93 differs from pull request most recent head ce2cc6e
Please upload reports for the commit ce2cc6e to get more accurate results.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
julia> struct SimpleLength
x
end
julia> @latexrecipe function f(x::SimpleLength)
return Expr(:latexifymerge, x.x, "\\;\\mathrm{m}")
end
julia> @latexify $(SimpleLength(3))^2
3\;\mathrm{m}^2
julia> @latexrecipe function f(x::SimpleLength)
operation := :*
return Expr(:latexifymerge, x.x, "\\;\\mathrm{m}")
end
julia> @latexify $(SimpleLength(3))^2
\left( 3\;\mathrm{m} \right)^{2}
Previously, recipes had no way of affecting the previous operation. With this (somewhat ugly) change, a type that fundamentally represents for instance a multiplication or sum can tell latexify, so that things like parentheses work out right.
Part of fixing #280
TODO