On Tue, 26 Feb 2019 01:35:52 -0500 Christian <cde...@gmail.com> wrote:
> Sorry, but I don't see how this solves the problem. This solution > assumes that the variable allocation is always fixed, so that loading > the module would be equivalent to have a set of variables > automatically allocated by "% some stuff to go in the preamble". This > is not what I was aiming for. The idea is to create some LyX layout > (environment, or similar, like "Author", or "Abstract"). Is it > possible to do it? If all you want to do is define an environment within a layout, here's how I do it: ================================================ Preamble \newenvironment{storyL}{ \par \begingroup \leftskip 0.4in\rightskip 0.4in \it \noindent{.\dotfill{}.\par} %~\vskip -0.3in }{ %~\vskip -0.05in \par\noindent{.\dotfill{}.\par} \endgroup %~\vskip 0.0in ~\\ } %%% Other LaTeX stuff necessary for LyX environments %%% and character styles EndPreamble Style Story LatexType Environment LatexName storyL LeftMargin "MMMMMM" RightMargin "MMMMMM" ParSkip 0.7 ParSep 0.7 TopSep 0.7 BottomSep 0.7 Font Series Medium Shape Italic Size Normal EndFont End ================================================ The preceding is directly from the layout file for my book, "Key to Everyday Excellence." I made a lot of appearance modifications for both LyX's authoring environment (Story) and the output appearance (StoryL). It could be much simpler. The main thing is that the LyX environment be LateXType "Environment" and have a LatexName identical to a LaTeX environment coded between a Preamble and an EndPreamble. SteveT