New DocBook support

Thibaut Cuvelier dourouc05 at gmail.com
Wed Jul 8 13:44:01 UTC 2020


On Fri, 26 Jun 2020 at 18:56, Thibaut Cuvelier <dourouc05 at gmail.com> wrote:

> Dear list,
>
> Here is the complete set of patches for the new DocBook implementation
> I've been working on for the last few years. It is a complete overhaul of
> the existing DocBook implementation, with a completely different mindset:
> the goal is to be able to convert almost any LyX document into DocBook, not
> only those that follow the DocBook templates. It works pretty well for now:
> D-BookeR (https://www.d-booker.fr/) can use it to convert a 200-A4-page
> LyX book into DocBook and use it in their toolchains (minus specificities
> for D-BookeR's use of DocBook, with many tags disabled).
>
> (This is a follow-up to https://www.lyx.org/trac/ticket/8444, cleanly
> divided in several patches and reviewed by Guillaume.)
>
> These patches apply cleanly on 4dc33e52f8c5b4a4c31e05da09ccb1dfb627e5cb
> (you can have a look at
> https://gitlab.com/gadmm/lyx-unstable/-/merge_requests/3). Guillaume
> reviewed it all, except the Python parts (they are quite small). It relies
> on the patches I recently submitted for XMLStream and MathML improvements.
> This contribution also includes documentation for the new layout parts, and
> a few test cases (both LyX documents and their reference DocBook
> translation). The division in patches is designed so that the code base
> remains compilable between patches.
>
> There are still a few points to discuss. More specifically:
> - documents are supposed to only contain one bibliography, at the very
> end. Other cases will probably lead to invalid DockBook. In DocBook, a
> bibliography is supposed to be either at the beginning or at the end of a
> book/part/chapter/section; it is not always clear at which level the
> bibliography should be output
> - handling subfigures is currently implemented in a suboptimal way:
> InsetFloat looks specifically for a given kind of pattern of insets in the
> LyX document (https://wiki.lyx.org/FAQ/FiguresSideBySide). Guillaume
> would have rather seen gathering information in OutputParams, but the
> implementation would be far from straightforward...
> - similarly, for floats, the DocBook tags for the floats and the captions
> are hard-coded in the Floating class, and not in the layouts. It is
> unlikely that this part should be overridden by other document
> classes/modules. The only missing part is algorithms, which are not handled
> by DocBook for now (but they may in the future:
> https://github.com/docbook/docbook/issues/157). Or am I missing other
> kinds of floats?
>
> Only the "main" DocBook vocabulary is implemented (the one that is being
> normalised by OASIS, the major standard body for XML-based things). The
> output requires DocBook 5.2 (which is not yet released), due to support for
> subfigures (other documents are compatible with 5.0): I had to ask the
> DocBook committee to include it at some point for this project. There is no
> option to output simplified DocBook (
> https://docbook.org/schemas/5x-custom.html#simple); Beamer documents are
> not translated to DocBook Slides (
> https://docbook.org/schemas/5x-custom.html#slides). These two variants
> are unofficial, and could be implemented in the future (I did not look at
> them to see how complex it would be).
>
> If anything could help you review this, let me know!
>
> All the best,
> Thibaut Cuvelier
>

I don't exactly know where to submit this, so here it is: another patch to
clean up. This should remove support for DeclareDocBookClass in layouts, as
it's no more useful.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200708/d384920c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Clean-up-DeclareDocBookClass.patch
Type: application/octet-stream
Size: 1038 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200708/d384920c/attachment-0001.obj>


More information about the lyx-devel mailing list