Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

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

share|improve this question
    
Can you give us an RTF (or a portion of it) that has italics both in and outside of the intro? –  Circle B Aug 7 at 14:36
    
@CircleB I've updated the question with a sample RTF file and instructions for setting up the InDesign document. Let me know if you need anything else. Thanks! –  bfrohs Aug 7 at 15:04
    
I'll look into it and let you know what I come up with. –  Circle B Aug 7 at 17:04
2  
user2358127's answer is the best I can come up with, maybe somebody knows of a style only option but I'm quite doubtful of it. –  Circle B Aug 8 at 14:53

1 Answer 1

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.

result

share|improve this answer
1  
Thanks so much! I'm going to hold out on awarding the bounty for now, in case a style-only answer comes along (ie, without having to use find/replace), but if none appear, and I don't think they will, I'll award to you :) –  bfrohs Aug 7 at 21:27
2  
Absolutely, but I've racked my brain and don't think there's another way. I'd love to be proven wrong though! –  MG_ Aug 8 at 3:15
    
You beat me to it—"Good on your head" as they say. –  Circle B Aug 8 at 14:54
    
Well you could automodify the RTF with a scripting language, or illustrator scripting. –  joojaa Aug 13 at 5:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.