Italics lost in compile

Imagine the engine of your car starts to fail. You call the garage, tell them what it sounds like in the hope that they can tell you what’s wrong and how to fix it yourself. They ask you to bring the car round to have a closer look. Instead you offer to put your phone near the engine to prove that it is indeed acting up.

Consider bringing the car round (a sample project), so someone can peek under the hood.

I bet that is your problem… you’ve given every paragraph in your project a style (as you would in Word), with the result that when you compile they are all formatted in the paragraph style, which doesn’t include italics, so strips them out.

All your main text paragraphs in Scrivener should be “No Style”, which becomes “body” or “Normal”—whatever the base style is called in Word (I don’t use Word or DOCX)—but doesn’t override the italics as you have discovered in that one paragraph.

In Scrivener, only paragraphs that differ from the main text style, like headings or block quotes should be given a style. All main text should be “No Style”.

HTH

Mark

1 Like

Okay, so you mean to attach a file. According to Mark, this is all my problem and can’t be fixed, so I won’t bother anyone any more. Thank you for your help.

I understand what the problem is, and in multiple threads it has been said it was fixed in a previous update, which is why I have continued to do it, because it’s far more convenient for me to hit a couple of shortcut keys to change specific paragraphs than to adjust my formatting manually.

So I guess the bottom line is that there is no way to prevent this manuscript from losing all of its italics. I appreciate your time.

@xiamenese : I bet that is your problem… you’ve given every paragraph in your project a style (as you would in Word), with the result that when you compile they are all formatted in the paragraph style, which doesn’t include italics, so strips them out.

That latter part was the original bug that was being reported, in that what you describe shouldn’t happen. The compiler should have special exemptions for direct formatting that is placed on top of styled text, so that it doesn’t get nuked when compiling. In older builds, it was getting nuked, but we fixed that and it should now be working as intended.

In practical usage the matter goes beyond body paragraph formatting. Say you want to italicise three words in a caption? (Yes, best practices would have one create a “Proper Noun” character style that uses italics to present itself, and apply that to the text rather than just messing around with font variants directly—but not everyone writes to best practices, clearly, or this thread wouldn’t exist, so we need to anticipate that in the design.)

While I do agree that the practice of applying a body style to all text, in a program like Scrivener, is needless and makes using the software more complicated than it should be—it’s still a supported way of working, and critical capabilities like making some text italic shouldn’t be mysteriously lost.

italics_in_styles.zip (145.3 KB)

Here is a sample project that demonstrates several different combinations of settings:

  • Each of the three items in this test have two test paragraphs with italics in them. One is not styled and the other is. The styles used are the most impactful possible: font family and size are changed, and character formatting as well as paragraph formatting.
  • The third item’s C-03 paragraph uses a different style (same configuration). We use two different “Body” styles so that we can test whether when the compiler overwrites the style design that makes a difference.
    • The “Body” style in B-03 is passed through the compiler without modification, which can be evidenced by the fact that all of the formatting around that paragraph changes, while it sticks to what we see in the editor.
    • The “Body Temp” style in C-03 has a rule in the Styles compile format pane that reformats the font family and size to match the rest of the text around it. I also added a little indent to help illustrate that this text is being manipulated specially.
  • All italic ranges are also highlighted for ease of referencing in the output.
  • All six italic ranges are preserved in output, whether the Section Layout reformats the paragraph, or the style is exempting the paragraph from reformatting, or the style is being reformatted itself.

While that is useful for demonstrating what works, the problem is that these are only six of many different ways to set things up.

Sorry if it isn’t clear, but I am asking for instructions on how I may see this bug on my end, so that we can look at it and fix it.

Absolutely. It took me a couple of months following the release of Scriv 3 for Mac to realise that I was best off not styling all paragraphs word processor style, and have read so often on the forum of people running into problems compiling from having done so, that I didn’t realise that the italics/bold problem in styled paragraphs had been resolved. I’m glad it has, but why @NJDamschroder is still encountering it, I hope you will be able to ascertain.

Yes, your sample project works fine, and it encouraged me to investigate setting up flexible ‘emphasis’ or ‘strong’ character styles… I hadn’t tried turning off Font Family and Font Size, assuming erroneously that they were necessary in a Character style.

So thanks for that, and for all the other help and support you give to us all.

Mark

3 Likes

You’re being lovely, thank you so much for all your help. Would it be best to go through Support? I can send the actual file I’m having trouble with.

Either you can send an email with an attachment, or can click on my avatar here on the forum and then the big Message button, which will send a private message. Just drag and drop the .zipped copy of the project into the composition area to upload. Or if it is too big, a share link from a cloud service is fine as well.

If you want to make a trimmed down version that’s ideal. You can use File ▸ Save As... to make a throw-away copy and purge everything but a section or two that demonstrates the problem (probably some with paragraphs that work too). But if you’re nervous about doing that we can work with whatever.

Just to close this out for anyone who may have this issue and comes across this thread while looking for a solution…

Amber was able to duplicate the problem, and deleting the styles was the simplest solution. That left everything as is, and it compiled correctly! I’ll be more efficient moving forward

Thank you to everyone who weighed in on this, and especially to Amber for not letting me give up and working to help me fix it. :slight_smile:

3 Likes

For anyone else having this issue, in case deleting the styles is not viable (say you have captions with italics, or headings), there are actually two potential fixes we found.

For both fixes, I recommend creating a backup of your current project, via the File ▸ Back Up ▸ Back Up To... menu command. Both of these steps are “destructive” in the sense that they have the potential to broadly change large amounts of your project. They are not destructive in the sense that you should lose any formatting, however it never hurts to play it safe with tools that work so broadly.

Font Swap

This involves simply setting the font family on the styles to something else, and then switching them back to what you prefer, which seems to be enough to reset the formatting and get rid of the glitch.

Instructions
  1. Select any paragraph using one of the styles that doesn’t have italics in it.
  2. Change the font to something else. I used Times New Roman.
  3. With the cursor in the modified paragraph, use the Format ▸ Style ▸ Redefine Style from Selection ▸ (style name).
  4. If the Include font family checkbox is not enabled, tick it so that your adjustment will take effect.

This will go through the whole thing and update the entire manuscript with the new font. Double-check to make sure none of the italics were lost.

As this point, you can follow the same procedure to set the font back to one of your choosing, and if you had to tick Include font family, you might also want to do a third run to clear that setting. You do need to leave it on for the two main font swaps though, otherwise this fix won’t actually change the formatting in the way we need it to.

Style Removal

The second method also works, and that is to simply delete the Self-Pub and Self-Pub First styles from the project. Deleting a style does not disturb the original formatting at all—it just strips the style tags out of the document. This will be a viable approach if you don’t really need the styles (like “body” paragraph styles, which have little use in Scrivener).

I’ve managed to slove this problem for myself, and I hope this works for others. In the end it was incredibly simple.
Choose a paragraph in the style you wish to keep.
Italicise a couple of words.
Select the whole paragraph.
Open the Styles panel in the paragraph box.
Click on the … at the bottom and click on “Redefine paragraph style from selection”.
Voila!
If you’re starting from scratch, include every potential variant in your intial paragraph style.

2 Likes

Hi, this is the first time I’ve posted here and I’m quite new to Scrivener (at least I’m new to the final stages of putting together a manuscript).
I see there has been a bug that wipes italics when using Compile but it was fixed in October '21. Unfortunately, it’s just happened to my manuscript and I’m now not sure what to do. :thinking: :sob:
I’ve checked my version of Scrivener - it’s Version: 3.1.5.1 (2073405) 64-bit - 06 Jul 2023.
I’m on a tight deadline now and thought I had everything done… I can’t imagine having to plough through 104,000 words to redo all the italics manually.
Any advice will be gratefully received!
TIA for any help you can give :pray:

What have you compiled to—PDF, DOCX, RTF? Try them interchangeably to test.
Has a style been applied to the italicised text?
It may be a font issue. Change font in a single document set to No Style and compile that doc with the Current Selection filter selected.
Check your Compile settings to see whether you’ve suppressed anything. Scrivener has a grey (bold) italics feature. If font enhancements are suppressed (don’t know the actual name offhand) you’d get a regular version of the font.
Compiling Italics is not broken in this version of Scrivener.

1 Like

Hi, thanks for this - I’ll give it a go with some of the suggestions you mention.
I compiled to .DOCX but will try out the others.
I created my own paragraph style about a year ago, which I’ve been using since, purely because it helped with the way I viewed the text on screen. I didn’t realise I could have left it plain and then compiled ‘in a style’.

:point_right: I’ve just opened a new project in Scrivener to copy and paste a document into and I’ve noticed the instructions for ‘General Non-Fiction Format’ looks completely different. I started this project in 2020 - before the last update in July 2023. Is it possible that although I am using the most up-to-date version of Scrivener, it won’t update the bug issues with removing italics on existing projects?

If you have no specialist formatting needs, No Style in Scrivener translates to Normal (style) in Word. Therefore, if so you never need to change the default in Scrivener.
I’d assume the 2021 fix is retained in the latest version of S3, which applies its current settings to the underlying content. In other words, text and formatting exist separate to one another.

In addition to @Kevitec57 which is spot on, it occurs to me that perhaps in Scrivener you used some sort of user-defined style to mark the words/charactors/paragraphs (which?) you want in italics. I’m not sure how user-defined styles transfer into a Word DOCX on compile, but a hunch is that the name of that style goes across and perhaps all you have to do in the Word DOCX document is define font styles for that user-named style which is attached to the items you wish to be in italics? Word doesn’t have a clue about user-named styles so probably uses a default, awaiting further instructions from user.

I’m not at a computer at Global HQ to try this out, but if this makes sense, give it a look.

Sorry you are on a close deadline. In Scrivener, a “best practice” is to “compile early and compile often.”

I’d assume Word doesn’t care if you call the style Treetrunk, as long as it doesn’t have a Treetrunk style the formatting might clash with. I see a style a combination of formatting options that can be commonly applied with one selection.
I believe Word goes haywire when you use Body style because it has its own Body style. Something like that.
See the sentence that follows I quickly compiled. The italics is in Scrivener’s Emphasis style.
Checking in Word, the Style name ported over to Word and retained the formatting.

There’s also nothing in Compile options to suppress italics:

Up to this point, you can strip out all styles AND retain italics. However, do not Paste and Match Style, else you’ll lose formatting such as italics as well.

For you specific experience, the manual recommends the following:

1 Like

Hi, thanks for this. I’ve learnt that now - I’ll compile regularly instead of leaving to the end, to ensure it’s working!
A lot of the information went over my head… however, I was concerned that my up-to-date version of Scriv still showed the old style template instructions. So my easiest option was to open a new project, make new folders and new texts. I copied each section over and voila, the compile did its job perfectly. It’s a massive learning curve for me, but huge thanks again - to you and @Kevitec57 :grin:
I got there in the end. :crazy_face:

2 Likes

To this specific point, the “template instructions” are just a document in the Binder. Once the project is created, that document loses any connection to the Scrivener application. It’s part of your project, and Scrivener isn’t allowed to change things in your project without your permission.