I tried making a .layout fro brev.cls (A class form making Norwegian-style letters.)
I usually have no problems making a .layout, but this class seems to need a troublesome latex structure. Example .tex code: \documentclass{brev} \begin{document} \name{my name} %No problem \address{my address} %No problem \begin{letter}{sendto-address} %Argh . . . \opening{Hi!} %No problem Some text \closing{Regards,} %No problem \end{letter} % . . . Sigh \end{document} The problem is this "letter" environment. Now lyx supports using environments, but that will force the poor user to input almost the entire letter nested into the lyx paragraph containing the sendto address. That isn't exactly user-friendly. It has to be this way, \opening and friends only works inside this letter environment. And worse, the sendto address is stuffed into a parameter to this environment, a construct the .layout file doesn't seem to support. (I can have a parameter, but it can't be changed from within lyx) Have I overlooked some _nice_ way of supporting this? If not, what do you think of these ugly workarounds: 1. Create a custom latexcommand for the sendto address, that will contain the "\begin{letter}" stuff. 2. Create a custom latexcommand for the closing, which add the "\end{letter}" after the closing itself. This ought to work. But the user will now be forced to have exactly one "sendto" address, one "closing", and any "opening" must be between them. Otherwise, the output will explode in compile errors. :-/ Helge Hafting