Re: Question: Using LyX as your daily word processor

2013-08-22 Thread Steve Litt of Troubleshooters.Com
On Thu, 22 Aug 2013 09:26:39 +0200
Wolfgang Engelmann engelm...@uni-tuebingen.de wrote:

 Am Thursday, 22. August 2013, 09:18:09 schrieb Scott Kostyshak:
  On Thu, Aug 22, 2013 at 3:19 AM, Wolfgang Engelmann
  
  engelm...@uni-tuebingen.de wrote:
   by the way, in Tübingen, my home town
  
  Cool! :)
  
  Scott
 
 More to Matthias Ettrich:
 
 http://en.wikipedia.org/wiki/Matthias_Ettrich
 
 Wolfgang

I give thanks to eternity that LyX wasn't made into a KDE app. My
business has banned all use of all KDE libraries, for stability's sake.
Qt's not bad, as a matter of fact Qt built apps seem easier to
configure, from my point of view, than Gtk built apps.

In the history of LyX, did anyone campaign for it to be a KDE app, and
if so, how was that (in my opinion mistake) prevented?


Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Re: Question: Using LyX as your daily word processor

2013-08-22 Thread Steve Litt of Troubleshooters.Com
On Thu, 22 Aug 2013 20:54:36 +0200
Jean-Marc Lasgouttes lasgout...@lyx.org wrote:

 Le 22/08/13 20:42, Steve Litt of Troubleshooters.Com a écrit :
  In the history of LyX, did anyone campaign for it to be a KDE app,
  and if so, how was that (in my opinion mistake) prevented?
 
 This is KLyX, a fork attempted by Matthias without telling us. But we 
 won in the end :)
 
 JMarc

Yeah, now that you mention it, I remember KLyX. Thank you, thank you,
THANK YOU for winning that battle!

Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Re: Question: Using LyX as your daily word processor

2013-08-22 Thread Steve Litt of Troubleshooters.Com
On Thu, 22 Aug 2013 09:26:39 +0200
Wolfgang Engelmann engelm...@uni-tuebingen.de wrote:

 Am Thursday, 22. August 2013, 09:18:09 schrieb Scott Kostyshak:
  On Thu, Aug 22, 2013 at 3:19 AM, Wolfgang Engelmann
  
  engelm...@uni-tuebingen.de wrote:
   by the way, in Tübingen, my home town
  
  Cool! :)
  
  Scott
 
 More to Matthias Ettrich:
 
 http://en.wikipedia.org/wiki/Matthias_Ettrich
 
 Wolfgang

I give thanks to eternity that LyX wasn't made into a KDE app. My
business has banned all use of all KDE libraries, for stability's sake.
Qt's not bad, as a matter of fact Qt built apps seem easier to
configure, from my point of view, than Gtk built apps.

In the history of LyX, did anyone campaign for it to be a KDE app, and
if so, how was that (in my opinion mistake) prevented?


Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Re: Question: Using LyX as your daily word processor

2013-08-22 Thread Steve Litt of Troubleshooters.Com
On Thu, 22 Aug 2013 20:54:36 +0200
Jean-Marc Lasgouttes lasgout...@lyx.org wrote:

 Le 22/08/13 20:42, Steve Litt of Troubleshooters.Com a écrit :
  In the history of LyX, did anyone campaign for it to be a KDE app,
  and if so, how was that (in my opinion mistake) prevented?
 
 This is KLyX, a fork attempted by Matthias without telling us. But we 
 won in the end :)
 
 JMarc

Yeah, now that you mention it, I remember KLyX. Thank you, thank you,
THANK YOU for winning that battle!

Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Re: Question: Using LyX as your daily word processor

2013-08-22 Thread Steve Litt of Troubleshooters.Com
On Thu, 22 Aug 2013 09:26:39 +0200
Wolfgang Engelmann  wrote:

> Am Thursday, 22. August 2013, 09:18:09 schrieb Scott Kostyshak:
> > On Thu, Aug 22, 2013 at 3:19 AM, Wolfgang Engelmann
> > 
> >  wrote:
> > > by the way, in Tübingen, my home town
> > 
> > Cool! :)
> > 
> > Scott
> 
> More to Matthias Ettrich:
> 
> http://en.wikipedia.org/wiki/Matthias_Ettrich
> 
> Wolfgang

I give thanks to eternity that LyX wasn't made into a KDE app. My
business has banned all use of all KDE libraries, for stability's sake.
Qt's not bad, as a matter of fact Qt built apps seem easier to
configure, from my point of view, than Gtk built apps.

In the history of LyX, did anyone campaign for it to be a KDE app, and
if so, how was that (in my opinion mistake) prevented?


Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Re: Question: Using LyX as your daily word processor

2013-08-22 Thread Steve Litt of Troubleshooters.Com
On Thu, 22 Aug 2013 20:54:36 +0200
Jean-Marc Lasgouttes <lasgout...@lyx.org> wrote:

> Le 22/08/13 20:42, Steve Litt of Troubleshooters.Com a écrit :
> > In the history of LyX, did anyone campaign for it to be a KDE app,
> > and if so, how was that (in my opinion mistake) prevented?
> 
> This is KLyX, a fork attempted by Matthias without telling us. But we 
> won in the end :)
> 
> JMarc

Yeah, now that you mention it, I remember KLyX. Thank you, thank you,
THANK YOU for winning that battle!

Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Re: Help on LaTeX if statement

2013-08-19 Thread Steve Litt of Troubleshooters.Com
On Mon, 19 Aug 2013 12:40:48 + (UTC)
Guenter Milde mi...@users.sf.net wrote:

 On 2013-08-10, Steve Litt wrote:
  Hi all,
 
  I need your help. Could you please point me to the best web
  resources I'd need in order to understand LaTeX's if statement? 
 
 The raw if statement is provided by TeX (not LaTeX) and therefore
 has a different look and feel as well as philosophy and working.
 Read about it in the excellent TEX BY TOPIC, A TEXNICIAN’S REFERENCE
 from VICTOR EIJKHOUT.
 http://www.eijkhout.net/texbytopic/texbytopic.html
 
 For a more LaTeX-like layer, have a look at the ifthenelse package
 http://www.ctan.org/pkg/ifthen, well documented, try `texdoc ifthen`.
 
 Günter
 

Thanks Günter,

I decided to use TeX's ifx statement. It sux that there's no elsif, but
it's reasonably useable, and if you need complex logic you can do it
by flipping flags.

I just downloaded the book you suggested. Personally, I like TeX more
than LaTeX for much the same reasons I like C better than C++. So this
book will be very helpful for me. I already have a fairly good idea
*how to use* TeX, this book gives me the whys. Thanks for the great
suggestion.

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Re: Help on LaTeX if statement

2013-08-19 Thread Steve Litt of Troubleshooters.Com
On Mon, 19 Aug 2013 12:40:48 + (UTC)
Guenter Milde mi...@users.sf.net wrote:

 On 2013-08-10, Steve Litt wrote:
  Hi all,
 
  I need your help. Could you please point me to the best web
  resources I'd need in order to understand LaTeX's if statement? 
 
 The raw if statement is provided by TeX (not LaTeX) and therefore
 has a different look and feel as well as philosophy and working.
 Read about it in the excellent TEX BY TOPIC, A TEXNICIAN’S REFERENCE
 from VICTOR EIJKHOUT.
 http://www.eijkhout.net/texbytopic/texbytopic.html
 
 For a more LaTeX-like layer, have a look at the ifthenelse package
 http://www.ctan.org/pkg/ifthen, well documented, try `texdoc ifthen`.
 
 Günter
 

Thanks Günter,

I decided to use TeX's ifx statement. It sux that there's no elsif, but
it's reasonably useable, and if you need complex logic you can do it
by flipping flags.

I just downloaded the book you suggested. Personally, I like TeX more
than LaTeX for much the same reasons I like C better than C++. So this
book will be very helpful for me. I already have a fairly good idea
*how to use* TeX, this book gives me the whys. Thanks for the great
suggestion.

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Re: Help on LaTeX if statement

2013-08-19 Thread Steve Litt of Troubleshooters.Com
On Mon, 19 Aug 2013 12:40:48 + (UTC)
Guenter Milde  wrote:

> On 2013-08-10, Steve Litt wrote:
> > Hi all,
> 
> > I need your help. Could you please point me to the best web
> > resources I'd need in order to understand LaTeX's "if" statement? 
> 
> The "raw" if statement is provided by TeX (not LaTeX) and therefore
> has a different "look and feel" as well as philosophy and working.
> Read about it in the excellent "TEX BY TOPIC, A TEXNICIAN’S REFERENCE"
> from VICTOR EIJKHOUT.
> http://www.eijkhout.net/texbytopic/texbytopic.html
> 
> For a more LaTeX-like layer, have a look at the ifthenelse package
> http://www.ctan.org/pkg/ifthen, well documented, try `texdoc ifthen`.
> 
> Günter
> 

Thanks Günter,

I decided to use TeX's ifx statement. It sux that there's no elsif, but
it's reasonably useable, and if you need complex logic you can do it
by flipping flags.

I just downloaded the book you suggested. Personally, I like TeX more
than LaTeX for much the same reasons I like C better than C++. So this
book will be very helpful for me. I already have a fairly good idea
*how to use* TeX, this book gives me the "whys". Thanks for the great
suggestion.

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Re: Question: Using LyX as your daily word processor

2013-08-17 Thread Steve Litt of Troubleshooters.Com
On Sat, 17 Aug 2013 07:30:43 -0600
Ken Springer snowsh...@q.com wrote:

 I'm always looking for software that fits me better, giving me the 
 output I'm looking for.
 
 I'm interested in knowing what users of LyX think of the idea of
 using it as a general word processor, instead of MS Word, Libre
 Office, Apple's Pages, etc.
 
 Pluses?  Minuses?

Pluses: Stable. Doesn't let you put in extra spaces and newlines,
unless you *mean* to. Supports brain-dead authoring. Produces a
good-looking PDF output. Does math well.

Minuses: Much more difficult to create/change paragraph styles and
character styles than in MSWord or LibreOffice.

HTH,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Re: Question: Using LyX as your daily word processor

2013-08-17 Thread Steve Litt of Troubleshooters.Com
On Sat, 17 Aug 2013 07:30:43 -0600
Ken Springer snowsh...@q.com wrote:

 I'm always looking for software that fits me better, giving me the 
 output I'm looking for.
 
 I'm interested in knowing what users of LyX think of the idea of
 using it as a general word processor, instead of MS Word, Libre
 Office, Apple's Pages, etc.
 
 Pluses?  Minuses?

Pluses: Stable. Doesn't let you put in extra spaces and newlines,
unless you *mean* to. Supports brain-dead authoring. Produces a
good-looking PDF output. Does math well.

Minuses: Much more difficult to create/change paragraph styles and
character styles than in MSWord or LibreOffice.

HTH,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Re: Question: Using LyX as your daily word processor

2013-08-17 Thread Steve Litt of Troubleshooters.Com
On Sat, 17 Aug 2013 07:30:43 -0600
Ken Springer  wrote:

> I'm always looking for software that fits me better, giving me the 
> output I'm looking for.
> 
> I'm interested in knowing what users of LyX think of the idea of
> using it as a general word processor, instead of MS Word, Libre
> Office, Apple's Pages, etc.
> 
> Pluses?  Minuses?

Pluses: Stable. Doesn't let you put in extra spaces and newlines,
unless you *mean* to. Supports brain-dead authoring. Produces a
good-looking PDF output. Does math well.

Minuses: Much more difficult to create/change paragraph styles and
character styles than in MSWord or LibreOffice.

HTH,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Re: How to do conditional compilation from LyX?

2013-08-15 Thread Steve Litt of Troubleshooters.Com
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


Re: How to do conditional compilation from LyX? SOLVED

2013-08-15 Thread Steve Litt of Troubleshooters.Com
On Wed, 14 Aug 2013 22:16:25 -0400
Steve Litt of Troubleshooters.Com stevel...@careersuccess.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
 

The ideal solution, and in fact my first attempt, would have been to
package the preceding \renewcommand and \fancyhf commands in their own
subroutine (command), and call that command from LyX's LaTeX preamble.
That makes *perfect* sense but doesn't work, because when you wrap the
\renewcommand commands within another command, the #1's involved change
from a prototype to a literal -- #1 of the enclosing command. That's
why I tried the conditional compile in the first place, but we all know
that didn't work because it comes earlier than LyX can set a var.

So I moved the \renewcommands outside of the subroutine, and assigned
them to otherwise meaningless commands \smark and \cmark, which can then
be assigned to \sectionmark and \chaptermark *inside the enclosing
command*. So the solution looks like this:

==
\newcommand{\cmark}[1]{\markboth{\MakeUppercase{\slshape\chaptername{}\thechapter:
 #1}}{}}
\newcommand{\smark}[1]{\markright{\MakeUppercase{\slshape\thesection : #1}}}

\newcommand{\setheader}[1]{%
  \let\chaptermark\cmark
  \let\sectionmark\smark
  \fancyhf{}
  \fancyhf[OLH]{\rightmark}
  \fancyhf[ERH]{\leftmark}
  \fancyhf[ORH,ELH]{\thepage}
}
==

So it sets \cmark and \smark regardless, but those are *used* only if
the \setheader command is run. Pretty cool, huh?

Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Re: How to do conditional compilation from LyX?

2013-08-15 Thread Steve Litt of Troubleshooters.Com
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


Re: How to do conditional compilation from LyX? SOLVED

2013-08-15 Thread Steve Litt of Troubleshooters.Com
On Wed, 14 Aug 2013 22:16:25 -0400
Steve Litt of Troubleshooters.Com stevel...@careersuccess.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
 

The ideal solution, and in fact my first attempt, would have been to
package the preceding \renewcommand and \fancyhf commands in their own
subroutine (command), and call that command from LyX's LaTeX preamble.
That makes *perfect* sense but doesn't work, because when you wrap the
\renewcommand commands within another command, the #1's involved change
from a prototype to a literal -- #1 of the enclosing command. That's
why I tried the conditional compile in the first place, but we all know
that didn't work because it comes earlier than LyX can set a var.

So I moved the \renewcommands outside of the subroutine, and assigned
them to otherwise meaningless commands \smark and \cmark, which can then
be assigned to \sectionmark and \chaptermark *inside the enclosing
command*. So the solution looks like this:

==
\newcommand{\cmark}[1]{\markboth{\MakeUppercase{\slshape\chaptername{}\thechapter:
 #1}}{}}
\newcommand{\smark}[1]{\markright{\MakeUppercase{\slshape\thesection : #1}}}

\newcommand{\setheader}[1]{%
  \let\chaptermark\cmark
  \let\sectionmark\smark
  \fancyhf{}
  \fancyhf[OLH]{\rightmark}
  \fancyhf[ERH]{\leftmark}
  \fancyhf[ORH,ELH]{\thepage}
}
==

So it sets \cmark and \smark regardless, but those are *used* only if
the \setheader command is run. Pretty cool, huh?

Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Re: How to do conditional compilation from LyX?

2013-08-15 Thread Steve Litt of Troubleshooters.Com
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


Re: How to do conditional compilation from LyX?

2013-08-15 Thread Steve Litt of Troubleshooters.Com
On Wed, 14 Aug 2013 22:16:25 -0400
"Steve Litt of Troubleshooters.Com" <stevel...@careersuccess.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
> 

The ideal solution, and in fact my first attempt, would have been to
package the preceding \renewcommand and \fancyhf commands in their own
subroutine (command), and call that command from LyX's LaTeX preamble.
That makes *perfect* sense but doesn't work, because when you wrap the
\renewcommand commands within another command, the #1's involved change
from a prototype to a literal -- #1 of the enclosing command. That's
why I tried the conditional compile in the first place, but we all know
that didn't work because it comes earlier than LyX can set a var.

So I moved the \renewcommands outside of the subroutine, and assigned
them to otherwise meaningless commands \smark and \cmark, which can then
be assigned to \sectionmark and \chaptermark *inside the enclosing
command*. So the solution looks like this:

==
\newcommand{\cmark}[1]{\markboth{\MakeUppercase{\slshape\chaptername{}\thechapter:
 #1}}{}}
\newcommand{\smark}[1]{\markright{\MakeUppercase{\slshape\thesection : #1}}}

\newcommand{\setheader}[1]{%
  \let\chaptermark\cmark
  \let\sectionmark\smark
  \fancyhf{}
  \fancyhf[OLH]{\rightmark}
  \fancyhf[ERH]{\leftmark}
  \fancyhf[ORH,ELH]{\thepage}
}
==

So it sets \cmark and \smark regardless, but those are *used* only if
the \setheader command is run. Pretty cool, huh?

Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


How to do conditional compilation from LyX?

2013-08-14 Thread Steve Litt of Troubleshooters.Com
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*.

My ideal solution to this conditional compilation would be to simply
define a variable within the LyX file and have that work. I haven't
been able to do that. Uglier solutions, which I haven't tried yet,
would be to modify the layout with AWK just before the compilation, or
run the LaTeX command like:

latex \edef\stevelitt{$1}\input{myfile.latex}

Something I *haven't* been able to get to work is to put the
conditional code inside a command and just call the command from the
LyX LaTeX preamble. The conditional code gets arguments like #1 very
confused when it's placed inside a command.

I could put the code that will be conditionally compiled inside the LyX
LaTeX document preamble, but that would be sloppy.

Does anyone know a good way to trigger conditional compilation from
within the LyX file itself?

Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


How to do conditional compilation from LyX?

2013-08-14 Thread Steve Litt of Troubleshooters.Com
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*.

My ideal solution to this conditional compilation would be to simply
define a variable within the LyX file and have that work. I haven't
been able to do that. Uglier solutions, which I haven't tried yet,
would be to modify the layout with AWK just before the compilation, or
run the LaTeX command like:

latex \edef\stevelitt{$1}\input{myfile.latex}

Something I *haven't* been able to get to work is to put the
conditional code inside a command and just call the command from the
LyX LaTeX preamble. The conditional code gets arguments like #1 very
confused when it's placed inside a command.

I could put the code that will be conditionally compiled inside the LyX
LaTeX document preamble, but that would be sloppy.

Does anyone know a good way to trigger conditional compilation from
within the LyX file itself?

Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


How to do conditional compilation from LyX?

2013-08-14 Thread Steve Litt of Troubleshooters.Com
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*.

My ideal solution to this conditional compilation would be to simply
define a variable within the LyX file and have that work. I haven't
been able to do that. Uglier solutions, which I haven't tried yet,
would be to modify the layout with AWK just before the compilation, or
run the LaTeX command like:

latex "\edef\stevelitt{$1}\input{myfile.latex}"

Something I *haven't* been able to get to work is to put the
conditional code inside a command and just call the command from the
LyX LaTeX preamble. The conditional code gets arguments like #1 very
confused when it's placed inside a command.

I could put the code that will be conditionally compiled inside the LyX
LaTeX document preamble, but that would be sloppy.

Does anyone know a good way to trigger conditional compilation from
within the LyX file itself?

Thanks,

SteveT

Steve Litt*  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance