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 apologize for any inconvenience with the following message regarding an issue I'm having with using latex2exp.
My name is Raffaele Vardavas, and I recently came across your insightful post that describes the utilization of your latex2exp package, particularly emphasizing the significance of employing raw strings. Your example, where "\Psi" was transformed into r"(\Psi)", greatly clarified this process.
Nonetheless, I am encountering challenges in handling the case when my string is a variable. For example, the following command works fine:
latex2exp::TeX(r'($\tilde{\alpha}_k$)')
but what if my input variable is "\tilde{\alpha}_k" such as in the following code:
this does not give me the same output. I need to process a vector read from an excel spreadsheet, where each element x is a LaTeX expression and convert them to a vector or list that contains the elements latex2exp::TeX(x) as my outputs. The issue is very much linked to the single backslash, and all my attempts in getting a working solution by asking chatGPT end with frustrating failures.
Any guidance or insight you can provide regarding the conversion would be greatly appreciated.
Thanks!
Raff
The text was updated successfully, but these errors were encountered:
Dear Dr. Meschiari,
I apologize for any inconvenience with the following message regarding an issue I'm having with using latex2exp.
My name is Raffaele Vardavas, and I recently came across your insightful post that describes the utilization of your latex2exp package, particularly emphasizing the significance of employing raw strings. Your example, where "\Psi" was transformed into r"(\Psi)", greatly clarified this process.
Nonetheless, I am encountering challenges in handling the case when my string is a variable. For example, the following command works fine:
latex2exp::TeX(r'($\tilde{\alpha}_k$ )')
but what if my input variable is "\tilde{\alpha}_k" such as in the following code:
x<-"\tilde{\alpha}_k"$",x,"$ )'")
parsed_expr <- paste0("r'(
latex2exp::TeX(x)
this does not give me the same output. I need to process a vector read from an excel spreadsheet, where each element x is a LaTeX expression and convert them to a vector or list that contains the elements latex2exp::TeX(x) as my outputs. The issue is very much linked to the single backslash, and all my attempts in getting a working solution by asking chatGPT end with frustrating failures.
Any guidance or insight you can provide regarding the conversion would be greatly appreciated.
Thanks!
Raff
The text was updated successfully, but these errors were encountered: