>>> latex = 'e^{2x}'
>>> LatexNodes2Text().latex_to_text(latex)
'e^2x'
How i can get e^(2x)
?
Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Powers (TV Series 2015–2016) - IMDb
Set in a world where humans and superheroes co-exist, a homicide detective whose powers were taken from him investigates crimes involving superhumans along ......
Read more >Powers (American TV series) - Wikipedia
Powers is an American streaming television series developed by Brian Michael Bendis and Charlie Huston for PlayStation Network. It is based on the...
Read more >List of Supernatural Powers and Abilities - Superpower Wiki
Superpowers are superhuman and supernatural abilities, characteristics, and/or attributes employed and explored in many works of fiction and has become a ...
Read more >POWERS - Facebook
Love the song "Stay Gold" on The Knocks new album "History!" I hope we get to hear more music from you two soon!...
Read more >Powers Anchors
DEWALT is the leader in contractor power tools including cordless drills, woodworking tools and professional power tools.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the pointer to the list of unicode sub/superscripts. For the reasons that were mentioned above, it isn’t straightforward to implement this. I’m thinking about some upgrades to how LaTeX gets converted to unicode text, and I’ll try to integrate unicode super/subscripts as much as possible. (Plus, there would be additional design decisions, e.g., what should happen to subscripts where not all characters have a unicode subscript variant, such as $\theta_{i,j*k}$?)
Hi, thanks for the issue. I’ve been thinking a bit about how to handle powers and subscripts but there are some edge cases I want to make sure that I can polish before providing support for these out of the box. Here is a simple solution you can use in the meantime:
The above code has the following caveats:
In LaTeX the syntax
X_\mathrm{min}
can be used instead ofX_{\mathrm{min}}
. With my above snippet,pylatexenc
will not recognize the first syntax because it will parse the argument of_
as a macro argument, here capturing only the token\mathrm
without{min}
.If you have underscores outside math mode, e.g.,
See \url{example.com/some_page}
, then with my above snippetpylatexenc
will attempt to parse the_
as a math subscript (whereas in LaTeX the\url
command does some catcode magic to avoid that).I’m currently thinking about some ideas for ways to avoid these caveats, in order to support
^
and_
by default inpylatexenc
, but I haven’t found the time to work these out fully yet.