DocBook change: use a stack of fonts

Thibaut Cuvelier dourouc05 at gmail.com
Sat Jan 7 02:19:39 UTC 2023


On Sun, 1 Jan 2023 at 13:02, Kornel Benko <kornel at lyx.org> wrote:

> Am Tue, 27 Dec 2022 02:13:15 +0100
> schrieb Thibaut Cuvelier <dourouc05 at gmail.com>:
>
> > 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
>
> What could you do, is to call xmlParser.pl directly to check if it working
>
>         $ perl D:/LyX/lyx-unstable/development/autotests/xmlParser.pl
> some_test_file.xml
> This should give the same error. In this case check if
> C:/Strawberry/perl/vendor/lib/auto/XML/Parser/Expat/Expat.xs.dll exists.
> (Maybe it is in
> the D: partition?)
>

I gave this command a try, but it didn't yield any error. Actually, I got a
representation of the XML tree:

C:\Users\Thibaut\Documents>perl
D:/LyX/lyx-unstable/development/autotests/xmlParser.pl
"D:\LyX\lyx-unstable\autotests\export\docbook\abstract_list.xml"
\\ (lang de_DE version 5.2)
article || #10;
article \\ ()
article info || #10;
article info \\ ()
article info title || LyX-Anpassung:

Would it be possible that it is due to some PATH issue, correctly set when
I run Strawberry Perl (with its own shell configuration) and not when I
just add perl.exe to the PATH for the test suite? I see that perl.exe is in
C:\Strawberry\perl\bin, while Expat's DLL is in C:\Strawberry\c\bin.

In any case, I don't believe the Perl code is to blame.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20230107/dfc2161d/attachment.html>


More information about the lyx-devel mailing list