korsbo / Latexify.jl

Convert julia objects to LaTeX equations, arrays or other environments.
MIT License
544 stars 55 forks source link

More robust latexification of specific functions #252

Closed gustaphe closed 1 year ago

gustaphe commented 1 year ago

Closes #251 .

We were in a strange state for (for lack of a better word) "named" functions like sin. This way should be more robust.

Before

julia> latexify(sin)
ERROR: AssertionError: latexify does not support objects of type typeof(sin).

julia> latexify(:sin)
L"$sin$"

After

julia> latexify(sin)
L"$\sin$"

julia> latexify(:sin)
L"$\sin$"
hyrodium commented 1 year ago

The CI failure on Windows seems not related to this PR.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.14 :tada:

Comparison is base (12c0408) 72.23% compared to head (13a27e5) 72.38%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #252 +/- ## ========================================== + Coverage 72.23% 72.38% +0.14% ========================================== Files 23 23 Lines 940 945 +5 ========================================== + Hits 679 684 +5 Misses 261 261 ``` | [Impacted Files](https://codecov.io/gh/korsbo/Latexify.jl/pull/252?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Niklas+Korsbo) | Coverage Δ | | |---|---|---| | [src/Latexify.jl](https://codecov.io/gh/korsbo/Latexify.jl/pull/252?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Niklas+Korsbo#diff-c3JjL0xhdGV4aWZ5Lmps) | `46.15% <ø> (ø)` | | | [src/latexoperation.jl](https://codecov.io/gh/korsbo/Latexify.jl/pull/252?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Niklas+Korsbo#diff-c3JjL2xhdGV4b3BlcmF0aW9uLmps) | `85.10% <100.00%> (+0.21%)` | :arrow_up: | | [src/latexraw.jl](https://codecov.io/gh/korsbo/Latexify.jl/pull/252?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Niklas+Korsbo#diff-c3JjL2xhdGV4cmF3Lmps) | `91.17% <100.00%> (+0.13%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://codecov.io/gh/korsbo/Latexify.jl/pull/252/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Niklas+Korsbo) Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Niklas+Korsbo). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Niklas+Korsbo)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.