The Table of Content Zone macro enables you to mark out a 'page zone' from which to create a table of contents. Styling the headings as a flat list enables you to enclose the page text by top and bottom navigation bars similar to web navigation. When styled as a list, headings are indented progressively.

Using the Table of Content Zone Macro

コンテンツ ゾーン ページ マクロをページに追加するには:

  1. In the Confluence editor, choose Insert > Other Macros.
  2. Find and select the required macro.

オートコンプリートでマクロを素早く入力する方法

Type { and the beginning of the macro name, to see a list of suggested macros. Details are in Using Autocomplete.

既存のマクロを編集する方法: マクロのプレースホルダをクリックして、[編集] を選択します。マクロのパラメータが編集可能な場合、マクロのダイアログ ウィンドウが開きます。

パラメーター

パラメータは、マクロ出力の内容や形式を制御するために設定するオプションです。

パラメーター

既定

説明

場所

両方

出力リストを表示するゾーンを指定します。topbottom またはboth でページ ゾーン コンテンツを囲みます。

出力タイプ

list

コンテンツ テーブルのレイアウトを指定します。

  • list – 縦型のリスト (一般的には TOC) を生成します。
  • flat – 横型のメニュータイプのリンクを生成します。例: [Heading 1] [Heading 2] [Heading 3].

Display Section Numbering

false

見出しにアウトライン ナンバリングを適用します。例: 1.1, 1.2, 1.3.

リスト スタイル

なし

各リスト項目のブレット ポイントのスタイルを指定します。  有効な CSS スタイルを使用できます。 例:

  • none — リスト スタイルの表示なし
  • circle — 丸のリスト スタイル
  • disc — 黒丸のリスト スタイル。一般的な箇条書きリスト。このリストの例で使用しているものです。
  • square — 正方形のリスト スタイル
  • decimal — 番号付きリスト (1、2、3、4、5)
  • lower-alpha — the list is lower-case, alphabetised (a, b, c, d, e)
  • lower-roman — 小文字のローマ数字のリスト スタイル (i、ii、iii、iv、v、vi)
  • upper-roman — 大文字のローマ数字 (I、II、III、IV、V、VI) のリスト スタイル。

Heading Indent

 

CSS の数に従って、リストのインデントを作成します。「10px」と入力すると、見出しグループが連続して 10px でインデントされます。たとえば、h 1 の見出しの場合、インデントは 10px となり、h 2 の見出しはさらに 10px でインデントされます。

Separator

brackets

flat 出力タイプにのみ適用されます。リンクの表示スタイルを指定します。 次のいずれかの値を入力できます。

  • brackets — 各アイテムは、角かっこ [ ] で囲まれます。
  • braces — 各項目をかっこ { } で囲む。
  • parens — 各アイテムをかっこ ( ) で囲む。
  • pipe — 各アイテムをパイプで区切る。
  • anything — 入力する値によってそれぞれが区切られます。テキストをセパレーターとして入力できます (例: '***')。カスタム セパレーターを使用している場合、テキストは入力されたとおりに表示されることに注意してください。文字を区切る追加スペースなどは入りません。

Minimum Heading Level

1

TOC  リストを開始する最大見出しレベルを選択します。  たとえば、2 の場合、h2、h3、および h4 見出しをリストしますが、1 見出しは含まれません。

Max Heading Level

7

TOC に含める最小の見出しレベルを指定します。例えば、2 は h1 と h2 をリストしますが、h3 以下は含みません。

見出しを含める

 

Filter the included headings according to specific criteria. You can use wildcard characters. See Sun's Regex documentation for examples of constructing regular expression strings.

見出しを除外する

 

Exclude headings according to specific criteria. You can use wildcard characters. See Sun's Regex documentation for examples of constructing regular expression strings.

印刷用

true

既定では、TOC は印刷用に設定されています。このパラメーターをクリアすると、ページを印刷した際に TOC は表示されなくなります。

CSS Class Name

 

お使いの CSS スタイル シートにカスタムの TOC がある場合、このパラメーターを使用して、指定した "class" 属性で TOC を出力できます。

この例は、次のヘッダーが付いたページに基づいています。

フィルターされた目次

This example will filter all headings to include those that contain "Favourite", but will exclude any heading which ends with the word "Things". The list is styled with upper-case Roman numerals.

パラメーター
出力タイプlist
リスト スタイルupper-roman
見出しを含める

Favourite.*

見出しを除外する.*Things

スクリーンショット: フィルターされた TOC 'zone' 見出し

フラット リスト

この例では、すべての見出しをフィルターして角括弧で囲まれた "Unknowns" のフラット リストをレンダリングします。

パラメーター
出力タイプフラット
Separatorbrackets
Max Heading Level2
見出しを含める
Unknown*

スクリーンショット: フィルターされた TOC 'zone' 見出し (フラット リストとして表示)


注意

  • Due to an outstanding issue in the Table of Content Zone macro (CONF-10619), the Macro Browser's Refresh function does not render any parameter modifications. Currently, the rendering of parameter value modifications to the Table of Content Zone macro occurs only after the page is saved.
  • Using HTML Heading Markup with the Table of Content Zone Macro — The Table of Content Zone macro cannot handle HTML heading markup on its own. Hence, if you used the HTML and HTML Include macros to render HTML heading markup in a Confluence page, the Table of Content Zone macro will not create a contents list out of these headings. (For more information on about this issue, please refer to TOC-93.)
     
    However, if you insert an HTML anchor into each HTML heading on your page (based on the following syntax), the Table of Content Zone macro will incorporate these headings into your contents list.
     

    <h2><a name="pagename-headingname"></a>見出し名</h2>

     
    The syntax for the anchor name is usually the page name and heading name separated by a hyphen, in which the page and heading names have all spaces removed and are converted to lowercase. If punctuation marks occur within a page or heading name, each mark should usually be converted to its URL escape code in the anchor name.

  • ラベルなし