From b52c0c61f66461e966dbe4ec748bd287614a14fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Matox?= Date: Sun, 11 Feb 2001 21:25:34 +0000 Subject: [PATCH] Simple fix to docbook layout. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1482 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/layouts/docbook.layout | 4 ++++ src/buffer.C | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/layouts/docbook.layout b/lib/layouts/docbook.layout index 32c2f673a8..ae6ab92878 100644 --- a/lib/layouts/docbook.layout +++ b/lib/layouts/docbook.layout @@ -7,3 +7,7 @@ Input db_stdclass.inc MaxCounter Counter_Section + +# Exclude higher, or equal, sections: +NoStyle Part +NoStyle Chapter diff --git a/src/buffer.C b/src/buffer.C index c548ce5396..34574dd674 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -3040,7 +3040,10 @@ void Buffer::makeDocBookFile(string const & fname, bool nice, bool only_body) } sgmlOpenTag(ofs, depth + command_depth, command_name); - item_name = "title"; + if (c_params.empty()) + item_name = "title"; + else + item_name = c_params; sgmlOpenTag(ofs, depth + 1 + command_depth, item_name); break; @@ -3123,7 +3126,10 @@ void Buffer::makeDocBookFile(string const & fname, bool nice, bool only_body) // write closing SGML tags switch (style.latextype) { case LATEX_COMMAND: - end_tag = "title"; + if (c_params.empty()) + end_tag = "title"; + else + end_tag = c_params; sgmlCloseTag(ofs, depth + command_depth, end_tag); break; case LATEX_ENVIRONMENT: