Fwd: Springer Nature Journals layout: is this change safe?
Thibaut Cuvelier <[email protected]>
| Newsgroups | gmane.editors.lyx.devel |
|---|---|
| Message-ID | <CAK0LPyjf3r0cZURSYEcqsLiH=1bfxmea01Ac4q+0D6mAihdzHQ@mail.gmail.com> |
Second attempt… ---------- Forwarded message --------- From: Thibaut Cuvelier <[email protected]> Date: Sun, 22 Feb 2026 at 17:48 Subject: Springer Nature Journals layout: is this change safe? To: LyX Developers <[email protected]> Hi all, Following a report from Scott, I tried to improve the situation for exporting Springer Nature Journals to DocBook. The last few patches improve the situation quite a bit (and they should be safe to go in 2.5.x). There are two stubborn issues: algorithm floats and appendices. Unless I implement something specific to parse algorithms, the example will never work as is (the ERT starting with \begin{algorithmic}[1]) — there is nothing standard in DocBook for algorithms, I don't think I'll go this route unless there is a real need. I wrote a patch for appendices (in attachment), but I do not want to push without review. The current layout considers appendices as BackMatter, but they are really section titles. With this change, the DocBook output for appendices is correct, but I'm not sure exactly how much the change impacts the rest of LyX (apart from the UI). Without this, I cannot make appendices generate valid DocBook (well, unless we refactor the UI part from the handling part of categories: sections have a really different code path than the other styles in DocBook due to its hierarchical nature). What do you think? Maybe I missed something? Thibaut Cuvelier -- lyx-devel mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-devel
DocBook__in_Springer_Nature_Journals.patch
(application/x-patch, 1.4 KB)
Subject: [PATCH] DocBook: in Springer Nature Journals, mention the impossibility of handling appendices.
The problem (as seen from the example): the appendix should close the previous section (the `<db:appendix>` tag cannot be within the current `<db:section>`). Plus, the `<db:appendix>` tag must enclose the whole appendix, while here we only have access to the appendix title.
---
Index: lib/layouts/sn-jnl.layout
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/lib/layouts/sn-jnl.layout b/lib/layouts/sn-jnl.layout
--- a/lib/layouts/sn-jnl.layout (revision 078dd97da716ff5700393c48500276687fe4a9d2)
+++ b/lib/layouts/sn-jnl.layout (date 1771727999362)
@@ -271,19 +271,23 @@
Series Bold
Color textlabel2
EndFont
+ DocBookTag ""
End
Style Appendix
CopyStyle Section
- Category BackMatter
+ Category Sectioning
LabelCounter appendix
LabelString "Appendix \Alph{appendix}"
Argument 1
LabelString "Short Title"
Tooltip "Short title for the appendix"
InsertCotext 1
+ DocBookTag titleabbrev
+ DocBookArgumentAfterMainTag true
EndArgument
- # DocBook: custom appendices are impossible to implement correctly.
+ DocBookTag title
+ DocBookTagType paragraph
+ DocBookInInfo maybe
+ DocBookSectionTag appendix
End
-
-