The layout2layout.py script already reads and writes files in
binary format. However, all regexes and comparisons assume strings,
so that python3 chokes on them. This commit converts all involved
strings into bytes-like objects. In this way both python 2 and 3
behave the same.
Don't assume any encoding for the layout files and treat them in
the same way python 2 does. Thanks José for the idea.
This commit supersedes 50e21b71 and e19b2a71.
1.) The command check_layout exits with "0", even if the module contains errors.
The new module check_layout.cmake tries to compensate.
2.) Added default style to the test layouts when checking single modules.
Seemingly, when removing an argument from argv, and thus inserting
a null pointer to shorten the array, causes an assertion because
the null pointer is not a valid heap pointer (sic!)
Fixes bug #10440
When trying to do implement a LaTeX feature on screen, it is always
good to see how LaTeX does it, just in case it is easy to implement on
our side.
Then we have a correct output at all DPI sizes.
- LyX has new preamble tags. Although that they are not relevant for LaTeX they must be created by tex2lyx nevertheless
- also fix an issue that the formula indentation was always output
- update the tex2lyx tests accordingly
getPosNearX, which is the only user of x2pos, should always return the
nearest position.
In editXY, there is a need to return the position where the inset
stands, but it is done using checkInsetHit.
This is a simplification of commit eb4a2a19, which has been reverted
at 01f0ab64a.
Fixes part of bug #10569.
Instead of using complicated (and wrong) code, it is better to use
getPosNearX here.
Also simplify the code by removing temporary variables.
Fixes part of #10569.
The code that looks whether neighbor block has a different direction
should look to the left or to the right depending on the direction of
the current block.
Fixes part of bug #10569
This allows to fix distclean properly, since we know that
subdir-objects is used. When it is the case, it is not a good idea for
a Makefile to use a source file which is under the control of another
one. This could not be made to work work with old automake versions
(<1.14).
Therefore we refer directly to object files in Makefile.am instead of
source files. The actually leads to less compilation in tex2lyx.
Update the code here and there to remove compatibility hacks. Update
documentation.
Re-enable the layout test and fix the Length test, which was ovewriting
memory in test_inPixels() because lyxrc did not had a correct layout.