On Monday 22 September 2003 12:16 pm, Martin Vermeer wrote: > About the LaTeX stuff here BTW I noticed one unfortunate thing. If you > try to redefine fboxsep in the preamble, it ends up after the fboxwidth > definition... should I make that rather a newcommand? Then it is > called from the inset insertion point i.e. after fboxsep has been > redefined. LaTeX gurus...?
LyX's preamble stuff creaks rather in cases such as this. Is the "clean" solution to have Inset::validate pass the prefered position to insert the preamble stuff. Something like: class LaTeXFeatures { enum InsertionPosition { BEFORE_USER, AFTER_USER } ... void require(string const & name, InsertionPosition=BEFORE_USER); }; void InsetBox::validate(LaTeXFeatures & features) const { if (params_.type == "Boxed") { features.require("fboxwidth", LaTeXFeatures::AFTER_USER); ... } Ditto the calls to LaTeXFeatures::getMacros et al would have an InsertionPosition arg (these calls are made in bufferparams.C's BufferParams::writeLaTeX). Angus