On Mon, Sep 22, 2003 at 02:53:54PM +0200, Andre Poenitz spake thusly: > On Mon, Sep 22, 2003 at 01:50:30PM +0000, Angus Leeming wrote: > > How about a Preamble dialog (or pane) that displayed the stuff that LyX was > > auto-inserting too. These lines would be displayed in a different colour > > and could not be deleted. However, if the user hit the 'Return' button > > when the cursor was on one of these lines, he'd get a new line allowing > > him to input his own stuff. Going further, if the cursor was on one of > > these lines, then the current options list (or a subset thereof) would > > become editable. > > Sounds like a lot of complication for no big gain. > > What's the real world problem you are currently trying to solve?
The one the (tested, working) solution of which is the following: (lyx_sty.C) string const boxwidth_def = "\\newlength\\w\n"; string const fboxwidth_def = "\\newcommand\\setfboxwidth[0]{%\n" "\\setlength\\w{\\columnwidth}\n" "\\addtolength\\w{-2\\fboxsep}\n" "\\addtolength\\w{-2\\fboxrule}}%\n"; string const ovalboxwidth_def = "\\newcommand\\setovalboxwidth[0]{%\n" "\\setlength\\w{\\columnwidth}\n" "\\addtolength\\w{-2\\fboxsep}\n" "\\addtolength\\w{-0.8pt}}\n"; // 2x \thinlines width and (insetbox.C): if (pt == "Boxed") { os << "%\n\\par\\setfboxwidth\\fbox{\\parbox{\\w}{%\n"; } else os << "%\n\\par\\setovalboxwidth\\ovalbox{\\parbox{\\w}{%\n"; ... void InsetBox::validate(LaTeXFeatures & features) const { features.require("boxwidth"); if (params_.type == "Boxed") { features.require("fboxwidth"); } else { features.require("fancybox"); features.require("ovalboxwidth"); } inset.validate(features); } :-) > Andre' - Martin
pgp00000.pgp
Description: PGP signature