Fog Creek Software
Discussion Board




Mathematical symbols & edit controls

I'm creating a quiz program for myself (I'm a student), and I'd like to be be able to enter mathematical symbols in an edit control.  It's a client-server app with the front end written in C# and the backend on SQL Server 7 (running on the same box).

The basic idea is that as I study, I create flash-card type questions and answers to quiz myself with.  But any questions / answers than require mathematical symbols would be a real pain.

Anyone got a clue how to solve this problem?

Student A
Wednesday, February 04, 2004

If you use IE 5.5 or later you can use the a simple DIV and set it to content=editable (or something along those lines). Then youll be able to use a symbol font, and still be able to do direct editing.

Eric DeBois
Wednesday, February 04, 2004

Whoops.. youre not doing a webapp are ya?

Well, I guess using a HTML control and a symbol font might still work?

Eric DeBois
Wednesday, February 04, 2004

Using a RichTextBox Control you will be able to accomplish this.

1. Start CharMap and select the font that has the symbols you want to use.
2. Note the Name of the Symbol and it's corresponding code.
3. When entering your formula simply hold down the ALT key while typing, on the numeric keypad, the code for the glyph you would like.  ALT+X, where X is the code.

It is possible to do this programmatically...


Wednesday, February 04, 2004

Sounds like a ridiculous amount of typing.  Word comes with an equation editor; might you be able to embed that via COM interop?  Mathematica also isn't bad for printing equations and symbols.  Heck, you could even get a TI calculator that supports pretty-print (or an emulator for same) and grab screenshots, then attach images containing the screenshots.

None of which is particularly pretty, but you've probably already spent more time writing this app than you'd spend studying math... ;>

Sam Livingston-Gray
Wednesday, February 04, 2004

I was wondering about MathML - looks like a bit too much to type in an edit box etc... and I'm not sure what supports it yet ....


http://www.w3.org/Math/

blargle
Wednesday, February 04, 2004

"Word comes with an equation editor"

Unfortunately, the equation editor included in Word is crippleware.  The full version of MathType ($99 for the academic version) is vastly superior.  If this project is something you're doing only for personal use, then perhaps Equation Editor will suffice.  However, at the very least, I'd recommend you download the free trial of MathType.  After the 30 day trial is over, it just reverts back to Equation Editor, but you get to keep the additional math fonts that come with the package.  Before anyone asks, I should note that I am not in any way affiliated with Design Science, I'm just a satisfied user of their product.

Matt
Wednesday, February 04, 2004

Sounds like you have some flexibility in design

I don't know if this works for you

But what about using pictures (images) to display equations?


I guess for input, you'd be limited to multiple choice type answers if using this approach

S.Tanna
Thursday, February 05, 2004

*  Recent Topics

*  Fog Creek Home