On  6.05.08, Zhang Weiwu wrote:
> error message in opening tutorial with lyx. The opened tutorial is not
> printable. see below:
...
> Warning: Document class not available
> ----------------------------------------
> The layout file requested by this document,
> scrbook.layout,
> is not usable. This is probably because a LaTeX
> class or style file required by it is not
> available.
...

> [EMAIL PROTECTED]:~$ locate scrbook.layout
> /usr/share/lyx/layouts/scrbook.layout

scrbook.layout is the LyX layout file, for printed output it requires the
*LaTeX class file* ``scrbook.cls``:

[EMAIL PROTECTED]:/tmp > locate scrbook.cls
/usr/share/texmf-texlive/tex/latex/koma-script/scrbook.cls

Looking at Help>LaTeXConfig, you can find out which LaTeX classes and
packages are found by the latest Tools>Reconfigure run. Here I have:

  Found: scrartcl: yes, scrreprt: yes, scrbook: yes

Fix:
    
Find out which Gentoo package provides the file scrbook.cls and install
it (or install all classes that are marked as required, recommended or 
suggested by LyX).
    


> I wonder if it is a lyx problem or because of my Gentoo Linux.

Both: 

Gentoo:
  scrbook.cls is part of any major LaTeX distribution, but might be in
  a separate package on Gentoo. However, the the LyX package should at
  least recommend the package containing scrbook.cls. (If this is the
  case but you still choose not to install it, it is actually your
  problem ;-).

LyX:
  Finding out that LyX misses the file scrbook.cls is not
  straightforward without knowledge about LaTeX packages and classes. 
  
  * The error message points to the Customization guide (which contains 
    info about installing a new class but nothing specific to finding
    out about missing LaTeX classes for existing LyX layouts.

  * It fails to mention Help>LaTeXConfig where additional info could be
    found.
    
  * LaTeXConfig does not contain the full file name found or not found.
    (i.e. it mentions ``scrbook`` but not ``scrbook.cls``).

Günter

Reply via email to