English 中文(简体)
Is there a library for Visual C++ that renders math formulas?
原标题:

I ve been looking all over, but I can t find anything free that will let me simply display math formulas on a window. I found one for Visual C++.net, but no APIs. Are there any out there?

问题回答

What format are the Math formulas in?

My first impulse would be to try and find a LaTeX library for C++ which will let you render out LaTeX to an image. That way you could display most basic formulas, but the formulas would have to be in the LaTeX format.

Try ReforMath (http://reformath.webnode.com). Runs under both Windows and Linux. It is unfinished though, but can render a number of elements.

What a great question! Yes, there is now: latexpp.

You ll have to install VS 2017 Community first with the minimal amount of C++ features checked (so it doesn t take all day).

Then you install Boost using the binary (try the latest).

But you still have to build boost. By using the VS > Tools > Visual Studio Command Prompt. CD to your boost directory and run .ootstrap.bat, then .jam.exe. This will take all day.

Good news is it seems to be working so far on Windows 7, 64-bit with VS 2017 community and the latest boost 1.6.x.

The Latex library has other requirements, and I still haven t tried it but will post my notes here if any hickups.


Make sure all your directories are short, such as C:VisualStudio2017. However, boost will then fail if you use your regular windows command prompt unless you do the vcvarsall.bat trick. The VS Command Prompt does that for you, so that boost can find your MSVC stuff. Boost would still probably fail if you used the default directory and didn t use the VS command prompt.

So, again, my boost is in C:oost_{blah version} which you should shorten to C:oost assuming you ll only use one version of boost.

One reason is that if you have to add the respective /bin directories to your system Path, then you won t fail by maxing out the length of Path value (yes, it has a max length). Also stuff is easy to find and especially from the command line so you can cd quickly there. If you don t want everything in C: then make a C:\__TOOLS or something short.


I will post my notes here when I ve gotten LaTeX rendered.

Notes

  • When building boost with bjam, if it seemingly hangs for more than 10 mins on one item, then hit ctrl-C at the command line once. This seems to unhang it without canceling the install.
  • TODO




相关问题
how to reliable capture display setting changed

static void Main() { // Set the SystemEvents class to receive event notification when a user // when display settings change. SystemEvents.DisplaySettingsChanged += new ...

Why use CComBSTR instead of just passing a WCHAR*?

I m new to COM. What exactly is the advantage of replacing: L"String" with CComBSTR(L"String") I can see a changelist in the COM part of my .NET application where all strings are replaced in this ...

COM Basic links

folks can you provide me the tutorial link or .pdf for learning basic COM?. i do google it.. still i recommend answers of stackoverflow so please pass me.. Thanks

Statically linking Winsock?

I m using Winsock 1.1 in my project. I include wsock32.lib in "Additional Dependencies". I m looking at the DLL project using depends.exe and notice that the DLL depends on wsock32.dll. How can I ...

热门标签