See the discussion. The decision was just to keep re-trying for a
bit, since the lock preventing us from removing the old file seems
to clear after a bit.
(cherry picked from commit d96a9aa37f)
Nix (https://nixos.org) is a Unix package manager, which can be used to
install LaTeX on macOS. A peculiarity of Nix is that all packages are
installed into separate directories and the actual directory tree is
then constructed via symlinks.
This interacts badly with the way LyX currently detects files in the
TeX setup, because TeXFiles.py does not follow symlinks. Therefore,
almost nothing is found when using LyX together with Nix’ LaTeX.
Patch from Michael Roitzsch.
(cherry picked from commit 642b4acca1)
Do not replace a latex command with the corresponding symbol
in the unicodesymbols file unless it can be encoded in the
document encoding.
The mhchem \ce inset is a text mode environment but allows entering
spaces and mathmode commands. However, even if it doesn't allow unicode
symbols, LyX allows entering them (by copy/paste, for example), causing
latex errors. As a unicode symbol may have a proper latex representation
from the unicodesymbols file, use it instead of the bare symbol. Here, we
don't care about the mode because both text and math mode should be allowed.
For example, the ⟶ symbol is not recognized but its latex representation
(\longrightarrow) is fine. Of course, there may be symbols that are
not recognized anyway, but this is better because they cause explicit
errors from mhchem instead of cryptic iconv errors in case they cannot
be represented in the document encoding.
A branch inset modifies the layout of the internal structures in
which the text is organized. When a branch is active, it is as if it
was not there, but its only presence makes a paragraph which would not
be the last one to actually be the last one, or the check for the
language of the previous paragraph to fail because there is no
previous paragraph before the first one in a branch inset.
Oney way I found to tackle it, is tracking whether the typesetted
paragraphs are actually part of an active branch inset and acting
accordingly.
The "Rows & Columns" optional submenu is more easily accessible in
the math context menu rather having to navigate to the "Edit" menu.
All possible accelerators are already taken, so use the space bar.
(cherry picked from commit ff7eb0eb38)
Avoid an endless loop when in the definition of a macro the macro
itself is used in the LyX representation part.
(cherry picked from commit 1cb2a443b5)
The current heuristics only considered modules with styles that defined
a searched command in their preamble, and only for commands/environments
that were defined in the document's preamble. This limited the module
support drastically.
The new heuristics also checks for commands coming from packages. If the
command is not (re-)defined in the document preamble, it checks modules
that provide a style with a matching LaTeXName, checks for their
requirements and matches those with the packages loaded by the document.
If no module provides a searched style, but we found modules that load
packages that are loaded in the imported tex file, and if those packages
are not auto-loaded by LyX anyway, we also load this module.
fixes: #11259, part of #8229
(cherry picked from commit 0b54650f0e)
This is a much less invasive version of da2696cc+da2696cc, which
reduces the risk to a minimum. There may be other Row members that
need resetting, we'll see that later.
Fixes bug #11396.
This is hardcoded for now for simplicity and to allow backporting to
2.3.
The behavior is unchanged for all languages but Chinese, Japanese or
Korean.
Fixes part of bug #10299.
(cherry picked from commit 26c2811cc4)
This seems to be necessary on windows, where math editing can get very
slow. Note that other methods like rbearing already use a cache.
In the future all these caches for single characters shall be unified.
(cherry picked from commit d3979e798c)
In full screen mode, it is possible to restrict the text width. In
this case, the paint bar should not be painted outside of this
restricted area.
Fixes bug #11286.
(cherry picked from commit 7485225cc6)
Call gunzip with quoted filenames as they may contain spaces or
other special characters.
In computing the length of the extension, the code does not account
for the prefix "unzipped_", which is added when the zipped filename
does not have one of the extensions "gz", "z", "Z", or "svgz", and
thus the used index is out of bounds. See also this thread:
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg207360.html
(cherry picked from commit 69726b832b)
(cherry picked from commit 7296e0e6ba)
To reproduce: Do a search for text in a footnote (say) that is
currently closed. Click inside the now open footnote. It will close
by itself.
We need to know whether we can go into the inset, not whether we can
edit once we're there.
(cherry picked from commit 4484cc7751)
This commit removes the adhoc code in GuiPrefs and moves it to LyXRC,
so that it triggers in every preference change.
The code has also been updated to trigger on more variables, e.g.
font_*_foundry.
Note that the actual function that are called have not been changed
(addPreviews and LFUN_SCREEN_FONT_UPDATE), although there are doubts
that they behave as needed (see FIXMEs).
Fixes bug #11498.
(cherry picked from commit 954531f247)
Now we search in priority with the GUI language, and then the
language(s) specified in the LANGUAGES environment variable.
Preoviously, the GUI language would only be considered when
LANGUAGES was not set (which was a bug).
Take this opportunity to remove old compatibility code from 2007.
(cherry picked from commit e203bf519b)
When splitting parameters at commas, take into account that
commas inside curly braces are not parameter separators.
(cherry picked from commit 6316b9b7ae)
Otherwise, we will ask about it again next time, when the file
may have changed. Also, if we crash again, we'll over-write that
file, which we may not want to do.
See bug #11464.
(cherry picked from commit b804e8851c)
The PATH prefix modified through the GUI was set without
replacing embedded environment variables. This might have
caused problems on Windows with external python installations.
(cherry picked from commit 472bdf5910)
This adds a new (boolean) parameter "active" to the label cache, where
we track whether a label is deleted in ct mode (the same could be done,
if wanted, for labels in notes and inactive branches).
Deleted (inactive) labels are neither considered in the uniqueness check
nor added to the outliner. This also means that undeleted references to
deleted labels are now (correctly) marked as BROKEN.
Cherry-picked from:
[3ae6bff538/lyxgit]
[a550a613e8/lyxgit]
[c457ea90e/lyxgit]
[5cfd25697/lyxgit]
[5afacb144/lyxgit]
[54366c38e/lyxgit]
Fixes: #6563
If we use that, the document actually needs to be in utf8 encoding, and
the CJK environment needs to account for it.
Candidate for stable.
(cherry picked from commit d193cd05a8)
The column is flushed when the display of equations is flushed.
Not sure what to do with RtL languages.
Fixes bug 11324.
(cherry picked from commit 7cb0284a3f)
This broke the activation and de-activation of plural, capitalize,
etc. I guess that tells us how much those get used....
(cherry picked from commit 9b3f9cc687)
In particular, introduce the new InsetMathScript::allowLimits method
that checks for that and honor it in getStatus/ddoDispatch.
Do the same for (over|under)brace
(cherry picked from commit 7b7ed64a0e)
(cherry picked from commit 6cfd733dea)
For some reason, adding a LTR/RTL Override unicode character before a
MinionPro string increases the ascent of the line.
This creates vertical offset issues when painting if the ascent used
as reference is the one of the font. Use the QTextLine ascent instead
for better results.
This is a followup to 1bed76e2a.
Fixes (reopened) ticket #11284.
Fixes ticket #10532.
Fixes ticket #10767.
(cherry picked from commit d8498d4785)
We need to do this unconditionally, since there is no (trivial and non-
awkward) way to update it when the bibliography paragraphs are modified.
Fixes: #4899
(cherry picked from commit 35534231d4)
When blinking the caret, it looks like a cool idea to only update the
small rectangle containing the caret. Actually it is an awful idea, since
the paint event will paint some rows, and these rows will not be
properly painted outside of the small rectangle. Unfortunately, the
painter will skip those "painted" rows on next paint events.
This leads to painting errors that depend on the ordering of "real"
and "caret" paint events. This is the reason why they only appeared
with split screens.
Quote of the day: ``The real problem is that programmers have spent far
too much time worrying about efficiency in the wrong places and at the
wrong times; premature optimization is the root of all evil (or at
least most of it) in programming.''
-- Donald Knuth, The Art of Computer Programming.
Fixes bug #11354.
(cherry picked from commit fba9f5b9e8)
Eventually, all overridden virtual methods should be marked properly.
Currently, clang only warns about those in classes that already use
override in at least one place (which was the case dor GuiApplication).
(cherry picked from commit c8f4b68423)
Outsource the bibliography to an own child, which is then also included
in the children's "Standalone" branch
Add some clarifying notes.
Fixes: #10748
(cherry picked from commit 12aaeb259f)
We used to need a hack to set the size of the layout combo, but
the code was changed in Qt 4.5 or so. Hence the appearance of this
bug in 2009. We can now just remove this hack, and all seems to
work correctly.
(cherry picked from commit d7f4346a19)
I'm not entirely happy with this way of doing it. It seems messy.
But there is not another clear option right now.
(cherry picked from commit 4f0ccae399)
We need to load the master document before applying the params, since
otherwise the TOC reset (and other things) happen before the master
has been loaded (and set as parent).
(cherry picked from commit ac3693c04f)
Spaces are now conserved when they surround current cursor. Examples:
abc | def
becomes
abc | def
after DEPM and
abc |
is kept as it is.
Fixes ticket #11412.
(cherry picked from commit dff0c5729e)
Enclose in braces an optional argument of a math macro when it
starts with an incomplete script inset or ends with a delimiter
size-modifier macro.
(cherry picked from commit 2dcb730026)