Fixes output for 3 of the 4 test lyx-files.
Includes "FIXME"s at places where further action is required to get the XeTeX
export right but I don't know how.
Remove member disp_ that is defined both in Cursor and CursorData classes
Pass parameter of convert<T>(docstring const) templates as const reference for performance.
b1c68dccf8 and 46aed6d2b9 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 b1c68dccf8 and 46aed6d2b9. 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).
The correct mappings break the tex2lyx roundtrip tests because both,
the tests and tex2lyx use the wrong mapping (\b for "combining minus below").
Fix tex2lyx and the test files so that round-trip tests pass again.
The culprit was that the computation of textwidth did not take wordspacing in account.
Also fictor the code so that the pixmap path can use the special RTL handling.
It is not clear however that the handling of left and right bearing works correctly.
We already have a CoordCache of insets dimensions. It is not necessary
to store the same information in two places.
Give a name to CoordCache tables types to improve code readability.
Remove ParagraphMetrics::singleWidth, which is not used anymore.
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).
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.
(Using Georg's suggestion)
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.)
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.
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).
The id is just the memory address.
The status bar now spits out the math inset uid information when in a math cell
in DEVEL_VERSION, like it already does when in a paragraph.
This is preliminary work for extending the cursor<->row tracking to math.
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.
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.
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.
- also fix a typo in Customization.lyx
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.
This was made visible by aab1b145a5, 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().
- 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)
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.