]> git.lyx.org Git - lyx.git/commitdiff
add suport for ert export for docbook and linuxdoc
authorJosé Matox <jamatos@lyx.org>
Mon, 15 Oct 2001 12:21:11 +0000 (12:21 +0000)
committerJosé Matox <jamatos@lyx.org>
Mon, 15 Oct 2001 12:21:11 +0000 (12:21 +0000)
add support for revision history related tags.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2885 a592a061-630c-0410-9148-cb99ea01b6c8

lib/ChangeLog
lib/layouts/db_stdtitle.inc
src/insets/ChangeLog
src/insets/insetert.C

index 3d9e1a43461fecd4dbaa5ff64f52c2926ef85e9c..6b4d32e43f440a8d77a79cb0d6a5d0e2c6b3e24a 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-15  José Matos  <jamatos@fep.up.pt>
+
+       * layouts/db_stdtitle.inc: add AuthorGroup, RevisionHistory,
+       RevisionMark and Revision styles.
+
 2001-10-12  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * scripts/TeXFiles.sh: use -follow predicate in "find" to follow
index 365da4177fea344e554091358cd460768a4faac6..e42b42fbb23647e7e1d1be19fa21763fe79873ab 100644 (file)
@@ -21,6 +21,14 @@ Style Author
   KeepEmpty            1
 End
 
+# Authorgroup
+Style Authorgroup
+  CopyStyle             Author
+  LatexType             Environment
+  LatexName             authorgroup
+  LatexParam            author
+End
+
 # first name style definition
 Style FirstName
   Margin               Static
@@ -50,3 +58,58 @@ Style Date
   LatexType            Paragraph
   LatexName            date
 End
+
+# Revision History style definition
+Style RevisionHistory
+  Margin                Static
+  LatexType             Command
+  LatexName             revhistory
+  LatexParam           "3|!-- --"
+  LeftMargin            MMM
+  RightMargin           MMM
+  ParIndent             MM
+  TopSep                0.7
+  BottomSep             0
+  ParSep                0
+  Align                 Block
+  AlignPossible         Block
+  KeepEmpty            1
+  LabelType             Centered_Top_Environment
+  LabelString           "Revision History"
+  LabelBottomSep        0.5
+End
+
+# Revision style definition
+Style Revision
+  Margin                Dynamic
+  LatexType             Command
+  LatexName             revision
+  LatexParam           "4|revnumber"
+  LabelSep              xxx
+  ParSkip               0.4
+  TopSep                0.9
+  BottomSep             0.5
+  ParSep                0.5
+  Align                 Block
+  AlignPossible         Block
+End
+
+# RevisionRemark style definition
+Style RevisionRemark
+  Margin                Static
+  LatexType             Paragraph
+  InTitle               1
+  LatexName             revremark
+  LabelSep              xxx
+  ParIndent            MM
+  ParSkip               0.0
+  TopSep                0.0
+  BottomSep             0.0
+  ParSep                1
+  Align                 Block
+  AlignPossible         Block
+  LabelType             No_Label
+End
index b76c7c856d08ac5b2dc6608e502346893667474a..7f38a62ad08d9ba9d51b11e780fe870e155de5d8 100644 (file)
@@ -1,3 +1,7 @@
+2001-10-15  José Matos  <jamatos@fep.up.pt>
+
+       * insetert.C: allow export for docbook and linuxdoc
+
 2001-10-07  Adrien Rebollo <adrien.rebollo@gmx.fr>
 
        * insetquotes.C (dispString): handles latin3 and latin4 quotes
index 6ce0971d731967cc323593ff03b03f1a8da93e34..7a4f5b4a47ba0c29cb91e6e658e9ee1150968613 100644 (file)
@@ -348,15 +348,61 @@ int InsetERT::ascii(Buffer const *,
 }
 
 
-int InsetERT::linuxdoc(Buffer const *, std::ostream &) const
+int InsetERT::linuxdoc(Buffer const *, std::ostream & os) const
 {
-       return 0;
+       Paragraph * par = inset.paragraph();
+       int lines = 0;
+       while (par) {
+               Paragraph::size_type siz = par->size();
+               for (Paragraph::size_type i = 0; i < siz; ++i) {
+                       Paragraph::value_type c = par->getChar(i);
+                       switch (c) {
+                       case Paragraph::META_NEWLINE:
+                               os << '\n';
+                               ++lines;
+                               break;
+                       default:
+                               os << c;
+                               break;
+                       }
+               }
+               par = par->next();
+               if (par) {
+                       os << "\n";
+                       lines ++;
+               }
+       }
+       
+       return lines;
 }
 
 
-int InsetERT::docbook(Buffer const *, std::ostream &) const
+int InsetERT::docbook(Buffer const *, std::ostream & os) const
 {
-       return 0;
+       Paragraph * par = inset.paragraph();
+       int lines = 0;
+       while (par) {
+               Paragraph::size_type siz = par->size();
+               for (Paragraph::size_type i = 0; i < siz; ++i) {
+                       Paragraph::value_type c = par->getChar(i);
+                       switch (c) {
+                       case Paragraph::META_NEWLINE:
+                               os << '\n';
+                               ++lines;
+                               break;
+                       default:
+                               os << c;
+                               break;
+                       }
+               }
+               par = par->next();
+               if (par) {
+                       os << "\n";
+                       lines ++;
+               }
+       }
+       
+       return lines;
 }