Home > Blockchain >  Convert string with unicode characters e.g. →,∧,¬ into strings illustrated in latex?
Convert string with unicode characters e.g. →,∧,¬ into strings illustrated in latex?

Time:06-27

Is their a way or method in python which is able to convert strings in which logical symbols occur as unicode characters into latex code:

means:

str1 = '¬q→ ¬p→q'

into

str1_tex = '$\neg q\rightarrow \neg p\rightharrow q'

or

str2 = 'q∧ q'

into

str2_tex = '$q \wedge q$'

CodePudding user response:

That is possible. Check out the following repo: enter image description here

  • Related