Character Styles Question…

Learn / Forums / General InDesign Topics / Character Styles Question…

Tagged: 

Viewing 13 reply threads
  • Author
    Posts
    • #68116
      Scott Irwin
      Member

      Hello everyone,

      Long time reader, first time poster! :)

      I work for a large mail order catalog company, and we are in the process of changing our copy formatting in the catalogs. We will be showing the size range for each of our women’s line and I wanted to know if there is a way to make the character styles bold a letter before a set of parenthesis?

      Current Copy format looks like this:

      MISSES: 8-14
      PETITE: 8P-12P

      The new formatting is going to look like this:

      MISSES: S(6-8), M(10-12), L(14-16)….with the S, M, L being BOLD.

      Is there a way to apply a character style so that just the letters are bold, but the parenthesis information stays another style?

      As it is now, we bring the copy in from a database that interacts with InDesigns character styles to format the copy. I’m sure I could use GREP to find/replace what I need but that would still require extra steps. I really just want to bring the copy in and have it formatted correctly.

      Thanks in advance for any help

    • #68118

      Sure, you can do this with nested styles I think.

      First, make a character style that changes the font to Bold (and let’s call it Bold).

      Then edit the paragraph style that you’re applying to these kinds of lines:
      MISSES: S(6-8), M(10-12), L(14-16)

      Let’s say you’ve named that style “Sizes.” So you double-click the Sizes paragraph style, and then in the Drop Caps and Nested Styles, you add a series of Nested styles.

      First one applies the char style None through 1 [space] (that is, in the last field, replace the default “Word” with an empty space, a tap on the spacebar).
      Second one applies Bold through 1 Character (choose “character” from the menu for the last field)
      Third one applies None through 1 [space]
      Fourth one applies Bold through 1 Character

      Then just repeat that sequence of nested styles for as many times as you have sets of parens in a single paragraph. Note that this won’t work if you use spaces in the paragraph anywhere else but right before the sizes. For example, it wouldn’t work if instead of “MISSES” it said “KID’S CLOTHES”.

      There may well be a devilishly clever way to do this with a GREP style, but this works just as well for the example given ;-D

      AM

    • #68120

      Or when you nest it you could do this:

      1) None through one space
      2) Bold through one letter
      3) Repeat

      ——
      Now that I think about it, if you have a size such as XL, the above would not work. Or if they added spaces before the opening parenthesis.

      If the line were to look like this:

      MISSES: S (6-8), M (10-12), L (14-16), XL (23-24)

      or this:

      MISSES: S(6-8), M(10-12), L(14-16), XL(23-24)

      Your nesting would be:

      1) None through one space
      2) Bold up to open parenthesis [type in the ( ]
      3) Repeat

      The spaces would also be bold, but I don’t think that should be an issue.

    • #68129
      Scott Irwin
      Member

      Thank you for the replies, I will test this out when I get in to work on Monday. We occasionally do have sizes are two words, like “Women’s Tall” and stuff, but not often.

      I’ll post my results.

      Thanks again
      scott

    • #68165
      Scott Irwin
      Member

      Ok, so I created:

      Character Style that just has my font treatment: Font, Size, color, bold.

      Then I created a paragraph style that was just the default style except for the nested character style information:

      Paragraph style was:
      1. None through one space (put the space in the “word” field)
      2. Bold up to open parenthesis

      A. Repeated steps 1 & 2 5 times to compensate for the amount of sizes we carry
      B. Created a test paragraph of info on a blank page using only single named sizes (i.e. Petites, Women’s, Misses.)
      C. Highlighted the paragraph and applied the Paragraph style….

      ….worked great!!!

      I did try the same paragraph test with two word size names (Petite Short, Women’s Tall) and I do run into the issue Anne-Marie mentioned. The second word changes to use the character style of “Bold”. I don’t think this will be an issue since the “Size Name” field in the database has its own character style assigned to it, and the “Size Range” is going to be using the paragraph style above assigned to it.

      Thanks for the help Anne and Dwayne. Hopefully my database will play nice and this will be easy. haha.

      • #68167

        I’m glad it worked. I’ll keep my fingers crossed that the database plays nicely :)

    • #68206
      Scott Irwin
      Member

      Ok guys, I think I’m missing something, somewhere…

      In my post above I was able to get the letters of the size range to become bold, change fonts, sizes, etc. I accomplished this by manually typing in a “fake” copy block with sizes and then highlighting the size range and applying the paragraph style I created. That worked.

      When I bring it in from the database, I ran into an issue where all of the size names / size ranges were bold in the same font.

      So I started from scratch:

      1. Created a brand new blank document.
      2. Created all of the Character styles needed for a normal spread
      3. Created the “bold letter” Paragraph style
      4. Made sure that “NONE” was selected in character styles, and “BASIC PARAGRAPH” was selected in Paragraph styles.
      5. Typed out a full item description (using the default font – which was Times Roman 12pt)
      6. Copied that block of text so that I had two exact copies on the page.

      Then I went through the first copy block, highlighted certain pieces of text and applied all of my character styles that I had created. Everything looked and acted like it was suppose too….UNTIL I tried to highlight the size range and apply the paragraph style…nothing happened. The “size letters” didn’t bold.

      On the second copy block I left it at the default font (times roman 12pt) and only highlighted the “size range” and then applied the paragraph style….and it worked. It changed all the “size letters” to bold, changed the font from Times Roman 12pt to Arno Pro 8pt / Bold.

      So what am i doing wrong that it won’t change the font bold after it’s been formatted with a character style?

      • #68207

        I’m not sure. Are you saying that you applied the character styles first and then applied the paragraph style to it?

    • #68208
      Scott Irwin
      Member

      Yes, I believe I did that initially when formatting the size range. I then read that Local Formatting > Character Styles > Paragraph styles. :) So if you apply a character style to text, and then try to apply a paragraph style to text, it won’t work….is that correct? And after all these years of using Indesign, I just learned something new. :)

      Needless to say I finally manually applied all my character styles and paragraph style to the copy and it looks correct. Not sure that bringing copy in from the database to indesign will end up with the same results since I can only apply one style to a section of copy in the database…I think. That is an experiment for tomorrow though.

      • #68210

        If you applied character styles to the stuff that was supposed to be nested, then whatever you applied will override the nesting, I believe. If something is being nested, you don’t want to apply anything to them manually.

        If the paragraph style with nesting worked the first time, all you should need to do is click anywhere in the paragraph and apply the paragraph style, and the nesting should do everything automatically.

        I’ve had character styles applied and I’ve changed the paragraph to a different paragraph style sheet and it worked. But those characters styles were not used in nested stuff.

        That sucks you had to manually apply the character style sheets.

        I don’t do too much database importing as I usually used tagged text files.

      • #68226
        Masood Ahmad
        Participant

        Oooops!!! That was a heavy workout.

        Scott, can you try these:

        As you have already created a Character Style (Bold) and a paragraph Style let say (Size) for your body text:
        MISSES: S (6-8), M (10-12), L (14-16), XL (23-24)

        or this:

        MISSES: S(6-8), M(10-12), L(14-16), XL(23-24)

        Just right click the Size paragraph style and click Edit;
        Go to the GREP Style panel and in the GREP Style area, select “New GREP Style”;
        1. Apply Style: Bold
        To Text: S(?=\()

        add another “New GREP Style”
        2. Apply Style: Bold
        To Text: M(?=\()

        add another “New GREP Style”
        3. Apply Style: Bold
        To Text: M(?=\()

        add another “New GREP Style”
        4. Apply Style: Bold
        To Text: L(?=\()

        add another “New GREP Style”
        5. Apply Style: Bold
        To Text: X(?=\()

        add another “New GREP Style”
        6. Apply Style: Bold
        To Text: XL(?=\()

        You can edit the characters “S,M,L,X,XL” to meet your text.

    • #68232
      Scott Irwin
      Member

      @Dwayne – I was able to get my whole paragraph and its parts formatted like I wanted to…manually. So at least I know my characters styles and paragraph style is working correctly. The database on the other hand….totally different story. I’ve got a call in to support for that. If all else fails I’ll just see if Masood’s suggestion works. If it does, I’ll just do a find replace in the document during my QC process.

      @Masood – Thanks for the suggestion with GREP. I will try this out tomorrow afternoon. Like I said the paragraph style works if I do it manually. Now if I add the grep styles will it mess up the character formats already in the paragraph style?

      • #68233

        Scott–I don’t understand why you have to do it manually. You mean you have to highlight all those sizes (S, M, L, XL) and apply the character style sheet?

        The nesting should work automatically. Just click the those paragraphs and apply the paragraph style sheet.

        Can you send me a partial file you’ve done so I can take a look at and see why the nesting isn’t working?

        You can email me at:

        d w a y n e . h a r r i s @ g m a i l . c o m

        (remove all the spaces).

    • #68241
      Masood Ahmad
      Participant

      Hi Scott, I don’t think that GREP Style will create any problem with your existing paragraph styles. If they do so, you can easily remove the GREP Style. As Dwayne said, there seems to be some problem with the formatting. It would be a good idea to upload the file, so that we can have a look.

      As the forum doesn’t allow uploading of files or snapshots, you have to upload your file using some third party file transfer system i.e. Hightail, flicker, dropbox etc and have to paste the url on the forum.

    • #68277
      Scott Irwin
      Member

      @Dwayne – Sorry, I probably wasn’t explaining myself correctly. I created all the character/paragraph styles in Indesign…and then typed out a paragraph of copy and applied all the styles to the correct sections of my paragraph just to see if all the styles worked. They did. So if I had a style named “LEAD-IN” I would highlight the lead-in and then click on the character style to format it. This all worked for the most part. That’s what i meant by I manually formatted it. The only paragraph style I created was the one that turned my size letters bold. Everything else uses a character style. When I highlight all the sizes and their size ranges and click on the paragraph style, it formats them correctly.

      All of the different pieces of of the paragraph are in separate fields in the database and I can assign a different style to each section so my copy comes from the database into Indesign correctly formatted. Alas, I’m having issues with that, but I have a meeting to day with tech support to see why my database is bringing in other character styles that I have not assigned to the copy. Hopefully once that issue is resolved, my copy will come in correctly.

      @Masood – Thanks for the help. If I can’t get my database to format correctly, I’ll have to format the size letters manually…..can I use the Grep above to do that?

    • #68292
      Petr Burkot
      Participant

      Hi Scott,

      I made this grep style in paragraph style and it worked just fine for both instances of your patterns.
      Give it a try. Simply create your paragraph style and within it use a grep style using “bold” character style for this regular expression:

      (?<=,|\s)\u+?(?=\s*\()

    • #68339
      Scott Irwin
      Member

      Thanks for all the help guys!

      As of right now, I was able to get all of my copy formatted correctly from the database to Indesign. The size range issue was handled by using a combination of Grep AND Nested styles in a paragraph style. So until the art directors decide to change the look of the paragraphs, everything works.

      Thanks again to everyone that helped me out.

    • #68424
      Scott Irwin
      Member

      Couple more questions.

      My success with the size range was done using a combination of Grep and nested character styles in a paragraph style. I basically combined Barcode_CZ’s and Masood’s GREP code with Dwayne/Anne’s Nested styles.

      I’m curious to know if there is a way to to use Barcode_CZ’s code to find all sizes that are 1X, 2X, 3X, etc. instead of typing them all out one by one, like in Masood’s response? I can type in as many sizes as necessary as long as they are letters, but as soon as it gets to a Number/Letter it doesn’t format it automatically.

      So for example – using Barcode_CZ’s GREP code will format all the size letters in Bold. It doesn’t matter if I add sizes or not, as soon as I put in parenthesis, it formats correctly!!
      Misses Petite: MPXS(8-10), MPXS(8-10), MPXS(8-10), MPXS(8-10), MPXS(8-10) $29.99
      Petite: PXS(8-10), PXS(8-10), PXS(8-10), PXS(8-10), PXS(8-10) $29.99

      But when it gets to the women’s sizes – Barcode_CZ’s code doesn’t work. This is where I typed in Masood’s GREP code 5 times, but as soon as I go to 6X(size-size) it doesn’t format because I didn’t go that high in the GREP.
      Women’s: 1X(4-6), 2X(8-10), 3X(12-14), 4X(16-18), 5X(20-22) $34.99

      Can Barcode_CZ’s be modified to format the 1X (letter/digit) as well?

      The next thing I’m running into is that our shoes have a different size format than the clothes. Our shoes look like this format:
      N 7-10, 11; M 6-10, 11, 12 $39.99
      W 61?2-10, 11, 12; WW 61/2-10 $45.99

      The Letters in the above example need to be bold/font, and the numbers normal/different font. I got it working by playing around with GREP paragraph styles. I just applied the size character style to [l\u] which seems to work, until I type in a lower case letter or parenthesis. Sometimes we have shoe sizes that look like this:

      WWWW(EEEE) 7-12, 13. or more letters. If I use caps the letters are bold but the parenthesis are not. Lower case letters are not bolded either.

      What do I need to adjust in my GREP code for that to work?

      Thanks
      Scott

    • #68425
      Scott Irwin
      Member

      Update:

      Changed [\l\u] to [\l\u\(\)] to encompass the parenthesis and it works. It can’t be that easy can it? lol.

      I love GREP!

Viewing 13 reply threads
  • You must be logged in to reply to this topic.
>