Re: small graphical question
"'Chris Barker' via wxPython-users" <[email protected]> Sat, 3 Jul 2021 09:55:15 -0700
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <CALGmxEK5h+EBoxuvpF0S+Ne3Ov8AH0pXn-pRN8YLcj4Cj6NQYg@mail.gmail.com> |
and I"m not sure how far you'll get with raw richtext either, if you need more than the simplest math. I"d look at matplotlib -- it has a mini TeX implementation for math -- you could probably use it to make bitmaps of the Math, and render those inline with text in a RichTextControl. Or, if this doesn't need to be dynamic, use TeX, or MPL, or a browser option (MAthML and MathJAX, or ...) for making images of the math. -CHB On Wed, Feb 10, 2021 at 5:08 PM Nathan smith <[email protected]> wrote: > Hi Tim. > > > Really appreciate your response here. > > time to dust off my Rich text research and start again! > > > V best > > Nathan > > On 10/02/2021 02:15, Tim Roberts wrote: > > Nathan smith wrote: > >> > >> I'm using a wx.textCtrl and trying to write powers and fractions. For > >> instance, I would like to write 3 superscript 2 for 3 squared, or 3 > >> over 5 for fractions, without necessarily writing 3/5. > >> > >> I did a look around and found a question related to this to do with a > >> multiline Rich Text Widget but I'm hoping to only work with a single > >> line textCtrl. > > > > Not in the general case, no. Unicode does have glyphs for superscript > > and subscript 1 through 9, and fractions for 1/2, 1/3, 2/3, 1/4, 3/4, > > 1/8, 3/8, 5/8, and 7/8, but that's it. If you're looking for general > > case math symbols, then you absolutely need rich text. > > > > -- > You received this message because you are subscribed to the Google Groups > "wxPython-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/wxpython-users/e1d7d455-cfca-6315-9355-0a7641cbe761%40gmail.com > . > -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/CALGmxEK5h%2BEBoxuvpF0S%2BNe3Ov8AH0pXn-pRN8YLcj4Cj6NQYg%40mail.gmail.com.