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.
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.