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.
About removing the changeEnsureMath in MathMacro::{metrics,draw} : as it is only
called in edition mode, it only happened for user macros for which no ensureMath
is needed anyway. ChangeEnsureMath should indeed be applied for global macros,
but since they are linearized there is no obvious place to call it.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg198191.html
The root of the issue is in Buffer::reload() called during "Save As". After
loadLyXFile() there, all the insets have been deleted, and therefore the Inset
pointer GuiView::documentBufferView()->cursor().inset() is dangling. Immediately
after loadLyXFile(), reload() calls updateBuffer() which causes a segfault.
While debugging I got other segfaults caused by the same dangling Inset pointer
in Cursor, notably: 1) a trace identical to the second one from
<http://www.lyx.org/trac/ticket/10520>, and 2) a similar segfault in the
critical path after emergency saving (call to inMathed()).
Having to "refresh" by hand the inset pointer cache in CursorSlice is very
unsatisfactory, but there does not appears to be a consistent strategy for
managing these Inset pointers in CursorSlice.
We use the more comprehensive cochineal package if available and fall
back to the crimson package, if not.
Math support is provided by means of newtxmath
Fixes: #9974, #9976
From: "Joel A. Kulesza" <jkulesza@gmail.com>
Date: Mon, 24 Oct 2016 17:37:58 -0600
Subject: [PATCH] Add "Swap & Reverse" to math delimiter dialog
When "Keep matched" is unchecked, a button becomes enabled to "Swap &
Reverse" the left and right delimiters. This is expected to be of use
with line-wrapped equations featuring one or more set of delimiters that
break across the lines. When "Keep matched" is checked, the button is
visible but disabled.
The most common use case is expected to be the user entering a pair of
unmatched delimiters on the first line of an equation (e.g., "(" and
"(None)"), entering the inner text, going to the next line, and
inserting the opposite set of delimiters (e.g., "(None)" and ")").
This button will negate the need to find the correct corresponding
combination. However, it relies on the dialog's memory of the previous
unmatched set.
This change addresses Ticket #10457
-----------
Modifications by spitz to the original patch:
* Only enable the button if an unmatched pair is selected
* Consider l7n when locating the string "(None)"
* Add an accelerator and a tooltip to the dialog
* Simplify the code a bit
Fixes: #8831
This introduces
* a new inset member isPartOfTextSequence() that returns
whether the inset produces something visible at the current position
in the text flow
* an isOpenPunctuation() test that returns whether a character is in the
'Punctuation, Open' unicode class. This is used instead of just checking
for two (Western, ASCII) opening brackets
It also fixes the isChar() and isLetter() value of InsetSpecialChar,
since some types have not been assigned correctly.
* b `british' (``inner quotation'')
* w >>swedishg>> ('inner quotation') ["g" = Guillemets]
* f <<french>> (``inner quotation'')
* i <<frenchin>> (<<inner quotation>>) ["in" = Imprimerie Nationale]
* r <<russian>> (,,inner quotation``)
Rename "french" to "swiss"
Also rename "single/double" to "secondary/primary" ("inner/outer" in
the UI) and "left/right" to "opening/closing". Note that the inset
identifier string is left as is ("s/d" and "l/r")
The current char-based implementation gets increasingly unreadable,
especially if styles are added that do not follow the strict
single-double paradigm.