Commit Graph

247 Commits

Author SHA1 Message Date
Enrico Forestieri
05d4332152 Fix bug #10469 2017-05-20 02:36:16 +02:00
Uwe Stöhr
7b0f63f67b Color.cpp: backport fix for bug #10656 2017-05-16 23:47:35 +02:00
Uwe Stöhr
e40205e749 InsetFloat.cpp: backport fix for bug #10618 2017-05-16 23:44:32 +02:00
Juergen Spitzmueller
0887f89350 Do not add symbols twice to Encoding::symbolsList()
Also sort the list properly.

Fixes #10644
2017-05-16 13:37:29 +02:00
Richard Heck
eb4723a589 Start 2.2.4 development. 2017-05-15 21:35:33 -04:00
Uwe Stöhr
f0877e26c0 ia.po: updates for 2.2.3 from Giovanni 2017-04-29 16:00:36 +02:00
Uwe Stöhr
826b704b31 backport fix for bug #10440
thanks Enrico!
2017-04-20 22:20:50 +02:00
Uwe Stöhr
0271602b8d - backport fix for bug #10466
Handle the command \multicolumn correctly in math macros
2017-04-18 23:53:27 +02:00
Uwe Stöhr
a3edc38747 status.22x: the image update deserves an entry 2017-04-16 19:57:59 +02:00
Uwe Stöhr
64206d3725 lyx2lyx/lyx_2_2.py: fix 2 issues with the reversion of boxes 2017-04-16 16:37:05 +02:00
Uwe Stöhr
a9e154cdee PDF-form.lyx: New German translation
- also many fixes and updates of the English version
- also some according fixes in de.po
2017-04-15 04:59:30 +02:00
Uwe Stöhr
a526ff58c1 GuiDialog.cpp: remove question marks from Windows dialogs
backported from master, fixes bug #10098, patch from Guillaume
2017-04-04 23:54:31 +02:00
Enrico Forestieri
caf56220c6 Fix bug #10554
The \lyxdeleted macro cannot cope with \newpage & co.
2017-04-03 00:07:53 +02:00
Enrico Forestieri
9450cf7b12 Fix #9732: Inconsistent font properties for the preview and superscript insets
(cherry picked from commit b6f8a84a35)
2017-03-29 18:25:27 -04:00
Enrico Forestieri
6836c75803 Fix bug #10579
The \lyxdeleted macro cannot cope with empty lines.

(cherry picked from commit 5940dc53aa)
2017-03-28 14:59:58 -04:00
Juergen Spitzmueller
0312d30f9c Consider text-mode accents of the form {\v a} in BiblioInfo
Fixes #9340.
2017-03-19 16:53:12 +01:00
Enrico Forestieri
90f7cf2fd0 Fix configuring for Qt 5.8
They moved the QT_QPA_DEFAULT_PLATFORM_NAME definition to the newly
introduced qtgui-config.h header.
2017-03-05 00:14:53 +01:00
Enrico Forestieri
2b9965aebb Allow Input of local includes from local layout files
When including files, LyX always searches the user and the system
directory, in that order. This means that when using local layout
files broken down into multiple includes, the various includes should
be specified with a path relative to the user layouts directory
(typically ~/.lyx/layouts), making this very impractical.
This commit allows including local files by specifying their path
as explicitly relative to the main layout file position, i.e., by
specifying their path with either "./" or "../". If the main layout
is not loaded from a local file, the usual search order is used,
even if the path are explicitly relative. So, for system layouts,
both "Input ./name.inc" and "Input name.inc" are equivalent.

(cherry picked from commit 17ab47b3e6)
2017-03-01 14:55:00 -05:00
Guillaume Munch
9f2fcf20a5 Fix compilation with Qt5.8dev
(cherry picked from commit 6d375ddeac)
2017-02-26 00:13:23 +01:00
Enrico Forestieri
857548d33b Allow inserting consecutive dashes
Because latex allows to do so, and there is no easy way to achieve this.
This was apparently implemented to allow cycling between the various dash
types, but it was a bad idea bringing no benefit and causing griefs.
2017-02-25 21:00:25 +01:00
Juergen Spitzmueller
c8f40508e7 Use \providecommand for logical markup macros
\strong is already defined by recent fontspec.

Also use non-long definition (starred version), since the insets
only contain one paragraph.
2017-02-23 18:18:45 +01:00
Juergen Spitzmueller
53933a4927 Compatibility fix for acmsiggraph.cls v0.93
Reported by Jean-Pierre Chrétien, fix suggested by Günter Milde.

Also add a note about obsolescence of the class, by Jean-Pierre.
2017-02-23 18:17:19 +01:00
Juergen Spitzmueller
508f4deae2 Output Preamble code of InPreamble styles before the styles themselves.
This assures that macros are defined.

Fixes: #10215
2017-02-23 10:53:30 +01:00
Jean-Marc Lasgouttes
e76a0fb8d8 Fix crash when selecting muticolumn in math
The cells that are part of the multicolumn are not in the cache, and
it is OK.

Fixes bug #10486.
2017-02-23 10:51:12 +01:00
Juergen Spitzmueller
9ac3e3a49a Fix Fixme module description to make it translatable
See #10058
2017-02-23 10:44:05 +01:00
Uwe Stöhr
3d3312042b zh_CN.po: updates from Zheru
- also add Zheru to the CREDITS
2017-02-14 00:17:51 +01:00
Juergen Spitzmueller
39cee7396b Use localized item when calculating the panel stack's tree widget width.
The current version was wrong for non-English dialogs, and even for
the English one, due to the translator commands that were not removed
for calculation (as in "Formats[[output]]").
2017-02-07 07:56:44 +01:00
Juergen Spitzmueller
8a0696db29 Correctly enable/disable citation dialog widgets on initialization.
Thanks Guillaume for pointing this out.
2017-02-06 18:24:51 +01:00
Jean-Marc Lasgouttes
1438123a13 Fix flushing of row that was cut after an hyphen
When using Qt stuff in breakAt, it may happen that the row is broken
after an hyphen (whereas the old code would only consider spaces).

The fact that we abuse the Row::right_boundary() property to detect when
a row should be flushed broke justification when a row is cut at an
hyphen.

Fix this by introducing a new Row::flushed() property and set it as needed.
(cherry picked from commit 8e7d0c2002)
2017-02-06 10:39:38 +01:00
Jean-Marc Lasgouttes
b0673bd1fa Fix wrong splitting of text row
The code that tries to decide whether it is worth splitting a given
text row element had a shortcoming: it did not take into account the
left margin of the new row that would be created.

The problem is that this left margin is not the same as the left
margin of the current row, because there can be for example
indentation effects.

To fix this problem, we pass the amount of available space on the
next row as a parameter of Row::shortenIfNeeded.

Note that there is no need to care about RtL row elements at this
point, since the bidi algorithm will be applied to the row
subsequently.
(cherry picked from commit 8491962c6b)
2017-02-06 10:37:12 +01:00
Jean-Marc Lasgouttes
59577dea7a Handle properly unicode paragraph/line break
They are shown on screen by arrow or pilcrow symbol and cause a line break.

They are still not handled in LaTeX output, though.
(cherry picked from commit 6dfbab3124)
2017-02-06 10:28:22 +01:00
Jean-Marc Lasgouttes
90688b63be Make sanitize more robust to dangling pointers.
It is necessary to sanitize the new_word iterator too.
(cherry picked from commit 344f7f2e7d)
2017-02-02 13:57:12 +01:00
Juergen Spitzmueller
a50ad8f926 Handle backslash in escape function.
Fixes: #4595.

Candidate for stable
2017-01-28 09:27:45 +01:00
Juergen Spitzmueller
efca146571 Generalize the protection of brackets in citation arguments
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.
2017-01-26 18:32:26 +01:00
Uwe Stöhr
ee5c96149e pt_BR.po: update from Georger 2017-01-23 01:12:09 +01:00
Richard Heck
6693fe5d6d Add some remarks about defining formatted references. 2017-01-19 15:26:31 -05:00
Richard Heck
dc7a5ecea1 Do not replace "--" with "\twohyphens" in formula macros.
(cherry picked from commit 5cb5d2cb5a)
2017-01-18 21:52:14 -05:00
Richard Heck
1d93cfca8f Section and Section* should have the same font size.
Going with normal corresponds better to how the PDF displays.

(cherry picked from commit cb6ea90256)
2017-01-14 16:14:24 -05:00
Juergen Spitzmueller
6a0de80b6b We don't have formatToolTip in stable. Use wrap instead.
Sorry for the hassle.
2017-01-13 11:32:36 +01:00
Guillaume Munch
4c5312f603 status.22x 2017-01-09 23:16:31 +01:00
jpc
0bfae01c6f Update status.22x 2017-01-09 10:20:06 +00:00
Enrico Forestieri
a9dd6ea6bc Avoid useless warning from Qt
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)
2017-01-08 18:48:55 -05:00
Richard Heck
3a1eff90b9 Escape link name for DocBook.
Thanks to Martin Brown for pointing out the bug, and the obvious
solution.

(cherry picked from commit 06e2669b35)
2017-01-08 13:51:18 -05:00
Jean-Marc Lasgouttes
d76309913f Add caching for the QTextLayout objects we use
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)
2017-01-06 22:47:32 +01:00
Juergen Spitzmueller
54fa0d51da Fix two hyperlink-insert problems
1. Do not prematurely cut selection (#10306); patch proposed by Daniel Ramöller
2. Obey lfun argument, even if there is a selection
2016-12-29 19:30:36 +01:00
Jean-Marc Lasgouttes
5962cea9d2 Fixup c49cd699: QString::toStdString is not always available
This method requires STL support in Qt. Fortunately, it is not needed
here.
2016-12-29 08:43:31 +01:00
Juergen Spitzmueller
6c4c164531 Fix some quote inset bugs:
* 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
2016-12-07 18:51:03 +01:00
Richard Heck
39e3fabffb Verbatim, etc, can be used with IOP articles.
Fixes #10505.

(cherry picked from commit 91f980cf31)
2016-12-06 17:56:46 -05:00
Enrico Forestieri
9435dd6b52 Fix display and output of math macros with optional arguments
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
2016-12-04 22:52:22 +01:00
Uwe Stöhr
e5954386d2 Arabic Tutorial.lyx: new translation by Hatim 2016-12-02 02:15:55 +01:00