latexpp icon indicating copy to clipboard operation
latexpp copied to clipboard

Version of V8 working

Open florian-jean opened this issue 7 years ago • 6 comments

Hello,

I just compiled and linked the static library of google V8. However I get some errors of undefined functions for example auto context = v8::Context::New(_isolate); in latex.cpp gives the error expected unqualified-id before ‘new’

I wonder if my version of V8 is too new and latexpp has deprecated functions

Thank you

florian-jean avatar Mar 26 '18 13:03 florian-jean

You can find the version I used to compile this in https://github.com/goldsborough/latexpp/blob/master/examples/image/Makefile

goldsborough avatar Mar 26 '18 18:03 goldsborough

Thanks for your help. I found the problem, I didn't include in a right way the v8 libraries which have a circular dependency.

Althrough, importing latexpp with a newer version of V8 compile but make it crash at launch ! It misses an initializer for newer version of V8

v8::V8::InitializeExternalStartupData(argv[0]); Check this

florian-jean avatar Mar 28 '18 08:03 florian-jean

I had a problem that was that katex was not found. I ended up hardcoding local path of katex in the latex::to_complete HTML html += "

\n\n"; html += "<link rel='stylesheet' href='katex/katex.min.css' + >\n"; html += "\n";`

I also had problems of dependency hell due to wktohtml using newer version of libpng and libjpeg than my gui toolkit Wx.

I ended up implementing bmp generation of image as the same way latexpp generate jpeg, png and svg. That is a really easy implementation as wkhtmltoimage can already export to bmp format.

I suggest implementing thoses fix to the project. (plus the v8 initialization fix).

Thanks for this wonderfull library !

florian-jean avatar Apr 06 '18 08:04 florian-jean

Sounds great. Feel free to send a pull request with your changes and bmp support if you like :)

goldsborough avatar Apr 06 '18 17:04 goldsborough

Hi @florian-jean,

Do you have a repository with your modifications?

Thank you

himito avatar May 12 '20 11:05 himito

Don't need the 4.5.103.35 version. Just the latest is good. Because the old version is hard to build

slc1112 avatar Apr 02 '21 02:04 slc1112