Do not assume that the /systemlyxdir path prefix in \origin refers
to the system directory of the running instance, but check through
some heuristics what the real system dir is. In this way, a document
in the system dir of any other LyX installation is correctly spotted
and the \origin tag properly updated. For example, one can use an
installed version of lyx to edit a document in the lib/doc dir of a
git repo and obtain the same result as when running lyx in place.
(cherry picked from commit ade098e2896bd9d7d87b3df1a9276661dd3f7c78)
If the first character in the first cell of an aligned math environment is
'[', and the environment does not use top or bottom vertical alignment,
then LyX did write the '[' unprotected so that it got misinterpreted as
optional argument, both when reading the .lyx file in LyX and when reading
the .tex file in LaTeX => data loss!
The fix is to output an empty optional argument in this case, which is
interpreted as default alignment both by LyX and LaTeX. It would also be
possible to output \[ in the first cell instead, but this would be more
difficult to implement.
This is a fixup to commit 39329935. The two fixes are
* add forgotten offset `y' when drawing the line
* in order to have a continuous vertical line, draw from the offset of
the previous row.
Fixes bug #10363.
(cherry-picked from a27ff136)
Now the external material file dialog shows the file types defined in the
template again. Before this fix it did only show "All files (*)".
I don't know what the old syntax was supposed to do or whether it ever worked
with boost::regex, but with std::regex the new one is correct.
It failed in the case where a selection already existed (the anchor would be wrongly reset).
(cherry picked from commit 68d825fed8f34aa98053e6264cf0668d08534549)
This removes the submenu indirection in Insert and the type changer in
contextual menu. Interestingly, the code was there, but it did not
work at all.
(cherry picked from commit e7a33cacf171ee41609d6fe31e19eff6df1691bf
and made compatible with C++98)
When breaking paragraph in an empty top-level paragraph, nothing
happens on screen but yet there is an undo step because the layout is
reset to what it already was.
Avoid this case.
Fixes bug #10089.
(cherry picked from commit 2ad52918da1d0f375bf2831df4c51f6afa7ea448)
Syntax highlighting now provides the appropriate cue that the user preamble is
inside \makeatletter…\makeatother.
(cherry picked from commit 10f6eb2e7eeffc757b7f54059524441e90008240)
The purpose of this custom widget is to allow the use of a QToolBox in a limited
area. The stock QToolBox does not provide a minimum size hint that depends on
the size of the pages; it assumes that there is enough room. This subclass sets
the minimal size of the QToolbox. Without this, the size of the QToolbox is only
determined by values in the ui file and therefore causes portability and
localisation issues. Note that the computation of the minimum size hint depends
on the minimum size hints of the page widgets. Therefore page widgets must have
a layout with layoutSizeContraint = SetMinimumSize or similar.
(cherry picked from commits 576cb5df77604b50175b2410ac006c5c5c110e2b
7e9d0a938bb02510304822f6bce4df3bcfe4bfc9
efbc297b955da58cef7bf2d63dfbc8b2942c671e)
Prevent setRange() from causing a recursive call to scrollTo(). Reduces three
calls of scrollTo() to one call for all scrolling functions of the scroll bar
(e.g. clicking on the arrow, dragging, or clicking somewhere on the scrollbar).
(cherry picked from commit 4d7b912ca1890b5b0b3ed29568b7091a7e7baef0)
This was a regression from 2.1.x in LtR mode, and it never worked correctly in RtL mode.
Fixes bug #10344.
(cherry picked from commit 07c7dae367aea2ebc6486d1cc67b11c409f2d8a0)
Since we process layouts sequentially, we export LaTeX code for the
title once we arrive to a layout that has InTitle false. If the
document then later has a layout with InTitle true, we do not
(currently) go back to add it to the title and just output it
in-place. We previously warned with LYXERR0, but since this can
cause missing or unexpected output we now warn in the GUI.
For more information, see the following lyx-devel thread:
https://www.mail-archive.com/search?l=mid&q=a65ae226-d3bd-8fc5-a93b-7bb23f1cda82%40lyx.org
(cherry picked from commit 0b1cf1330d850b21313f5e68a83bb5053e52e6ec)
The name of the layout is now included in an error message about
layouts. This will help with finding the root issue of several
documents we have.
(cherry picked from commit c949268da7a56368cf848199f37659c218a57808)
On Windows, runCommand has never returned the exit code of the
spawned process but the result of correctly closing the input handle.
Fixes#10327
(cherry picked from commit fb46b3a1ee642b66b9712c6f376f543c47a2695e)
There was an oddity in the manual that exposed a problem with the
test for the "special case" of an inset all by itself in a pargraph.
If a font change is applied to that inset, we still need to open the
paragraph.
(cherry picked from commit 3be23d18b64d1409d14e0c1c95f4192e9a23e543)
care of much of what we need to do for RTL languages. It does not
take care of inline language changes, probably.
(cherry picked from commit 07dcb1c525435c6f22de4314ba31150c53502429)
As of this commit, this is ineffective, since no changes have been
made to external_templates.
(cherry picked from commit daf7cd4c05f55c7eb957df7076ec91dcd2eca543)
The second argument here is the length of the string to replace,
not the position of the final character.
(cherry picked from commit 6b97f2c0751ff79fc19ea0e11b4ef957fd71324c)
dealing properly with the paragraph separator tag.
We really need to use that tag as a kind of general marker for which
tags we're responsible for in a given paragraph and which tags we are
not. So the changes to InsetText.cpp use the tag as that kind of marker.
Note that, as of this commit, the User Guide again exports without any
kind of error. I haven't yet checked the other manuals.
This fixes bug #8022.
(cherry picked from commit 31e25c8ec695f864bec3679c3e11495e3011a0e2)
In redoParagraph, this should be done before coping with the insets,
other wise some graphic gliches may occur. This is a better fix for
Fixes bug #10163.
(cherry picked from commit 71374b38c26585dc060e923452f2dd873ef00f15)
Moreover enforce better the lower limit of 10 and avoid overflow due
to unsigned int.
Fixes bug #10212.
(cherry picked from commit 8884c4044d7c1d29526aca7b0be1734231c89207)