Skip to content

Conversation

@gustaphe
Copy link
Collaborator

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$"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Git knows this file was just renamed. Don't know why Github doesn't.

_latexraw(i::SubString{LaTeXStrings.LaTeXString}; kwargs...) = i
_latexraw(i::Rational; kwargs...) = i.den == 1 ? latexraw(i.num; kwargs...) : latexraw(:($(i.num)/$(i.den)); kwargs...)
_latexraw(i::QuoteNode; kwargs...) = _latexraw(i.value)
_latexraw(i::QuoteNode; kwargs...) = _latexraw(i.value; kwargs...)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this was a typo.

Copy link
Contributor

@hyrodium hyrodium left a comment

Choose a reason for hiding this comment

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

I added a minor comment around Symbol.
I'm not much familiar with the inside of Latexify.jl, but most of the changes LGTM.

Is this PR waiting for someone's approval?

@hyrodium
Copy link
Contributor

hyrodium commented Apr 1, 2023

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

Co-authored-by: Yuto Horikawa <[email protected]>
@codecov
Copy link

codecov bot commented Apr 18, 2023

Codecov Report

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

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

Additional details and impacted files
@@            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 Coverage Δ
src/Latexify.jl 46.15% <ø> (ø)
src/latexoperation.jl 85.10% <100.00%> (+0.21%) ⬆️
src/latexraw.jl 91.17% <100.00%> (+0.13%) ⬆️

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@gustaphe gustaphe merged commit 8e74eed into korsbo:master Apr 18, 2023
@gustaphe gustaphe deleted the functioncallexprs branch April 18, 2023 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support expressions like latexify(Expr(:call, sin, 3))?

2 participants