On Thursday 23 July 2009 10:33:22 Paul A. Rubin wrote:
> Steve Litt wrote:
> > Hi all,
> >
> > I upgraded to Ubuntu 9, lyx 1.6.2 March 16 2009 that came with it. Now of
> > my books stopped compiling. For one thing, the Memoir class, from which
> > the storybook class was built, was butchered -- I had to download Memoir
> > and compile it and texhash and then at least memoir (now called book
> > (Memoir)) appeared..
> >
> > But now, my storybook class doesn't show up in the LyX Doc Class
> > dropdown. I went so far as to put it into ~/.lyx/layouts/storybook.layout
> > (not as a symlink, but as an actual file), and simplified it to this:
> >
> > #% Do not delete the line below; configure depends on this
> > #  \DeclareLaTeXClass[book]{storybook}
> >
> > Input stdclass.inc
> >
> > Preamble
> >
> > EndPreamble
> >
> > Style MyTest
> >   CopyStyle  Chapter
> > End
> >
> >
> > Still, storybook didn't show up in Document Class dropdown.
>
> Steve,
>
> I have the same setup (except the drop date for my copy of LyX is March
> 14, not March 16).  I put your stripped layout file in ~/.lyx/layouts,
> reconfigured and restarted LyX, and it showed up on my class list.
>
> You did reconfigure/restart LyX, right?  

Oh dear lord! I did this, as is my habit:

/usr/share/lyx/configure.py

So just for fun, I did lyx->tools->reconfigure, quit, restart lyx, and now 
storybook showed up. Thanks for the reminder.

This brings up another problem. Without an automated way to reconfigure, 
debugging will take literallly two or three times longer. Can 
/usr/share/lyx/configure.py /usr/share/lyx/configure.py be modified to do 
exactly 
the same thing as lyx->tools->reconfigure, quit, restart lyx?

Also, I think it would be a great idea for LyX, on loading, to write to a log 
all info about discovered document classes. Every entry would have a 
timestamp. It might look something like this:

CHECKING SYSTEM WIDE DIRECTORIES FOR LAYOUTS
        dir /usr/share/lyx/layouts/
                /usr/share/lyx/layouts/seminar.layout: Loaded doc class 
"seminar"
                /usr/share/lyx/layouts/siamltex.layout: Loaded doc class 
"{article (SIAM)"
                /usr/share/lyx/layouts/sigplanconf.layout: FAILED to load doc 
class "article 
(ACM SIGPLAN)", reason
                /path/to/other/systemwide/layouts
                        ...
CHECKING CURRENT DIRECTORY
        dir /d/at/books/stories
                /d/at/books/stories/storybook.layout: Loaded doc class 
"storybook"
CHECKING PERSONAL LYX LAYOUT DIRECTORY
        dir /home/slitt/.lyx/layouts
                dir /home/slitt/.lyx/layouts/tttt.layout: Loaded doc class 
"tttt"
                dir /home/slitt/.lyx/layouts/ttotst.layout: Loaded doc class 
"ttotst"
                dir /home/slitt/.lyx/layouts/storybook.layout: FAILED to load 
doc class 
"storybook", class already loaded


That same log could be written by /usr/share/lyx/configure.py because I'm 
pretty sure that investigates all directories also.

With the log file in place, layout/class troubleshooting wouldn't be a black 
box -- we'd have  a diagnostic tool that could save the classmaker and/or 
author hours.

Thanks

STeveT

Reply via email to