<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Template%3ACatAutoTOC%2Fdoc</id>
	<title>Template:CatAutoTOC/doc - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Template%3ACatAutoTOC%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Template:CatAutoTOC/doc&amp;action=history"/>
	<updated>2026-07-22T16:00:34Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://arolstar52-zhtest.hf.space/index.php?title=Template:CatAutoTOC/doc&amp;diff=3443666&amp;oldid=prev</id>
		<title>2024年10月9日 (三) 08:16 imported&gt;Ohtashinichiro</title>
		<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Template:CatAutoTOC/doc&amp;diff=3443666&amp;oldid=prev"/>
		<updated>2024-10-09T08:16:30Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{NoteTA|G1=MediaWiki}}{{Documentation subpage}}&lt;br /&gt;
{{lua|Module:HTMLDecode}}&lt;br /&gt;
&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
當某一分類包含超過一定數量的頁面時，本模板會自動增加分類目錄：&lt;br /&gt;
# &amp;lt;= 100個頁面 → 沒有分類目錄&lt;br /&gt;
# 101–1200個頁面 → {{tl|CategoryTOC}}&lt;br /&gt;
# &amp;gt; 1200個頁面 → {{tl|LargeCategoryTOC}}&lt;br /&gt;
&lt;br /&gt;
==用法==&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{CatAutoTOC}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On category pages, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{CatAutoTOC}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; can be placed wherever you want the TOC to be displayed.&lt;br /&gt;
&lt;br /&gt;
On a category header template, it is best placed outside any &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;includeonly&amp;gt;&amp;lt;/includeonly&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; tags, so that the template is categorised as using CatAutoToc.&lt;br /&gt;
&lt;br /&gt;
===參數===&lt;br /&gt;
本模板沒有必填參數。&lt;br /&gt;
&lt;br /&gt;
However, the parameters available {{tl|CategoryTOC}} may be supplied, and if CatAutoTOC calls {{tl|CategoryTOC}}, those parameters will be passed on to {{tl|CategoryTOC}}.&lt;br /&gt;
&lt;br /&gt;
So e.g. &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{CatAutoTOC|align=center}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; will:&lt;br /&gt;
# Have no effect if no TOC is generated&lt;br /&gt;
# Align to the center if {{tl|CategoryTOC}} is used&lt;br /&gt;
# Have no effect if {{tl|LargeCategoryTOC}} is used, because {{tl|LargeCategoryTOC}} accepts no parameters&lt;br /&gt;
&lt;br /&gt;
==追蹤==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display:block; float:right&amp;quot;&amp;gt;{{CatAutoTOC stats}}&amp;lt;/div&amp;gt;&lt;br /&gt;
每個有放置本模板的頁面，將會被歸類於以下三個分類之一：&lt;br /&gt;
* [[:Category:CatAutoTOC generates no TOC]]&lt;br /&gt;
* [[:Category:CatAutoTOC generates standard Category TOC]]&lt;br /&gt;
* [[:Category:CatAutoTOC generates Large category TOC]]&lt;br /&gt;
&lt;br /&gt;
Templates which transclude {{tl|CatAutoTOC}} are categorised in&lt;br /&gt;
* [[:Category:Templates using CatAutoTOC]]  (population: {{PAGESINCATEGORY|Templates using CatAutoTOC}})&lt;br /&gt;
&lt;br /&gt;
... but only if the transclusion is outside any &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;noinclude&amp;gt;&amp;lt;/noinclude&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; tags&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;{{Purge|&amp;#039;&amp;#039;Purge this page to update the totals&amp;#039;&amp;#039;}}&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==缺陷==&lt;br /&gt;
This template uses the [[Help:魔术字|magic word]] &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{PAGESINCATEGORY}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; to count the number of pages in the category.  Unfortunately, this function can return wildly erroneous results on some categories which have had many pages added and removed.&lt;br /&gt;
&lt;br /&gt;
This bug is well-known, and has been documented in several places since 2010, including:&lt;br /&gt;
* [[phab:T18036]]&lt;br /&gt;
* [[phab:T221795]]&lt;br /&gt;
* [[phab:T69196]]&lt;br /&gt;
&lt;br /&gt;
In the overwhelming majority of categories, the count is recorded accurately enough to support use of this template.  However, there seemed to be some issue with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{PAGESINCATEGORY}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; falsely returning zero in some cases.  This is tracked in:&lt;br /&gt;
* [[:Category:CatAutoTOC on pages where PAGESINCATEGORY returns zero]] (population: {{PAGESINCATEGORY:CatAutoTOC on pages where PAGESINCATEGORY returns zero}})&lt;br /&gt;
&lt;br /&gt;
As of 19 April 2020, that problem seems to have been fixed by a small but cunning tweak[https://en.wikipedia.org/w/index.php?title=Template%3ACatAutoTOC&amp;amp;type=revision&amp;amp;diff=951919806&amp;amp;oldid=950933704] to how &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{PAGESINCATEGORY}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; is called.&lt;br /&gt;
&lt;br /&gt;
The category &amp;#039;&amp;#039;should&amp;#039;&amp;#039; contain only pages labelled as &amp;quot;empty&amp;quot;.&lt;br /&gt;
&amp;lt;small&amp;gt;{{Purge page|&amp;#039;&amp;#039;Purge page to update totals&amp;#039;&amp;#039;}}&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==參見==&lt;br /&gt;
* [[Template:CategoryTOC]]&lt;br /&gt;
* [[Template:LargeCategoryTOC]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:分類頁眉模板]]&lt;br /&gt;
[[Category:維基百科分類目錄模板]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Ohtashinichiro</name></author>
	</entry>
</feed>