A. Scottedward Hodel wrote:
I am trying to write a textbook layout file (current version is
attached) that will let me set a "switch" in the preamble of my LyX
file so that I can easily generate both a teacher's version (with
solutions) and a student version (without homework solutions).
What I've attempted to do is to put the command
\def\notestype{teacher}
in the Document -> Settings -> LaTeX preamble
window of LyX. However, this seems to be loaded after the layout
preamble is set. Is there a way for me to have at least a part of
the layout preamble processed /after/ the Documents -> Settings
preamble? If I can do this, then I will be able to work within LyX
rather than LaTeX, which I would like to do.
At present, no, you can't do that, but I'm not sure why you really need
to do so. Can't you just do something like this:
\ifequal\notestype....
in the environments (or commands) themselves? Then it doesn't matter
what gets loaded first. (If this isn't clear, post your layout, and we
can work on it together. All of us!!)
The other possibility is to use branches, which are designed for
precisely this sort of use.
rh