-
-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #362 from JonasIsensee/texpipeline
Improvements to the tex rendering pipeline
- Loading branch information
Showing
9 changed files
with
107 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
@testset "unicode to latex conversion" begin | ||
unicode2latex(args...) = Weave.unicode2latex(get_format("md2tex"), args...) | ||
|
||
# unit test | ||
let | ||
s = unicode2latex("α = 10") | ||
@test !occursin("α", s) | ||
@test occursin("alpha", s) | ||
end | ||
|
||
# end2end | ||
let | ||
str = """ | ||
```julia | ||
α = 10 | ||
``` | ||
""" | ||
doc = mock_run(str; doctype = "md2tex") | ||
Weave.set_rendering_options!(doc.format) | ||
rendered = Weave.render_doc(doc) | ||
@test occursin("alpha", rendered) | ||
@test !occursin("α", rendered) | ||
|
||
doc = mock_run(str; doctype = "md2tex") | ||
Weave.set_rendering_options!(doc.format; keep_unicode = true) | ||
rendered = Weave.render_doc(doc) | ||
@test !occursin("alpha", rendered) | ||
@test occursin("α", rendered) | ||
end | ||
end # @testset "rendering tex formats" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters