![]() |
#16 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'll check Linux with the system MathJax 2 later on today sometime (unless someone beats me to it).
![]() |
![]() |
![]() |
![]() |
#17 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
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. |
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
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).
|
![]() |
![]() |
![]() |
#19 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
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).
|
![]() |
![]() |
![]() |
#20 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Glad to hear it works on Linux once the injected url is fixed!
|
![]() |
![]() |
Advert | |
|
![]() |
#21 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
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. Last edited by DiapDealer; 06-15-2021 at 06:03 PM. |
![]() |
![]() |
![]() |
#22 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
|
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 |
![]() |
![]() |
![]() |
#23 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
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? ![]() Last edited by DiapDealer; 06-15-2021 at 06:28 PM. |
![]() |
![]() |
![]() |
#24 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Please push whatever you think best.
|
![]() |
![]() |
![]() |
#25 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
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.
|
![]() |
![]() |
![]() |
#26 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
![]() |
![]() |
![]() |
#27 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Thanks!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Bug] HTML Comments in Preview | Tex2002ans | Sigil | 4 | 08-22-2018 04:48 PM |
dynamically scale MathML equations | user2178319 | Workshop | 1 | 07-01-2015 08:04 AM |
Mathematical Equations in epubs | verydeepwater | ePub | 9 | 08-30-2013 06:49 AM |
Syncing bug in preview window | sellew | Sigil | 13 | 02-26-2013 01:10 PM |
A bug with images in epubs? | Cyclops | ePub | 2 | 09-13-2010 10:57 AM |