]> git.lyx.org Git - lyx.git/log
lyx.git
7 years agoRemove unused method in ArgumentProxy
Jean-Marc Lasgouttes [Fri, 2 Dec 2016 15:19:02 +0000 (16:19 +0100)]
Remove unused method in ArgumentProxy

Also reorder some methods.

7 years agoImprove spacing of BOX elements
Jean-Marc Lasgouttes [Fri, 2 Dec 2016 14:58:39 +0000 (15:58 +0100)]
Improve spacing of BOX elements

Tweak the algorithm so that a BOX math row element can have some
spacing. To this end, MathRow::before/after do not look at the type of
an element for deciding when to skip it, but rather to its math class.

In the new setting, the spacing algorithm works on all elements, but
skips the MC_UNKNOWN elements as if they were not present. As a
consequence, the two element types BEGIN and END have been replaced by
a single DUMMY (they can be recognized from their class).

To simply the code, add a new `mclass' argument to the
MathRow::Element constructor (default is MC_UNKNOWN).

7 years agoFactor out the code that handles default macro arguments
Jean-Marc Lasgouttes [Mon, 28 Nov 2016 12:13:36 +0000 (13:13 +0100)]
Factor out the code that handles default macro arguments

7 years agoRewrite handling of macro nesting in math rows
Jean-Marc Lasgouttes [Mon, 28 Nov 2016 12:13:36 +0000 (13:13 +0100)]
Rewrite handling of macro nesting in math rows

Macro nesting is now recorded into the macro inset itself. This allows
the ArgumentProxy inset to determine whether it is editable or not by
looking at its macro.

Remove code in the metrics and draw methods of ArgumentProxy: this
code is AFAICS not active anymore, since arguments are linearized into
math rows.

Use Changer idiom to change locally the values of MecticsInfo::base.macro_nesting.

7 years agoReintroduce broken support for default macro arguments
Jean-Marc Lasgouttes [Fri, 2 Dec 2016 10:13:47 +0000 (11:13 +0100)]
Reintroduce broken support for default macro arguments

This got forgotten in the math typesetting rewrite.

Fixes bug #10508.

7 years agoctests: invert ar/Tutorial_pdf4_texF
Scott Kostyshak [Fri, 2 Dec 2016 04:47:21 +0000 (23:47 -0500)]
ctests: invert ar/Tutorial_pdf4_texF

ar/Tutorial.lyx was recently added at f0bc4d43.

Inverting this test is consistent with ar/{Intro,Shortcuts}.

7 years agoctests: uninvert mathmacro tests
Scott Kostyshak [Fri, 2 Dec 2016 04:37:36 +0000 (23:37 -0500)]
ctests: uninvert mathmacro tests

These tests now pass (uninverted), likely due to b14e9d52 and
e8f480e7.

7 years agoArabic Tutorial.lyx: new translation by Hatim
Uwe Stöhr [Fri, 2 Dec 2016 01:12:58 +0000 (02:12 +0100)]
Arabic Tutorial.lyx: new translation by Hatim

7 years agoFix display and output of math macros with optional arguments
Enrico Forestieri [Thu, 1 Dec 2016 17:02:47 +0000 (18:02 +0100)]
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

7 years agoctests: univert aas_sample with LuaTeX test.
Günter Milde [Thu, 1 Dec 2016 10:47:12 +0000 (11:47 +0100)]
ctests: univert aas_sample with LuaTeX test.

The missing character problem is fixed upstream.

Also fix the scaling of the \sun-symbol-index by wrapping the symbol in \text.
(wasysym's \sun is valid in text and math mode. LyX  currently adds a spurious \ensuremath.)

7 years agoRemove spurious body tags in macro test file.
Günter Milde [Tue, 29 Nov 2016 16:22:18 +0000 (17:22 +0100)]
Remove spurious body tags in macro test file.

As Enrico pointed out in http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg131411.html, the loading error of testcases_speed.lyx is caused by tags from a LyX development version that were later removed but never handled in lyx2lyx.

LaTeX export still fails with
! Argument of \xargs@grab@opt has an extra }.

7 years agoInvert failing unreliable tests
Scott Kostyshak [Wed, 30 Nov 2016 14:42:55 +0000 (09:42 -0500)]
Invert failing unreliable tests

These tests are "unreliable" and thus their export status contains
less information than reliable tests. However, it contains some
information and could still be used to find regressions. This commit
helps keep the output of a vanilla "ctest" command clean.

See discussion here:
https://www.mail-archive.com/search?l=mid&q=20161127205800.epvjxkeri5yoeqwj%40steph

7 years agoDevelopment.lyx, updated handling of unreliable tests.
Kornel Benko [Wed, 30 Nov 2016 10:47:39 +0000 (11:47 +0100)]
Development.lyx, updated handling of unreliable tests.

7 years agoCmake tests: make unreliable tests independent of inverted tests
Kornel Benko [Tue, 29 Nov 2016 23:53:31 +0000 (00:53 +0100)]
Cmake tests: make unreliable tests independent of inverted tests

7 years agoTutorial.lyx: use a simple reference format for the Tutorial
Uwe Stöhr [Tue, 29 Nov 2016 00:56:11 +0000 (01:56 +0100)]
Tutorial.lyx: use a simple reference format for the Tutorial

The "<reference> on  <page>" reference format is too tricky for newbies, see e.g. bug #10494

- also update the corresponding example files

7 years agoEmbeddedObjects.lyx: fix a typo spotted by a user
Uwe Stöhr [Tue, 29 Nov 2016 00:29:25 +0000 (01:29 +0100)]
EmbeddedObjects.lyx: fix a typo spotted by a user

7 years agoWin installer: fix a bug
Uwe Stöhr [Sun, 27 Nov 2016 14:33:06 +0000 (15:33 +0100)]
Win installer: fix a bug

7 years agoWin installer: finish work for new installer version
Uwe Stöhr [Sun, 27 Nov 2016 13:35:55 +0000 (14:35 +0100)]
Win installer: finish work for new installer version

7 years agoBump up RC fileformat after [244de5d2/lyxgit] for the new 'needauth' options.
Tommaso Cucinotta [Fri, 25 Nov 2016 22:33:08 +0000 (23:33 +0100)]
Bump up RC fileformat after [244de5d2/lyxgit] for the new 'needauth' options.

Addressing #10481.

7 years agoctests: update invertedTests.
Günter Milde [Fri, 25 Nov 2016 14:38:36 +0000 (15:38 +0100)]
ctests: update invertedTests.

7 years agoImprove ctesting of Arabic documents
Scott Kostyshak [Fri, 25 Nov 2016 04:10:16 +0000 (23:10 -0500)]
Improve ctesting of Arabic documents

- invert the currently failing tests
- add a new test document that shows LyX's support of pdf2

For more details, see the discussion here:
https://www.mail-archive.com/search?l=mid&q=20161114035123.s5lt4ib4x4obtptp%40steph

7 years agoctests: correct inversion pattern for utf8-cjk tests.
Günter Milde [Thu, 24 Nov 2016 10:53:06 +0000 (11:53 +0100)]
ctests: correct inversion pattern for utf8-cjk tests.

7 years agoBetter explanations to the user for [244de5d2/lyxgit] and
Tommaso Cucinotta [Wed, 23 Nov 2016 23:53:41 +0000 (00:53 +0100)]
Better explanations to the user for [244de5d2/lyxgit] and
[830eb234/lyxgit] addressing #10481, so as to provide better clues as
to why the action is being forbidden or user authorization is needed.

7 years agoMatch the font in MathMacro::metrics with the font in MathMacro::draw
Guillaume Munch [Wed, 23 Nov 2016 22:05:01 +0000 (23:05 +0100)]
Match the font in MathMacro::metrics with the font in MathMacro::draw

This fixes the "bad keming" of math ERT (in fact wrong metrics) which recently
was worsened by InsetMathChar substitutions and their MathClass spacing.

Also fix a small inefficiency: always prefer:

  Changer dummy = (currentMode() == TEXT_MODE)
    ? pi.base.font.changeShape(UP_SHAPE) : Changer();

over:

  Changer dummy = pi.base.font.changeShape((currentMode() == TEXT_MODE)
    ? UP_SHAPE : pi.base.font.shape());

The former only records and restores a value when the condition is satisfied,
and does not cost anything otherwise.

7 years agoLet LyX remember what documents 'needauth' converters have been authorized to run...
Tommaso Cucinotta [Wed, 23 Nov 2016 21:17:13 +0000 (22:17 +0100)]
Let LyX remember what documents 'needauth' converters have been authorized to run over by the user.

This is done by moving Converters::auth_files_ into a new SessionSection
subclass, along with the same read/write paradigm, as per Enrico's hint.

7 years agoFix missing space in string from [244de5d2/lyxgit].
Tommaso Cucinotta [Wed, 23 Nov 2016 20:46:06 +0000 (21:46 +0100)]
Fix missing space in string from [244de5d2/lyxgit].

7 years agoFix header
Guillaume Munch [Wed, 23 Nov 2016 18:16:18 +0000 (19:16 +0100)]
Fix header

7 years agoFix some warnings after 6c9207579
Jean-Marc Lasgouttes [Wed, 23 Nov 2016 16:43:37 +0000 (17:43 +0100)]
Fix some warnings after 6c9207579

7 years agoctests: correct encoding tests
Günter Milde [Wed, 23 Nov 2016 16:43:31 +0000 (17:43 +0100)]
ctests: correct encoding tests

* Do not test encodings not supported by iconv (see #10502).
* uninvert export test that work.

7 years agoAmend fix for #10428
Enrico Forestieri [Wed, 23 Nov 2016 16:30:49 +0000 (17:30 +0100)]
Amend fix for #10428

- Allow using logical values for icon sizes as the standard sizes may
  differ among different icon sets
- Do not allow setting sizes smaller than smallIconSize

When the logical sizes differ and the icon set is changed, the correct
sizes are established only after a restart.

7 years agoUpdate sk.po
Kornel Benko [Wed, 23 Nov 2016 15:04:54 +0000 (16:04 +0100)]
Update sk.po

7 years agoWin installer major review of Packages.txt file
Uwe Stöhr [Wed, 23 Nov 2016 02:07:09 +0000 (03:07 +0100)]
Win installer major review of Packages.txt file

MiKTeX made a major package cleanup during the last 2 weeks. (Which caused a lot of troubles btw.) Many packages were removed and renamed. Now the list is complete again.

7 years agoAdd 'needauth' option to converters that need explicit user authorization.
Tommaso Cucinotta [Sat, 5 Nov 2016 00:00:44 +0000 (01:00 +0100)]
Add 'needauth' option to converters that need explicit user authorization.

Addressing #10481.

This patch adds the new 'needauth' option for converters launching
external programs that are capable of running arbitrary code on behalf
of the user. These converters won't be run unless the user gives explicit
authorization, which is asked on-demand when the converter is about to
be run (question is not asked if the file is cached and calling the
converter is not needed).

The user prompt has a 3rd button so that he/she's not prompted again
for (any converter over) the same document (identified through
buffer->absFileName()).

Two preference options are added:

lyxrc.use_converter_needauth_forbidden disables any converter with
the 'needauth' option, which is meant to force user to an explicit
action via the preferences pane, before being able to use advanced
converters that can potentially bring security threats;

lyxrc.use_converter_needauth enables prompting the user for 'needauth'
converters, or bypasses the check if not enabled, falling back to the
previous behavior.

So, the first option is for maximum security, the second is for
maximum usability.

7 years agoCmake build: Prepare for hardening use of external programs
Kornel Benko [Tue, 22 Nov 2016 15:51:44 +0000 (16:51 +0100)]
Cmake build: Prepare for hardening use of external programs

7 years agoAdd select whole buffer shortcut to emacs.bind
Kornel Benko [Tue, 22 Nov 2016 12:10:57 +0000 (13:10 +0100)]
Add select whole buffer shortcut to emacs.bind

7 years agoMark failing encodings. See #10502.
Günter Milde [Tue, 22 Nov 2016 10:48:16 +0000 (11:48 +0100)]
Mark failing encodings. See #10502.

7 years agoctests: uninvert exports that work.
Günter Milde [Tue, 22 Nov 2016 10:47:12 +0000 (11:47 +0100)]
ctests: uninvert exports that work.

7 years agoInsetMath: match the screen display with the EnsureMath behaviour in output
Guillaume Munch [Tue, 22 Nov 2016 10:26:15 +0000 (11:26 +0100)]
InsetMath: match the screen display with the EnsureMath behaviour in output

7 years agofrac: Add line thickness to height
Guillaume Munch [Mon, 21 Nov 2016 23:40:31 +0000 (00:40 +0100)]
frac: Add line thickness to height

7 years agoCorrect on-screen kerning in math for non-mu units
Guillaume Munch [Mon, 21 Nov 2016 21:21:38 +0000 (22:21 +0100)]
Correct on-screen kerning in math for non-mu units

The current math style should have no impact on \kern1mu. This is another
benefit of a9eb87a8.

Testcase:
\begin{align*}
 & \kern1em a\\
 & {\scriptscriptstyle \kern1em a}\\
 & \kern18mu a\\
 & {\scriptscriptstyle \kern18mu a}
\end{align*}

7 years agode.po
Juergen Spitzmueller [Tue, 22 Nov 2016 09:35:16 +0000 (10:35 +0100)]
de.po

7 years agoAdd the icon-size to the toolbar menu
Daniel Ramöller [Sun, 9 Oct 2016 07:15:20 +0000 (09:15 +0200)]
Add the icon-size to the toolbar menu

- Adds LFUNs for setting the icon size
- Adds icons sizes to the Toolbars menu
- Uses the Toolbars menu as application context menu
- The context menu can now be user defined in stdcontext.inc

Fixes ticket #10428.

7 years agoFix Polyglossia options for serbian
Juergen Spitzmueller [Mon, 21 Nov 2016 17:57:04 +0000 (18:57 +0100)]
Fix Polyglossia options for serbian

Script value is uppercase.

7 years agoClear temp cutstack before exiting LyX.
Jean-Marc Lasgouttes [Mon, 21 Nov 2016 15:54:45 +0000 (16:54 +0100)]
Clear temp cutstack before exiting LyX.

Otherwise it is done in the exit handler, which leads to crashes.

7 years agoAmend b30f8d3c
Guillaume Munch [Mon, 21 Nov 2016 11:09:48 +0000 (12:09 +0100)]
Amend b30f8d3c

Fix assertion. Thanks Scott for the bisect and the trace.

7 years agoFix display of nicefrac solidus
Guillaume Munch [Sun, 20 Nov 2016 21:51:49 +0000 (22:51 +0100)]
Fix display of nicefrac solidus

7 years agoLet math mu skips scale with zoom
Guillaume Munch [Sun, 20 Nov 2016 22:41:36 +0000 (23:41 +0100)]
Let math mu skips scale with zoom

7 years agoAmend ad7e2435cfd
Guillaume Munch [Sun, 20 Nov 2016 22:10:12 +0000 (23:10 +0100)]
Amend ad7e2435cfd

InsetMathKern is also used for non-mu lengths.

Generalise the fix by moving to Length::inPixels (thanks Jaan-Marc).

7 years agomathedSymbolDim only needs a MathBase
Guillaume Munch [Sun, 20 Nov 2016 21:34:03 +0000 (22:34 +0100)]
mathedSymbolDim only needs a MathBase

7 years agoFix display of \slash inside different fonts
Guillaume Munch [Sun, 20 Nov 2016 21:13:47 +0000 (22:13 +0100)]
Fix display of \slash inside different fonts

Also give slash a proper symbol

7 years agoImprove fractions bar
Guillaume Munch [Sun, 20 Nov 2016 21:00:08 +0000 (22:00 +0100)]
Improve fractions bar

* The bar grows with the zoom according to MetricsBase::solidLineThickness()

* The spacing around the bar grows with the font size.

7 years agoFix vertical alignment of fractions
Guillaume Munch [Sun, 20 Nov 2016 19:35:02 +0000 (20:35 +0100)]
Fix vertical alignment of fractions

Fractions and binoms are vartically aligned with -

Nicefracs are ascent-aligned with the surrounding text

7 years agoSimplify Changers interface
Guillaume Munch [Sun, 20 Nov 2016 18:53:16 +0000 (19:53 +0100)]
Simplify Changers interface

In fact having an extra parameter "bool cond" is no longer useful because it can
now always be emulated with a ternary operator:
Changers dummy = cond ? do_change() : Changer();

7 years agoClean up and fixes to fractions metrics and drawing
Guillaume Munch [Sun, 20 Nov 2016 19:08:11 +0000 (20:08 +0100)]
Clean up and fixes to fractions metrics and drawing

* Factor code for easier maintainance.

* Avoid computing metrics several times. This duplication explained the
  exponential blowup during the metrics phase for nested fractions (see
  b2b87330). This happened in particular when using lyxproofs which heavily uses
  nested \dfracs for on-screen drawing.

* Call MetricsBase::changeScript instead of MetricsBase::changeFrac for
  \nicefrac and \unitfrac.

7 years agoCorrect computation of math font size
Guillaume Munch [Sat, 19 Nov 2016 20:25:34 +0000 (21:25 +0100)]
Correct computation of math font size

Move math style to FontInfo and compute the font sizes for scriptstyle and
scriptscriptstyle according to standard proportions: 0.73 and 0.55.

This is simpler and more accurate. It also fixes the font size of
${\scriptscriptstyle {\textstyle A}}A$ which exposed the limitations of the
previous approach.

7 years agoWin installer: prepare for next release
Uwe Stöhr [Sat, 19 Nov 2016 15:35:42 +0000 (16:35 +0100)]
Win installer: prepare for next release

- see ChangeLog.txt file for changes

7 years agoAdd Andrew Parsloe.
Richard Heck [Fri, 18 Nov 2016 16:45:40 +0000 (11:45 -0500)]
Add Andrew Parsloe.

7 years agoUpdate sk.po
Kornel Benko [Fri, 18 Nov 2016 12:29:40 +0000 (13:29 +0100)]
Update sk.po

7 years agolib/symbols: fix \arrownot
Guillaume Munch [Thu, 17 Nov 2016 21:46:01 +0000 (22:46 +0100)]
lib/symbols: fix \arrownot

7 years agoUpdate version of new modules, etc.
Richard Heck [Thu, 17 Nov 2016 16:39:19 +0000 (11:39 -0500)]
Update version of new modules, etc.

7 years agoAdd three new files from Andrew Parsloe. These do for AMS-type
Richard Heck [Thu, 17 Nov 2016 15:59:49 +0000 (10:59 -0500)]
Add three new files from Andrew Parsloe. These do for AMS-type
theorem environments what the already existing "by chapter" modules
do for non-AMS ones.

7 years agoMerge branch 'betterspacing'
Jean-Marc Lasgouttes [Thu, 17 Nov 2016 08:28:33 +0000 (09:28 +0100)]
Merge branch 'betterspacing'

The purpose of this branch is to improve the spacing in math equations

* do not use hardcoded pixel values, but math units that depend on
  zoom and dpi. This should be good for HiDPI systems.

* implement as much as possible the math typesetting algorithm
  described in Appendix G of the TeXbook.

One typical example of the spacing algorithm is that ``-a'' has no
spacing, contrary to ``a + b''. This reflects the unitary/binary
minus that will indeed happen in typeset output.

Together with the better character substitution that has already been
implemented by Guillaume, we get a nice improvement of mathed looks.

What makes this code complicated is that it handles macros properly:
the spacing inside the macro will depend on the values of the
arguments and the elements that are before and after the macro.

As a result, many definitions in lib/symbols are now just copy/pasted
from the relevant sty file. In particular, it is now possible to make
use of \mathrel, \mathbin, etc. macros to specify spacing.

This merge is a starting point. Remaining work includes

* proper handling of sub/superscript nucleus and of font-changing
  insets (as is done in the TeX algorithm).
* proper typesetting of fractions

Thanks to Guillaume for extensive testing.

7 years agoCleanup of lib/symbols
Jean-Marc Lasgouttes [Mon, 14 Nov 2016 14:33:51 +0000 (15:33 +0100)]
Cleanup of lib/symbols

Try as far as possible to use the same definitions as in the LaTeX files.

An example of that is the definition and subsequent use of \joinrel,
\relbar and \Relbar.

This is mostly Guillaume's work.

7 years agoSkip drawing of markers in non-editable math data
Jean-Marc Lasgouttes [Mon, 14 Nov 2016 17:01:56 +0000 (18:01 +0100)]
Skip drawing of markers in non-editable math data

There is no reason to reserve pixel space in macros replacement text,
which is not editable. This makes macros more compact and eases the
writing of lib/symbols.

* introduce new InsetMath::drawMarkers and friends that do nothing
  when nested inside a macro. This required to move macro_nesting
  inside MetricsBase, and to pass MetricsInfo & to metricsMarkers.

* keep track of nesting when drawing rows or macros.

7 years agoOnly display a blue rectangle for editable empty insets
Jean-Marc Lasgouttes [Tue, 4 Oct 2016 22:25:38 +0000 (00:25 +0200)]
Only display a blue rectangle for editable empty insets

Empty insets should use a minimal amount of space, especially when
they are part of a built-in macro in lib/symbols.

With this change, blue rectangles signal actually editable places.
Empty macros in editable data are shown as grey boxes, but they do not
appear when further nested.

This is done by adding a new type BOX of MathRow::Element object and a
MetricsInfo::macro_nesting that keeps track of macros (and is reset to
0 in editable macro arguments).

7 years agoAdd support for \mathbin and friends
Jean-Marc Lasgouttes [Tue, 4 Oct 2016 22:25:38 +0000 (00:25 +0200)]
Add support for \mathbin and friends

All they do is change the class of the elements that they contain.

7 years agoSet correctly the spacing between atoms in MathData
Jean-Marc Lasgouttes [Wed, 16 Nov 2016 14:07:00 +0000 (15:07 +0100)]
Set correctly the spacing between atoms in MathData

* new MathRow class which contains the description of a MathData
  object in terms of math class and spacing

  + macros and their arguments used in the MathData object are
    linearized (replaced with their contents) so that all math insets
    are typeset as a string together. To this end, we introduce a
    method addToMathRow to InsetMath and MathData. This method allows
    to linearize recursively a MathData object.

  + It is then necessary to set manually the dimension and position of
    the macros and arguments.

  + the class class and spacing are computed using the MathClass helpers.

  The MathRow data is cached in the MathData object in a bufferview-dependent
  way (different dpi for different screens).

* delegate most of the work MathData::metrics/draw to MathRow metrics/draw.

  The case of draw is trickier, since many draw() methods rely on their
  metrics without any spacing added.

7 years agoImplement computation of spacing according to the TeXBook
Jean-Marc Lasgouttes [Mon, 22 Aug 2016 12:15:28 +0000 (14:15 +0200)]
Implement computation of spacing according to the TeXBook

This implements the relevant math typography rules described in the
Appendix G of the TeXbook. More precisely, for each atom

  + the class is computed by implementing rules 5 and 6 of Appendix G

  + the spacing is computed according to the table p. 170

This code is not used at this point.

7 years agoIntroduce the notion of math class
Jean-Marc Lasgouttes [Mon, 30 May 2016 08:33:35 +0000 (10:33 +0200)]
Introduce the notion of math class

This done according to the TeXbook. This class replaces the individual
isMathXXX() methods. The mathClass() method (currently unused) is
provided for the following insets:

 * InsetMathChar (with a revised list of affected characters)
 * InsetMathSymbol: the class is given by the `extra' field
   Operators defined in lib/symbols (e.g. \log) are MC_OP
 * InsetMathFrac is MC_INNER (except nicefrac and units)
 * InsetDelimiters is MC_INNER
 * InsetStackrel is MC_REL
 * The class of InsetScript is the class of the last element of its
   nucleus (yes, it is a hack, but doing it right is more work).

Remove the explicit spacing that was done in the different insets. The spacing
will be reintroduced properly in a forthcoming commit.

7 years agolib/unicodesymbols tests and fixes.
Günter Milde [Tue, 15 Nov 2016 22:50:41 +0000 (23:50 +0100)]
lib/unicodesymbols tests and fixes.

Test unicodesymbols for most supported input encodings with Kornel's addition to ctests.

Add required "forces" to unicodesymbols:
* utf8x does not support all characters supported by LyX
* several 8-bit encodings map characters to math-mode commands - force replacement in text-mode so that LyX can wrap them in \\ensuremath.

Fix a misalignment (wrong replacements) in the Cyrillic Unicode block.

Use \\mathscr for Mathematical Script characters in Mathematical Alphanumeric Characters (in line with the characters in other unicode blocks.

7 years agoComplete the renaming of a ctest sample directory.
Günter Milde [Mon, 14 Nov 2016 13:32:46 +0000 (14:32 +0100)]
Complete the renaming of a ctest sample directory.

Rename the directory for test samples  "export/latex/Unicode-characters" to "export/latex/unicodesymbols". This matches the purpose to test the lib/unicodesymbols file.

7 years agoSet default output format to XeTeX in Arabic docs
Scott Kostyshak [Mon, 14 Nov 2016 03:42:18 +0000 (22:42 -0500)]
Set default output format to XeTeX in Arabic docs

All other exports to PDF fail.

7 years agoctests: mark 4 LuaTeX + poly tests as TeX issues
Scott Kostyshak [Mon, 14 Nov 2016 03:04:17 +0000 (22:04 -0500)]
ctests: mark 4 LuaTeX + poly tests as TeX issues

These tests were broken from the fix at 3374b854.

The bug was reported upstream:
https://github.com/reutenauer/polyglossia/issues/163

For more details, see ML discussion:
https://www.mail-archive.com/search?l=mid&q=1478004223.2367.5.camel%40lyx.org

7 years agoDisplay properly math characters that behave like symbols
Guillaume Munch [Wed, 25 May 2016 12:16:51 +0000 (13:16 +0100)]
Display properly math characters that behave like symbols

* set up a replacement of *, -, and : by the adequate symbols (#9893)

* fix the wrong character selection and operator spacing in \text mode

* hide some internal symbols from the auto-completion.

7 years agoFix display of some math symbols
Guillaume Munch [Fri, 11 Nov 2016 19:52:03 +0000 (20:52 +0100)]
Fix display of some math symbols

* Fix spacing in lib/symbols after recent commits about math spacing, as well as
  older spacing issues (e.g. \Join).

* InsetMathKern now uses the same em value as other math length commands.

What is nice is that the kerning amount now matches the ones found in the
packages definition (modulo 10mu that lyx currently adds between relations).

Testcase: $\CheckedBox\LEFTcircle\RIGHTcircle\photon\gluon\vcentcolon\dblcolon\Coloneqq\eqcolon\models\hookrightarrow\bowtie\hookleftarrow\Join\APLinv\neq$

7 years agoFallback definitions for unicode paragraph/line break.
Günter Milde [Thu, 10 Nov 2016 11:45:27 +0000 (12:45 +0100)]
Fallback definitions for unicode paragraph/line break.

Convert characters 0x2028  LINE SEPARATOR and
0x2029 PARAGRAPH SEPARATOR to LaTeX equivalent.
(Just in case they slipped somehow into the source.)

7 years agoHandle properly unicode paragraph/line break
Jean-Marc Lasgouttes [Mon, 7 Nov 2016 09:14:39 +0000 (10:14 +0100)]
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.

7 years agoCmake export tests: Check exports also for different possible input encodigs
Kornel Benko [Wed, 9 Nov 2016 23:56:49 +0000 (00:56 +0100)]
Cmake export tests: Check exports also for different possible input encodigs

Affected are all lyx files in "autotests/export/latex/Unicode-characters" directory.
This completes the commit 6674a91573477e4716869ba728a9932e0a00e9e3

Thanks Günter.

7 years agoFix warning during runtime with qt4
Guillaume Munch [Wed, 9 Nov 2016 22:37:35 +0000 (23:37 +0100)]
Fix warning during runtime with qt4

Do not use "on_" as a prefix for functions unless the use of auto-connect is
intended.

7 years agoAdd comment
Guillaume Munch [Wed, 9 Nov 2016 21:54:27 +0000 (22:54 +0100)]
Add comment

7 years agolib/unicodesymbols test update and fixes.
Günter Milde [Wed, 9 Nov 2016 20:15:14 +0000 (21:15 +0100)]
lib/unicodesymbols test update and fixes.

First run of Kornels patch for tests with all input encodings in lib/encodings.

Remove redundant sample files - keep only one sample and change the input encoding in the test script.

Put remaining failing test in "unreliableTests" for later sorting...

7 years agoFix addition of new formats
Guillaume Munch [Wed, 9 Nov 2016 14:42:43 +0000 (15:42 +0100)]
Fix addition of new formats

Regression at cb0a4c66

7 years agoMake insertInset use a temporary cut-and-paste area.
Jean-Marc Lasgouttes [Wed, 9 Nov 2016 14:13:41 +0000 (15:13 +0100)]
Make insertInset use a temporary cut-and-paste area.

This is a long wanted feature, although it does not go all the way to
fix #6604 (private-cut/private-paste).

Additionally, it fixes a crash that can happen when using undefined
branches. This is done by making the action when pasting unknown
branches configurable.

Fixes bug #6570.

7 years agoencodings: use correct encoding "latin7" for ISO 8859-13
Uwe Stöhr [Mon, 7 Nov 2016 23:04:02 +0000 (00:04 +0100)]
encodings: use correct encoding "latin7" for ISO 8859-13

This fixes bug #10474 properly, thanks Günter

7 years agodoc files: port recent changes
Uwe Stöhr [Mon, 7 Nov 2016 22:53:19 +0000 (23:53 +0100)]
doc files: port recent changes

7 years agoAlways prefer breaking at word boundaries
Guillaume Munch [Sun, 6 Nov 2016 14:14:29 +0000 (15:14 +0100)]
Always prefer breaking at word boundaries

An overlong word containing a hyphen could be broken anywhere, instead of after
the hyphen.

Example: compare the line breaking of

   aaaaa-aaaaa-aaaaa-aaaaa

with

   aaa aaaaa-aaaaa-aaaaa-aaaaa

(with a very narrow window)

This also improves Chinese text in some situations (#10299)

7 years agoOn-screen justification: stretch in proportion with the em, up to a limit
Guillaume Munch [Sat, 13 Aug 2016 18:03:02 +0000 (19:03 +0100)]
On-screen justification: stretch in proportion with the em, up to a limit

1) Distinguish expanding characters from separators, to fit with Qt's notion of
expanding character which comes from the Unicode std.  CountExpanders() is moved
to FontMetrics to fix a discrepancy with the duplicate implementation from
598f7e4a.

2) Make these expanders stretch on-screen proportionally to the em of the font.
If a row mixes large and small text, LyX let us see which spaces are set in the
bigger font.

3) Now that the stretch is defined in ems, add a limit such that an expander
never stretches more than 1.5em to avoid weird and hard to read justified lines.

4) Add a return boolean to setSeparatorExtraWidth for future use.

7 years agoJapanese EmbeddedObjects.lyx: re-add export format
Uwe Stöhr [Sat, 5 Nov 2016 18:19:19 +0000 (19:19 +0100)]
Japanese EmbeddedObjects.lyx: re-add export format

- I don't know if it is a bug that LyX automatically deletes the output format if it cannot find

7 years agoFrench Tutorial.lyx remove info accidentally introduced in recent commits
Uwe Stöhr [Sat, 5 Nov 2016 18:13:32 +0000 (19:13 +0100)]
French Tutorial.lyx remove info accidentally introduced in recent commits

7 years agoJapanese EmbeddedObjects.lyx: re-add code
Uwe Stöhr [Sat, 5 Nov 2016 18:12:40 +0000 (19:12 +0100)]
Japanese EmbeddedObjects.lyx: re-add code

please use 2.2.x as working branch for all doc files unless you describe new features in master!

7 years agodoc files port recent changes
Uwe Stöhr [Sat, 5 Nov 2016 18:03:56 +0000 (19:03 +0100)]
doc files port recent changes

7 years agoDon't parse multicolumn if the grid does not support it
Guillaume Munch [Thu, 3 Nov 2016 22:23:11 +0000 (23:23 +0100)]
Don't parse multicolumn if the grid does not support it

Fixes #10466 and visual/compilation bugs with InsetMathSplit, InsetMathDiagram,
InsetMathHull, InsetMathSubstack and InsetMathXYMatrix.

7 years agoRe-Fix #8471
Juergen Spitzmueller [Sat, 5 Nov 2016 12:10:51 +0000 (13:10 +0100)]
Re-Fix #8471

The bug has partly been re-introduced with fb9a866a6

7 years agoAvoid dataloss with \multicolumn
Enrico Forestieri [Sat, 5 Nov 2016 09:15:37 +0000 (10:15 +0100)]
Avoid dataloss with \multicolumn

When \multicolumn{ncol}{align}{content} is parsed and the ncol
parameter is not a numeric value, this parameter is swallowed
and replaced with '1'. Hence, if the file is subsequently saved
a dataloss would occur. With this commit, \multicolumn is not
interpreted when ncol is not a numeric value and is left as is.

See also #10466

7 years agoRound values properly when drawing right margin selection
Jean-Marc Lasgouttes [Fri, 4 Nov 2016 14:57:59 +0000 (15:57 +0100)]
Round values properly when drawing right margin selection

This fixes a compiler warning reported by Uwe.

7 years agoFix height of cursor inside insets
Jean-Marc Lasgouttes [Fri, 4 Nov 2016 11:01:43 +0000 (12:01 +0100)]
Fix height of cursor inside insets

It turns out that Cursor::getFont() does not return a fully realized
font in some cases. This patch uses real_current_font instead, which
seems better anyway.

I suspect that all uses of getFont() should be removed, but this is
not code that I know well.

Fixes bug #10478.

7 years agoClear background behind sublables when necessary.
Jean-Marc Lasgouttes [Fri, 4 Nov 2016 10:35:22 +0000 (11:35 +0100)]
Clear background behind sublables when necessary.

This is analogous to what has been done to address #4889 and #10359.

Fixes bug #10475.

7 years agoQString only uses UTF-16, not UCS-4
Jean-Marc Lasgouttes [Wed, 2 Nov 2016 16:42:56 +0000 (17:42 +0100)]
QString only uses UTF-16, not UCS-4

This means that, when a string contains high-plane Unicode characters,
the length of a docstring and the corresponding QString will be
different: Qt will encode these characters using several 16bit
characters.

We have additionally to take into account QTBUG-25536, which implies
that sometimes qstring_to_ucs4(toqstr(s)) !=s. It is not clear whether
this bug can be a problem in other places.

Fixes bug #10443.

7 years agode.po
Juergen Spitzmueller [Thu, 3 Nov 2016 09:33:14 +0000 (10:33 +0100)]
de.po

7 years agoIn Color Preferences "frame of button" should be "button frame"
Daniel Ramöller [Sun, 30 Oct 2016 16:19:29 +0000 (17:19 +0100)]
In Color Preferences "frame of button" should be "button frame"

Fixes #10135.