Confluence create table of contents

TOC(Table of Content Zone)

toc 매크로는 페이지의 heading 을 파악해서 자동으로 목차를 만들어 주는 매크로입니다.

페이지의 최상단에 toc 를 추가해 두고 heading 을 조정해서 전체 문서의 구조를 만든후에 작성을 시작하면 체계적으로 문서를 작성할 수 있습니다.

목차를 생성하려면 매크로 입력 버튼을 누르고 "Table of Contentst" 를 선택하거나 매크로 단축키(Server: {, Cloud: /) 에서 toc 를 입력하면 됩니다.

아래와 같이 toc 매크로를 입력하면 1 ~ 7까지 heading 에 대해 자동으로 목차를 만들어 줍니다.

TOC Parameter

toc macro 에는 다양한 파라미터가 있는데 다음 파라미터를 많이 사용합니다.

ParameterDefault설명
Output Type list list 일 경우 list 유형으로 목차를 출력하고 flat 일 경우 한 라인에 표시합니다.
Minimum Heading Level 1 toc 에 추가할 최소 레벨을 설정합니다. 만약 2 로 설정했을 경우 h2 부터 toc 에 추가합니다.
Maximum Heading Level 7 toc 에 추가할 최대 레벨을 설정합니다. 만약 5 로 설정했을 경우 h5 까지 toc 에 추가합니다.
Include Headings
toc 에 포함시킬 heading 을 정규식으로 기술합니다.
Exclude Headings
toc 에서 제외할 heading 을 정규식으로 기술합니다.

Table of Content Zone

"table of content zone" 매크로를 사용하면 section 에 있는 부분만 toc 가 생성됩니다.

매크로를 입력하면 panel 매크로처럼 입력 창이 표시되는데 여기에 toc 를 구성할 컨텐츠를 작성하고 heading 으로 구조화 해주면 됩니다.

Ref

  • Table of Contents Macro | Confluence Data Center and Server 7.12 | Atlassian Documentation
  • Table of Content Zone Macro | Confluence Data Center and Server 7.12 | Atlassian Documentation

Using the Table of Contents macro

Create a new page or use an existing page. Make sure that each section that you want in the table of contents is separated by headings of varying sizes (e.g. Heading 1 - Heading 6). The Table of Contents macro will create a Table of Contents for the current page based on headings in the page. Each lower heading level will be listed below and indented in relation to the higher heading level.

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

Speeding up macro entry with autocomplete: Type {and the beginning of the macro name, to see a list of suggested macros.

To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.

Macro Parameters

Parameters are options that you can set to control the content or format of the macro output.

Parameter

Default

Description

Output Type

list

  • list — produces a typical list type TOC.
  • flat — produces a horizontal menu-type series of links.

Display Section Numbering

clear

Select the check box to apply outline numbering to your headings, for example: 1.1, 1.2, 1.3.

List Style

none

Select the style of bullet point for each list item.  You can use any valid CSS style.  For example:

  • none — no list style is displayed
  • circle —  the list style is a circle
  • disc — the list style is a filled circle. This is the typical bullet list, and is used for this example list.
  • square — the list style is a square
  • decimal — the list is numbered (1, 2, 3, 4, 5)
  • lower-alpha — the list is lower-case, alphabetised (a, b, c, d, e)
  • lower-roman — the list style is lower roman numerals (i, ii, iii, iv, v, vi)
  • upper-roman — the list style is upper roman numerals (I, II, III, IV, V, VI)

Heading Indent

 

Sets the indent for a list according to CSS quantities. Entering 10px will successively indent heading groups by 10px. For example, level 1 headings will be indented 10px and level 2 headings will be indented an additional 10px.

Separator

brackets

This parameter applies to flat lists only.  You can enter any of the following values:

  • brackets — Each item is enclosed by square brackets: [ ].
  • braces — Each item is enclosed by braces: { }.
  • parens — Each item is enclosed by parentheses: ( ).
  • pipe — Each item is separated by a pipe:
  • anything — Each item is separated by the value you enter. You can enter any text as a separator, for example "***". If using a custom separator, be aware that text displays exactly as entered, with no additional white space to further separate the characters.

Minimum Heading Level

1

Select the highest heading level to start your TOC  list.  For example, entering 2 will include levels 2, and lower, headings, but will not include level 1 headings.

Maximum Heading Level

7

Select the lowest heading level to include.  For example, entering 2 will include levels 1 and 2, but will not include level 3 headings and below.

Include Headings

 

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

Exclude Headings

 

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

Printable

checked

By default, the TOC is set to print. If you clear the check box, the TOC will not be visible when you print the page.

CSS Class Name

 

If you have custom TOC styles in your CSS style sheet, use this parameter to output the TOC inside <div> tags with the specified class attribute.

Using Wiki Markup

Place your cursor where you want the Table of Contents to go. Click on Insert in the editor menu bar. Select Wiki Markup and add markup like the following in the Wiki Markup window.

{panel:title=Contents} {toc:minLevel=2} {panel}

OR

{panel:title=Contents} {toc:maxLevel=4} {panel}

OR

{panel:title=Contents} {toc:maxLevel=4|minLevel=2} {panel}


Click on Insert and Save the page to see the table of contents on the page.

How do I create a table of contents in Confluence?

Using the Table of Contents macro.
From the editor toolbar, choose Insert > Other Macros..
Choose Table of Contents from the Confluence content category..
Enter any parameters..
Choose Insert..

How does Confluence table of contents work?

The Table of Contents macro scans the headings on the current Confluence page to create a table of contents based on those headings. This helps readers find their way around lengthy pages, by summarizing the content structure, and by providing links to headings.

How do I link headings to a table of contents in Confluence?

Insert a table contents (TOC) at the top of the page. Save your page and for the heading that you want to link to, copy the link from your TOC. Edit your page again, insert a link (web link) and paste the link that you copied. Save the page again.

How do I create an index page in Confluence?

The Page Index macro creates a hyperlinked alphabetical index of all page titles within the current space..
When editing , select from the toolbar..
Find the item to be inserted and select it..
Select Insert..

Toplist

Última postagem

Tag