0

I'm working on an application written in C# to help determine dimensions on cables and fuses for my electrical engineer study.

The calculations consists of a lot of complex numbers, square roots and fractions, nothing really extraordinary.

The only problem I'm having is, to be able to use this in an exam situation, I will need to print the formulas, formulas with numbers inserted and the result.

Having never done ANY printing from a C# application I'm a bit lost here, can anyone guide me in the right direction?

If the result could look somewhat like what an equation looks like in equation editor that would be absolutely perfect.

It would need to be done somewhat dynamic, as sometimes I have more than 1 cable in an installation, sometimes a lot.

I've googled for 2 days now, but haven't really learned anything valuable.

Thanks in advance, Claus

Claus
  • 3
  • 2
  • 2
    http://stackoverflow.com/questions/4877638/pretty-printing-math-in-c-desktop-application – Mitch Wheat Mar 29 '11 at 14:36
  • Are you using Visual Studio? If so, what version? – CodingGorilla Mar 29 '11 at 14:37
  • Thanks for the helpful comments so far, I've got a bit more researching to do it seems. Was hoping it would be a breeze to do, since I'm time limited already. I'm using visual studio 2010 – Claus Mar 29 '11 at 17:30

2 Answers2

2

Considering that the equations seem to be somewhat complex and that you need them in an academic setting, I would implement a TeX-export and generate a PDF based on the exported LaTeX file, which can be printed. It's a workaround but might be simple enough to fit your needs.

lafe
  • 111
  • 1
  • 2
  • You beat me to the same answer. – ChrisV Mar 29 '11 at 14:42
  • Wow you guys are fast, didn't expect this much attention. I'm using Visual Studio 2010. I will need a bit of plain text inbetween the equations, guessing exporting to TeX and generate a PDF might be tricky then. Unless it could be done from within the program.. – Claus Mar 29 '11 at 17:34
  • Otherwise it would be a perfect solution since i don't need to render it in the program, it's only to give the teacher, so a pdf would be nice. Not sure how I could handle mixing the TeX and plain text. – Claus Mar 29 '11 at 17:38
  • After having looked around, I see tex has no problems mixing text and math. I thank you for your answer, I'll be using tex :) – Claus Mar 31 '11 at 19:44
1

look at this example of an application written in WPF Display equation in WPF

and this TeX

Sergey K
  • 4,071
  • 2
  • 23
  • 34