Template:pt-adj/documentation

This template generates a headword line and categorizes Portuguese adjective entries.

The template uses Module:pt-headword as a back end.

Usage
This template should be added to all Portuguese adjective entries.

The template should be placed within the Portuguese language section, immediately following the Adjective L3 header.

As with other Wiktionary inflection line templates, please do not use .

Default parameters
In the majority of cases, no parameters are required, e.g. for :
 * pt-adj

which produces

The module knows how to form the feminine and plural of most adjectives, including those in -l, -ão, -m, etc. For example, for :
 * pt-adj

which produces

Similarly, for :
 * pt-adj

which produces

And for :
 * pt-adj

which produces

Note in the latter case that the module knows that the feminine is the same as the masculine, and adjusts the display accordingly.

Explicit parameters
Explicit parameters are available in case of irregular adjectives:
 * f, f2, ...
 * Explicitly specify the feminine(s).


 * f_qual, f2_qual, ...
 * Optional qualifiers for the feminine(s). f_qual corresponds to f, f2_qual corresponds to f2, etc.


 * mpl, mpl2, ...
 * Explicitly specify the masculine plural(s).


 * mpl_qual, mpl2_qual, ...
 * Optional qualifiers for the masculine plural(s). mpl_qual corresponds to mpl, mpl2_qual corresponds to mpl2, etc.


 * pl, pl2, ...
 * Explicitly specify the plural(s), for adjectives where the masculine and feminine plural are the same.


 * pl_qual, pl2_qual, ...
 * Optional qualifiers for the plural(s). pl_qual corresponds to pl, pl2_qual corresponds to pl2, etc.


 * fpl, fpl2, ...
 * Explicitly specify the feminine plural(s). The default is based on applying the pluralization algorithm to the feminine(s) (whether defaulted or explicitly specified).


 * fpl_qual, fpl2_qual, ...
 * Optional qualifiers for the feminine plural(s). fpl_qual corresponds to fpl, fpl2_qual corresponds to fpl2, etc.


 * comp, comp2, ...
 * Explicitly specify the comparative(s).


 * comp_qual, comp2_qual, ...
 * Optional qualifiers for the comparative(s). comp_qual corresponds to comp, comp2_qual corresponds to comp2, etc.


 * sup, sup2, ...
 * Explicitly specify the superlative(s).


 * sup_qual, sup2_qual, ...
 * Optional qualifiers for the superlative(s). sup_qual corresponds to sup, sup2_qual corresponds to sup2, etc.


 * dim, dim2, ...
 * Explicitly specify the diminutive(s).


 * dim_qual, dim2_qual, ...
 * Optional qualifiers for the diminutive(s). dim_qual corresponds to dim, dim2_qual corresponds to dim2, etc.


 * aug, aug2, ...
 * Explicitly specify the augmentative(s).


 * aug_qual, aug2_qual, ...
 * Optional qualifiers for the augmentative(s). aug_qual corresponds to aug, aug2_qual corresponds to aug2, etc.


 * 1
 * Specify that the adjective is invariable (indeclinable).


 * 1
 * Specify that the adjective is feminine-only.


 * hascomp
 * Indicative whether the adjective has a comparative. Possible values are,   or   (the adjective has a comparative);  ,   or   (the adjective has no comparative); and   (the adjective sometimes has a comparative, depending on the meaning).


 * 1
 * Specify that the adjective is metaphonic, i.e. the stressed vowel varies between in the masculine singular and  in other forms. Adjectives in  are automatically marked as metaphonic unless 1 is used. Certain other adjectives, e.g.  and, are also metaphonic and should be marked as such using 1.


 * 1
 * Explicitly indicate that the adjective is not metaphonic, in case of adjectives in.


 * pagename
 * Override the page name. Useful especially on documentation and test pages.


 * sp
 * Special indicator describing how to form non-lemma parts for multiword expressions. See below.

For all the above gender/number/comparative/superlative/diminutive/augmentative parameters, use  to explicitly request the default and   to stand for the lemma.

For example, for :
 * pt-adj

which produces

For :
 * pt-adj

which produces

Note how the masculine and feminine plural are appropriately generated (the feminine plural by pluralizing the explicitly given feminine).

For :
 * pt-adj

which produces

For :
 * pt-adj

which produces

For :
 * pt-adj

which produces

For :
 * pt-adj

which produces

For :
 * pt-adj

which produces

For :
 * pt-adj

which produces

Comparatives and superlatives
When degrees of comparison are not explicitly stated through parameters, the adjective is not assumed to be comparable or uncomparable. Whether an adjective is comparable can be controlled using hascomp as described above. In addition, if a comparative or superlative is explicitly given, the adjective is assumed comparable. For example, for the adjective to request the default comparative form, use +:
 * pt-adj

which produces

Note how the default superlative is automatically supplied as well.

If an absolute superlative in is specified, default comparatives and superlatives will automatically be added. To request a default absolute superlative, use +abs. For example, for, use the following:
 * pt-adj

which produces

The default algorithm for generating absolute superlatives is fairly smart, and knows e.g. that the accent on must be removed before adding the suffix. It also knows that adjectives in must change to -abil; those in  must change to -ibil; those in  must change to -on; those in  must change to -qu (e.g.  becomes ); etc. For example, for, use the following:
 * pt-adj

which produces

Nonetheless, in some cases irregular absolute superlatives must be given explicitly, e.g. for :
 * pt-adj

which produces

Diminutives and augmentatives
Use + to request a default diminutive in, and + to request a default augmentative in. In each case, the algorithm for generating the default is smart and handles most adjectives correctly, as with comparatives and superlatives. For example, for, to specify a diminutive and augmentative along with an absolute superlative, use the following:
 * pt-adj

which produces

Irregular diminutives and/or augmentatives can be given explicitly, as with comparatives and superlatives. For example, for, use:
 * pt-adj

which produces

Multiword expressions
The module knows how to correctly pluralize and form the feminine of most multiword expressions. An example is :
 * pt-adj

which produces

Note here we use 1 to indicate that the adjective is metaphonic (see above).

The default algorithm is to inflect the first and last word, unless (as here) there is a recognized preposition in the word, in which case only the portion before the preposition is inflected. An example without a preposition is :
 * pt-adj

which produces

In some cases, the default algorithm produces incorrect results. In those cases, you can control which words are inflected using one of the following specs:
 * Use first if only the first word inflects.
 * Use last if only the first word inflects.
 * Use first-last if the first and last word inflect.
 * Use each if all words inflect.
 * Use first-second if the first and second words inflect.
 * Use second if only the second word inflects.
 * Use + to explicitly request the default multiword inflection algorithm (needed with hyphenated terms; see below).

An example that uses these codes is. The default is to inflect the first and last words, but here we need only the last word inflected:
 * pt-adj

which produces

Another example is, where we want only the second word pluralized:
 * pt-adj

which produces

These codes also work for hyphenated terms such as and, but in these cases the default multiword algorithm does not automatically apply; instead, by default the word is treated as a single word. To apply the multiword algorithm, you must explicitly specify one of the codes above; use  to request the default. An example of this is :
 * pt-adj

which produces

Here the default multiword algorithm inflects both parts; without +, the term would be treated as single-word and only the last part inflected.

Suffixes
You can use this template for adjective-forming suffixes. If the page name begins with a hyphen, the part of speech for categories is changed to  instead of , and the page is added to an additional category Category:Portuguese adjective-forming suffixes. An example is :
 * pt-adj

which produces

and automatically adds the page to Category:Portuguese suffixes and Category:Portuguese adjective-forming suffixes. Note how we rely here on the default feminine-forming and plural-forming algorithms, which usually work.