Here are some layout files for the memoir documentclass. I've split them into two layout files -- one for books and one for articles (with a third file for all the common code). The article layout file does a couple weird things to make it more compatible with the standard article documentclasses. The first is to redefine the sectioning commands (so that, for example, \section gets interpreted as \chapter). The reason for this is so that it is possible to switch between the article document class and the memoir documentclass (with the "article" class option) without having to change manually anything in the document. The second is to redefine the \chapter command so as to remove the erroneous "Chapter x" that precedes section titles in headers when babel is loaded.

I've tried to include as many commands and environments as I could from the memoir class, though I wasn't able to figure out how to do many of them since they take more arguments or options than I could accommodate within the LyX layout file. In some cases, as with the \epigraph command, I've made the quotation be the body of the Epigraph paragraph, with the author to be inserted as a "Short Title" (under the "Insert" menu), since the "Short Title" actually gets passed as an optional argument to the command.
In other cases, as with the \hangpara command, I've done the same trick (where the "Short Title" specifies the number of lines to be "hung" by the paragraph), though I've had to stipulate that the width of the "hanging" be 2em. This use of LyX's "Short Title" is certainly counterintuitive, but it gets the job done.

Perhaps there ought to be a way in the definition of layout files to make handling extra arguments/options easier or to make it possible to specify more than 2 arguments within LyX. (Or perhaps I'm just not seeing how this could be done.)

Of course, comments or suggestions for improvement would be welcome.

Bennett Helm

Attachment: memoir.inc
Description: Binary data

Attachment: memoir-book.layout
Description: Binary data

Attachment: memoir-article.layout
Description: Binary data

Reply via email to