]> git.lyx.org Git - features.git/commitdiff
moving LatexParam functionality into .layout files
authorMartin Vermeer <martin.vermeer@hut.fi>
Wed, 31 Dec 2003 08:44:42 +0000 (08:44 +0000)
committerMartin Vermeer <martin.vermeer@hut.fi>
Wed, 31 Dec 2003 08:44:42 +0000 (08:44 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8290 a592a061-630c-0410-9148-cb99ea01b6c8

lib/ChangeLog
lib/layouts/agu_stdclass.inc
lib/layouts/agu_stdsections.inc
lib/layouts/agu_stdtitle.inc
src/ChangeLog
src/output_docbook.C

index 43958d4d36caf39331faf34a91ee15959158104d..5109b20df6b89da2c78a8b76b6160decffff261a 100644 (file)
@@ -1,3 +1,10 @@
+2003-12-31  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * layouts/agu_stdclass.inc: 
+       * layouts/agu_std sections.inc: 
+       * layouts/agu_stdtitle.inc: moving LatexParam functionality into
+       .layout files
+
 2003-12-22  Michael Schmitt  <michael.schmitt@teststep.org>
 
        * layouts/g-brief2-en.layout: fix spelling, 
index f9813f2ea33079aa2a0a2f575438f2638cfbf25b..c3cc81952937ea17faf8c3750421f7bc423c2646 100644 (file)
@@ -27,7 +27,7 @@ Style Standard
        Align                 Block
        AlignPossible         Block
        LabelType             No_Label
-       LatexParam            "para#"
+       LatexParam            "id=&quot;para#&quot;"
 End
 
 
index 616d1f59cbddabea6938bc80f6e58758614e1503..e42df5cd60712e18525ac21fe398a2c141fe9875 100644 (file)
@@ -32,7 +32,7 @@ Style Section
        InnerTag              head
        LabelTag              label
        CommandDepth          2
-       LatexParam            "s#"
+       LatexParam            "id = &quot;s#&quot;"
 End
 
 
@@ -42,7 +42,7 @@ Style Subsection
        InnerTag              head
        LabelTag              label
        CommandDepth          3
-       LatexParam            "s#"
+       LatexParam            "id = &quot;s#&quot;"
 End
 
 
@@ -52,7 +52,7 @@ Style Subsubsection
        InnerTag              head
        LabelTag              label
        CommandDepth          4
-       LatexParam            "s#"
+       LatexParam            "id = &quot;s#&quot;"
 End
 
 
@@ -62,7 +62,7 @@ Style Paragraph
        InnerTag              head
        LabelTag              label
        CommandDepth          5
-       LatexParam            "s#"
+       LatexParam            "id = &quot;s#&quot;"
 End
 
 
@@ -72,7 +72,7 @@ Style Subparagraph
        InnerTag              head
        LabelTag              label
        CommandDepth          6
-       LatexParam            "s#"
+       LatexParam            "id = &quot;s#&quot;"
 End
 
 Style Subsubparagraph
@@ -81,6 +81,6 @@ Style Subsubparagraph
        InnerTag              head
        LabelTag              label
        CommandDepth          7
-       LatexParam            "s#"
+       LatexParam            "id = &quot;s#&quot;"
 End
 
index a88f32279a64fdbc3edee21fa62d84e3807a1041..a7a30db36dbc9c2958f63c6c277c593a5e37b396 100644 (file)
@@ -44,6 +44,7 @@ End
 
 Style AGU-journal
        CopyStyle             Special-section
+       LatexParam            "journal-code=&quot;$1&quot; electronic-only=&quot;yes&quot;"
        LatexName             AGU-journal
        LabelString           "AGU-journal: "
        CommandDepth          3
index 304c8b37fa66c6664c6c3bd4f2e12575fca79833..635b2ee51e820e123d65ca66f6d8d8e7323f6eba 100644 (file)
@@ -1,3 +1,8 @@
+2003-12-31  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * output_docbook.C: moving LatexParam functionality into 
+       .layout files
+
 2003-12-29  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * buffer.C: increment format to 229.
index cc8e8d670ab93fb1dc5f784ec2a5f8213cecbc47..e8daa3feeb460f77849b290474a1c7a274d345df 100644 (file)
@@ -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);