On Thu, Jun 11, 2020 at 06:30:22PM +0200, Thibaut Cuvelier wrote:
> Yes, the output is identical. I also added some comments.
> 
> I'm adding a third patch in this, I forgot it was necessary??? It is a
> refactoring of XHTMLStream as a more generic XMLStream (required for
> DocBook, and it has a few implications for MathML, but not that much).

The refactoring looks reasonable, unfortunately it breaks tex2lyx here.
Apart from harmless warning (which should be fixed though) linker
for tex2lyx screams as new dependencies appear. Most likely doesn't
appear for you because cmake links everything?
I can look next week, but I spent all my avail lyx-time for today when trying 
to fix it.

0001 patch gives me:


output_docbook.cpp: In function 'const docstring& 
lyx::{anonymous}::fontToDocBookTag(lyx::xml::FontTypes)':
output_docbook.cpp:48:40: warning: returning reference to temporary 
[-Wreturn-local-addr]
             return from_utf8("emphasis");
                                        ^
output_docbook.cpp:50:38: warning: returning reference to temporary 
[-Wreturn-local-addr]
             return from_utf8("person");
                                      ^
output_docbook.cpp:62:40: warning: returning reference to temporary 
[-Wreturn-local-addr]
             return from_utf8("emphasis");
                                        ^
output_docbook.cpp:64:36: warning: returning reference to temporary 
[-Wreturn-local-addr]
             return from_utf8("code");
                                    ^
output_docbook.cpp:77:40: warning: returning reference to temporary 
[-Wreturn-local-addr]
             return from_utf8("emphasis");
                                        ^
output_docbook.cpp:79:30: warning: returning reference to temporary 
[-Wreturn-local-addr]
             return docstring();
                              ^
output_docbook.cpp: At global scope:
output_docbook.cpp:44:19: warning: 'const docstring& 
lyx::{anonymous}::fontToDocBookTag(lyx::xml::FontTypes)' defined but not used 
[-Wunused-function]
 docstring const & fontToDocBookTag(xml::FontTypes type) {
                   ^~~~~~~~~~~~~~~~
  CXX      output_xhtml.o
output_xhtml.cpp: In function 'const docstring& 
lyx::fontToHtmlTag(lyx::xml::FontTypes)':
output_xhtml.cpp:52:34: warning: returning reference to temporary 
[-Wreturn-local-addr]
             return from_utf8("em");
                                  ^
output_xhtml.cpp:54:33: warning: returning reference to temporary 
[-Wreturn-local-addr]
             return from_utf8("b");
                                 ^
output_xhtml.cpp:56:35: warning: returning reference to temporary 
[-Wreturn-local-addr]
             return from_utf8("dfn");
                                   ^
output_xhtml.cpp:60:33: warning: returning reference to temporary 
[-Wreturn-local-addr]
             return from_utf8("u");
                                 ^
output_xhtml.cpp:63:35: warning: returning reference to temporary 
[-Wreturn-local-addr]
             return from_utf8("del");
                                   ^
output_xhtml.cpp:65:33: warning: returning reference to temporary 
[-Wreturn-local-addr]
             return from_utf8("i");
                                 ^
output_xhtml.cpp:84:36: warning: returning reference to temporary 
[-Wreturn-local-addr]
             return from_utf8("span");
                                    ^
output_xhtml.cpp:87:22: warning: returning reference to temporary 
[-Wreturn-local-addr]
     return docstring();
                      ^
insets/InsetCounter.cpp: In member function 'virtual lyx::docstring 
lyx::InsetCounter::xhtml(lyx::XMLStream&, const lyx::OutputParams&) const':
insets/InsetCounter.cpp:197:43: warning: unused parameter 'xs' 
[-Wunused-parameter]
 docstring InsetCounter::xhtml(XMLStream & xs, OutputParams const &) const


insets/InsetLabel.cpp: In member function 'virtual int 
lyx::InsetLabel::docbook(lyx::odocstream&, const lyx::OutputParams&) const':
insets/InsetLabel.cpp:354:63: warning: unused parameter 'runparams' 
[-Wunused-parameter]
 int InsetLabel::docbook(odocstream & os, OutputParams const & runparams) const


  CXX      dummy_impl.o
  CXXLD    tex2lyx
dummy_impl.o: In function 
`lyx::xml::StartTag::StartTag(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&)':
/home/lyx/devel/src/tex2lyx/../../src/xml.h:164: undefined reference to `vtable 
for lyx::xml::StartTag'
dummy_impl.o: In function `lyx::xml::StartTag::~StartTag()':
/home/lyx/devel/src/tex2lyx/../../src/xml.h:180: undefined reference to `vtable 
for lyx::xml::StartTag'
dummy_impl.o: In function `lyx::xml::StartTag::~StartTag()':
/home/lyx/devel/src/tex2lyx/../../src/xml.h:180: undefined reference to `vtable 
for lyx::xml::StartTag'
../Layout.o: In function 
`lyx::xml::StartTag::StartTag(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&)':
/home/lyx/devel/src/xml.h:164: undefined reference to `vtable for 
lyx::xml::StartTag'
collect2: error: ld returned 1 exit status
Makefile:630: recipe for target 'tex2lyx' failed
make[4]: *** [tex2lyx] Error 1


Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to