I want to return to the following discussion:

http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg65034.html

The current situation is considerably better than the one existing then:

1) We now have character style insets in "conglomerate" style,
unintrusively part of the running text.
2) Char attributes can be nested inside them, and they can themselves
nest recursively... if only we can make the LaTeX preamble definition
stick, which it currently does not for the inner inset -- a bug.

Currently however, both the toolbar buttons and the keystroke C-e at
least, still produce font-noun and font-emph attribute-type charstyles.
Should we, for 1.4.0, switch to inset-type character styles for this,
and make it the preferred way, marking the text attribute types noun and
emph as deprecated? (And what the heck to do with underline? And this
"number" thing, is that for Hebrew only?)

It a later stage we could then remove them altogether, and code lyx2lyx
to take care of them in older documents.

Ideas?

- Martin

Index: bind/cua.bind
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/bind/cua.bind,v
retrieving revision 1.32
diff -u -p -r1.32 cua.bind
--- bind/cua.bind	15 Jan 2005 18:36:02 -0000	1.32
+++ bind/cua.bind	18 Apr 2005 06:56:25 -0000
@@ -53,7 +53,7 @@
 \bind "C-Prior"			"buffer-previous"
 
 \bind "C-b"			"font-bold"
-\bind "C-e"			"font-emph"
+\bind "C-e"			"charstyle-insert Emph"
 # used below for line-delete-forward
 #\bind "C-k"			"font-noun"		# 'k' for capitals
 \bind "C-u"			"font-underline"
Index: images/charstyle-insert_Emph.xpm
===================================================================
RCS file: images/charstyle-insert_Emph.xpm
diff -N images/charstyle-insert_Emph.xpm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ images/charstyle-insert_Emph.xpm	18 Apr 2005 06:56:25 -0000
@@ -0,0 +1,27 @@
+/* XPM */
+static char * font_emph_xpm[] = {
+"22 22 2 1",
+" 	c None",
+".	c #000000",
+"                      ",
+"                      ",
+"                      ",
+"                      ",
+"     ............     ",
+"      ...........     ",
+"      ...      .      ",
+"      ...             ",
+"      ...             ",
+"     ...              ",
+"     .........        ",
+"     ........         ",
+"     ...              ",
+"    ...               ",
+"    ...               ",
+"    ...       ..      ",
+"    ...........       ",
+"   ............       ",
+"                      ",
+"                      ",
+"                      ",
+"                      "};
Index: images/charstyle-insert_Noun.xpm
===================================================================
RCS file: images/charstyle-insert_Noun.xpm
diff -N images/charstyle-insert_Noun.xpm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ images/charstyle-insert_Noun.xpm	18 Apr 2005 06:56:25 -0000
@@ -0,0 +1,27 @@
+/* XPM */
+static char const * noun_xpm[] = {
+"20 20 2 1",
+" 	c None",
+".	c #000000",
+"                    ",
+"         ..         ",
+"        ....        ",
+"        ....        ",
+"         ..         ",
+"       ......       ",
+"      ........      ",
+"      . .... .      ",
+"      . .... .      ",
+"      . .... .      ",
+"      . .... .      ",
+"      . .... .      ",
+"       ......       ",
+"       ..  ..       ",
+"       ..  ..       ",
+"       ..  ..       ",
+"       ..  ..       ",
+"       ..  ..       ",
+"       ..  ..       ",
+"                    "};
+
+
Index: layouts/scrclass.inc
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/layouts/scrclass.inc,v
retrieving revision 1.11
diff -u -p -r1.11 scrclass.inc
--- layouts/scrclass.inc	13 Oct 2003 09:50:10 -0000	1.11
+++ layouts/scrclass.inc	18 Apr 2005 06:56:26 -0000
@@ -262,6 +262,7 @@ Style Dictum
 	EndFont
 End
 
+Input stdcharstyles.inc
 Input lyxmacros.inc
 Input scrmacros.inc
 
Index: layouts/stdcharstyles.inc
===================================================================
RCS file: layouts/stdcharstyles.inc
diff -N layouts/stdcharstyles.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ layouts/stdcharstyles.inc	18 Apr 2005 06:56:26 -0000
@@ -0,0 +1,46 @@
+# Standard textclass definition file.
+# Martin Vermeer <[EMAIL PROTECTED]>
+
+CharStyle Noun
+LatexType	Command
+LatexName	noun
+Font
+	Shape	SmallCaps
+EndFont
+LabelFont
+	Shape	SmallCaps
+	Color	blue
+EndFont
+Preamble
+	\newcommand{\noun}[1]{\textsc{#1}}
+EndPreamble
+End
+
+CharStyle Emph
+LatexType	Command
+LatexName	emph
+Font
+	Shape	Italic
+EndFont
+LabelFont
+	Shape	Italic
+	Color	blue
+EndFont
+# \emph already exists
+End
+
+CharStyle Code
+LatexType	Command
+LatexName	code
+Font
+	Family	Typewriter
+EndFont
+LabelFont
+	Shape	Typewriter
+	Color	blue
+EndFont
+Preamble
+	\newcommand{\code}[1]{\texttt{#1}}
+EndPreamble
+End
+
Index: layouts/stdclass.inc
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/layouts/stdclass.inc,v
retrieving revision 1.9
diff -u -p -r1.9 stdclass.inc
--- layouts/stdclass.inc	12 Nov 2003 14:38:22 -0000	1.9
+++ layouts/stdclass.inc	18 Apr 2005 06:56:26 -0000
@@ -35,22 +35,8 @@ Style Standard
 	LabelType             No_Label
 End
 
-CharStyle Noun
-	LatexType             Command
-	LatexName             noun
-	Font
-	  Shape               SmallCaps
-	EndFont
-	LabelFont
-	  Shape               SmallCaps
-	  Color               blue
-	EndFont
-	Preamble
-	  \newcommand{\noun}[1]{\textsc{#1}}
-	EndPreamble
-End
-
 
+Input stdcharstyles.inc
 Input stdlists.inc
 Input stdsections.inc
 Input stdstarsections.inc
Index: ui/stdtoolbars.ui
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ui/stdtoolbars.ui,v
retrieving revision 1.15
diff -u -p -r1.15 stdtoolbars.ui
--- ui/stdtoolbars.ui	21 Apr 2004 00:19:25 -0000	1.15
+++ ui/stdtoolbars.ui	18 Apr 2005 06:56:26 -0000
@@ -50,8 +50,8 @@ Toolbar "standard" "Standard"
 	Item "Paste" "paste"
 	Item "Find and replace" "dialog-show findreplace"
 	Separator
-	Item "Toggle emphasis style" "font-emph"
-	Item "Toggle noun style" "font-noun"
+	Item "Mark emphasis style" "charstyle-insert Emph"
+	Item "Mark noun style" "charstyle-insert Noun"
 	Item "Toggle user style" "font-free-apply"
 	Separator
 	Item "Insert math" "math-mode"

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to