Could someone please either refer me to a how to do or show me how I can
build the following environment in Lyx.  They are borrowed from Ads-Wes.sty
Thanks,
Artimess
-------------------------

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% ENVIRONMENTS

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%

%% new environments, or new definitions of old ones

%%

%% - example : for displaying computer interaction

%% - wexample : as above, but full width

%% - cexample : as above, but centered

%% - pseudocode : for displaying pseudo-code

%% - outputstuff : for displaying computer output

%% - description : like description, but with equal left & right indents

%% - itemize : as above, for itemized lists

%% - enumerate : as above, for enumerated lists

%% - preface : for prefaces

%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%

%% EXAMPLE environment

%%

\def\examplefont{\tb} %% font (& style) used for all example environments

\newdimen\exampletopsep %% white space to leave above an example

\exampletopsep\parskip

\def\example{\list{}{%

\topsep\exampletopsep

\rightmargin\leftmargin

\examplefont}

\item[]}

\let\endexample\endlist

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%

%% FULL WIDTH EXAMPLE ENVIRONMENT

%%

\def\wexample{\list{}{%

\topsep\exampletopsep

\leftmargin 0pt

\rightmargin \leftmargin

\examplefont}

\item[]}

\let\endwexample\endlist

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%

%% CENTERED EXAMPLE ENVIRONMENT

%%

\def\cexample{%

\begin{center}

\examplefont}

\def\endcexample{\end{center}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%

%% PSEUDO-PSUEDOCODE ENVIRONMENT

%%

%% usage:

%% \begin{pseudocode}

%% if (test clause) \\

%% \> action statement \\

%% else \\

%% \> alternative \\

%% endif

%% \end{pseudocode}

%% extra levels of indentation can be achieved with additional \>'s.

\def\pseudocode{\list{}{%

\topsep \exampletopsep

\rightmargin \leftmargin

\examplefont}

\item[]

\begin{tabbing}

\hskip 1cm \= \hskip 1cm \= \hskip 1cm \= \hskip 1cm \= \hskip 1cm \= \kill}

\def\endpseudocode{\endtabbing\endlist}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%

%% OUTPUTSTUFF ENVIRONMENT

%%

%% for displaying the output from computer interaction

\def\outputfont{\op} %% font to use for outputstuff

\newdimen\outputstufftopsep %% space to leave above outputstuff

\outputstufftopsep\parskip

\def\outputstuff{\list{}{%

\rightmargin \leftmargin

\topsep\outputstufftopsep

\outputfont}

\item[]}

\let\endoutputstuff\endlist

 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%

%% DESCRIPTION ENVIRONMENT

%%

%% redefine the `description' environment

%% to give equal right and left margins,

%% and parametize its topsep

\newdimen\lrdesctopsep %% space to leave above a description

\lrdesctopsep\parskip

\def\description{\list{}{%

\topsep\lrdesctopsep

\rightmargin\leftmargin

\itemindent -\leftmargin

\divide\itemindent by 2

\labelwidth\z@

\let\makelabel\descriptionlabel

}}

\let\enddescription\endlist

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%

%% ITEMIZED LIST ENVIRONMENT

%%

\def\itemize{%

\ifnum \...@itemdepth >3%

\...@toodeep%

\else%

\advan...@itemdepth \...@ne%

\ed...@itemitem{labelitem\romannumeral\the\@itemdepth}%

\list{\csna...@itemitem\endcsname}%

{\def\makelabel##1{\hss\llap{##1}}%

\rightmargin\leftmargin}%

\fi}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%

%% ENUMERATED LIST ENVIRONMENT

%%

\def\enumerate{%

\ifnum \...@enumdepth >3%

\...@toodeep%

\else

\advan...@enumdepth \...@ne%

\ed...@enumctr{enum\romannumeral\the\@enumdepth}%

\list{\csname lab...@enumctr\endcsname}%

{\usecounte...@enumctr}%

\def\makelabel##1{\hss\llap{##1}}%

\rightmargin\leftmargin}%

\fi}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Reply via email to