Dear developers,
On Arch Linux, the file template-preamble.tex is looked for at /resources/templates/template-preamble.tex by MainWindow::newEquation, line:
QFile f(":/resources/templates/template-preamble.tex");
Indeed, if I printf f.fileName().toLatin1().data(), I get that path above. What I did to work this around is to define TEMPLATES_PATH with value "/usr/share/equalx/resources/templates" in defines.h, right after line 83. Then, in MainWindow::newEquation, I replaced the code above with:
QFile f(QString("%1/template-preamble.tex").arg(TEMPLATES_PATH));
just like what is done in MainWindow::setSymbolsPanel to read the file symbols.ini using the constant SYMBOLS_PATH. Of cousre, I also created the folder /usr/share/equalx/resources/templates, and copied the file template-preamble.tex into it.
Hoping this is relevant.
Let me also use this message to kindly request a "feature" related to this topic: it would be nice to have a local version of this template file, on top of the factory version /usr/share/equalx/resources/templates/template-preamble.tex. For example in:
~/.config/equalx/resources/templates/template-preamble.tex, with this user version having priority over the factor version, as is usual. Moreover, the context menu in the preamble area of equalx ui could exhibit a "save" option whenever the preamble has been modified (and/or a similar procedure using the menu and/or the preference window for example).
Best regards
Eric