“Flip” italics/oblique with character style

We are exporting content from our CMS into InDesign via RTF. All content has style names applied automatically, including italics which has an italic character style. italic has the Font Style set to “Italic”.

This works great, except one of our paragraph styles (intro) sets Font Style to “Italic” as well. In these cases, we would like the italic style to remove “Italic” from the Font Style.

I came across this question which wants to do something similar, but both of the answers require manual intervention, which we’re trying to avoid at all costs.

As far as I can tell, it’s only possible to specifically set Font Style globally with a character class. That is, it isn’t possible to have it apply different styles based on the parent paragraph style.

Ideally, we would like to have the italic style switch between “Italic” and non-italic automatically. In CSS, this would be achieved like this (I know toggle() doesn’t work yet, let me dream):

.italic { font-style: toggle(italic, normal); }

Alternatively, we could settle for setting the Font Style different when it appears within a intro paragraph. For example, in CSS:

.italic { font-style: italic; }
p.intro .italic { font-style: normal; }

Is there any way to achieve this behavior in InDesign with styles?

We don’t do the import very often (a few times in a short period of time every few months), but each import is rather large, so it’s both time-consuming and error-prone to fix these by hand. With that said, if there’s a way to do a single search and replace that takes care of this, that could also be acceptable, but anything that needs to be done for each instance is out of the question.

Note: We are looking into changing the RTF export to use a different style name for italics within intro, but are hoping for a better fix.

Setting up InDesign document

To set up a sample InDesign document, follow the instructions below. These instructions will create an InDesign document with italic and intro that are both “Italic”.

  1. Copy the following text into an empty file and save as sample.rtf:

    {\rtf1\ansi{\fonttbl{\f0 Times New Roman;}}{\stylesheet{\s1 intro;}{\s2 text;}{\*\cs3 \additive italic;}}\sectd\s1{Intro paragraph with {\*\cs3 italic} text.\par}\s2{Non-intro paragraph with {\*\cs3 italic} text.\par}}
  2. Place sample.rtf into an empty InDesign document

  3. Set Font Style to “Italic” for intro paragraph style

  4. Set Font Style to “Italic” for italic character style


Following on from your (most excellent) set up:

5) Create a new character style, name it “non-italic” and set it’s font style accordingly (“Regular” works in this example).

6) Bring up Find/Change, but leave the “Find what” and “Change to” fields blank. Beneath those fields you’ll see Find Format. Specify Character Style as “italic” and Paragraph Style as “intro”. Click OK.

7) In the “Change To” field, specify your new “non-italic” character style, leaving paragraph style as [Any Style]. Click OK.

8) Click “Change All”. (NB. There’s only 1 instance in this example.)

For confirmation, see screen shot.


Source : Link , Question Author : 0b10011 , Answer Author : MG_

Leave a Comment