From: Martin Vermeer Date: Wed, 31 Dec 2003 08:44:42 +0000 (+0000) Subject: moving LatexParam functionality into .layout files X-Git-Tag: 1.6.10~15620 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=6c176e40e3965b5882d40a4843654f9c25a941b8;p=features.git moving LatexParam functionality into .layout files git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8290 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/ChangeLog b/lib/ChangeLog index 43958d4d36..5109b20df6 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,10 @@ +2003-12-31 Martin Vermeer + + * layouts/agu_stdclass.inc: + * layouts/agu_std sections.inc: + * layouts/agu_stdtitle.inc: moving LatexParam functionality into + .layout files + 2003-12-22 Michael Schmitt * layouts/g-brief2-en.layout: fix spelling, diff --git a/lib/layouts/agu_stdclass.inc b/lib/layouts/agu_stdclass.inc index f9813f2ea3..c3cc819529 100644 --- a/lib/layouts/agu_stdclass.inc +++ b/lib/layouts/agu_stdclass.inc @@ -27,7 +27,7 @@ Style Standard Align Block AlignPossible Block LabelType No_Label - LatexParam "para#" + LatexParam "id="para#"" End diff --git a/lib/layouts/agu_stdsections.inc b/lib/layouts/agu_stdsections.inc index 616d1f59cb..e42df5cd60 100644 --- a/lib/layouts/agu_stdsections.inc +++ b/lib/layouts/agu_stdsections.inc @@ -32,7 +32,7 @@ Style Section InnerTag head LabelTag label CommandDepth 2 - LatexParam "s#" + LatexParam "id = "s#"" End @@ -42,7 +42,7 @@ Style Subsection InnerTag head LabelTag label CommandDepth 3 - LatexParam "s#" + LatexParam "id = "s#"" End @@ -52,7 +52,7 @@ Style Subsubsection InnerTag head LabelTag label CommandDepth 4 - LatexParam "s#" + LatexParam "id = "s#"" End @@ -62,7 +62,7 @@ Style Paragraph InnerTag head LabelTag label CommandDepth 5 - LatexParam "s#" + LatexParam "id = "s#"" End @@ -72,7 +72,7 @@ Style Subparagraph InnerTag head LabelTag label CommandDepth 6 - LatexParam "s#" + LatexParam "id = "s#"" End Style Subsubparagraph @@ -81,6 +81,6 @@ Style Subsubparagraph InnerTag head LabelTag label CommandDepth 7 - LatexParam "s#" + LatexParam "id = "s#"" End diff --git a/lib/layouts/agu_stdtitle.inc b/lib/layouts/agu_stdtitle.inc index a88f32279a..a7a30db36d 100644 --- a/lib/layouts/agu_stdtitle.inc +++ b/lib/layouts/agu_stdtitle.inc @@ -44,6 +44,7 @@ End Style AGU-journal CopyStyle Special-section + LatexParam "journal-code="$1" electronic-only="yes"" LatexName AGU-journal LabelString "AGU-journal: " CommandDepth 3 diff --git a/src/ChangeLog b/src/ChangeLog index 304c8b37fa..635b2ee51e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-12-31 Martin Vermeer + + * output_docbook.C: moving LatexParam functionality into + .layout files + 2003-12-29 Jürgen Spitzmüller * buffer.C: increment format to 229. diff --git a/src/output_docbook.C b/src/output_docbook.C index cc8e8d670a..e8daa3feeb 100644 --- a/src/output_docbook.C +++ b/src/output_docbook.C @@ -16,6 +16,7 @@ #include "buffer.h" #include "bufferparams.h" #include "counters.h" +#include "debug.h" #include "lyxtext.h" #include "paragraph.h" #include "paragraph_funcs.h" @@ -100,7 +101,7 @@ void docbookParagraphs(Buffer const & buf, if (!style->latexparam().empty()) { counters.step("para"); int i = counters.value("para"); - ls = "id=\"" + subst(style->latexparam(), "#", tostr(i)) + '"'; + ls = subst(style->latexparam(), "#", tostr(i)); } sgml::openTag(os, depth + command_depth, false, style->latexname(), ls); @@ -140,7 +141,7 @@ void docbookParagraphs(Buffer const & buf, command_stack.push_back(string()); command_stack[command_depth] = command_name; - if (!style->latexparam().empty()) { + if (style->latexparam().find('#') != string::npos) { counters.step(style->counter); } // treat label as a special case for @@ -156,11 +157,14 @@ void docbookParagraphs(Buffer const & buf, command_name += '"'; labelid = true; } - } else { - if (!style->latexparam().empty()) { - ls = expandLabel(buf.params().getLyXTextClass(), style, false); - ls = "id=\"" + subst(style->latexparam(), "#", ls) + '"'; - } + } + if (!labelid && !style->latexparam().empty()) { + ls = style->latexparam(); + if (ls.find('#') != string::npos) { + string el = expandLabel(buf.params().getLyXTextClass(), + style, false); + ls = subst(ls, "#", el); + } } sgml::openTag(os, depth + command_depth, false, command_name, ls);