LyXLyX 2.4.2.1 and DocBook 5 export

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
pblatex
Posts: 1
Joined: Thu Jan 30, 2025 8:45 am

LyX 2.4.2.1 and DocBook 5 export

Post by pblatex »

I had to update to newer LyX version and it looks like the "DocBook 5" export causes some troubles on my side.

Before: LyX Doc -> DocBook export to SGML -> conversion to html
Now: LyX Doc -> DocBook export to XML-> conversion to html

The embedded code (\begin_layout Plain Layout...) in the document contained since long time relate to info/revision and so on did not proper survive but is required for the box
https://www.deepspace6.net/projects/ipv6calc.html

Old set worked at least with 2.3.7
https://github.com/pbiering/ipv6calc/tree/4.2.2/doc

New set need some tweaks for 2.4.2.1
https://github.com/pbiering/ipv6calc/blob/4.3.0/doc/

Tweak#1: require to add in front of

Code: Select all

\begin_layout Right Address
pb at bieringer dot de
\end_layout
that leads at least to that the "Plain Layout" section survives the XML export at least as comment - otherwise it will not occur in XML export at all

Code: Select all

lyx --export docbook5 ipv6calc.lyx

Code: Select all

<!-- &lt;author&gt;&lt;firstname&gt;Peter&lt;/firstname&gt;&lt;surname&gt;Bieringer&lt;/surname&gt;&lt;affiliation&gt;&lt;address&gt;pb at bieringer dot de&lt;/address&gt;&lt;/affiliation&gt;&lt;/author&gt; --><!-- &lt;revhistory&gt;  --><!-- &lt;revision&gt; &lt;revnumber&gt;12.0.0&lt;/revnumber&gt; &lt;date&gt;2025-01-28&lt;/date&gt; &lt;authorinitials&gt;PB&lt;/authorinitials&gt;&lt;/revision&gt; --><!-- &lt;/revhistory&gt;  -->
Tweak#2: using Perl to reactivate the content

Code: Select all

perl -pi -e 's#&lt;(\/?(author|firstname|surname|affiliation|address|revhistory|revision|revnumber|date|authorinitials))&gt;#<$1>#g' ipv6calc.xml
perl -pi -e 's#<!--\s*(</?(author|revision|revhistory)>)#$1#g' ipv6calc.xml
perl -pi -e 's#(</?(author|revision|revhistory)>)\s*-->#$1#g' ipv6calc.xml
Then the conversion to HTML is proper working and the revision history box appears in HTML.

Code: Select all

xsltproc -o ipv6calc.html db2xhtml-ipv6calc.xsl ipv6calc.xml
Is this a bug or a dropped feature or is there any change in LyX doc required to let "DocBook 5" export this revision information proper as it worked in the past?

Thank you in advance for any help, had not found any hints using search engines the last days.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
milka
Posts: 1
Joined: Mon Feb 03, 2025 6:39 pm

Re: LyX 2.4.2.1 and DocBook 5 export

Post by milka »

Looks like a bug. I think you should report it on the lyx bug tracker or their mailing list.
Post Reply