Instead of having to add and individually test the versions to check
for, we store the current version and test on that with a specific
function isAvailableAtLeastFrom(package, year, month, day)
Currently only used for the LaTeX version, but could also be extended
for package versions.
If the main language does not require the inputenc package, but a
secondary language does, inputenc needs to be loaded as well
(without options)
Also simplify the code a bit.
File switches with documents are done via \inputencoding.
Other than with fontenc, these do not need to be laoded via options
beforehand.
Also, out current code loaded the additional languages' encoding last,
which might result in wrong encoding settings.
When there is no module, the old code would invoke tex2lyx with option
-m
instead of
-m ""
and an error would ensue.
This is because the QProcess command line parser used in Systemcall is
broken and does not recognize empty parameters as such. The solution
is to rewrite our parsecmd() parser to generate a list of parameters.
This is post-2.4.0 work.
The workaround used here is:
- set the list of modules to "," when it should be empty. In effect,
this is a list of two empty modules.
- change tex2lyx to accept empty module names and ignore them; this is
good in terms of robustness anyway.
Additionally, when there is no receiving buffer, set the defaults as
the BufferParams defaults instead of empty (this is cleaner, but
should not make a difference in practice).
In the long term, we should switch to use the QStringList-based API of
QProcess in Systemcall (see QTBUG-80640).
This quashes a new warning in clang++ 15, when std::move() (the
one-parameter version) is used as simply move(). There is a strong
recommendation from WG21 to avoid that.
Details here: https://reviews.llvm.org/D119670
It might be that we should not use that many move()s. I am not
competent to decide on that.
I also used this occasion to get rid of a spacial casing for C++11
that does not seem necessary after all.
In several range-based for loops, implicit copies are made. Remove
that when possible, and try to shut converity up otherwise.
Fixes issues found by coverity.
- Check the state of the synchronize TeX output option of the document to enable or disable the LFUN for forward-search.
- write synctex macro to TeX source not only for PdfLaTeX
Set colors now apply to the active mode only. Matching reversed colors
are produced for the other mode if no color is assigned yet.
File format change.