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 is a mode for includeonly handling that is effective and still outputs
at least mostly correct counters and references. This is intended for non-
final editing work.
File format change.
This revives a patch by Uwe and extends it. Additional options to font
packages/fontspec can now be entered in Document Settings.
This is principally also true for TeX fonts, if the new TeXFont tag
MoreOptions is set. For the time being, I have only done this for
MinionPro, as a model and prove of concept.
Note that adding more TeXFonts requires a file format change,
respectively, and changes to tex2lyx (in the same way as I've done for
MinionPro).
This addresses #8226
As opposed to modules (from which the framework was initially borrowed),
we only allow one cite engine per document. Thus, we don't need to fiddle
with lists.
It is now possible in the float settings (doc dialog) to specify a global
(inner) alignment for floats, and in the float settings, this can be
overridden (just as with float placement)
Fixes: #8665
File format change.
Allow a LaTeX backend to run external commands after user confirmation.
This is a per document and per machine setting. The authorization has
to be given through the document settings pane, but is not recorded in
the document itself. Moving the document to either another computer or
another directory on the same computer revokes the authorization.
This can also be done by right clicking the red icon that appears in
the status bar when a document is marked as one requiring shell escape.
The patch also checks whether the user has added the -shell-escape
option to a LaTeX converter and nags the user to remove the option
(which would be used for all documents) in favor of the (per document)
support offered by LyX.
Update the listings inset to optionally use the minted package
(instead of the listings one) for typesetting code listings.
Only one of the two packages can be used in a document, but it
is possible to switch packages without issues if the used options
are the same. If a switch is made and the options differ, one needs
to manually adjust them if they were entered in the advanced options
tab, or apply again the gui settings.
Note that minted requires the -shell-escape option for the latex
backend and the installation of additional software (python pygments).
With these changes, equation numbers are shown properly on screen.
When setting is default, we guess the side using these two rules
* ams(art|book) and siamltex classes are leqno by default. This is
signalled because the classes provide "leqno" (in amsdefs.inc). If
there are other classes that do this in output, the relevant classes
should be updated.
* the language arabic_arabi also sets leqno by default. This is
currently hardcoded for lack of a better idea.
Besides, a few bugs are fixed:
* use mathrm instead of mathbf for numbers metrics
* set spacing between maths and labels in inches
This commit replaces the string math_number_before by a proper math_number enum.
Note that the _before naming was misleading. It was chosen at a time
when we were not sure whether leqno was always left or could be right
in RtL documents.
Note that the token in LyX document is still \math_number_before and
this should be changed.
Fixup for 19cc4a1f.
as discussed our support for the formula numbering side should be complete. There are document classes that uses left numbering as default and with the class option "reqno" this can be changed to right numbering. reqno requires the loading of amsamth.
Use Length instead of HSpace for math_indentation and rename it to mathindent.
Get rid of the string version.
Rename (g|s)etMathIndentation() to (g|s)etMathIndent().
Remove the HSpace class altogether.
Some cleanups to parindent support to look like mathindent.