Here's a small patch to fix the problem that command-line export doesn't work for CharStyle insets.
Unfortunately this means that the LyX format changes. Instead of,
e.g., (CharStyle 'Filename'):
\begin_inset Filename
we will have
\begin_inset CharStyle Filename
the same idiom as the other insets use. My bad not making it
straightaway like this.
I also made all charstyle names conform to Capital first + rest
lowercase, like for Style names.
So anybody having test files with character styles should edit them
like this... probably not too many people yet.
I propose to commit this Monday afternoon, to leave time for
discussion.
- Martin
--
Martin Vermeer [EMAIL PROTECTED]
Helsinki University of Technology
Dept. of Surveying, Inst. of Geodesy
P.O. Box 1200, FIN-02015 HUT, Finland
:wq
Index: src/factory.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/factory.C,v
retrieving revision 1.70
diff -u -p -r1.70 factory.C
--- src/factory.C 13 Nov 2003 20:16:34 -0000 1.70
+++ src/factory.C 22 Nov 2003 16:27:41 -0000
@@ -333,9 +333,6 @@ InsetOld * readInset(LyXLex & lex, Buffe
lex.next();
string tmptok = lex.getString();
- CharStyles::iterator found_cs = tclass.charstyle(tmptok);
- if (found_cs != tclass.charstyles().end())
- tmptok = "CharStyle";
// test the different insets
if (tmptok == "LatexCommand") {
@@ -408,6 +405,9 @@ InsetOld * readInset(LyXLex & lex, Buffe
|| tmptok == "Ovalbox" || tmptok == "Frameless") {
inset.reset(new InsetBox(buf.params(), tmptok));
} else if (tmptok == "CharStyle") {
+ lex.next();
+ string s = lex.getString();
+ CharStyles::iterator found_cs = tclass.charstyle(s);
inset.reset(new InsetCharStyle(buf.params(), found_cs));
} else if (tmptok == "Branch") {
inset.reset(new InsetBranch(buf.params(), string()));
Index: src/insets/insetcharstyle.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcharstyle.C,v
retrieving revision 1.2
diff -u -p -r1.2 insetcharstyle.C
--- src/insets/insetcharstyle.C 20 Nov 2003 01:22:50 -0000 1.2
+++ src/insets/insetcharstyle.C 22 Nov 2003 16:27:41 -0000
@@ -196,7 +196,7 @@ void InsetCharStyle::validate(LaTeXFeatu
void InsetCharStyleParams::write(ostream & os) const
{
- os << type << "\n";
+ os << "CharStyle " << type << "\n";
}
Index: lib/layouts/db_stdclass.inc
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/layouts/db_stdclass.inc,v
retrieving revision 1.8
diff -u -p -r1.8 db_stdclass.inc
--- lib/layouts/db_stdclass.inc 12 Nov 2003 14:38:22 -0000 1.8
+++ lib/layouts/db_stdclass.inc 22 Nov 2003 16:27:41 -0000
@@ -2,7 +2,7 @@
# Author : Jos� Ab�lio Oliveira Matos <[EMAIL PROTECTED]>
# This file is the counterpart of stdclass.inc
-# It is desireable, as far as possible, to have the same look and feeling for
+# It is desirable, as far as possible, to have the same look and feel for
# related layouts in latex and docbook.
OutputType docbook
@@ -38,7 +38,7 @@ CharStyle Filename
EndFont
End
-CharStyle FirstName
+CharStyle Firstname
LatexType Command
LatexName firstname
Font
pgp00000.pgp
Description: PGP signature
