-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest release breaks Latexify of expressions with unicode exponents/subscripts #1314
Comments
No issues on 6.15.0. |
convert_subscript(::Symbol, Any...) got unsupported keyword arguments "function_name", "convert_unicode", "index", "cdot", "safescripts", "fmt", "snakecase", "env"
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexoperation.jl:281 that looks like a bug in latexify: it should be splatting the kwargs not the args? |
I haven't investigated. I just found that it is broken with 6.15.1 when it previously worked (and I checked it works on 6.15). |
(I agree that does look like a Latexify bug.) |
That is the only change from 6.15 so I assume it does. |
|
Maybe it's better to capture this here. Interesting. string("\\texttt", "{", sym, "}"))
convert(String, LaTeXString(string("\\texttt", "{", sym, "}")) fails with: ERROR: in Latexify.jl:
You are trying to create latex-maths from a `String` that cannot be parsed as
an expression: `\texttt{{\delta}t}`.
`latexify` will, by default, try to parse any string inputs into expressions
and this parsing has just failed.
If you are passing strings that you want returned verbatim as part of your input,
try making them `LaTeXString`s first.
If you are trying to make a table with plain text, try passing the keyword
argument `latex=false`. You should also ensure that you have chosen an output
environment that is capable of displaying not-maths objects. Try for example
`env=:table` for a latex table or `env=:mdtable` for a markdown table.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] _latexraw(::Val{…}, i::String; kwargs::@Kwargs{…})
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexraw.jl:158
[3] _latexraw(i::String; parse::Bool, kwargs::@Kwargs{…})
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexraw.jl:148
[4] process_latexify(args::String; kwargs::@Kwargs{…})
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexify_function.jl:49
[5] process_latexify
@ ~/.julia/packages/Latexify/ieukI/src/latexify_function.jl:40 [inlined]
[6] latexraw
@ ~/.julia/packages/Latexify/ieukI/src/latexraw.jl:58 [inlined]
[7] _latexequation(eq::String; starred::Bool, kwargs::@Kwargs{…})
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexequation.jl:5
[8] process_latexify(args::Num; kwargs::@Kwargs{})
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexify_function.jl:49
[9] process_latexify
@ ~/.julia/packages/Latexify/ieukI/src/latexify_function.jl:40 [inlined]
[10] latexify(args::Num; kwargs::@Kwargs{})
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexify_function.jl:27
[11] latexify(args::Num)
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexify_function.jl:25
[12] top-level scope
@ ~/Desktop/test.jl:107
caused by: ParseError:
# Error @ none:1:1
\texttt{{\delta}t}
╙ ── not a unary operator
Stacktrace:
[1] #parse#3
@ ./meta.jl:244 [inlined]
[2] parse
@ ./meta.jl:236 [inlined]
[3] parse(str::String; filename::String, raise::Bool, depwarn::Bool)
@ Base.Meta ./meta.jl:278
[4] parse
@ ./meta.jl:276 [inlined]
[5] _latexraw(::Val{…}, i::String; kwargs::@Kwargs{…})
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexraw.jl:155
[6] _latexraw(i::String; parse::Bool, kwargs::@Kwargs{…})
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexraw.jl:148
[7] process_latexify(args::String; kwargs::@Kwargs{…})
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexify_function.jl:49
[8] process_latexify
@ ~/.julia/packages/Latexify/ieukI/src/latexify_function.jl:40 [inlined]
[9] latexraw
@ ~/.julia/packages/Latexify/ieukI/src/latexraw.jl:58 [inlined]
[10] _latexequation(eq::String; starred::Bool, kwargs::@Kwargs{…})
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexequation.jl:5
[11] process_latexify(args::Num; kwargs::@Kwargs{})
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexify_function.jl:49
[12] process_latexify
@ ~/.julia/packages/Latexify/ieukI/src/latexify_function.jl:40 [inlined]
[13] latexify(args::Num; kwargs::@Kwargs{})
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexify_function.jl:27
[14] latexify(args::Num)
@ Latexify ~/.julia/packages/Latexify/ieukI/src/latexify_function.jl:25
[15] top-level scope
@ ~/Desktop/test.jl:107
Some type information was truncated. Use `show(err)` to see complete types. only LaTeXString(string("\\texttt", "{", sym, "}")) works. @gustaphe can you help us figure out a good solution here? |
Oh, did I miss it? |
It hopefully works now, but I think we have room for improvement 😄 I suggest to keep the discussion in #1305. |
@ChrisRackauckas the latest release (6.15.1) breaks Latexify with unicode subscripts/superscripts. (I noticed this as suddenly Catalyst doc builds are failing):
now gives
The text was updated successfully, but these errors were encountered: