On Mon, 20 Dec 1999 [EMAIL PROTECTED] wrote:

> In <[EMAIL PROTECTED]>, on 12/21/99
> 
>    at 12:08 PM, Allan Rae <[EMAIL PROTECTED]> said:
> 
> [...]
> >To speed things along you should be able to just copy article.layout and
> >reword the line at the top that lloks like:
> 
> >     #  \DeclareLaTeXClass{article}
> >to
> >     #  \DeclareLaTeXClass{article (exam)}
> 
> >since I think you originally said it was exam.cls.  There are new docs being
> >developed all about adding new classes but Mike hasn't resurfaced with them
> >yet.  
> 
> I tried doing just that, but found that I am unable to type in even the
> simplest example without an error about "\end{document}" having no line to
> end...

This can happen if you have unmatched '{' and '}' in your latex document.
A different error occurs when you have unmatched \begin and \end
statements.

>  The package does not appear to require a document having any specific
> parts in the body.  I tried to add either/both \begin{document} and
> \end{document} statements to no avail.  ("Exam" did show up as a class, BTW,
> after doing the above.)  

Adding \begin{document} or \end{document} is just going to confuse latex
the same way multiple \documentclass statements do.  You've already
learned that lesson :-)

If "Exam" didn't show up as a class how did you generate a file with lyx
for this class?

Have you rerun configure for LyX either from the command line or from the
menu?  Take a look at the output and see if lyx even searched for exam at
all.  If it did there should be a line with either a "yes" or "no" stating
if it was found.  You can also check this in your ~/.lyx/textclass.lst
file assuming you put the new layout file as ~/.lyx/layouts/exam.layout 
Remember you have to restart LyX after reconfiguring.

> I'm still slowly trying to figure out how to get the various environments
> into Lyx's drop down list at the top.  One of my the biggest problems is a
> lack of knowledge about Latex itself and how Lyx incorporates that from the
> .cls files into the layout files.  

Building the layout file is a trial-and-error process done by hand -- no
automated tools.  Generally I just copy Styles from other layouts that
look similar to whatever new class I happen to trying to use.  As a result
they (IEEEtran, latex8 and soon ieice) on screen only look approximately
like they do on paper.  You should take a look at the section on the
layout format in Help->Customization.  The main things you need to set are
the Margin and label info.  Fonts can be tuned later.

> Additionally, can a new command (macro?) be defined in the preamble which
> causes a substitution of a whole phrase?  E.g. "\bmcq" translating to 
> 
> \begin{multiplechoice}
>   \begin{question}
> 
> ???  This would at least give me a shorthand way of doing several entries at
> once until things get figured out.

Something like this is certainly possible.  It's been used in the past for
the slides environment although now we have support for empty environments
this isn't used anymore.  You can define the multiple choice environment
to have "KeepEmpty  1" which will then allow you to inert new question
environment/s.  It's likely you'd run into problems with consecutive
question environments due to flaw in LyX's handling of environments but
there is a simple workaround for this if you do have problems here.

Allan. (ARRae)

Reply via email to