Template:Emerge/doc

Usage
produces:

If params is omitted, it defaults to --ask

Technical notes
Unless looping over all template arguments is possible in MediaWiki the usage of is needed, which also means the maximum number of packages to be specified is 10.

Once looping is supported, something as simple as this could be used for the template: where @ contains all unnamed template arguments and _ is the local iteration variable of the for loop.

Examples
See the template's testcases: