diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2023-04-19 14:04:06 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2023-04-19 14:04:56 -0600 |
| commit | 636b2a6915c6b6280b97b8218892c63ca6fd57c3 (patch) | |
| tree | f9a72af483577ac27801c1280b603b688ee33ee5 | |
| parent | ae4d0d6050872c38cc1c62d58b1cd23afd35b938 (diff) | |
add section dedicated to hiding the page number in the running conntent
| -rw-r--r-- | docs/modules/theme/pages/page-numbers.adoc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/modules/theme/pages/page-numbers.adoc b/docs/modules/theme/pages/page-numbers.adoc index df1341e7..80f58fc1 100644 --- a/docs/modules/theme/pages/page-numbers.adoc +++ b/docs/modules/theme/pages/page-numbers.adoc @@ -24,6 +24,39 @@ The page number is displayed in the right corner of the footer on recto pages an You can change where the <<start-at,virtual page numbering starts>>, how the <<style,numbers are styled and positioned>>, what page the <<display,numbers start being displayed on>>, and adjust the folio placement using a combination of theme keys and AsciiDoc document attributes. +== Hiding the page numbers + +When using a theme that's configured to show page numbers in the running content (such as the footer), you can quickly hide the page numbers by unsetting the `pagenums` document attribute in the document header (or via the API). + +---- += Document Title +:doctype: book +:!pagenums: + +This page doesn't have a page number in the footer. +---- + +In doing so, it will also hide all other text on the same line of the column in the running content. +Therefore, a more formal way of hiding page numbers is to configure the running content to not include them. + +Here's an example of a theme that extends the default them to show legal text instead of the page number. + +[,yml] +---- +extends: default +footer: + columns: =100% + recto: + center: + content: '(C) Copyright 2020 ACME. All rights reserved.' + verso: + center: + content: $header-recto-center-content +---- + +Notice that there is no reference to `\{page-number}`, hence why no page number will appear. +You can find more details in the section xref:add-running-content.adoc#page-number[Modify page number position]. + [#start-at] == Starting integer page numbering |
