You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to convert a csv file to a markdown table and ran into an error whenever I had strings in my file (obviously a very common scenario)
Minimal example:
df =DataFrame(CSV.File("file.csv"))
latexify(df)
There's a discourse suggesting that you need to handle AbstractString instead of just String. The breaking change happened a couple of years ago so maybe I've missed something?
The correct usage was to use latexify(df, env=:mdtable, latex=false) as given by a later error message:
in Latexify.jl:
You are trying to create latex-maths from a String that cannot be parsed as
an expression: Hello World.
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 LaTeXStrings 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.
I was trying to convert a csv file to a markdown table and ran into an error whenever I had strings in my file (obviously a very common scenario)
Minimal example:
There's a discourse suggesting that you need to handle
AbstractString
instead of justString
. The breaking change happened a couple of years ago so maybe I've missed something?The text was updated successfully, but these errors were encountered: