Whenever an argument delimiter is used inside the argument, the argument
needs to be grouped, that is
\cites({text (text) text})
or
\cite[{text [text] text}]
This fixes the original case reported in #2751 which is independent
from the general issue that the pre- and postnote field take literal
code.
It seems that QTextLayout does not handle properly a single character
with 0 width. This breaks drawing of things like \not.
No status line needed as this amends 24648404.
PLEASE work in branch for the doc files. There is no reason not to release improved manuals with the next bugfix release. Only new features of LyX 2.3 are only for master.
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".
(cherry picked from commit 25e6b5da39)
The QTextLayout handling is terribly slow on Qt 4.8.7, but some
caching has been added in Qt5 that makes it much faster. For some
reason, it is not that slow with Qt 4.8.1.
Caches are introduced for the three following methods
* width(doctring), controlled by CACHE_METRICS_WIDTH. This cache already
existed, but the code has been cleaned up
* getTextLayout, controlled by CACHE_METRICS_QTEXTLAYOUT (disabled by
default on Qt5, which does its own caching). This is used for pos2x
and x2pos and now for drawing of text too. The previous code used a
trivial caching scheme of the last used QTextLayout, but now they
are properly kept in a QCache. Moreover, the cacheEnabled() property
is enabled for these QTextLayout object (not sure what this does).
* breakAt, controlled by CACHE_METRICS_BREAKAT. This is the only user
of QTextLayout which did not have some kind of caching already.
For some weird reasons related to Argument-dependent look-up, the
qHash(docstring) function has to be defined in std namespace, since
lyx::docstring is actually std::basic_string<wchar_t>.
(cherry picked from c5119c97fc)
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
The XHTML entries were added in the wrong field, if they are given we need
extra xhtml requires. The order is inconsistent, there are discussions on the
list about that but for now I'll use the existing order to fix the export tests.
The format of the lib/symbols file does not support "" for empty strings.
One would have to use x for fields that are not set (this is a hack), but
actually we know how to fill the extra field.
(cherry-pick of commit 338cef2a)
* Adjoining closing Single + double quote becomes double + single quote
(for English, Swedish and German, LaTeX export as ''').
* French double quotes are converted to << >> in the LaTeX file and to
double inverted question/interrogation marks in the output, if the font
encoding is set to [None] or OT1 but the global default is T1. (test
for lyxrc.fontenc instead of the document-specific fontenc setting in
InsetQuotes.cpp).
* Quote type ignored for LyXHTML: always "English" quotes used.
See #10451
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