Losing styles in some paragraphs when compiling to odt

Hello,

When I export my project to .odt, some paragraphs are not in the style I have defined. I really cannot think of any reason why it might do this.
I have checked with .docx, and it works fine.

Does anyone have an idea how to fix this?

Thank you

Point of clarification: is it every paragraph of some particular style that is not sticking? Or is it just some of the paragraphs in a style that are misbehaving.

I am also wondering if you are judging that those passages have not gotten the style based just on its appearance, or are you checking to see whether the passage text in fact has an assigned style in the app (OpenOffice or Word or whatever).

1 Like

Thank you for your reply.

  1. All the body of my text is in the same style, but only some paragraphs are misbehaving.

  2. I have just doublechecked: I am judging both from the appearance and from clicking on the paragraph: it says “normal” where is should read “Dylan Body” (I am writing about Bob Dylan).

  3. On closer inspection, I notice that when it does misbehave, it is systematically the last paragraph of a section, but that does not mean that ALL the last paragraphs are in “normal” style instead of “Dylan Body”

=> LibreOffice recognises the style Dylan Body but randomly decides not to assign it to some of the last paragraphs of sections.

I have compiled it twice to check, and it happens both with the exact same paragraphs, which seems to indicate that it is not LibreOffice randomly losing styles, but that something is happening during the compilation process.

Thank you VERY MUCH for trying to help me with this!

If DOCX is fine, what happens if you convert the DOCX file to ODT?

Is there anything unusual about the problem paragraphs, other than their location at the end of a section? Any bold or italic text in the body of the paragraph? Are they definitely styled in Scrivener itself?

1 Like

I have opened the docx with Microsoft Word, then clicked on “save as” to save a version as on odt.
In THAT version, the styles are NOT lost, they appear as “Dylan Body”.

Yes, they are definitely styled in Scrivener, for sure.

I really cannot see anything that these paragraphs have in common. I use very little bold. I use italics for titles of works, but not more in these specific paragraphs than elsewhere.
I have just noticed also that, while the whole paragraph is in “normal” style, only part of it is in font size 10, sometimes, then the end of the paragraph is in 12, which is not at all coherent with my text in Scrivener. Normally, in my “Dylan Body” style, it should ALL be in 12.

Question:
I am not used to compiling. From what I have read, when I am working on my section layouts, I do not need to add the styles except if I want to override them. I hope that this information is accurate… so, based on this info, I have not added any styles while compiling, supposing that it would just compile the text exactly as it is.
Please tell me if I need to add styles while compiling, in which case I can do it if that could be the issue. It is not a very complex document in terms of styles, I am only using two styles, which are “Dylan Body” and “Block Quotes”. Apart from that, I have set the footnotes the way I wanted them. I do not have any titles in my text, I am just using the titles given to the folders and sections, which I have compiled as indented decimal: “part 1.1.2.4”, for example.
Not really indented, in fact, because I have set the indentation to ZERO in “transformations”.

Sorry if that is too much info. I am trying to give you an idea of the general document, in case any of this might be important…

Correct.

If you mean the indentation setting to follow, I’m pretty sure setting it to zero or unchecking the box doesn’t remove indentation; it just doesn’t add any.

1 Like

Sounds like the trouble may be because what goes between sections is in a default normal style and not your custom style. Seems like that should not upset your last paragraphs but maybe it is.

In experimental spirit, suppose you went into your compile settings for the section layout that handles the body text sections of your work, and suppose you there at the bottom of the pane specified that otherwise unstyled body text paragraphs should have the Dylan Body style applied to them. Then compile again and see if that fixes the problem.

gr

P.S. Just for future reference, there is really no need to apply a defined style to all your body text — in fact Scrivener was built with the basic idea that you would not be doing that. If the above fixes the problem, this means you just ran into one of the reasons not to do that. Rule of thumb: only apply defined styles to text that needs special treatment. Leave to the compiler the job of giving your normal body text its finished look.

2 Likes

@drmajorbob Thank you for confirming the information.

Concerning your remark about indentation, did you mean that it was easier to just uncheck it rather than set it to zero?

If that is the case, I have just done it, and you are right. I don’t know why I did not think of it before xD

Actually, I find that indenting the titles would be interesting, but I have looked everywhere and I cannot see how it is possible to indent JUST the titles without indenting the text.

@gr OK. Here is what I have done:

In Compile, I first went to “Styles” and added “Dylan Body” so that I could use it.

I then went to “Section Layouts” and in “Formatting”, “prefix” AND “suffix” *, applied “Dylan Body” to the whole text (except the Section Title, which I did not select)

  • For your information, I do not have a suffix set at the moment, only a prefix, which is just a blank line, for which I have ticked “Place prefix after title” at the bottom so that I would always have a blank line between my titles/subtitles and the body of the text.

I am not sure I should apply “Dylan Body” to the section titles too.

Anyway, I have tested this. Not only does it not solve the issue, but I have some parts that were in “DylanBody” style and are now in “normal” style.

To make matters worse…
… the initial document I had tested it on was about 30 pages. Now I have tried compiling about 120 pages, including these. These behave in the same way, but in the preceding 30 pages, I have lots of parts that are not in the defined style.

I am now VERY worried. I downloaded Scrivener to write my PhD thesis and really need to get on with the writing, but since Scrivener does not integrate Zotero, I will HAVE to export it to .odt so that I can run an ODT scan with Zotero for citations and THEN convert it to docx.

I so much wish that Scrivener had Zotero integration, then I can could export directly to docx. Everything seems to work perfectly on .docx.
I have just tried it with the changes you advised for the sake of experiment. I have compiled 122 pages: I have not detected a single issue.

To answer your advise about not applying any style in Zotero in general, the reason I did it is that it figured that setting a style in the sections while working would allow me to know approximately what it would all look like at the end, in Times New Roman…

If you think I should just get rid of the styles, I could just probably try to work without “Dylan Body” and just define one style for the block quotes. Not ideal, but if necessary…

@kewms Since it compiles to docx and I can then convert to .odt, do you think that I should add another step to my workflow?
That would mean:

  • compile to .docx
  • save as .odt in Microsoft Word
  • run an .odt scan with Zotero for citations
  • export back as .docx

I suppose it could work. I just hope that, with all these conversions, it is not going to mess up my layout.

Thank you for confirming the information.

Concerning your remark about indentation, did you mean that it was easier to just uncheck it rather than set it to zero?

If that is the case, I have just done it, and you are right. I don’t know why I did not think of it before xD

Actually, I find that indenting the titles would be interesting, but I have looked everywhere and I cannot see how it is possible to indent JUST the titles without indenting the text.

Still running tests.

I don’t know if it can help, but I have just tried UNchecking “override notes and text formatting” in “formatting”, thinking that the compile tool would just use the two styles “Dylan Body” and “block quotes” present in the text.

It did NOT fix the issue. It did not change ANYthing at all.

No you won’t. As kewms suggested you can compile to docx and take a side trip to odt. As you seem to acknowledge this works perfectly, so what is the hang up that makes you VERY worried? Seems like you have a working solution.

Also, doesn’t Zotero scan rtf files? I think it does. Why not compile to rtf, scan that and then open in Word.

BTW this is not a good reason to style all your body text. You could have just set the default paragraph appearance for the project to however you wanted to see text in the Editor pane. Something to consider “next time”.

Also, for your serious research project, please forgive me, but is this consideration (seeing how it’s going to look) an important one?

Sounds like not a big deal, since you would not need to do it a lot. So, yeah, you could easily do that.

2 Likes

@gr Thank you very much for your wise advice, which has really allowed me to move on.

I have considered your questions, and…

  1. to be honest, I could not answer your question about why it is important to see how it’s going to look. I don’t know why it seemed important, perhaps reassuring, but you are right, it is certainly not essential, so…

  2. instead of waiting for “next time”, it is VERY easy to select all the text in the same style in Scrivener, even through the whole project, in Scrivenings, so I have just transformed all my “Dylan Body” to “normal” and formatted the text in the editor pane, as you said…

  3. … and compiled it in .odt. As you suspected, that was the issue, so now it works absolutely fine ! :slight_smile:
    The only style I need to define is “block quote”, and apparently there is no issue with that one.

  4. Sorry if I sounded overly worried, but after spending time finding a workout for Zotero, installing addons… I was afraid that now I would not be able to work with it. Perhaps this should not worry me, but I was under the impression that converting a file 3 times in a row might cause more trouble than it would solve, because my experience between Pages and Word, or Keynote and Powerpoint, for example, is that it can mess up things.

  5. I also considered your suggestion of using .rtf, which I had not even thought of because I am absolutely not familiar with .rtf. I tested compiling in .rtf, but for some reason, it did not compile my footnotes. I may have done something wrong, but I really cannot see what. In any case, I do not want to waste your time with this, since everything is now working fine with .odt.

Thank you… a thousand times.

1 Like

What did you use to open the RTF file? Not all RTF editors implement the full specification. In particular, TextEdit does not support footnotes.

1 Like

Wow! Thanks! I never suspected it had to do with the editor… Always happy to learn.

I have just tried with both LibreOffice and Word, and it works find.
Pages does not open the footnotes either.

In any case, after the suggestion made by @gr of changing the workflow to rtf, I had a look online and apparently Zotero advises ODF scan rather than RTF scan.
For one thing, at least, it is probably better for me. I sometimes put a citation in a footnote, and RTF does not allow it. I mean, ZOTERO does not scan the footnotes, from what I read… so I am probably better off with ODT.

Honestly, forums are paradise when you like learning new stuff! Thanks again :slight_smile:

Keeping RTF in the back of your head is useful because that’s Scrivener’s native format. So if you have something that works, say, in DOCX but not ODT, you might compile to RTF and let LibreOffice do the ODT conversion. That tests for the possibility of a bug in Scrivener’s ODT converter.

1 Like

Very interesting, thank you!

In this case, I will follow your advice and compile it neither to DOCX nor to ODT.

It is probably safer to add one layer of conversion if the RTF format is the least likely to have any mistake in the compiling process.

I have just tested this workflow:

  • compile to .RTF
  • open RTF with LibreOffice
  • Save a copy as .ODT
  • ODF scan
  • open ODF with LibreOffice
  • Save a copy as .DOCX

It seems to be working fine.

So now, in fact, you have several workflows that work — which may be good in a pinch if you run into another puzzler!

gr

1 Like