DocBook change: use a stack of fonts
Thibaut Cuvelier
dourouc05 at gmail.com
Tue Dec 27 01:13:15 UTC 2022
Dear list,
To solve https://www.lyx.org/trac/ticket/12585, I wrote the attached patch.
Basically, LyX now considers the order of font tags when closing them,
otherwise you get strange results like in the ticket. The bug is quite
serious, actually, even though I don't believe many users will hit it.
I'd like help on two points:
- code review
- running the test suite (ctest -R "_docbook")
Currently, I cannot run the DocBook test suite due to Perl errors. I'm
quite ignorant about Perl, so I'm not sure what I should do about the
issue. I understood that the XML::Parser module can't be found, but perl -e
"use XML::Parser" and perl -e "use XML::Parser::Expat" run without
troubles. Here is the log from CTest:
266: -- Expected result file
"D:/LyX/lyx-unstable/cmake-build-debug/autotests/out-home/AbC_9MGmGf/export/docbook/LFUNs.xml"
exists
266: -- Calling C:/Strawberry/perl/bin/perl.exe
"D:/LyX/lyx-unstable/development/autotests/xmlParser.pl"
"export/docbook/LFUNs.xml"
266: -- Can't load
'C:/Strawberry/perl/vendor/lib/auto/XML/Parser/Expat/Expat.xs.dll' for
module XML::Parser::Expat: load_file:The specified module could not be
found at C:/Strawberry/perl/lib/XSLoader.pm line 93.
266: at C:/Strawberry/perl/vendor/lib/XML/Parser/Expat.pm line 29.
266: Compilation failed in require at
C:/Strawberry/perl/vendor/lib/XML/Parser.pm line 18.
266: BEGIN failed--compilation aborted at
C:/Strawberry/perl/vendor/lib/XML/Parser.pm line 22.
266: Compilation failed in require at
D:/LyX/lyx-unstable/development/autotests/xmlParser.pl line 4.
266: BEGIN failed--compilation aborted at
D:/LyX/lyx-unstable/development/autotests/xmlParser.pl line 4.
266:
266: -- Calling:
C:/Strawberry/perl/bin/perl.exeD:/LyX/lyx-unstable/development/autotests/filterXml4Sax.pl
D:/LyX/lyx-unstable/cmake-build-debug/autotests/out-home/export/docbook/LFUNs.xml
266: -- Errors from xmllint: Could not run xmllint
266:
266: -- Msg Summary:
266: -- OK: Exporting
"D:/LyX/lyx-unstable/cmake-build-debug/autotests/out-home/AbC_9MGmGf/export/docbook/LFUNs.lyx"
to format docbook5
266: -- Error: Checking
"D:/LyX/lyx-unstable/cmake-build-debug/autotests/out-home/AbC_9MGmGf/export/docbook/LFUNs.xml"
with xmlParser.pl
266: -- Error: Checking
"D:/LyX/lyx-unstable/cmake-build-debug/autotests/out-home/AbC_9MGmGf/export/docbook/LFUNs.xml"
with C:/Strawberry/c/bin/xmllint.exe
266: -- Exporting export/docbook/LFUNs.lyx to docbook5
Here is my small debugging session:
C:\Users\Thibaut\Documents>perl -e "use XML::Parser"
C:\Users\Thibaut\Documents>perl -e "use XML::Parser::Expat"
C:\Users\Thibaut\Documents>where perl
C:\Strawberry\perl\bin\perl.exe
(By the way, the "lyx-windows-deps-msvc2017" archive should be updated with
the contents of
http://xmlsoft.org/sources/win32/64bit/libxml2-2.9.3-win32-x86_64.7z to
include xmllint.)
If anyone can lend me a hand either by testing the patch locally or by
troubleshooting the test suite, I'd be really grateful!
All the best,
Thibaut Cuvelier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20221227/942534fe/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-DocBook-implement-a-stack-of-fonts.patch
Type: application/octet-stream
Size: 22260 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20221227/942534fe/attachment-0001.obj>
More information about the lyx-devel
mailing list