auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX-devel] a LaTeX-env-usepackage environment


From: Mosè Giordano
Subject: Re: [AUCTeX-devel] a LaTeX-env-usepackage environment
Date: Thu, 20 Feb 2014 21:04:06 +0100

Hi Tassilo,

2014-02-20 8:40 GMT+01:00 Tassilo Horn <address@hidden>:
> BTW, the name suggests that I can enter many packages.  Is that correct?
> Or is that all due to the special case of
>
>   \usepackage[options]{pkg1,pkg2,pkg3}

Yes, it's that special case.  I don't believe there are many packages
sharing the same options, but it's possible in principle, I verified
it with handcrafted packages.

> If so, I'd rather prefer to read just one package with it's options, so
> that I'd end up with
>
>   \usepackage[options]{pkg1}
>   \usepackage[options]{pkg2}
>   \usepackage[options]{pkg3}
>
> and name the function accordingly, i.e., "package" (singular), when used
> repeatedly.
> Or it could allow entering multiple packages as it is now, but each
> package with its own options.  And then it would return an alist
> structurally equal to `LaTeX-provided-package-options'.

I'm not sure I understood what you mean.  In the patch,
`LaTeX-arg-usepackage-get-packages-options' (or its new name) prompts
for a list of packages (one or more) and their options, so
`\usepackage' is inserted as

    \usepackage[options]{pkg1,pkg2,pkg3}

You are suggesting to prompt for packages, and if one supplies more
than one package s/he will be asked for options for each package,
separately, so they'll be inserted as you showed above, is it correct?
 In this case, I think that if one wants to load different packages
with different options s/he should call `LaTeX-arg-usepackage' (ie,
`C-c RET usepackage RET') many times, or use the new
`LaTeX-insert-usepackages' which makes insertion of many
`\usepackage's easy.  That's because I often load many packages with a
single `\usepackage' if no option is needed and I think it's a quite
common practice, so I like that packages are read with
`TeX-completing-read-multiple'.

Bye,
Mosè



reply via email to

[Prev in Thread] Current Thread [Next in Thread]