On Thu, 15 Aug 2013 09:17:08 -0400 Richard Heck <rgh...@lyx.org> wrote:
> On 08/14/2013 10:16 PM, Steve Litt of Troubleshooters.Com wrote: > > Hi all, > > > > My Layout file, derived from the Book doc class, has the following > > code: > > > > ======================================== > > \ifx\stevelitt\undefined \else > > \renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\slshape\chaptername{} > > \thechapter: #1}}{}} > > %\renewcommand{\sectionmark}[1]{\markright{\MakeUppercase{\slshape\thesection > > : > > #1}}} \renewcommand{\sectionmark}[1]{\markright{Steve Stiffler}} > > > > \fancyhf{} > > \fancyhf[OLH]{\rightmark} > > \fancyhf[ERH]{\leftmark} > > \fancyhf[ORH,ELH]{\thepage} > > > > \fi > > ======================================== > > > > Ideally, what I'd like to do is set (or not set) command \stevelitt > > in the LyX Document Preamble, but that doesn't work --- define it > > or not, the layout code acts as if it's not defined. I suspect the > > reason is that LyX places the code from the layout file earlier in > > the resultant LaTeX file than the LyX document preamble, so > > \stevelitt is always undefined *when the conditionally compiled > > code is encountered*. > > Yes, that is correct. > > Try wrapping the conditional code in \AtBeginDocument to defer its > execution. Thanks Richard, That would be incredibly cool if it works. Meanwhile, I already implemented a different solution, which I'll describe in a different email. Thanks, SteveT Steve Litt * http://www.troubleshooters.com/ Troubleshooting Training * Human Performance