Commit Graph

203 Commits

Author SHA1 Message Date
Enrico Forestieri
49c0021306 Fix bug #11174
Apparently, a new paragraph is started after a float even if
no blank line is actually present. So, account for this fact.

(cherry picked from commit f6922b8c88)
2018-06-17 23:37:39 +02:00
Enrico Forestieri
87b44bcc1f Fix bug #11151
(cherry picked from commit 17ea71b31c)
2018-05-21 22:01:56 +02:00
Stephan Witt
26d0fb3dd5 #11142 correct list of previous versions to check for user directory contents
LyX on Mac uses a user directory with version suffix. On change of the version suffix
the existence of the directories with previous versions is checked and the latest one
is used for a copy on first configure run.

For 2.3 the candidate list starts with 2.2 now as it should.

(cherry picked from commit 17c3617c49)
2018-05-16 07:18:38 +02:00
Juergen Spitzmueller
d35055de83 Fix InsetBox::contentAlignment()
Some cases where alignment is possible were missing.

Candidate for 2.3.x.

(cherry picked from commit de67b68b1d)
2018-05-11 18:44:17 +02:00
Jean-Marc Lasgouttes
4e981b034e Adapt caret height to context in mathed.
Compute a height from current font and current cell vertical
dimensions in MathData::metrics(), because this is where current font
is known.

Introduce BufferView::setCaretAscentDescent to remember this value.

This mechanism is not used for text because Cursor::current_font is
restored by undo, and the caret height would not be changed then. But
in principle it is doable.

(cherry picked from commit 90cfe4ec3b)
2018-05-10 12:53:30 +02:00
Scott Kostyshak
705302f6de Center longtable explicitly (#10690)
"Center" is the default of longtable, but some situations require it
to be centered explicitly, such as when using floatrow:

https://tex.stackexchange.com/questions/320592/floatrow-package-conflicting-with-centering-longtable

(cherry picked from commit bde1834f7e)
2018-05-08 17:42:43 -04:00
Scott Kostyshak
532d3600f2 Do not use needauth when only exporting code
We have a couple of converters (using Sweave and knitr to "tangle"
an intermediate file) that are used for exporting code chunks
contained in a .lyx file. Since the code is just exported to a text
file and is not executed, needauth is not necessary.

(cherry picked from commit 065e37e96f)
2018-05-06 19:50:55 -04:00
Juergen Spitzmueller
36096435e5 Fixes for nested ulem commands
1. \uuline must be on top of \sout
2. \uwave in \xout needs a hack to compile

(cherry picked from commit 9fd94a2dd0)
2018-05-05 10:09:04 +02:00
Juergen Spitzmueller
63c54434ae PassThru paragraphs have latex_language; consider this when checking
previous language

Fixes: #10793.
(cherry picked from commit 15df033bce)
2018-05-01 06:56:45 +02:00
Scott Kostyshak
6a808d285c Fix duplicate, disabled "Separated Frame Below"
This commit fixes an issue where the menu option "Insert Separated
Frame Below" would show up twice, with one instance disabled. This
occurred when there was a "Standard" environment nested in a
"Frame". With this commit, the duplicate instance is removed.

(cherry picked from commit 4f7a5f8c3e)
2018-04-29 00:05:15 -04:00
José Matos
f7b9d57a45 Update scripts to support simultaneously python 2 and 3
The fixes are simple and on line with the changes made during
the 2.3 development. It was an oversight to leave them out.

With this commit all the python scripts should be supported by
python 2 and 3.

(cherry picked from 5b160e82be)
2018-04-28 11:24:28 +01:00
Richard Kimberly Heck
636e998353 Fix bug #11127.
This also fixes an accidental commit of "NeedCProtect".

(cherry picked from commit 9f79ab99ed)
2018-04-27 20:17:15 -04:00
Jean-Marc Lasgouttes
5c6bc52b1b Update cursor position after committing IM string
(cherry picked from commit 01fea56eb6)
2018-04-26 22:45:57 +02:00
Richard Kimberly Heck
e7387fd348 Don't sort the bibfiles cache.
This causes problems with biblatex. Instead, we sort the old and
new lists and then compare them.

(cherry picked from commit 6b095e2b71)
2018-04-25 13:45:17 -04:00
Richard Kimberly Heck
13354c4a53 Improve error message.
(cherry picked from commit 04f7151684)
2018-04-25 12:06:07 -04:00
Jean-Marc Lasgouttes
d0a11cb8e2 Redo metrics after cancelling macro mode
When the cursor is inside a subscript that may become empty, metrics
issues can happen. This patch fixes the issue, although it is not
clear to see what the problem is.

Still, requesting a metrics update also in the case where the macro
mode is canceled makes sense.

Fixes bug #11125.

(cherry picked from commit 68ec34e603)
2018-04-25 17:03:50 +02:00
Richard Kimberly Heck
b3946f6d4d Add bindings for inset-settings.
Fixes #7762.

(cherry picked from commit 8da025014d)
2018-04-22 23:58:21 -04:00
Richard Heck
7d0b7e0840 Fix for #10624.
If we're in the first paragraph after a division (section, etc),
use the prefix for it.

(cherry picked from commit dd2efe8d0d)
2018-04-20 23:29:36 -04:00
Richard Heck
0662ffb98e Fix #6344.
For some reason, special code was added for LFUN_INDEX_INSERT
when it was not actually needed. So just delete it.

(cherry picked from commit 83356ab9fe)
2018-04-20 23:16:02 -04:00
Richard Heck
7dcd1a7f4e Reset counters before we re-run updateBuffer when the bibfiles change.
Fixes a bug reported by Pavel here:
  https://marc.info/?l=lyx-devel&m=152407889727665&w=2

(cherry picked from commit 64acc06b91)
2018-04-20 23:01:23 -04:00
Richard Heck
12c196755b Fix bug #11118.
Adds LFUN_MASTER_BUFFER_EXPORT.

(cherry picked from commit c4c7053d1d)
2018-04-19 00:11:48 -04:00
Juergen Spitzmueller
9e52c7693e Add support for rotated longtabulars (via [pdf]lscape)
Fixes: #9194

See #9194 for why we use an earlier file format change here.

(cherry picked from commit feab528fd1)
2018-04-18 18:10:06 +02:00
Richard Heck
33e1ead22f Reorder status. 2018-04-16 23:29:07 -04:00
Richard Kimberly Heck
b567ef36bb Fix bug #11084.
Allow unicode-insert to accept a sequence of codepoints.

(cherry picked from commits 83b1ac3b, f7d502d0, and a714f6cb)
2018-04-16 23:26:08 -04:00
Richard Heck
955199fe8c Fix bug #9847.
Spaces are, amazingly, allowed at the end of bibliography keys. So we
introduce a new parameter allowing getVectorFromString not to trim
whitespace, and then use it.

For some reason, this seems not actually to have been backported
to 2.3.x.
2018-04-16 23:19:21 -04:00
Enrico Forestieri
03b5a0800a Account for Qt 5.10
Fix regular sed expression in order to catch a second digit in the
Qt minor version number.

(cherry picked from commit 6253cc4c51)
2018-04-15 22:28:29 +02:00
Juergen Spitzmueller
930e6c14d2 de.po 2018-04-15 11:50:23 +02:00
Richard Heck
5a9bf60166 Fix bug #11055.
See also https://marc.info/?l=lyx-devel&m=151709211602688&w=2.

(cherry picked from commit d3ee87eea2)
2018-04-15 00:29:36 -04:00
Juergen Spitzmueller
4ce9e61ab1 Prevent that a full source preview of a child clears the master's bibfiles cache.
See #9158

(cherry picked from commit a9a7f38488)
2018-04-15 00:26:43 -04:00
Juergen Spitzmueller
e4a3527fa9 Consider sub-subfiles on log file parsing.
These are listed as (subfile.ext (sub-subfile.ext))

Fixes: #11112
(cherry picked from commit 1e1800a21a)
2018-04-15 00:04:40 -04:00
Richard Heck
dc2c1b943d Clean up status.23x 2018-04-15 00:01:11 -04:00
Richard Heck
bcb002039b Merge branch '2.3.2-staging' into 2.3.x 2018-04-14 23:52:31 -04:00
Richard Heck
156cfe5951 Fix bugs #10897 and #10912. 2018-04-14 23:38:32 -04:00
Scott Kostyshak
c19fd610b9 Do not show master's errors if compiling child
If a master document is compiled and has errors, and then a child is
compiled without error, the errors from the master compilation were
shown.

The setup of the relevant code is the following:

  processingThreadFinished() calls errors().  errors() makes the
  assumption that if it is called, there must have been an error
  somewhere.

The logic of the setup is the following:

  processingThreadFinished() knows whether there was an error on
  the most recent preview/export, although it doesn't know whether
  the error is from master or child (i.e. does not know whether the
  user was compiling the child, or whether master-buffer-view was
  called).  Inside error(), if there is no error in the child, it is
  assumed the error is from master.

For the above logic to work, errors() should only be called if there
was an error.

This commit fixes #11106 and preserves the fix to #7330.

(cherry picked from commit 8d2b121ef5)
2018-04-14 23:25:19 -04:00
Jean-Marc Lasgouttes
86c003001d Fix invalid octal number
(cherry picked from commit 6cffd468e0)
2018-04-14 23:23:10 -04:00
Juergen Spitzmueller
10335b93b4 Support new hunspell C++ ABI if LyX is built against hunspell >= 1.5
Fixes: #10547
2018-04-14 10:35:59 +02:00
Joel A. Kulesza
d25762da35 Changed Settings->Local Layout to FixedWidth & Nowrap
This change is made in response to Ticket 10992.

The change made is consistent with those captured in Ticket 9966.

(cherry picked from commit 869e2fe9b9)
2018-04-09 21:30:40 -04:00
Juergen Spitzmueller
1eceb1c574 Load hyperref with a suitable driver
This is mandatory for some features (such as bookmarks,pdfusetitle)
to work, and only a handful of drivers can be auto-detected by hyperref.

Fixes: #6418
(cherry picked from commit 33bfbf89c4)
2018-04-09 15:17:11 +02:00
Juergen Spitzmueller
9df09d8cba Set correct path to (biblatex) bibliography databases that are entered relative to child documents.
Fixes: #11105
(cherry picked from commit 2ecc3b09c6)
2018-04-08 13:25:17 +02:00
Uwe Stöhr
c690e8880b tex2lyx: parse \xymatrix
LyX's \xymatrix support relies on math therefore put it into math and parse its content

fixes bug #10638

(cherry picked from commit 1174279967)
2018-04-07 00:19:10 -04:00
Juergen Spitzmueller
6810a181d0 Do not use \tablefootnote in minipages
Minipages provide their own working \footnote's

Should also go to 2.3.x.

(cherry picked from commit 37404df686)
2018-04-05 11:59:05 +02:00
Richard Heck
935442aaba Fix bug #11102.
Ignore deleted material when generating a proposed label.

(cherry picked from commit d9ebf6e2c7)
2018-04-03 18:41:28 -04:00
Richard Heck
1696d26b20 Status for last two commits. 2018-04-01 22:21:31 -04:00
Stephan Witt
8ccbfd5dc7 #11094 add status entry for backported fix 2018-03-31 12:00:33 +02:00
Juergen Spitzmueller
bcd1814746 Open ExternalInset dialog on first tab for new insets
Fixes: #11081
(cherry picked from commit 126e0c3dac)
2018-03-29 09:48:00 +02:00
Juergen Spitzmueller
d549330760 Handle comments in options
Things like
pdfpagemode=UseOutlines%None,UseOutlines,UseThumbs,FullScreen

was not imported correctly (the comment was not stripped)

Fixes the rest of #5737

(cherry picked from commit 820ec38da7)
2018-03-29 09:42:00 +02:00
Richard Kimberly Heck
5f4d678a72 Whitespace only. 2018-03-28 15:46:55 -04:00
Juergen Spitzmueller
82f9688c81 typo 2018-03-26 18:35:09 +02:00
Juergen Spitzmueller
953df30894 Fix use of default biblio_style
Fixes: #11088
2018-03-26 17:59:27 +02:00
Juergen Spitzmueller
f2a3053323 add status entry 2018-03-26 13:48:40 +02:00
Jean-Marc Lasgouttes
977a0c4037 Make it possible to select (not)native file dialogs at run time
Add a new LyXRC variable use_native_filedialog (true by default) that
allows to select the kind of FileDialog we want at runtime.

(cherry picked from commit af795b80d8)
2018-03-21 10:56:57 +01:00
Richard Kimberly Heck
0209f2faff Fix problem with conversion of stmary10.lyx. 2018-03-19 18:44:29 -04:00
Juergen Spitzmueller
d9314d15dc Some improvements to the graphics dialog
* Describe the viewport/bb situation more accurate
* Use generic term "coordinates", since bb and viewport are flavor-specific
* Add some tooltips
* Increase the width of the options widget.

(cherry picked from commit c462fadff5)
2018-03-19 18:23:59 +01:00
Juergen Spitzmueller
27a871499f Change lookup order for enchant-2 vs. enchant (prefer the former)
(cherry picked from commit 1ae537c543)
2018-03-19 17:45:00 +01:00
Jean-Marc Lasgouttes
0ddb1435c9 Fix default spellchecker when only Enchant is available
This has been annoying me for ages.

(cherry picked from commit ae473b012a)
2018-03-19 16:51:45 +01:00
Joel A. Kulesza
3abfd72b27 Update to accept automake 1.16
(cherry picked from commit 61db4af82d)
2018-03-19 16:44:24 +01:00
Juergen Spitzmueller
7927d71a08 Properly fix math packages table in Document Settings
Fixes: #10777
(cherry picked from commit 3face5e119)
2018-03-18 16:47:59 +01:00
Juergen Spitzmueller
be80912d1c syntax.default: add missing *
Fixes: #10501
(cherry picked from commit 23766fdd59)
2018-03-17 15:44:05 -04:00
Juergen Spitzmueller
c52baa7d81 tex2lyx: handle whitespace in table column declaration.
Fixes: #10804
(cherry picked from commit 247e1a223d)
2018-03-17 15:44:05 -04:00
Juergen Spitzmueller
d71e3404fe Braces need to be escaped as well on LATEXIFY
part of #9563
2018-03-17 15:44:05 -04:00
Juergen Spitzmueller
db3768da89 Fix the implementation of new libertine package
Needs to go to 2.3.1-staging

(cherry picked from commit 905516fd70)
2018-03-17 15:44:05 -04:00
Juergen Spitzmueller
5fb2566572 Do not force singlebyte encoding for listings with XeTeX/LuaTeX.
Fixes: #11056
(cherry picked from commit cbf2a329c9)
2018-03-17 15:44:05 -04:00
Uwe Stöhr
880fd9aa81 status.23x: mention the updated po files in 2.3.x branch
- also sync an entry with status.22x
2018-03-17 15:44:05 -04:00
Richard Heck
96ec4d645b Use pythonic syntax, as suggested by José.
(cherry picked from commit cec9edd34b)
2018-03-17 15:44:05 -04:00
Juergen Spitzmueller
11d20e132a tex2lyx: do not force default bibliography style if none is set
Some classes provide a \bibliographystyle, so we must not output any
\bibliographystyle if none is set in the TeX file.

Fixes: #10673
(cherry picked from commit ed331bedd6)
2018-03-17 15:44:05 -04:00
Juergen Spitzmueller
b35fb98335 Fix list of viewable formats in view/update menu.
Also fix list in (currently unused) Export toolbar button.

Fixes: #11044
(cherry picked from commit ab6bd5e319)
2018-03-17 15:44:05 -04:00
Jean-Marc Lasgouttes
f599e90d92 Kill macro mode when using LFUN_ESCAPE
Add a `cancel' boolean to macroModeClose() that just removes all trace
of what has been entered instead of finalizing it.

When entering a macro in mathed, let LFUN_ESCAPE invoke
macroModeClose(true). The new semantics of LFUN_ESCAPE in mathed is
thus to abort the input of a macro name.

Fixes bug #9251.

(cherry picked from commit 9296344b9a)
2018-03-17 15:44:05 -04:00
Juergen Spitzmueller
148a053fbc escape label in included listings
Also use docstring rather than string.

Fixes part of #10544

(cherry picked from commit 0bf8865122)
2018-03-17 15:44:05 -04:00
Juergen Spitzmueller
0e08b4e4f5 Adapt to new ChkTeX return values.
As of v. 1.7.7, chktex has four exit values. Only consider the program
failed with EXIT_FAILURE (1). This is backwards compatible to chktex
up to v. 1.7.5 and later patched versions included in TeXLive, where
there was the distinction EXIT_FAILURE (program failed) and EXIT_SUCCESS
(program successfully run, with or without something to report).

Note that ChkTeX v. 1.7.5 and 1.7.6 vanilla (as included in MikTeX) also
returned EXITE_FAILURE if ChkTeX found something to report.

We do not, and never did, support this case.

Fixes: #9989 (after ChkTeX 1.7.7. is released).
(cherry picked from commit 0d806799aa)
2018-03-17 15:44:05 -04:00
Juergen Spitzmueller
8bf7e691bc Do not use English, but the context language, when pasting from math
Fixes: #2596
(cherry picked from commit 92990adc23)
2018-03-17 15:44:05 -04:00
Juergen Spitzmueller
6da7b92c36 update status 2018-03-17 15:44:05 -04:00
Richard Heck
2508e7aacc Status file for 2.3.1 2018-03-17 15:44:05 -04:00
Juergen Spitzmueller
f711e44bcf tex2lyx: complete minted support (inputminted)
Also fix some whitespace issues in minted inset import.

(cherry picked from commit f3c5bcd2be)
2018-03-17 18:16:46 +01:00
Juergen Spitzmueller
aa8d047bb3 Update status 2018-03-17 14:36:56 +01:00
Juergen Spitzmueller
d263ca0529 tex2lyx: update quote handling
* Consider new quote styles
* Consider changed quote styles
* Try to be a bit smarter with ambiguous quotation marks

(cherry picked from commit 8184f08f4a)
2018-03-12 09:19:17 +01:00
Juergen Spitzmueller
59449063df tex2lyx: support tipa \t*{} macro.
(cherry picked from commit cc6f2dae82)
2018-03-12 09:15:57 +01:00
Juergen Spitzmueller
8f69f7af01 Status updates. 2018-03-11 18:33:45 +01:00
Juergen Spitzmueller
f183686505 tex2lyx: support for URW Classico, MinionPro and the new Libertine fonts.
(cherry picked from commit a3836d9909)
2018-03-11 18:23:35 +01:00
Juergen Spitzmueller
0f33720d29 tex2lyx: support for \includeonly
(cherry picked from commit 15fd17d83f)
2018-03-10 11:09:40 +01:00
Juergen Spitzmueller
42dd5f5cfa tex2lyx: chapterbib support
(cherry picked from commit af6933c06f)
2018-03-10 10:33:10 +01:00
Uwe Stöhr
e9470e7d64 status.23x: correct sorting
tex2lyx biblatex support is an improvement not a bugfix. At least in the past we sorted new tex2lyx features this way.
2018-03-06 22:34:21 +01:00
Juergen Spitzmueller
30cb99503f tex2lyx: support alignment pseudo-environments.
Fixes: #7857
(cherry picked from commit 7a22ce7c09)
2018-03-06 18:27:13 +01:00
Juergen Spitzmueller
afeb5acb0f Fix local polyglossia switch for Arabic
We need to lowercase the language again (it's \begin{Arabic},
but \textarabic)

Fixes: #11057.
(cherry picked from commit 27584f5f70)
2018-03-06 18:24:32 +01:00
Juergen Spitzmueller
94fe126161 tex2lyx: fix subfloat import
Fixes: #10385
(cherry picked from commit 1dcb2a0976)
2018-03-06 18:22:12 +01:00
Juergen Spitzmueller
566f368885 Remove duplicate entries. 2018-03-06 17:31:19 +01:00
Uwe Stöhr
150fb89e22 status.23x: mention the new biblatex support in tex2lyx 2018-03-06 13:52:42 +01:00
Juergen Spitzmueller
50b78507b9 tex2lyx: support biblatex
(qualified citation lists and multibib not yet supported)

(cherry picked from commit f22213a04f)
2018-03-06 08:19:35 +01:00
Juergen Spitzmueller
3e6a1eecc5 tex2lyx: consider options passed via \PassOptionsToPackage
(cherry picked from commit 476401a76f)
2018-03-06 08:18:43 +01:00
Juergen Spitzmueller
84b59c90e7 tex2lyx: import straight quotation marks as ERT
This assures that they are output as straight quotations marks (e.g.,
babel shorthands).

Fixes: #75 [sic!]
(cherry picked from commit ccb9ae9670)
2018-03-06 08:17:18 +01:00
Juergen Spitzmueller
749ff439df No manual intervention needed for polyglossia (bidi) and RTL numbers.
See https://tex.stackexchange.com/a/256837/19291

(cherry picked from commit 00d4144352)
2018-02-27 08:59:02 +01:00
Juergen Spitzmueller
98e9e53882 Take actual font height (ascent, descent) into account when drawing placeholder box for graphics
Fixes: #11048
(cherry picked from commit 5ddd377a0a)
2018-02-26 08:59:11 +01:00
Richard Heck
797babd462 Fix bug #10817.
Respect 'literal' setting when calculating longest bibitem.

(cherry picked from commit 224e56c935)
2018-02-22 15:44:29 -05:00
Richard Heck
04e8526460 Respect "literal" setting when entering citation via LyX server.
This requires moving the bool that tracks this somewhere that it
is visible from BufferView. It seemed to make sense to put it as
a static member of InsetCitation.

(cherry picked from commit f8e8877f83)
2018-02-22 15:33:01 -05:00
Juergen Spitzmueller
721cc085a2 Implement IsTocCaption for normal layouts.
But use default "true" to maintain current behavior if not explicitly
stated otherwise.

Fixes: #11045
(cherry picked from commit 8a703573ea)
2018-02-22 19:12:30 +01:00
Alexander Dunlap
257f978d62 save session when we save a buffer
Implements enhancement #10712.

(cherry picked from commit cca365f26c)
2018-02-21 11:56:37 +01:00
Jean-Marc Lasgouttes
a2e1021aba Use parMetrics to access the par_metrics_ map
In cursorY, it is dangerous to access par_petrics_[0], since one does
not know whether metrics have been computed for this paragraph (which
may be off-screen).

It is safer to use parMetrics(0), that will compute the paragraph
metrics as needed.

Fixes bug #8120.

(cherry picked from commit a25b48f86c)
2018-02-20 15:02:35 +01:00
Juergen Spitzmueller
e1f7cc964b update status 2018-02-16 18:19:05 +01:00
Pavel Sanda
c17f706a1c * status file 2018-02-15 21:48:47 +01:00
Jean-Marc Lasgouttes
c8230ab0d0 Merge remote-tracking branch 'features/properpaint' into 2.3.2-staging
This makes sure that painting actually happens at paint events, making
display more fluid.
2018-02-15 14:57:53 +01:00
Pavel Sanda
abdadcceb9 * status.23x 2018-02-15 11:56:49 +01:00
Jean-Marc Lasgouttes
2e1863b704 Implement display of roots more faithfully
This is a follow-up to 758de957.

- unify the metrics and drawing of \sqrt and \root using helper
  functions mathed_root_metrics and mathed_draw_root.

- compute the vertical spacing above the nucleus of the root following
  rule 11 of the TeXbook. In particular, it is different in inline and
  display style.

- draw the root glyph without hard-coded pixel values. Make the line
  width depend on the zoom.

more work is needed to implement properly rule 11:

- Ideally, we should use sqrt glyphs from the math fonts. Note that
  then we would get rule thickness from there.

- The positioning of the root MathData is arbitrary. It should
  follow the definition of \root...\of... in The Texbook in
  Apprendix B page 360.

Fixes bug #10814.

(cherry picked from commit 16af6e7c50)
(cherry picked from commit 6cb6f78ae9)
2018-02-15 11:34:00 +01:00
Jean-Marc Lasgouttes
1dc134fb60 Improve UndoGroupHelper and use it more
Now the helper class contains logic that checks whether buffer are
known before closing them. This avoids potential crashes.

Use it in different places to siplify code. It is not clear at this
point whether it should be used everywhere.

Followup to bug #10847.

(cherry picked from commit cd9e42dc35)
2018-02-15 10:36:17 +01:00
Jean-Marc Lasgouttes
5f6c681b76 Handle properly top/bottom of inset with mac-like cursor movement
The correct behavior is to go to position 0 going up from first row,
and to end of row when going down on last row.

The targetx value of the cursor is not updated, which makes cursor
movement more natural.

Fixes bug #10701.

(cherry picked from commit 34285cc683)
2018-02-14 17:06:03 +01:00