On 2011-06-27, Richard Heck wrote: > On 06/27/2011 10:13 AM, Andrew Steele wrote: >> I am using the bm package in conjunction with LyX, and my document >> recently started failing to build, complaining of too many math >> alphabets. This can be fixed by limiting the number of alphabets that >> bm uses, by placing the following commands in the preamble:
>> \newcommand{\hmmax}{0} >> \newcommand{\bmmax}{3} >> BEFORE the \usepackage{bm} statement. > The only option here is to stop LyX from loading bm.sty automatically, > so you can load it yourself. We can do this with a module: >====== > #\DeclareLyXModule{Suppress bm.sty} > #DescriptionBegin > # Stop LyX from autoloading bm.sty. > #DescriptionEnd > Format 35 > Provides bm 1 >====== > Put that in a file nobm.module, in your local LyX layout directory > (~/.lyx/layouts/, on Linux). Then reconfigure LyX and go to > Document>Settings>Modules, and add it. This will allow you to load > bm.sty yourself in the preamble, after the commands you mentioned. > Richard > PS You could also put the non-commented lines into > Document>Settings>Local Layout, but that isn't reusable. Of course, you can also set the options and load bm in the module with something like Preamble \newcommand{\hmmax}{0} \newcommand{\bmmax}{3} \usepackage{bm} EndPreamble See Help>Customization for details. I think the tip to use a Local Layout to override LyX auto-package loading might become an FAQ - maybe it should find a place on the wiki. Günter