![]() |
I'll check Linux with the system MathJax 2 later on today sometime (unless someone beats me to it). ;)
|
OK. The bad news is that regardless of this latest change, MathJax rendering isn't working at all with the system mathjax2 on my Arch system. Even with the stock pacman version of Sigil 1.6.0. Inspector shows that the local config is being properly installed and found.
I'll need to find out what's going on there before I can test the latest Preview sync changes. |
I take that back. The mathjax url isn't being properly built whenever the system mathjax is being used. There's a path separator missing. It was probably the last change we made to get Mathjax working again on Windows. It works for the bundled mathjax build, just not when the -DMATHJAX_DIR= cmake directive is provided (and the provided path doesn't end with a forward slash).
|
Other than that, it looks like your latest MathJax sync fixes will indeed work with the Linux system mathjax2 (once I figure out what's going wrong with the url building under that special-cased situation).
|
Glad to hear it works on Linux once the injected url is fixed!
|
Yeah. We broke mathjax rendering on any repo versions of Sigil that specify -DMATHJAX_DIR (which may only be Arch right now) starting with Sigil 1.5.1. It's a pretty easy fix, but I want to make sure it's handled in a way that doesn't change how packagers specify the system MathJax location in their existing build scripts.
Everything will already work on Linux for those who use our bundled mathjax. It's only the packagers who debundle with -DMATHJAX-DIR who are affected. |
Given the code in MainWindow.cpp, mathjax_dir needs to end with a '/' or we can not just append MathJax.js
Perhaps we check if mathjax_dir.endsWith('/') and if not append one for linux/unix |
A *nix check for the slash might be best. Otherwise, a broken url with two forward slashes is technically possible if someone provides a path that end in a slash via MATHJAX_DIR (and we automatically append one in all cases).
Why is there nothing as handy as Python's os.path.join, so we could avoid concatenating with slashes altogether? :D |
Please push whatever you think best.
|
I like your idea of checking if it ends with a slash, and adding it if not (*nix only). That's probably what I'll do.
|
|
Thanks!
|
| All times are GMT -4. The time now is 10:31 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.