I’ve recently discovered the package LaTeXStrings, and am very impressed with it. I was wondering if this package makes it possible to display LaTeX strings within arrays and DataFrames. For example, suppose I have a DataFrame containing a column of strings such as “\alpha_{BC}^{n}”, “\beta_{DF}^{m}”, “\gamma_{G}^{k}”. Is there a way to make these strings display in LaTeX format when the DataFrame is printed?
I was trying to get this to work for arrays, but couldn’t figure it out. I tried
vars = ["\\alpha_{BC}^{n}", "\\beta_{DF}^{m}", "\\gamma_{G}^{k}"]
tex_vars = ["L%$v" for v in vars]
println(tex_vars)
which produced
LaTeXString[L"$\alpha_{BC}^{n}$", L"$\beta_{DF}^{m}$", L"$\gamma_{G}^{k}$"]
rather than actually rending LaTeX characters, as I had hoped. Is it possible to make this work? If so, can this also work for a DataFrame for which some (but not all) entries are strings of LaTeX code?