0

Looks like RichEditBox supports math editing and display http://blogs.msdn.com/b/murrays/archive/2012/03/03/richedit-8-0-preview.aspx in Windows 8, but when I copy/paste mathematical equations from MS word doc, they are treated as image and editing is not allowed.

Can I author math symbols/equations in RichEditBox? I can render symbols using their Unicode values(obtained via Character Map App in Windows 8.1), but I want advanced control whereby I can write complex equations.

chiccodoro
  • 14,407
  • 19
  • 87
  • 130
Shefali
  • 1,065
  • 2
  • 11
  • 13

2 Answers2

1

You will proabably want to use a InlineUIContainer to properly format an equation but there are a whole host of mathematical symbols in unicode

http://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode

To use any of that blog post you will need to drop down to COM, UGLY.

Gusdor
  • 14,001
  • 2
  • 52
  • 64
  • I was able to get equation in proper format from Word doc with default settings. Even if I go down the COM way and send a message EM_SETEDITSTYLEEX, would it allow me to edit the equation? Not sure... – Shefali Feb 20 '14 at 13:31
1

How mathematical content is copied from Word is a matter of how Word supports copying of such content, not a matter of what is supported by RichEditBox. As you have noticed, unicode supports such symbols, but how a symbol gets into the box needs to be defined by you. You could either:

  • Provide a tool bar to insert the symbols by adding the unicode values properly
  • Support pasting content from other applications. In that case you need to analyze how the content in the clipboard looks like. On paste, you will need to transform that content into the type of content you need (that is, unicode characters).
chiccodoro
  • 14,407
  • 19
  • 87
  • 130
  • Writing a toolbar as elaborate as MS Word already supports, might be a tedious job and would require learning efforts from user. Most likely users of my app would already be familiar with word doc, so I was hoping to provide a quick way to author. – Shefali Feb 20 '14 at 13:27
  • Well, you could do something like create a single button with a popup which displays a GridView of all characters within a given range of unicode values, such as the ones listed in the link provided in @Gusdor's answer. That wouldn't be particularly tedious, relative to anything else. – Nate Diamond Feb 21 '14 at 23:50