Georg Baum [Tue, 27 Oct 2015 21:36:52 +0000 (22:36 +0100)]
Make language nesting code more readable
This is a tiny simplification that makes understanding the code more easy and
will help in fixing the remaining regressions. The logic remains the same, no
export test result is changed.
Georg Baum [Sun, 25 Oct 2015 09:47:40 +0000 (10:47 +0100)]
Add toolbar icons for LyX documentation
These icons are for lfuns that are not very interesting for users, but quite
often used when working on the LyX documentation. Now we can create a special
LyX documentation toolbar.
Scott Kostyshak [Sun, 25 Oct 2015 03:37:33 +0000 (23:37 -0400)]
Invert some ctests that correctly fail
These exports correctly fail now that we've switched to polyglossia.
Although they compiled without error with babel, the resulting PDFs
had gibberish.
Scott Kostyshak [Sat, 24 Oct 2015 19:34:02 +0000 (15:34 -0400)]
ctests: uninvert tests that were fixed by updates
I believe these tests were fixed by TeX Live updates.
Comparing the log files for a system where the tests fail with a
system where the tests pass, below are some of the differences
between the "good" and "bad" logs:
Scott Kostyshak [Fri, 23 Oct 2015 22:11:19 +0000 (18:11 -0400)]
Fix polyglossia exports for docs with babel cmds
Many of our documents have babel-specific preamble code. By putting
this code in a \@ifpackageloaded{babel}{}{} conditional, XeTeX and
LuaTeX compilation with polyglossia now works. This fixes some
LuaTeX tests that were broken by edd37de8 and also allows us to
uninvert some XeTeX tests.
Note that in some of the files although the preambles were fixed to
allow for polyglossia, they still do not compile without errors:
es/Math.lyx
es/Customization.lyx
de/Customization.lyx
Similar fixes might be desired in other manuals but these at least
fix regressions in the tests.
Scott Kostyshak [Sat, 24 Oct 2015 06:30:03 +0000 (02:30 -0400)]
Correct PolyglossiaOpts for Serbian
PolyglossiaOpts are case-sensitive so "latin" must be changed to
"Latin". Without this change, compiling examples/sr/Braille.lyx
with LuaTeX and system fonts gives the following error:
Package Polyglossia Error: Unknown script `latin' for Serbian
language
Scott Kostyshak [Sat, 24 Oct 2015 04:45:49 +0000 (00:45 -0400)]
Use "babel only" for some Spanish manuals
Many of our Spanish documents use babel-specific features in the
documents, e.g. to write "sin" in Spanish ("sen"). Because babel
seems to have good support for Spanish, I am setting the "Always
babel" for the manuals.
This fixes several LuaTeX tests with non-TeX fonts. A XeTeX test is
also reverted accordingly.
Scott Kostyshak [Sat, 24 Oct 2015 00:28:15 +0000 (20:28 -0400)]
Update formats
Some of my following commits will make changes to these files
(mainly just changing the preambles). This commit simply updates the
format so the diffs of the following commits are easy to read.
Stephan Witt [Sat, 24 Oct 2015 19:03:01 +0000 (21:03 +0200)]
For Mac OS: Additional check for Control and Meta modifier swap state.
Starting with Qt 5 the modifiers aren't reported correctly for disabled swap.
Until this is fixed it is corrected by reverting the modifier mask to check for.
The horizontal alignment changes caused a regression for documents in older
formats. This could have been fixed by adding the following lines to the
format entry for 489 in development/FORMAT:
Previously, the horizontal position was ignored except for the
following parameter combinations:
- fixed width and type Boxed and without inner box
- fixed width and any type and with inner box and with makebox
Now, it is also used for the parameter combination below:
- makebox is not used and not (type Boxed and without inner box)
and a corresponding conversion to convert_BoxFeatures() in
lib/lyx2lyx/lyx_2_2.py. However, it was decided to revert the box alignment
changes instead: The box alignment can contradict the paragraph alignment. A
better way to avoid the additional space that can be created by paragraph
alignment (which was the motivation for implementing box alignment) is the
same as for table cells (see noTrivlistCentering() in src/Paragraph.cpp).
This would be a file format change and it is too late now for 2.2.0.
See http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg188147.html for the
complete discussion (subject "Regression in lyx2lyx box alignment").
Georg Baum [Mon, 19 Oct 2015 19:08:01 +0000 (21:08 +0200)]
Fix language nesting regression
b1c68dccf8f and 46aed6d2b90 fixed some language nesting issues, but introduced
a regression for the case that there is a standard paragraph in a foreign
language, followed by a list (e.g. itemize) in the same language, followed
by the end of the document, as e.g. in lib/doc/de/Additional.lyx. The reason
for this was that not all language ending commands did reset
state->open_polyglossia_lang_ correctly.
I am sure that one can still construct broken corner cases, and I am also sure
that this was already possible before b1c68dccf8f and 46aed6d2b90. However,
this fix seems to fix the most important issues, and to get nesting completely
correct we would probably need some stack-like structure, for languages and
encodings, also for the CJK part (which is not touched at all by this commit).
Guillaume Munch [Tue, 13 Oct 2015 22:51:50 +0000 (23:51 +0100)]
Add cursor<->row correspondance tracking for tables and subcaptions.
Please use the new function otexstream.append(str, texrow) to append an
odocstringstream with texrow information to the output when outputing to a
string buffer (e.g. case of subcaptions).
Guillaume Munch [Mon, 12 Oct 2015 22:31:15 +0000 (23:31 +0100)]
Remove a deep copy of MathData in lyx::write
This deep copy used to mess with the unique identifier: what TexRow saw was
different from the original uid. There may also be performance improvements.
Guillaume Munch [Sun, 11 Oct 2015 13:50:32 +0000 (14:50 +0100)]
TexRow info in source panel and gotoCursor() for debugging
These features are active in DEVEL_VERSION when Debug is set to LATEX.
1. The TexRow information is prepended to the source panel.
2. Clicking on any line in the source triggers reverse search. (This would be an
interesting feature to implement on the user side, but we need a proper LFUN.)
Guillaume Munch [Wed, 7 Oct 2015 03:13:21 +0000 (04:13 +0100)]
Adding TexRow information on math latex output (#4725)
WriteStream is now built from an otexstream instead of an odocstream, and
therefore counts lines in a TexRow. Calls to TexRow are added in relevant places
in math insets.
This finishes adding line tracking for math in the source panel and for forward
search.
Guillaume Munch [Tue, 13 Oct 2015 23:17:05 +0000 (00:17 +0100)]
Add math cell positions to TexRow
This is preliminary work for extending the cursor<->row tracking to math.
TexRow used to associate, to each row, a location id/pos where id determines a
paragraph and pos the position in the paragraph.
TexRow now associates to each row a list of entries, text or math. A math is a
pair uid/idx where uid will determine a math inset and idx is the number of the
cell.
The analogy id/pos<->inset/idx works better than the analogy id/pos<->idx/pos,
because what matters for the TexRow algorithm(TM) is the behaviour in terms of
line breaks.
This only improves the source view and the forward search, not the error report
and the reverse search (though this could be easily added now).
Guillaume Munch [Wed, 7 Oct 2015 03:02:40 +0000 (04:02 +0100)]
Splitting otexstream into otexrowstream and otexstream.
otexstream used to count lines to build a TexRow, and some other things. The new
class otexrowstream has the line counting feature of the previous otexstream
without other stuff. otexstream is now a subclass of otexrowstream that has the
same features as before.
This is preliminary work for extending the cursor<->row tracking to math.
Georg Baum [Sun, 18 Oct 2015 18:55:53 +0000 (20:55 +0200)]
Fix language end command
The code that sets open_polyglossia_lang_ is not only executed for polyglossia,
but also for babel, so we have to use the correct language end command.
Uwe Stöhr [Sun, 18 Oct 2015 16:57:15 +0000 (18:57 +0200)]
EmbeddedObjects.lyx: update appendix A
Since a while now we can translate the unit descriptions. For some special applications it is also necessary that the users know the LaTeX command of the relative units.