Tweak the algorithm so that a BOX math row element can have some
spacing. To this end, MathRow::before/after do not look at the type of
an element for deciding when to skip it, but rather to its math class.
In the new setting, the spacing algorithm works on all elements, but
skips the MC_UNKNOWN elements as if they were not present. As a
consequence, the two element types BEGIN and END have been replaced by
a single DUMMY (they can be recognized from their class).
To simply the code, add a new `mclass' argument to the
MathRow::Element constructor (default is MC_UNKNOWN).
Macro nesting is now recorded into the macro inset itself. This allows
the ArgumentProxy inset to determine whether it is editable or not by
looking at its macro.
Remove code in the metrics and draw methods of ArgumentProxy: this
code is AFAICS not active anymore, since arguments are linearized into
math rows.
Use Changer idiom to change locally the values of MecticsInfo::base.macro_nesting.
This is a long standing issue, present since the new math macros
inception in version 1.6. It manifests as a display issue when a
macro with optional arguments appears in the optional argument of
another macro. In this case the display is messed up and it is
difficult, if not impossible, changing the arguments as they do not
appear on screen as related to a specific macro instance. It also
manifests as latex errors when compiling, even if the latex output
is formally correct, due to limitations of the xargs package used
to output the macros. Most probably, both aspects have the same
root cause, as simply enclosing in braces the macro and its
parameters solves both issues. However, when reloading a document,
lyx strips the outer braces enclosing a macro argument, thus
frustrating this possible workaround.
This commit solves the display issue by correctly accounting for
macros with optional arguments nested in the argument of another
macro, and circumvents the xargs package limitations causing errors
by enclosing in braces the macros with optional arguments appearing
in the argument of an outer macro when they are output. This means
that when loading an old document with such macros and saving it
again, the macro representation is updated and will have these
additional braces. However, as such braces are stripped by lyx on
loading, there is no risk that they accumulate.
See also this thread:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg197828.html
The missing character problem is fixed upstream.
Also fix the scaling of the \sun-symbol-index by wrapping the symbol in \text.
(wasysym's \sun is valid in text and math mode. LyX currently adds a spurious \ensuremath.)
As Enrico pointed out in http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg131411.html, the loading error of testcases_speed.lyx is caused by tags from a LyX development version that were later removed but never handled in lyx2lyx.
LaTeX export still fails with
! Argument of \xargs@grab@opt has an extra }.
These tests are "unreliable" and thus their export status contains
less information than reliable tests. However, it contains some
information and could still be used to find regressions. This commit
helps keep the output of a vanilla "ctest" command clean.
See discussion here:
https://www.mail-archive.com/search?l=mid&q=20161127205800.epvjxkeri5yoeqwj%40steph
This fixes the "bad keming" of math ERT (in fact wrong metrics) which recently
was worsened by InsetMathChar substitutions and their MathClass spacing.
Also fix a small inefficiency: always prefer:
Changer dummy = (currentMode() == TEXT_MODE)
? pi.base.font.changeShape(UP_SHAPE) : Changer();
over:
Changer dummy = pi.base.font.changeShape((currentMode() == TEXT_MODE)
? UP_SHAPE : pi.base.font.shape());
The former only records and restores a value when the condition is satisfied,
and does not cost anything otherwise.
- Allow using logical values for icon sizes as the standard sizes may
differ among different icon sets
- Do not allow setting sizes smaller than smallIconSize
When the logical sizes differ and the icon set is changed, the correct
sizes are established only after a restart.
MiKTeX made a major package cleanup during the last 2 weeks. (Which caused a lot of troubles btw.) Many packages were removed and renamed. Now the list is complete again.
Addressing #10481.
This patch adds the new 'needauth' option for converters launching
external programs that are capable of running arbitrary code on behalf
of the user. These converters won't be run unless the user gives explicit
authorization, which is asked on-demand when the converter is about to
be run (question is not asked if the file is cached and calling the
converter is not needed).
The user prompt has a 3rd button so that he/she's not prompted again
for (any converter over) the same document (identified through
buffer->absFileName()).
Two preference options are added:
lyxrc.use_converter_needauth_forbidden disables any converter with
the 'needauth' option, which is meant to force user to an explicit
action via the preferences pane, before being able to use advanced
converters that can potentially bring security threats;
lyxrc.use_converter_needauth enables prompting the user for 'needauth'
converters, or bypasses the check if not enabled, falling back to the
previous behavior.
So, the first option is for maximum security, the second is for
maximum usability.