Runs the compare via the command line, and then compares the output to the
expected result. Required adding a script to do the comparison, so that
the timestamps on changes in the lyx file are ignored.
This is only relevant on linux/unix if running the scripts from a shell.
These two were the last where the call still used an unversioned python.
This has no reflex on the way that lyx calls the scripts or the python
version used since the #! "shebang line" is ignored.
For elements that should behave like sections (for now, mostly prefaces).
A second paragraph of PartBacktext can only wreak havok: it should start a section, and nothing else (otherwise, it's a real nightmare to implement).
In cooperation with Thibaut Cuvelier:
lib/scripts/spreadsheet_to_docbook.py: Strip the document header and convert some flags
lib/xtemplates/gnumeric.xtemplate: use this output to be inserted in docbook5
lib/configure.py: Add needed conversion entries
Disable conversion cache because all lyx instances use the same cache without
any locking between read and write to the cache.
Thanks to Scott catching this case.
Needed font-config (so that this script is probably OK on unix systems only)
Probably needed module for Getopt::Mixed.
On debian systems it is contained in package libgetopt-mixed-perl
The log file generated by latex can contain strings encoded in
whatever supported encoding. Instead of guessing the encoding,
it is better to open it in binary mode and then performing the
necessary comparisons as "bytes". In order to do this, the
strings are encoded in utf8, so that, for example, b"pythön" is
encoded as "pyth\xc3\xb6n" (7 bytes). Of course, this means that
we can only successfully perform comparisons with ascii strings.
However, this is what we actually do, as we only search for
ascii strings in the log file.
Unfortunately, stat.st_ino returns 0 on Windows, at least on Python 2.7, so we can't use that way of telling when we're seeing the same directory again. Surely the real pathname should work.
Three backslashes are needed before a LaTeX command, not one. Before
this commit, the code gave the following error with Python >= 3.6:
re.error: bad escape \g at position 29
This error was introduced with Python 3.6, as documented [1] by the
following line of documentation:
Changed in version 3.6: Unknown escapes in pattern consisting of
'\' and an ASCII letter now are errors.
Although previous Python versions did not give an error, the regular
expression was not working as intended: for example, the "\\n" in
"\\newcommandx" would be interpreted as a new line.
[1] https://docs.python.org/3.6/library/re.html#re.sub