The goal of this patch is to be able to properly remove the space
needed for markers in the case of insets that are inside macros and do
not need these markers. This was attempted at 9a9a6a8, but did not
work reliably.
To this end, the following simplifications are made:
* instead of drawing its own markers, each inset has a virtual method
marker() which prescribes either NO_MARKER, MARKER (normal bottom
marker) or MARKER2 (top and bottom marker). All explicit calls to
(draw|metrics)Markers(|2) are removed.
* the space necessary for the markers is now counted in the
before/above margins in the row structure. Therefore painting will
not happen at (x + 1, y), but just (x,y).
* the methods drawDecoration are removed.
* the helper methods InsetMath::(draw|metrics)Markers(|2) are removed
and replaced by a new function drawMarkers in MathRow.cpp.
Now the marker type is kept in the MathRow::Element object (and set to
NO_MARKER in not editable context) and the marker is accounted for in
MathRow::(metrics|draw).
Moreover, the extra pixel for the marker is taken on the before/After
space if possible. The marker will only require extra space when
before/after is 0.
See comment 168 of #8883 to understand what issues are fixed.
The rewrite of macro_nesting done at 0f15dcc6 was faulty, in
particular since the information should be available also at draw
time. To this end, we revert the patch of the said commit that removes
macro nesting information from MathRow::Element. In the next commit,
we will change the marker code so that MathRow::draw does not need the
nesting information.
Actually the code is now cleaner since the macro nesting stack of
MathRow::metrics can be removed.
New file: ignoreLatexErrorsTests
The sublabels in this list of export-testnames specify which error
messages should be ignored.
For each sublabel (for example "xxx") the lyx-command line is expanded with
"--ignore-error-message xxx"
I don't know what happened with the version in master because it contained outdated sections I already removed months ago in branch. I can also not see new inf that is special in LyX 2.3dev.
Therefore I re-sync hereby with the version in branch.
As I often request: please change the doc files in branch, only new features of LyX 2.3 are master-only because there is no reason not to update and improve the docs for every LyX release.
When cloning InsetExternal, the tempname_ member of InsetExternalParams
has yet to be initialized. So, trying to remove it causes the warning
"QFile::remove: Empty or null file name".
No one seems to have been adding them `thematically', and it's too
hard to know how to do that, anyway. This at least makes it easier
to scan through the list.
I have verified, by re-generating LFUNs.lyx, that no significant
changes have been made here.
inset.
If the reference is "sec:mysec", then this will output just "mysec".
This is what is needed, e.g., to use refstyle's range commands, e.g.,
\secrangeref{mysec1}{mysec2}
You *cannot* use:
\secrangeref{sec:mysec1}{sec:mysec2}
even if those are the actual labels.
Eventually, I'd like to add native support for this, but I'm a bit
frightened of trying to make the reference dialog support multiple
selections.
Copy-pasting $#\n$ from text to LyX gives the error message:
MathMacroArgument::MathMacroArgument: wrong Argument id
and it is not hard to get a crash soon after.
There are legitimate uses of # not followed by 1..9 in LaTeX and it is good to
parse them correctly when importing from LaTeX.
Following discussion on the list:
https://www.mail-archive.com/lyx-users@lists.lyx.org/msg103012.html
This defines a new behaviour for Ctrl[+Shift]+Arrow in math:
* Left/Right does not enter insets
* Left/Right jump groups of insets that have the same math class ("words")
* Enable Up/Down for consistency.
This was missing for macros defined in lib/symbols. This only affects the
equation splitting since global macros are always linearized. This fixes#10107.
Testcase: Define a math macro \AA, overriding the definition of \AA from
lib/symbols, then insert it in math mode.
* Before this commit: \text{\AA}, and \lyxmathsym{\AA} after deleting \text, but
displayed like \AA.
* After this commit: \text{\AA} is inserted, but one gets \AA after deleting
\text. The output is now consistent with the display and the meaning.
* Expected: only \AA is inserted. This is unfortuately not what one gets; for
this to work, the scope of the macros would need to be resolved upon creating
the inset.