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.
The context menu did no longer work for some insets, since it requires the
cursor to be in front, and editXY() is also used to determine the inset for
the context menu. Now the cursor is corrected if needed.
Georg Baum [Thu, 15 Oct 2015 18:52:28 +0000 (20:52 +0200)]
Fix std::string docstream output error
This was made visible by aab1b145a57c, since xhtml export for
lib/doc/Additional.lyx caused an exception. However, the cause for this was
already present earlier: All attempts to output a std::string to an
odocstream resulted in trying to change the encoding of the stream instead,
since there is no operator<<(odocstream &, std::string) defined, and an
implicit conversion to SetEnc happened instead.
This is fixed by making the SetEnc constructor explicit and adjusting all
code parts that did not compile anymore after that. The parts of the code
that did use the wrong output operator were the std::string version of
htmlize() from output_xhtml.cpp and all changed parts in the other .cpp files.
I also removed the std::string versions of html::htmlize() and
html::cleanAttr(), since it was difficult to see which encodings were used
with these. Now we are always explcit when using html::cleanAttr() and
html::htmlize().
Uwe Stöhr [Mon, 12 Oct 2015 00:50:07 +0000 (02:50 +0200)]
installer: update the packages list
- there are some new packages required by LyX's supported document classes and example files
(this list is only used when LyX is installed the first time on a PC together with MiKTeX to shorten the installation time)
Georg Baum [Sun, 11 Oct 2015 12:21:45 +0000 (14:21 +0200)]
Fix cursor movement for large logos (#9628)
Previously, if one clicked onto a large non-editable inset like the new LyX
logo inset, the cursor was always positioned in front of the inset, even if
the click was almost at the back edge. Now the cursor is positioned at the
correct edge. I tested this also with RTL contents, where from means right
and back means left, but the inset anchor position anchor point is still
at the left, and the right edge is dim.wid pixels to the right of it.
Georg Baum [Sun, 11 Oct 2015 09:16:09 +0000 (11:16 +0200)]
Comply with rule-of-three
The rule-of-three says that if any of virtual destructor, copy constructor
or assignment operator needs to be manually implemented, then all three
should be implemented. Otherwise you can get subtle bugs which can be
difficult to find. In the changed classes, changing a copy-construction to
an assignment would have had surprising effects. Now they all behave
consistently.