Apache OpenOffice Community Forum - [Solved-Workaround] Page numbering with leading zeros (2024)

Post Reply

  • Print view

8 posts• Page 1 of 1

sherbert
Posts: 12
Joined: Tue Jan 26, 2010 1:06 am
Location: New Plymouth, New Zealand

Apache OpenOffice Community Forum - [Solved-Workaround] Page numbering with leading zeros (1)[Solved-Workaround] Page numbering with leading zeros

  • Quote

Postby sherbert »

I want to enter a uniform format of page numbering into the header space of my bundle of exhibits which is to be exhibited to my deponent's affidavit, ie. "JJJnnn" where J=deponent's initials and n=page-number.
Eg. "I exhibit the agreement at pages SMM001 - SMM010".
I can do the "SMM" part in the header readily enough, of course. I just add these 3 characters of text immediately before the page-numbering field.
I have seen Acknak's 2007 answer elsewhere, not immediately to hand, that one can increment a variable and format the result with leading zeros. That solution calls for the manual insert of the variable field at [every page in what is now a 300 page exhibit.] [edited] I'd rather not.
I have searched this and other forums for 'page numbering leading zeros' (no results) while 'leading zeros' returns solutions for Calc documents, eg. 26592. I know how Office handles leading zeros in Calc, thanks.
I see Acknak offered a solution for removing leading zeros. I do not want to do that, either.
I can do without leading zeros but my document will not look as sharp, IMHO.
Is it perhaps the case that leading zeros in page numbering remain a to-be-hoped-for future feature of the marvellous Writer app?

Last edited by sherbert on Wed May 07, 2014 5:08 am, edited 3 times in total.

LIbre Office 3.5.7.2 on Linux Mint 13
"If there is a sin against life, it consists perhaps not so much in despairing of life as hoping for another life and in eluding the implacable grandeur of this life", Albert Camus

Top

acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Page numbering with leading zeros

  • Quote

Postby acknak »

Sorry, this is something Writer just doesn't provide for. The page number field is completely different from the other numeric fields which work with a number format.

The only workaround I can think of is to handle it the same way you propose to handle the rest of the page numbers: manually add the zeroes. This would require a separate page style for page with different numbers of zeroes but even for a 300-page document, that's only two extra page styles.

The one difficulty with that is that I don't see a good way to switch page styles. The only way to switch at some arbitrary place in the text is to add a manual page break. You can do that easily enough but it has to happen at a paragraph boundary so there may be some empty space on the page where the break is.

AOO4/LO5 • Linux • Fedora 23

Top

RoryOF
Moderator
Posts: 34675
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Page numbering with leading zeros

  • Quote

Postby RoryOF »

My thought on this (and I haven't worked it out in detail) would be to use a conditional field where the "SMM" prefix is "SMM0" if page/paragraph number is greater than 10 and SMM00 if page/paragraph number less than 10. But to be honest, one would hand edit the final document quicker than working out the detail of the above.

Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS

Top

acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Page numbering with leading zeros

  • Quote

Postby acknak »

The problem there is that Writer does not make the page number field available for any kind of formula or condition. As I say, it's a bizarre design that the page number field is completely different than other fields.

You can't even manually edit the numbers--they don't exist in the document; they're generated as needed.

I don't know if it's possible to use a regular variable in the header/footer and have it increment each time. That might be worth a try.

Edit:PS:

Nope. Formulas in a header/footer are not re-calculated for each page so the value never changes.

AOO4/LO5 • Linux • Fedora 23

Top

RoryOF
Moderator
Posts: 34675
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Page numbering with leading zeros

  • Quote

Postby RoryOF »

I did once use a variable to count and number columns, but I've forgotten how I did it. I should write these things down! Writing something else now, so no time to think of what I did.

Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS

Top

sherbert
Posts: 12
Joined: Tue Jan 26, 2010 1:06 am
Location: New Plymouth, New Zealand

Re: Page numbering with leading zeros

  • Quote

Postby sherbert »

Thanks, gentlemen, your thoughts are gratefully received, even if between the greatest minds in the known universe the problem ranks with Fermat.
Apache OpenOffice Community Forum - [Solved-Workaround] Page numbering with leading zeros (6)

LIbre Office 3.5.7.2 on Linux Mint 13
"If there is a sin against life, it consists perhaps not so much in despairing of life as hoping for another life and in eluding the implacable grandeur of this life", Albert Camus

Top

sherbert
Posts: 12
Joined: Tue Jan 26, 2010 1:06 am
Location: New Plymouth, New Zealand

Re: Page numbering with leading zeros WORK AROUND

  • Quote

Postby sherbert »

WORK AROUND: Thanks Acknak, your new page styles suggestion works for me.

My context is that I am using the marvellous pdftk (PDF Tool Kit) app developed by the ever-helpful Sid Steward of Texas. His pdftk features a stamping function where a pdf file containing just page-numbers in the header space (for example) can be 'stamped' onto another file of content, eg, my bundle of exhibits.
I created 3 page styles based on the Default page style, called 'multistamp pages 1 to 9', 'multistamp pages 10 to 99' and 'multistamp pages 100+' .
In the first I add fixed text 'SMM 00' before a page-numbering field. In the second I use 1 less leading zero, ie 'SMM 0' and in the third no leading zeros at all, ie. 'SMM '.

I can Insert a Manual Break, Page Break, Style 'multistamp pages 10 to 99' (no change to page-number) at the appropriate place, ie. at the end of page 9. Ditto at 99 for the third page Style.

This results in a document with leading zeros on the page numbers. I convert that to pdf and Sid's marvellous app does the rest.

Thanks to the forum and its diligent contributors
SH Apache OpenOffice Community Forum - [Solved-Workaround] Page numbering with leading zeros (7)

LIbre Office 3.5.7.2 on Linux Mint 13
"If there is a sin against life, it consists perhaps not so much in despairing of life as hoping for another life and in eluding the implacable grandeur of this life", Albert Camus

Top

acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Re: Page numbering with leading zeros WORK AROUND

  • Quote

Postby acknak »

Nice! Thanks for posting the follow-up info.

AOO4/LO5 • Linux • Fedora 23

Top

Post Reply

  • Print view

8 posts• Page 1 of 1

Return to “Advanced Uses”

Jump to

  • Getting started
  • ↳ Survival guide
  • ↳ Beginners
  • ↳ Getting Started Guide for 4.x
  • ↳ Getting Started Guide for 3.x
  • ↳ Install, Setup and Troubleshooting
  • ↳ Admin Guide
  • ↳ MS Windows
  • ↳ Linux
  • ↳ Mac OSX
  • ↳ LibreOffice
  • ↳ Tablets
  • ↳ Tutorials
  • ↳ Writer
  • ↳ Calc
  • ↳ Base
  • Applications
  • ↳ Writer
  • ↳ Writer Guide for 4.x
  • ↳ Writer Guide for 3.x
  • ↳ Writer Tutorials
  • ↳ Templates
  • ↳ Advanced Uses
  • ↳ Calc
  • ↳ Calc Guide for 4.x
  • ↳ Calc Guide for 3.x
  • ↳ Calc Functions
  • ↳ Calc Tutorials
  • ↳ Impress
  • ↳ Impress Guide for 4.x
  • ↳ Impress Guide for 3.x
  • ↳ Draw
  • ↳ Draw Guide for 4.x
  • ↳ Draw Guide for 3.x
  • ↳ Math
  • ↳ Math Guide for 4.x
  • ↳ Math Guide for 3.x
  • ↳ Math Guide for 3.x
  • ↳ Base
  • ↳ Base Guide for 4.x
  • ↳ Wiki
  • ↳ Base Tutorials
  • ↳ Forms
  • ↳ External Data Sources
  • ↳ Reporting
  • ↳ Database Examples
  • Customizing and Extending
  • ↳ Macros and UNO API
  • ↳ Basic Guide
  • ↳ Code Snippets
  • ↳ Extension Repository
  • ↳ Macro Repository
  • ↳ External Programs
  • ↳ Extensions
  • ↳ Extensions page
  • Community
  • ↳ General Discussion
  • ↳ Site Feedback
  • ↳ Forum Governance
  • ↳ User Experience (UX)
  • ↳ Announcements
  • Business
  • ↳ Paid support
  • ↳ Consultants Directory
Apache OpenOffice Community Forum - [Solved-Workaround] Page numbering with leading zeros (2024)
Top Articles
Latest Posts
Article information

Author: Catherine Tremblay

Last Updated:

Views: 5573

Rating: 4.7 / 5 (47 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Catherine Tremblay

Birthday: 1999-09-23

Address: Suite 461 73643 Sherril Loaf, Dickinsonland, AZ 47941-2379

Phone: +2678139151039

Job: International Administration Supervisor

Hobby: Dowsing, Snowboarding, Rowing, Beekeeping, Calligraphy, Shooting, Air sports

Introduction: My name is Catherine Tremblay, I am a precious, perfect, tasty, enthusiastic, inexpensive, vast, kind person who loves writing and wants to share my knowledge and understanding with you.