Commit Graph

316 Commits

Author SHA1 Message Date
Jean-Marc Lasgouttes
c047dc64bf Fixup 17571104: really avoid empty numbers in toc
For some reason, I missed this one when trying to fix the bug.

Fixes bug #11423.

(cherry picked from commit 5a22b2e391)
2019-07-07 13:23:45 -04:00
Richard Kimberly Heck
ad4215e462 Fix bug #10091.
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)
2019-07-07 13:15:27 -04:00
Juergen Spitzmueller
53597584e6 Fix nomencl generation with LuaTeX
Fixes: #11571
(cherry picked from commit bf6a7dc38f)
2019-07-07 10:45:41 +02:00
Juergen Spitzmueller
7c673acbb1 \detokenize paths containing ~
(cherry picked from commit d876319e85)
2019-07-07 10:35:55 +02:00
Juergen Spitzmueller
5afb71cb9b Fix import of custom float definitions
Candidate for stable

(cherry picked from commit bda3b6d07e)
2019-07-05 18:47:07 +02:00
Jean-Marc Lasgouttes
b89749ae1d Let TeXFiles.py handle symbolic links.
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)
2019-06-27 23:53:03 +02:00
Enrico Forestieri
a2d181905a Fix bug #11586
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.
2019-06-25 22:23:51 +02:00
Enrico Forestieri
f5510a8a8d Fix bug #11552
Do not write supefluous braces in optionals of a macro when saving.
2019-06-25 22:09:12 +02:00
Enrico Forestieri
911e6412b8 Refined fix for #9633
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.
2019-06-25 21:57:00 +02:00
Enrico Forestieri
7998616edb Properly fix #9616
Now all symbols in the unicodesymbols file having a mathcommand
are not wrapped in a \text inset anymore.

(cherry picked from commit 506324ef9d)
2019-06-25 21:41:21 +02:00
Enrico Forestieri
112616a97b Fix bug #10499
The array environment has to be explicitly parsed in math mode.

(cherry picked from commit 1a286c7910)
2019-06-25 21:33:29 +02:00
Enrico Forestieri
ad8f574277 Fix bug #10498
Use the selection as the argument of a macro also when the
macro has only optional arguments.
2019-06-25 21:27:33 +02:00
Enrico Forestieri
eb66e68ed5 Add submenu to math context menu
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)
2019-06-25 21:21:47 +02:00
Enrico Forestieri
11fd6fe43d Fix bug #11595
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)
2019-06-22 21:48:16 +02:00
Juergen Spitzmueller
053876e7d7 Dutch l7n is back with a big splash
Patch by Niko Strijbol
2019-06-21 12:02:21 +02:00
Juergen Spitzmueller
4cf56383ca tex2lyx: improve module support
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)
2019-06-19 17:23:26 +02:00
Juergen Spitzmueller
019a4fa124 Prevent multiplication of preamble code
Fixes rest of #8229

(cherry picked from commit f51fa38123)
2019-06-19 17:13:16 +02:00
Juergen Spitzmueller
f8eb3b9742 Fix toprule with booktabs/longtable and captions
(cherry picked from commit fe589d5622)
2019-06-19 09:45:20 +02:00
Juergen Spitzmueller
8941ec4b42 update buffer after fixBiblio
fixes: #2743
(cherry picked from commit 0a4686d8d3)
2019-06-19 09:23:52 +02:00
Juergen Spitzmueller
86f999097e reset bibitem counter in the second updateBuffer() routine as well
Fixes: #8499
(cherry picked from commit 9370135c3e)
2019-06-19 09:20:25 +02:00
Richard Kimberly Heck
4e28ebea31 Open for 2.3.4. 2019-06-18 18:14:22 -04:00
Jean-Marc Lasgouttes
bc54a55491 Cell in delimiter inset should not be tight
Fixes bug #11337.

(cherry picked from commit 4da19ef833)
2019-05-25 14:15:38 +02:00
Jean-Marc Lasgouttes
49255788ea Always paint text decoration when painting inset.
Fixes bug #11402.

(cherry picked from commit 621c908f85)
2019-05-24 10:36:13 +02:00
Jean-Marc Lasgouttes
bbe7b84f3b Reset change bar information when breaking row
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.
2019-05-24 10:21:43 +02:00
Enrico Forestieri
a5f5985d28 Fix bug #11528
The code was not doing what said in the description.

(cherry picked from commit 45e0ce2372)
2019-05-20 22:07:59 +02:00
Juergen Spitzmueller
b90638ccc3 Update Swedish localisation 2019-05-19 14:05:26 +02:00
Richard Kimberly Heck
91cfd0b535 Update Brazilian Portuguese translation. 2019-05-15 22:43:27 -04:00
Jean-Marc Lasgouttes
7686af1ba8 Some Asian langagues allow to wrap text at any position
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)
2019-05-15 18:26:08 +02:00
Jean-Marc Lasgouttes
23505a8a91 Newly created inline math is not numbered
The bad initialisation created phantom entries in equation ToC

Fixes bug #11423.

(cherry picked from commit 175711046d)
2019-05-13 10:05:33 +02:00
Juergen Spitzmueller
f6c0c1ee35 Enable optional \cite* arguments in biblatex-natbib
(cherry picked from commit 6a4199ed23)
2019-05-13 09:25:31 +02:00
Richard Kimberly Heck
679f136eb6 Update Russian translation. 2019-05-11 16:30:37 -04:00
Juergen Spitzmueller
b50949b472 Only write btUnits if we have a bibliography
Fixes: #11562
(cherry picked from commit b77094a497)
2019-04-24 07:32:07 +02:00
Juergen Spitzmueller
43c31f4e0e Revive Bulgarian localization 2019-04-23 13:33:04 +02:00
Juergen Spitzmueller
4104cd13a5 Fix renaming of citation refs after changing bibitem key
Fixes: #6494
(cherry picked from commit faefee3dc6)
2019-04-22 09:18:29 +02:00
Juergen Spitzmueller
6f8673bcee Pass proper text to TeXOnePar in Paragrapgh::Private::validate
This fixes InPreamble layouts in insets (#11557)

(cherry picked from commit 4f884fc92d)
2019-04-21 08:03:22 +02:00
Juergen Spitzmueller
ccf93fc0d6 Use proper listings font styles with polyglossia and RTL
Fixes: #11554

Also load color with minted and polyglossia/RTL, as minted loads it
too late.

(cherry picked from commit 3e516a6219)
2019-04-20 08:37:45 +02:00
Juergen Spitzmueller
ac1ee5947f Status update 2019-04-16 09:10:38 +02:00
Enrico Forestieri
f929e2aae5 Update status.23x
Add reference to a bug reported after it was fixed.
2019-04-14 10:46:05 +02:00
Jean-Marc Lasgouttes
f03c4a2db4 Fixup ad79ac40: reintroduce markers around delimiters
The reasoning behind this change was not correct.

Fixes bug #11516.

(cherry picked from commit 3b58e38dc6)
2019-04-10 14:39:09 +02:00
Jean-Marc Lasgouttes
595c6d0a05 Fix bold-like characters when selecting bidi text
In painter, restrting paining regions does not really work when region is empty.

Fixes bug #11198.

(cherry picked from commit f9da28428a)
2019-04-10 14:19:18 +02:00
Daniel Ramoeller
e8dc6fad05 Fix for #11476: Icons have spurious squares
(cherry picked from commit 209944796a)
2019-04-06 07:30:46 +02:00
Daniel Ramoeller
5f444ee86f Fix for Mac Command-0 zoom-buffer binding
Amends fix to #10455

(cherry picked from commit 990f1eca4a)
2019-04-06 07:28:47 +02:00
Juergen Spitzmueller
7986ac2f32 Fix left/right border UI when toggling formal
Fixes: #9835
(cherry picked from commit 00de6c4be7)
2019-04-01 18:48:07 +02:00
Juergen Spitzmueller
15dae1244b Fix booktabs bottom line with multirows
Fixes: #11445
(cherry picked from commit 819c9c1645)
2019-04-01 18:45:57 +02:00
Enrico Forestieri
f836783908 Fix bug #11526
Correctly categorize a textmode symbol in mathed.

(cherry picked from commit c2af2cfd94)
2019-03-24 22:19:05 +01:00
Jean-Marc Lasgouttes
e0879b1460 Cache the value of GuiFontMetrics::lbearing().
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)
2019-03-21 18:43:37 +01:00
Jean-Marc Lasgouttes
f94cdf6e1c Place the depth bar correctly in full screen mode
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)
2019-03-21 11:57:59 +01:00
Juergen Spitzmueller
5518ca028e Add tabular-features set-inner-lines and fix set-all-lines behavior
Patch by Daniel Ramöller (racoon)

Fixes: #11382
(cherry picked from commit cb84f752f2)
2019-03-20 12:49:23 +01:00
Enrico Forestieri
98a792c9fd Fix bug #11490
Correctly add the branch name suffix when the stem
of the filename contains a dot.

(cherry picked from commit c3b9504835)
2019-03-19 21:41:04 +01:00
Enrico Forestieri
33023e6811 Fix bug #4269 and avoid crash with gzipped file
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)
2019-03-19 21:27:35 +01:00