Skip to content

Commit

Permalink
fix latex in windows (#421)
Browse files Browse the repository at this point in the history
* change tex2svg command for windows case
  • Loading branch information
gpucce authored Sep 18, 2021
1 parent c11fb70 commit 5318148
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Javis.jl - Changelog
- Added fix to `latex` function to make it work better on Windows.

## v0.6.3 (17th of September 2021)
- `RFrames` is ignored when used in the first `Action` of an `Object`
Expand Down
8 changes: 6 additions & 2 deletions src/latex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,12 @@ function get_latex_svg(text::LaTeXString)
if haskey(LaTeXSVG, text)
svg = LaTeXSVG[text]
else
ts = strip_eq(text)
command = `tex2svg $ts`
ts = replace(strip_eq(text), "\n" => " ")
command = if Sys.iswindows()
`cmd /C tex2svg $ts`
else
`tex2svg $ts`
end
try
svg = read(command, String)
catch e
Expand Down

0 comments on commit 5318148

Please sign in to comment.