Template:AlphanumericTOC

=Documentation=

Purpose
Wikipedia users created this TOC template as a customizable substitute for the growing zoo of CompactTOCs on Wikipedia. Rather than have dozens of stylistic varieties, it is better to have a single template which an editor can adjust to fit his or her wishes.

User:Teratornis copied this template from Wikipedia initially to use in User:Teratornis/Index, but users can use it anywhere.

Usage
Insert  at the point in the article where you want the TOC to appear. If using with a list, many editors have found it helpful to insert a TOC at both the beginning and end of the list.

Parameters
Toggling the style and display of elements within the TOC is accomplished by adding parameters with a null value (in the form ). This is a short list which will be expanded upon further in the following text:
 * block v. inline formatting:,  ;
 * table alignment: ;
 * addition of prefixes to the links:,  ;
 * suppressing the automatic table of contents: ; and,
 * each of the links also has its own parameter which when used suppresses the display of the link.

Block and inline formatting
When the template is used without any parameters, it appears as:

This replicates what you would see with a template like. The templates,  , and   display the text in a single inline list. To accomplish this, add the parameter  to the template:

For a TOC which displays in a block format, like  and , add the parameter  :

Note: If these parameters are used in combination,  will always override any effects from.

Aligning the TOC
As is apparent from the examples already given, the natural state of the TOC is to appear along the left side of the page without any alignment. Some of the existing TOCs, including,  , and  , are aligned to the center of the page. This can be replicated by adding the parameter  with a value of 'center':

The TOC may also be aligned to the right or the left, causing the article text to wrap around it, but floating the TOC is generally discouraged. Guidelines may be found at wp:Wikipedia:Section.

Prefixing links or link descriptions
The TOC templates  and   include the ability to add a prefix to the link with or without displaying it in the TOC. This can also be accomplished with this template by using the parameters  and  ; the former adds the prefix to the actual link, and the latter adds the prefix to the text displayed on the page. Examples:

Suppression of the normal TOC
In the cases where it might not be desirable to suppress the automatically generated table of contents this template uses the parameter  to prevent suppression. If you want to allow the software to generate a table of contents, use the following:

Selective link removal
One of the reasons for having so many different versions of CompactTOC has been that some articles do not have a 'References' section, or the TOC is being used for a list contained within a larger article. This template solves the problem by providing a parameter for each link to be removed. They are as follows:
 * : removes the numbers link
 * ,, etc.: removes the link for that letter; alternatively it can be used to create unlinked letters (see example below)
 * : removes all links appearing after the letters
 * : removes the link to the 'Top of Page'
 * : removes the link to the 'See also' section
 * : removes the link to the 'References' section
 * : removes the link to the 'External links' section

Some examples:

Optional user defined section links
Optional section links may be defined using the parameters,  ,  ,  , and  , as follows: