Skip to content

Conversation

@gustaphe
Copy link
Collaborator

This is a re-PR of #167 , rebased on current master and with two added kwargs which I feel address the slight regressions in that PR by way of customizability:

julia> @latexify hello_world
L"$hello_{world}$"

julia> @latexify hello_world snakecase=true
L"$hello\_world$"

julia> @latexify aᵦᵧ¹²₃
L"$a_{\beta \gamma}^{1 2}_3$"

julia> @latexify aᵦᵧ¹²₃ safescripts=true
L"$a{_{\beta \gamma}}{^{1 2}}{_3}$"

(A majority of this is @akabla's work, I just couldn't figure out how to merge this otherwise)

akabla and others added 9 commits March 16, 2022 11:40
This patch allows us to use a broader range of Unicode symbols with sub-scripts and super-scripts. I was having issues with Greek letters in sub-script in one of my projects and this is fixing the problem. See the example below:

julia> latexify(:(2a₍ₐᵦᵧ₎+ΓhΛ₁₂- ħᵗⁱᵦ))
L"$2 \cdot a{_{( a \beta \gamma )}} + {\Gamma}h\Lambda{_{1 2}} - \hbar{^{t i}}{_\beta}$"

Many thanks for this great library btw!
@gustaphe gustaphe requested a review from korsbo March 16, 2022 11:34
@codecov
Copy link

codecov bot commented Mar 16, 2022

Codecov Report

Merging #215 (ffc933c) into master (6bf3875) will decrease coverage by 0.21%.
The diff coverage is 91.66%.

@@            Coverage Diff             @@
##           master     #215      +/-   ##
==========================================
- Coverage   62.90%   62.68%   -0.22%     
==========================================
  Files          23       23              
  Lines         806      812       +6     
==========================================
+ Hits          507      509       +2     
- Misses        299      303       +4     
Impacted Files Coverage Δ
src/unicode2latex.jl 89.74% <88.46%> (-10.26%) ⬇️
src/latexoperation.jl 84.78% <100.00%> (ø)
src/latexraw.jl 90.62% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6bf3875...ffc933c. Read the comment docs.

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.

2 participants