Bản mẫu:Mục lục vừa số vừa chữ

Bách khoa toàn thư mở Wikipedia
Bước tới điều hướng Bước tới tìm kiếm
Tài liệu bản mẫu[xem] [sửa] [lịch sử] [làm mới]

{{Alphanumeric TOC}} is a customizable substitute for the (formerly) growing zoo of variants of {{Compact ToC}}. Rather than have dozens of stylistic varieties, it is preferable to have a single template which can be adjusted to fit the editor's wishes.

Cách sử dụng[sửa mã nguồn]

Insert the following 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 (remember to add |top=yes to the bottom template to quickly get back to the top).

{{alphanumeric TOC}}

Whenever multiple TOCs will be used on a page, and this template will not be the primary one at the top of the page, add |primary=false (this prevents multiple TOCs from showing up in each other's listings):

{{alphanumeric TOC

Các tùy chọn[sửa mã nguồn]

Alignment[sửa mã nguồn]

The natural state of the TOC is to appear along the left side of the page without any alignment. To align to the center of the page, add the parameter align with a value of 'center':

{{alphanumeric TOC|align=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 Trợ giúp:Section#Floating the TOC.

Prefixing or suffixing links or link descriptions[sửa mã nguồn]

The template includes 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 prefixLink and prefixDesc; the former adds the prefix to the actual link, and the latter adds the prefix to the text displayed on the page. The suffixLink and suffixDesc parameters work the same way. Examples:

{{alphanumeric TOC|prefixLink=1.}}
{{alphanumeric TOC|prefixLink=hidden|prefixDesc=visible}}
{{alphanumeric TOC|prefixDesc=+}}
{{alphanumeric TOC|suffixDesc=+}}

Standard and custom sections[sửa mã nguồn]

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 shown. They are as follows:

shows the numbers link
|a=, |b=, etc.
shows the link for that letter; alternatively it can be used to create unlinked letters (see example below)
shows the link to the 'Top of Page'
shows the link to the 'See also' section
shows the link to the 'References' section
shows the link to the 'External links' section

Một số ví dụ:

{{alphanumeric TOC|numbers=yes|i=|n=|x=|z=|references=yes}}
{{alphanumeric TOC|numbers=yes|i=I|j=J|v=V|x=X|top=yes}}
{{alphanumeric TOC| style="text-align:center;" |g=|seealso=yes|externallinks=yes}}

Optional user defined section links[sửa mã nguồn]

Optional section links may be defined using the parameters |sec1=, |sec2=, |sec3=, |sec4=, |sec5=, and |sec6=, as follows:

{{alphanumeric TOC|numbers=yes|seealso=yes|externallinks=yes|sec1=Added section|sec2=Plus one}}