The fixes are simple and on line with the changes made during
the 2.3 development. It was an oversight to leave them out.
With this commit all the python scripts should be supported by
python 2 and 3.
Following a request by Günter, we consider the document fonts (only rm
for now) when selecting an appropriate font encoding.
See #9741
The new default font encoding setting "auto" does
* consider the font encoding needed by the language(s), which can now
have fallback alternatives
* Consider which font encoding is provided by the document font
Thus, cm now will result in OT1 fontenc, if the language can deal with
that.
The font_enc pref is ditched: it is no longer needed.
The automatism is still very basic and is subject to extension.
File format and prefs format change.
This is complementary to AutoNests: Styles can determine which other
style should auto-nest them. This is particularly useful for modules
that add new styles which should be auto-nested in a given context.
Now layouts can specify other layouts that should be nested in and
after the current one (if the layout is switched from the current one
and if it follows a paragraph in the current one).
This is particularly useful for things such as the beamer frames, where
particular layouts are practically always nested.
The current spelling is not strictly wrong, but flagged as unusual or
historical by some authorities. It is also found fault with many
spell checkers. Thus we decided to move to the more standard "-ible"
form once and for all.
See #10678 for discussion
This part covers the most tricky part: the internal naming.
Translations and layouts will follow.
This will all also all be backported to 2.3.x, for the sake of backwards
compatibility (cherry-picking).
In 1a26f9b26c, all strings in the context of regexes and
comparisons have been converted to byte-like objects for python2/3
compatibility reasons. This has not been considered in the later
commit 5c54557350, which makes layout2layout break with
TypeError: can't concat str to bytes.
Now painting the workarea is done at paint events as should be.
Explicit painting after updating metrics has been replaced by a much
lighter procedure (updatePosCache) to update the insets positions cache.
Expected benefits:
- better performance
- proper use of subpixel aliasing
The LyXRC variable use_qimage is not needed anymore and is therefore removed.
Remove the trimming operation on LabelString, LabelStringAppendix,
EndLabelString and LabelCounter. This trimming meant that quotes
strings were not preserved, which is wrong.
To preserve layouts, the Layout format has been updated to 64, so that
layout2layout can remove extra spaces on existing strings, which
ensures that behavior is unchanged for old layouts (courtesy of rgheck).
It is now possible to re-add spaces in label strings where it makes
sense.
Fixes bug #10723.
The inkscape command was hardcoded, but it seems that we need the full
patch on Windows. Therefore we check in configure.py if inkscape is
installed and pass the proper name (and possibly path) to the scripts.
Should address problems mentioned in #10679
This fixes an error in the preview generation with polyglossia
and bidi that prevents snippet generation (and consequently also
"math as image" xhtml output).
Fixes: #10716.
Due to the peculiarities of Windows, it may happen that
pdftocairo is built without png support when compiled on this
platform. Unless explicitly requested (maybe for some peculiar
application and certainly not for usual distros), this is
highly improbable to occur on other platforms.
1.) Handle also 'LatexCommand inputminted' in lyxStatus.pm
2.) Add '-shell-escape' to the appropriate converters.
This applies only to the ctest-environment iff calling
the script 'prefTest.pl' in the build directory.
If we call parser.parse_args(), thus with no arguments, the parser uses
sys.argv (because that is the default). We should pass argv since that was
the purpose of handling argv in the main function.
We pass argv[1:] since when parsing the arguments we always ignore the name
of the program.
Use the full power of argparse to declare the default value of the end_format.
If we call parser.parse_args(), thus with no arguments, the parser uses
sys.argv (because that is the default). We should pass argv since that was
the purpose of handling argv in the main function.
Remove support for python 1.x (really)
This code has not been used for a long time, probably never, since some code
above requires at least python 2.4 to work.
I got to this code by running futurize from python-future. There are no
significant warnings, mostly are related with the division but since
we are dividing floats there is no change between python 2 and 3.
python 2 does not allow to declare a string as raw byte so we double
the backslashes and remove the r preffix
python 3 accepts rb"..." meaning a byte string that is raw. In this context
raw means that the backslash does not has any special meaning and thus it
is not escaped. This is usefull together with regular expressions where the
backslashes are special.
In the worst possible case, like this one, we must use 4 backslashes to represent
one in the regular expression...
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.