Here is an example of how one can provide a means of inserting simple (or not so
simple) ERT commands into your document more easily.

There is a whole set of commands which one regularly needs but are not provided 
(yet) as insets etc. Currently you have to insert them directly -- if you remember 
them.

This menu sub-tree is really just a memory jogger for these things. It makes life
a little easier for the people that need them, requiring only a little LaTeX 
experience. One more handle on the inside of the machine, halfway between clean
WYSIWYG and raw LaTeX.

The attached patch contains some commands that could be argued would belong in the
preamble. For the more complex ones one could envisage a dialogue box that builds
them from elements, validating these while they are entered. (Doing this, one
can just as well go the extra mile and make it an embeddable inset.)

As it is, this is a discussion piece for making the user interface a little more 
friendly while we are waiting ;-)

Martin

BTW If you want to see LyX, or rather xforms, make a graceful ballistic nose-dive, 
insert a | into a menu item text...

Index: default.ui
===================================================================
RCS file: /cvs/lyx/lyx-devel/lib/ui/default.ui,v
retrieving revision 1.78
diff -u -b -B -p -r1.78 default.ui
--- default.ui  2002/02/07 16:43:51     1.78
+++ default.ui  2002/02/17 19:36:46
@@ -197,6 +197,8 @@ Menuset
        Submenu "Lists & TOC|O" "insert_toc"
        Separator
        Item "TeX|T" "ert-insert"
+       Submenu "TeX Commands|A" "insert_commands"
+
        Item "Minipage|p" "minipage-insert"
        Item "Graphics...|G" "graphics-insert"
        Item "Tabular Material...|b" "dialog-tabular-insert"
@@ -269,6 +271,37 @@ Menuset
        Item "Ascii as Paragraphs...|P" "file-insert-ascii-para"
     End
 
+    Menu "insert_commands"
+       Item "Current Date" "command-sequence ert-insert; self-insert \today;"
+       Separator
+       Item "Sloppy Linebreaking" "command-sequence ert-insert; self-insert \sloppy;"
+       Item "Fussy Linebreaking"  "command-sequence ert-insert; self-insert \fussy;"
+       Item "Hyphenation Rule" "command-sequence ert-insert; self-insert 
+\hyphenation{}; char-backward;"
+       Item "Keep Text Together" "command-sequence ert-insert; self-insert \mbox{}; 
+char-backward;"
+       Separator
+       Item "Omit This Page's Number" "command-sequence ert-insert; self-insert 
+\thispagestyle{empty};"
+       Item "Set Page Counter" "command-sequence ert-insert; self-insert 
+\setcounter{page}{}; char-backward;"
+       Item "Page Number Style" "command-sequence ert-insert; self-insert 
+\pagenumbering{arabic}; char-backward;"
+       Separator
+       Item "enum(i-iv) Number Style" "command-sequence ert-insert; self-insert 
+\renewcommand{\theenumi}{\arabic{enumi}};"
+       Item "enum(i-iv) Label" "command-sequence ert-insert; self-insert 
+\renewcommand{\labelenumi}{\theenumi.};"
+       Item "Label Definition (1)" "command-sequence ert-insert; self-insert 
+\renewcommand{\thesection}{\arabic{section}.};"
+       Item "Label Definition (2)" "command-sequence ert-insert; self-insert 
+\renewcommand{\thesubsection}{\thesection.\arabic{subsection}.};"
+       Item "Add Entry to TOC" "command-sequence ert-insert; self-insert 
+\addcontentsline{toc}{section}{\protect\numberline{\thesection} }; char-backward;"
+       Separator
+       Item "Front Matter"  "command-sequence ert-insert; self-insert \frontmatter;"
+       Item "Main Matter"   "command-sequence ert-insert; self-insert \mainmatter;"
+       Item "Back Matter"   "command-sequence ert-insert; self-insert \backmatter;"
+       Separator
+       Item "Number Style arabic" "command-sequence ert-insert; self-insert arabic;"
+       Item "Number Style Alph" "command-sequence ert-insert; self-insert Alph;"
+       Item "Number Style alph" "command-sequence ert-insert; self-insert alph;"
+       Item "Number Style Roman" "command-sequence ert-insert; self-insert Roman;"
+       Item "Number Style roman" "command-sequence ert-insert; self-insert roman;"
+
+    End
+
+
 #
 # LAYOUT MENU
 #

Attachment: msg33112/pgp00000.pgp
Description: PGP signature

Reply via email to