Stefano Franchi wrote:
> On 29 Jan, 2007, at 7:23 AM, William Adams wrote:
>> \documentclass[draft]{memoir}
>> \documentclass[final]{memoir}
>>
>> Although the other issues aren't addressed AFAIK in LyX (yet),
>> they're as easily solved in LaTeX by using the right packages
>> appropriately.
> Well, that is true by definition---everything can be done in LaTeX!
> [for some very broad definition of 'everything,' at least ;-)]
> The above solution becomes less easy when you have several parameters
> you want to change at once and several files in a document. In fact
> the real solution would be to have different classes or customized
> classes. Which is basically what Framemaker does when you change from
> one template to another and export it to all the files.
> However, my point was that Framemaker makes this, and other tasks,
> easier. Read---less time consuming and error prone. 
This kind of thing can be made easier, if you use file includes. Put
what you need into a file preamble.sty---you don't need an entire class,
just a package---and then include that from each of your subdocuments.
Make whatever changes you need to make in preamble.sty, which may just
mean commenting out some stuff and uncommenting other stuff. Or you can
define a \newif and use a conditional to choose among different
possibilities and then just change \ifdraftrue to \ifdraftfalse at the
beginning of preamble.sty.

There are issues that can arise here, but they aren't that hard to
resolve. There's some stuff I posted on the wiki that's relevant. Note,
however, that most of that will only be an issue when you are just
compiling parts of the document. If you're compiling the whole document,
then the commands in the preamble of the master document are the only
ones LaTeX will see: The preambles of sub-documents are only visible to
LyX.
> On a similar point raised earlier: suggesting that multi-file
> search-and-replace could be done with a perl script seems to me to be
> beside the point. Or would you consider hacking perl 'easy'? Not for
> me, for sure, and, I would dare say, not for a large majority of writers.
I wasn't suggesting you should have to hack perl. The point was that
there are simple scripts out there that can be used to do very powerful
search and replace. The script I posted doesn't need to be hacked. It
just needs to be saved and used. (Other scripts do the same thing. I
just wrote it to kill time.) Don't want to use regexes? Don't have to.

Granted, multi-file search and replace would be a nice thing to have
within LyX, and a more important thing is that search and replace in LyX
doesn't see everything in the file. So, yes, I think that's a place
improvement would be welcome.

Part of the issue here, I think, is that LyX isn't a stand-alone product
but a front-end to LaTeX. It doesn't look that way, and it's not meant
to look that way. A large part of the idea seems to be to let people do
a whole lot without knowing any LaTeX at all, and a lot of people use
LyX comfortably without ever having to go beyond that. But there are
some of us who need or want to do more. Sometimes, such people need, as
much as anything, to unlearn bad habits and stop trying to control the
layout so much. But, as I said, some of us need to do more, and then
that means getting down and dirty with LaTeX. There's really no way
everything that's possible in LaTeX can be put on a menu. But if you do
make heavy use of LaTeX, then it can easily seem like LyX gets in the
way. It can make you want to have a document with nothing but ERT!
(Speaking of which, sometimes the best solution to a search and replace
problem is to export to LaTeX, do the edits there, and then re-import to
LyX.) But mostly it's a matter of figuring out how to make the best of
the combination. Fortunately, there are lots of people here who've had
experience with that, so we don't all have to re-invent the wheel. File
includes and redefinitions of commands seem to be the most useful
techniques here. And if you want to post specific issues, I'd be happy
to help work them out, as I'm sure many other people would, also. That,
of course, is the really nice thing about F/OSS: The community that goes
with it.

Well, that said: It's nice to see another philosopher on the list!

Richard

-- 
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://bobjweil.com/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto

Reply via email to