[Solved] Page styles change when trading docs with others

Writing a book, Automating Document Production - Discuss your special needs here
Post Reply
posaune
Posts: 55
Joined: Tue Jul 28, 2015 3:48 pm

[Solved] Page styles change when trading docs with others

Post by posaune »

I'm trading book manuscripts between myself and the authors. I send them a manuscript that is set up with only three page styles: FRONT PAGE; DEFAULT; RIGHT PAGE>

Twice now, when the authors have made corrections and returned them, I've gotten a document that has a lengthy list of page styles: MP1, MPF1, MP2, MPF2, MP3, MPF3, etc....

1. Any idea why this is happening or how to prevent it?
2. Is there any easier way to fix all these page styles than going through and re-setting every right page?

So far, I've set the right pages to be followed by default, which helps. But as short as the chapters are in the particular project I'm on now, I'm having to manually reset just about every other page, anyway, to right page.
Last edited by posaune on Thu Dec 01, 2016 4:18 pm, edited 1 time in total.
Apache Open Office 4.1.3 on Windows 10
User avatar
robleyd
Moderator
Posts: 5056
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Page styles change when trading docs with others

Post by robleyd »

At a guess, this involves MS Office documents? This may help a little:

[Tutorial] Differences between Writer and MS Word files
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.1.2; SlackBuild for 24.2.1 by Eric Hameleers
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Page styles change when trading docs with others

Post by Zizi64 »

There is NOT 100% compatibility between the different fileformet. Do not store your documents in a foreign, never standardized poorly documented .doc format. What MS .doc version had you saved your document to? And what version of the MS Office was used, when the authors have made corrections? The most supported MS document version of the AOO/LO is the "MS Office 97/2000/XP/2003 .doc". Never use older versions.

The native fileformat of the Apache OpenOffice and the LibreOffice is the ODF.
It is an International Standard "ISO/IEC 26300:2006". Always use these fileformats: .odt, .ods, .odp, .odg... instead of the .doc, .xls, .ppt.
The LibreOffice has a littlebit higher compatibility with the foreign fileformats. The LO can save into OOXML format too (.docx)
Try it.

A tip:
Send the documents to your author in various fileformats:
Send for it a .pdf to see the original layout in a PDF reader software.
Send for it an .odt, because it is the source format.
Send a "MS Office 97/2000/XP/2003 .doc" version if he/she have not a relative new MS Office version, and must to modify the document. (The new versions MS Office versions can open the ODF files, but they will cause the descripted issues at the conversion of the filetype.)

Use the original ODF version of your document, when you will update the modifications, and corrections manually.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
keme
Volunteer
Posts: 3699
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Page styles change when trading docs with others

Post by keme »

One important aspect that has not been covered explicitly in this thread (or the one linked), and which may be seen as the root cause for the current issue:
Word does not handle the concept of page style. As far as I have found, page layout in Word seems to be handled by elements of paragraph formatting (which may use styles) and section settings.
This means that any changes to page formatting (new page style) in your document must be converted to either section or paragraph format when:
  • the document is saved to a Word format
  • the document is opened by Word (be it doc, docx, or odt)
When opening a doc file in Writer or saving from Word to odt format, the Word layout elements not handled by odf format must be translated. Each page containing such elements may have different layout, so a new style is created. In some cases (not unusual) this may give one new page style for each page.

Possible solutions:
If the authors just provide content, one solution may be to have the files in "raw" format, with no layout elements applied. Insert those files into a "master document" by copy/paste or link.
If the authors need to also handle layout, you need to work with the same tools. Same applications (same generation) using identical default templates, all fonts in use must be installed for everyone, page size settings must be consistent. Deviating from that will break the workflow.
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
posaune
Posts: 55
Joined: Tue Jul 28, 2015 3:48 pm

Re: Page styles change when trading docs with others

Post by posaune »

The author said he has Open Office. I checked in with him last night and he said he's highly technologically challenged so he's not sure now--he said he opened the document (sent as .odt), it opened and he was able to edit.

I've solved the problem--but it was tedious, and wondering if there's a better way in the future if this happens again. Is there a quicker way to change formatting back than going chapter by chapter?

I found one helpful tip in another thread here--to delete the customized page styles. At least this sped up the process, as I didn't have to scroll through 200 page styles every single time to change each new chapter to RIGHT PAGE.

Generally, I wait until the very end of the back and forth to do the formatting, but I sent this one for him to double check and seek out any last minute typos or corrections needed.
Apache Open Office 4.1.3 on Windows 10
esperantisto
Volunteer
Posts: 578
Joined: Mon Oct 08, 2007 1:31 am

Re: Page styles change when trading docs with others

Post by esperantisto »

The best way: make your author install and use Apache OpenOffice only for the work. I bet, he used Micro$oft Turd for editing and saved the document to one of those M$ formats.

Not the best way (partly guessed by you): when you receive a messed document,
a) delete all page breaks resulting from custom pages styles;
b) delete all custom page styles;
c) import pages styles from your original document (you’ve saved a backup copy, haven’t you?);
d) re-format pages with the styles as necessary.

For the tasks a) and b), there are some great macros (don’t remember the author, got it eons ago at from http://www.oooforum.org/forum/, now that forum does not work):

Code: Select all

 DeleteAutoPageBreaks 
oDoc = ThisComponent 
oStyles = oDoc.getStyleFamilies 
oPageStyles = oStyles.getByName("PageStyles") 
oPageStyleNames() = oPageStyles.getElementNames() 
For i = 0 to uBound(oPageStyleNames) 
 thisName = oPageStyleNames(i) 
 oPageStyles.removeByName(thisName) 
Next i
 oCursor = oDoc.Text.CreateTextCursor()
 oCursor.GoToStart(False)
   Do
   If oCursor.BreakType <> com.sun.star.style.BreakType.PAGE_BEFORE Then
    If NOT IsEmpty(oCursor.PageDescName) Then
      oCursor.PageDescName = ""
      oCursor.BreakType = com.sun.star.style.BreakType.PAGE_BEFORE
    End If
   End If
   Loop Until NOT oCursor.gotoNextParagraph(False)
Msgbox "Farite"
End Sub

Sub DeletePageStyleFromAutoPageBreaks 
Dim oDoc,oVC 
oDoc = thisComponent 
oVC = oDoc.CurrentController.getViewCursor 
oVC.jumpToFirstPage 
While oVC.jumpToNextPage 
'If oVC.PageStyleName = "Standard" then 'limit to Default page style. 
 If isEmpty(oVC.TextTable) then 
   If oVC.BreakType = 0 Or oVC.BreakType = 4 then 
    oVC.BreakType = 4 : oVC.PageDescName = "" 
   EndIf 
  ElseIf oVC.TextTable.BreakType = 0 Or oVC.TextTable.BreakType = 4 then 
   oVC.TextTable.BreakType = 4 : oVC.TextTable.PageDescName = ""  
 EndIf 
'EndIf 
Wend 
oVC.jumpToFirstPage 
End Sub

Sub DeleteCustomPageStyles
oDoc = ThisComponent
oStyles = oDoc.getStyleFamilies
oPageStyles = oStyles.getByName("PageStyles")
oPageStyleNames() = oPageStyles.getElementNames()
For i = 0 to uBound(oPageStyleNames)
 thisName = oPageStyleNames(i)
 oPageStyles.removeByName(thisName)
Next i
MsgBox "No more custom page styles"
rem DeletePageStyleFromAutoPageBreaks()
End Sub
AOO 4.2.0 (of 2015) / LO 7.x / Win 7 / openSUSE Linux Leap 15.4 (64-bit)
posaune
Posts: 55
Joined: Tue Jul 28, 2015 3:48 pm

Re: Page styles change when trading docs with others

Post by posaune »

Thank you.

I'll ask him (and future authors) to double check that they have Apache OO.
Apache Open Office 4.1.3 on Windows 10
Post Reply