Create my own module

2011-08-14 Thread Francesco Menoncin

Dear LyX users,

I am using LyX 2.0.0 (on both Windows and Linux).
How can I create my own module and add it to the list in Document 
Settings?
For instance, I have put the following commands in the preamble in order 
to create a balanced index


\RequirePackage{multicol}

\renewenvironment{theindex}{

\columnseprule 0pt\relax

\columnsep 35pt\relax

\chapter*{\indexname}

\begin{multicols}{2}

\@mkboth{\MakeUppercase \indexname}{\MakeUppercase \indexname}

\thispagestyle{plain} \parindent 0pt\relax \parskip 0pt \@plus .3pt\relax

\let\item\@idxitem}

{\end{multicols}}


Nevertheless, if I were able to collect these commands in a module, I 
could use them in a much easier way.

Thank you,

Francesco

--

Francesco Menoncin
Università degli Studi di Brescia
Facoltà di Economia
Via S. Faustino, 74/B
25122 Brescia (Italy)
Tel: 0039-030-2988806
Fax: 0039-030-2988837
E-mail: menon...@eco.unibs.it
web: www.eco.unibs.it/~menoncin/




Re: Create my own module

2011-08-14 Thread Richard Heck
On 08/14/2011 05:06 AM, Francesco Menoncin wrote:
 Dear LyX users,

 I am using LyX 2.0.0 (on both Windows and Linux).
 How can I create my own module and add it to the list in Document
 Settings?

Please see chapter 5 of the Customization manual. The process is
described there. In this case, you just need to wrap the preamble code
you want in:

AddToPreamble
 \RequirePackage{multicol}

 \renewenvironment{theindex}{

 \columnseprule 0pt\relax

 \columnsep 35pt\relax

 \chapter*{\indexname}

 \begin{multicols}{2}

 \@mkboth{\MakeUppercase \indexname}{\MakeUppercase \indexname}

 \thispagestyle{plain} \parindent 0pt\relax \parskip 0pt \@plus .3pt\relax

 \let\item\@idxitem}

 {\end{multicols}}

EndPreamble

and then add the module declaration code at the top. Oh, and don't
forget the format tag, which must be the first non-comment,
non-whitespace line.

Richard



Create my own module

2011-08-14 Thread Francesco Menoncin

Dear LyX users,

I am using LyX 2.0.0 (on both Windows and Linux).
How can I create my own module and add it to the list in Document 
Settings?
For instance, I have put the following commands in the preamble in order 
to create a balanced index


\RequirePackage{multicol}

\renewenvironment{theindex}{

\columnseprule 0pt\relax

\columnsep 35pt\relax

\chapter*{\indexname}

\begin{multicols}{2}

\@mkboth{\MakeUppercase \indexname}{\MakeUppercase \indexname}

\thispagestyle{plain} \parindent 0pt\relax \parskip 0pt \@plus .3pt\relax

\let\item\@idxitem}

{\end{multicols}}


Nevertheless, if I were able to collect these commands in a module, I 
could use them in a much easier way.

Thank you,

Francesco

--

Francesco Menoncin
Università degli Studi di Brescia
Facoltà di Economia
Via S. Faustino, 74/B
25122 Brescia (Italy)
Tel: 0039-030-2988806
Fax: 0039-030-2988837
E-mail: menon...@eco.unibs.it
web: www.eco.unibs.it/~menoncin/




Re: Create my own module

2011-08-14 Thread Richard Heck
On 08/14/2011 05:06 AM, Francesco Menoncin wrote:
 Dear LyX users,

 I am using LyX 2.0.0 (on both Windows and Linux).
 How can I create my own module and add it to the list in Document
 Settings?

Please see chapter 5 of the Customization manual. The process is
described there. In this case, you just need to wrap the preamble code
you want in:

AddToPreamble
 \RequirePackage{multicol}

 \renewenvironment{theindex}{

 \columnseprule 0pt\relax

 \columnsep 35pt\relax

 \chapter*{\indexname}

 \begin{multicols}{2}

 \@mkboth{\MakeUppercase \indexname}{\MakeUppercase \indexname}

 \thispagestyle{plain} \parindent 0pt\relax \parskip 0pt \@plus .3pt\relax

 \let\item\@idxitem}

 {\end{multicols}}

EndPreamble

and then add the module declaration code at the top. Oh, and don't
forget the format tag, which must be the first non-comment,
non-whitespace line.

Richard



Create my own module

2011-08-14 Thread Francesco Menoncin

Dear LyX users,

I am using LyX 2.0.0 (on both Windows and Linux).
How can I create my own module and add it to the list in "Document 
Settings"?
For instance, I have put the following commands in the preamble in order 
to create a "balanced index"


\RequirePackage{multicol}

\renewenvironment{theindex}{

\columnseprule 0pt\relax

\columnsep 35pt\relax

\chapter*{\indexname}

\begin{multicols}{2}

\@mkboth{\MakeUppercase \indexname}{\MakeUppercase \indexname}

\thispagestyle{plain} \parindent 0pt\relax \parskip 0pt \@plus .3pt\relax

\let\item\@idxitem}

{\end{multicols}}


Nevertheless, if I were able to collect these commands in a module, I 
could use them in a much easier way.

Thank you,

Francesco

--

Francesco Menoncin
Università degli Studi di Brescia
Facoltà di Economia
Via S. Faustino, 74/B
25122 Brescia (Italy)
Tel: 0039-030-2988806
Fax: 0039-030-2988837
E-mail: menon...@eco.unibs.it
web: www.eco.unibs.it/~menoncin/




Re: Create my own module

2011-08-14 Thread Richard Heck
On 08/14/2011 05:06 AM, Francesco Menoncin wrote:
> Dear LyX users,
>
> I am using LyX 2.0.0 (on both Windows and Linux).
> How can I create my own module and add it to the list in "Document
> Settings"?
>
Please see chapter 5 of the Customization manual. The process is
described there. In this case, you just need to wrap the preamble code
you want in:

AddToPreamble
> \RequirePackage{multicol}
>
> \renewenvironment{theindex}{
>
> \columnseprule 0pt\relax
>
> \columnsep 35pt\relax
>
> \chapter*{\indexname}
>
> \begin{multicols}{2}
>
> \@mkboth{\MakeUppercase \indexname}{\MakeUppercase \indexname}
>
> \thispagestyle{plain} \parindent 0pt\relax \parskip 0pt \@plus .3pt\relax
>
> \let\item\@idxitem}
>
> {\end{multicols}}
>
EndPreamble

and then add the module declaration code at the top. Oh, and don't
forget the format tag, which must be the first non-comment,
non-whitespace line.

Richard