Confluence 3.4 のサポートは終了しています。
ドキュメントの最新バージョンを確認してください。
To add page numbering to your documentation, you need to combine some customised HTML in the header or footer with some customised CSS in the PDF stylesheet.
- Create a header or footer with an empty span element and give it a unique ID, for example
pageNum. This is a place holder for the page number in your PDF document.<span id="pageNum"/>
- Create the following CSS selector rule for the empty span and add it to the PDF stylesheet:
#pageNum:before { content: counter(page); }
上記の CSS セレクタルールを詳細に分析します:
#pageNumルールは、指定した「pageNum」ID を値として持つ HTML 要素、つまりヘッダーやフッター用に作成したspan要素を選択します。- セレクターの
:before部分は、span要素が処理される前にコンテンツを挿入できるようにする疑似クラスです。 counter(page)は、現在のページ番号をコンテンツとして返す関数です。- The
contentproperty tells the CSS processor that dynamic content (that is, an incrementing page number) is to be inserted before the span tag.
概要
コンテンツ ツール
アプリ
