Specifying a package in Module declaration

ehud.behar at protonmail.com ehud.behar at protonmail.com
Wed Apr 6 13:33:45 UTC 2022


Thanks a lot for your reply.

1. The geometry package is not listed in Appendix A of the customization manual, and I tried passing it to Requires but lyx doesn't add \usepackage{geometry} to the preamble. It does so when I specify a package that is indeed listed in the appendix.

2. I didn't understand. When using the additional argument inside the [] in the module specification, should LyX add the \uspackage{} line to the preamble or not?

------- Original Message -------
On Tuesday, April 5th, 2022 at 3:52 PM, Jürgen Spitzmüller <spitz at lyx.org> wrote:


> Am Dienstag, dem 05.04.2022 um 13:08 +0000 schrieb tush via lyx-users:
>
> > Of course, I can do
> >
> > AddToPreamble
> > \usepackage{geometry}
> > \geometry{..page layout commands go here..}
> > EndPreamble
> >
> > But I prefer the \usepackage{}` command to be inserted automatically,
> > just like
> >
> > Requires packagename
> >
> > does.
>
>
> Requires works for the packages that are hardcoded in LyX. geometry is
> among them.
>
> > I read in the Customization manual that there is this optional
> > argument for the Module specification (section 5.3.2. The Module
> > declaration), for example:
> >
> > #\DeclareLyXModule[endnotes.sty]{Endnotes}
> >
> > It doesn't add to my preamble the \usepackage{endnotes} command
> > automatically. If so, then what is good for?
>
>
> It is read by Tools > Reconfigure. If the package in question is not
>
> there, the user will be informed about that in the document dialog.
>
> Jürgen


More information about the lyx-users mailing list