How do I apply a character style to a sentence that has an '&' in it?

Hi all,
I'm trying to apply the Character style 'See Figure' to any mention of of the phrase (See Figure x) which  I've figured out is: \(See Figure \d+\)
The problem I'm facing is that sometimes I will need to list multiple figure references. It will need to read (See Figure x&y) and in rare cases (See Figure x,y&z)
NOTE: There are no spaces in the above listed numbers.
Thank you  for your help.

That works perfectly, thank you very much.
Can you break it down for me in English if you have a moment please? I think I'm reading it wrong.
Digit followed by an Ampersand (I'm confused by the square bracket and plus...)

Similar Messages

  • How to apply a Character Style that's already been made in a template document?

    First of all I'd like to thank everyone that helps. I'm a complete beginner at scripting and appreciate all your help.
    I'm basically using GREP expressions to find patterns in a document and apply a Character Style which has already been made. This Character style was not made using script, but just in InDesign when making and setting up the template.
    var myDoc = app.activeDocument;
    //Clear the find/change grep preferences.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    //Set the find options.
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    //GREP Expression for finding all HEADERS
    app.findGrepPreferences.findWhat = ".+\n";
    //Applying formatting changes to put into All Caps, Bold and changing the font size to 12 pt.
    app.changeGrepPreferences.capitalization = Capitalization.allCaps;
    app.changeGrepPreferences.fontStyle = "Bold";
    app.changeGrepPreferences.pointSize = "12";
    myDoc.changeGrep();
    //Clear the find/change preferences after the search.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    This is how I currently have it. I will manually define the changes to the text. The problem is, each template uses a different set of fonts and not all of them use Bold e.g. Sabon can use CE Bold.
    I would like to learn how to apply a Character Style and have tried looking around but nothing seems to work.
    Any help would be much appreciated.
    Thanks.

    select the text where u went  and run below  script after change group as per ur template.
    var myDoc = app.activeDocument;
    var mySel = app.selection[0];
    //Clear the find/change grep preferences.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    //Set the find options.
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    //GREP Expression for finding all HEADERS
    app.findGrepPreferences.findWhat = "role";
    //Applying formatting changes to put into All Caps, Bold and changing the font size to 12 pt.
    //app.changeGrepPreferences.capitalization = Capitalization.allCaps;
    //~ app.changeGrepPreferences.fontStyle = "Bold";
    //~ app.changeGrepPreferences.pointSize = "12";
    app.changeGrepPreferences.appliedCharacterStyle=myDoc.characterStyleGroups.item("Style Group 1").characterStyleGroups.item("Style Group 2").characterStyles.item("Header")// Header is name of character name
    mySel.changeGrep();
    //Clear the find/change preferences after the search.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    If it's help then click yes
    Mi_D

  • How to apply bold character style with grep

    finding bold characters in a particular paragraph style
    I want to apply a character style
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.string = String.Bold;
    if (app.findGrepPreferences.appliedParagraphStyle == myPar) {
    app.changeGrepPreferences.appliedCharacterStyle = myCar1;
    app.activeDocument.changeGrep();
    app.findGrepPreferences = app.changeGrepPreferences = null;

    Try this,
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.fontStyle = "Bold";
    app.findGrepPreferences.appliedParagraphStyle = "myPar";
    app.changeGrepPreferences.appliedCharacterStyle = "myCar1";
    app.activeDocument.changeGrep();
    app.findGrepPreferences = app.changeGrepPreferences = null;
    Vandy

  • How can I apply a GREP style to a text variable?

    Hello everybody,
    I have a question concerning GREP styles inside Paragraph styles.
    1. I've created a text variable to generate a recurring title on the upper side of the page based on the main title paragraph style;
    2. The recurring title is in Adobe Garamond Small Caps, all letters in lower case, and it is formatted with a paragraph style sheet in the master page;
    3. I want to create a GREP style for the recurring title, according to which every time that in the recurring title appear an apostrophe or the double quotes, they are automatically lowered 2pt on the baseline
    (I already created the character style sheet that lowers letters of 2pt).
    What I need is the correct GREP formula to automatically apply the character style sheet to apostrophes and double quotes, in the line of text generated by the text variable...
    Thanks for your  help
    p.

    Hi,
    As I said, using Power Headers is the best way to do it.
    As Power Headers treats the header as "live text", you can use a simple grep style inserted in the header para style:
    … to obtain:
    For the sample, I use a char style named "-2pts" with Shift -5 pts and Green color to show you the place of ' and ".
    Don't forget that, even Power Headers treats the header as "live text", you only have to update Power Headers to make an update of the headers! 
    Even I use in another cases Tomaxxi's [JS] and it's a good way to treat the question, Jean-Claude Tremblay's solution is less interesting because the variable used is converted in text. If the variable text content changes, it's more complicated to manage the update!

  • How to apply multiple paragraph styles to one sentence?

    I'm using paragraph styles but is not helpful because I'm trying to apply 2 different styles within the same sentence which is not working.
    To make it work I select the sentence, apply the style, for instance "xfont-regular" then I select the word within the sentence that I want it to have a different style and I choose from the font list maybe italic so that it looks "something like this"
    Obviously by doing this, I'm loosing all the benefits of using p styles and of course it's so time consuming. Is there any way to break the sentence, keeping it in the same line, so that I can apply different styles to it? and still keep the benefits of just going to the styles and make the changes to the whole document that have that style applied.
    Thank you

    pchinique wrote:
    I'm using paragraph styles but is not helpful because I'm trying to apply 2 different styles within the same sentence which is not working.
    To make it work I select the sentence, apply the style, for instance "xfont-regular" then I select the word within the sentence that I want it to have a different style and I choose from the font list maybe italic so that it looks "something like this"
    Obviously by doing this, I'm loosing all the benefits of using p styles and of course it's so time consuming. Is there any way to break the sentence, keeping it in the same line, so that I can apply different styles to it? and still keep the benefits of just going to the styles and make the changes to the whole document that have that style applied.
    Thank you
    As Diane King mentioned, nested character styles may work for your need. Her example was an initial dropped capital (multi-line first one or several letters of a paragraph.) Dropped caps are a specific type of nested style - always the first one or more characters in a paragraph, two or more lines high.
    To use the general kind of nested style, you need to be able to identify the word or words within the paragraph that gets the nested character style. For example, the third word, or the first two words after the first semi-colon. If there is no pattern of word(s) that can be identified by position or sequence, it's possible that a GREP style can be used to find a common pattern of characters and apply a character style to it, for example a telephone number, date, or currency amount that's identified by a dollar sign, pound, or yuan.
    Search InDesign Help and Google for "InDesign nested style," "InDesign grep style," and similar terms (without quotes) for details. There have been many discussions of GREP on this forum.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • How To Add Glyph to Character Style?

    Specifically, i want to add the "math x" as a Character Style. The font is Adobe Janson Pro, and the "glyph" (what we used to call a "character") is present. I could add by hand, but i have a lot of them. In the menus that define the character(s) you want to add, i can't find an option that will add a *specific* character-- in this case the math x. Or an accented character, for that matter (ü?)
    Thanks very much.

    Okay, I see. I tried one more thing -- since the Symbol character for the math x font is option-y (which is the "yen" symbol in most fonts) I tried having the Nested GREP apply a character style including the Symbol font to all option-Y characters -- but Indesign is too clever for that, and shows an empty box (since there's no Yen symbol in the Symbol font).
    I give up. Keep the "Glyphs" palette handy, and once you've entered one math x symbol, it will be on the "recently used glyphs" row, and you can enter them by double-clicking. Or, you can search for space-x-space and replace with space-math x-space where needed.
    Rodney

  • I can't figure out how to log off of my daughter's iTunes account that has been loaded to my PC.  When I want to sync my iPhone, I get her data, not mine.

    I can't figure out how to log off of my daughter's iTunes account that has been loaded to my PC.  When I want to sync my iPhone, I get her data, not mine.

    Hi, Abril_Perez17.
    This may be related to a new feature embedded in iOS7 that shows all purchased music by default.  Go to Settings > Music, then turn off Show All Music.  See if the issue ceases once the feature has been disabled.  This information is located on page 63 of the user guide below. 
    iPhone User Guide
    Regards,
    Jason H. 

  • How can I print in black/white only a document that has colors in the original?

    How can I print in black/white only a document that has colors in its original. I don't need the print out to be in color, and I don't want to waste the color ink.

    It depends on your printer and the application you are using.
    In some applications you can choose color vs. greyscale/black&white when you do File > Print.   PowerPoint is one example of an application that allows this choice.
    Otherwise, you can usually select greyscale at the time you print the document.  Do File > Print. In the resulting dialog box, there should be an item called Copies & Pages (in Word and other applications) or Preview (in Preview).  Click it.  In the resulting list, you should then see an option called Printer Features.  Click it.  Then you should see an option called Printout Mode.  Usually one of the modes is Greyscale or Black & White.  Select it.  Then Print.
    This can also depend on your printer.  Exactly what make/model printer are you using?   And what kind of document are you trying to print (Word, PPT, JPEG, etc)?

  • Please help me with the step by step instructions on how to install a Windows server 2008 on a computer that has Windows 8 installed on it

    Please help me with the step by step instructions on how to install a Windows server 2008 on a computer that has Windows 8 installed on it without formatting windows 8.Please email the steps , Thanks

    Please help me with the step by step instructions on how to install a Windows server 2008 on a computer that has Windows 8 installed on it without formatting windows 8.Please email the steps , Thanks
    Assuming your rig can support virtual machines, you can use Hyper-V and run another OS there.
    Better practice however is to use a dedicated machine and use remote desktop to the server.
    Corsair Carbide 300R with window
    Corsair TX850V2 70A@12V
    Asus M5A99FX PRO R2.0 CFX/SLI
    AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
    G.SKILL RipjawsX DDR3-2133 8 GB
    EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
    Asus PA238QR IPS LED HDMI DP 1080p
    ST2000DM001 & Windows 8.1 Enterprise x64
    Microsoft Wireless Desktop 2000
    Wacom Bamboo CHT470M
    Place your rig specifics into your signature like I have, makes it 100x easier to understand!
    Hardcore Games Legendary is the Only Way to Play!

  • How do I remove an alert for a calendar item that has long since been deleted? and yet goes off mysteriously, un-deletably, and un-editably every single ****** week !!

    How do I remove an alert for a calendar item that has long since been deleted? and yet goes off mysteriously, un-deletably, and un-editably every single ****** week !!

    I have the same problem with my iPhone.  I set up a recurring calendar event for every Thursday.  That event is no longer happening during the summer, so I went in and chose one from the current month and selected Delete.  Then it gve me two choices, one of which was to Delete All Future Events of this one, and that's what I chose.  I figured, this way, I'll still be able to see the ones from the past, but won't have to see (or hear the alert) for the future ones.
    The following week, my phone alerted me to the appointment, and even showed it on the initial screen, even though it wasn't in the calendar.  I went in to the calendar and NOTHING was scheduled for that day.  So why is this happening?
    So I set up a new recurring event, for in the past, then went in and deleted all furture occurances, and it did the same thing... still alerted to an event that was no longer in the calendar.
    I hope somebody else has found a fix, or at least a reason for why this is happening.

  • How do I edit the text in a pdf file that has been converted to a Word doc

    How do I edit the text in a pdf file that has been converted to a Word doc?

    Hi BridgetteJean,
    Please go through this video this explains how to edit text in a pdf document.
    http://tv.adobe.com/watch/acrobat-tips-and-tricks/editing-text-with-the-typewriter-tool/

  • How do I open a Numbers file sent to me that has been converted to Excel?  I already have MS Office for Mac.Ow

    How do I open a Numbers file sent to me that has been converted to Excel?  I already have MS office for Mac, but nothing comes up when I click on the imported file.

    If it indeed has been converted from Numbers to Excel, it will have a .xlsx suffix at the end of the name. Do a Get Info on the file if the suffix doesn't show. Else, it may still be in Numbers format and be unreadable by Excel.
    If it is in the right format, and you don't want to have to do what mende1 has instructed above for every successive file, click on the "Always open with..." option. That will associate the .xlsx suffix to Excel from thereon.

  • How do I get iCloud to work with my mac that has snow lepard and is pre intel?

    How do I get iCloud to work with my mac that has snow lepard and is pre intel?

    Richard Kerns wrote:
    And it kills me that a friend who has pc computers and just has an iphone and ipad can breeze through all this with no problem and he still has XP.  So Apple goes back and helps old OS for pc but not for it's own kind!!!
    Richard, I agree with you 1,000%. I wrote this in a forum a few weeks ago, when a user was complaining about Snow Leopard not supporting iCloud:
    Why is it that if I bought a Mac before July of this year, I must pay to upgrade my operating system in order to take advantage of iCloud? Meanwhile, a Windows Vista SP2 user, who bought a new computer in May 2009, already has everything they need on their computer to use iCloud.
    Why was it possible for Apple to write a free iCloud Control Panel that was compatible with existing versions of Windows, but Mac users must buy an entirely new operating system?
    If Apple gave Mac users the same amount of backwards compatibility that it gives to Windows users, people with OSX 10.5 (Leopard) would be able to use iCloud. That's something to think about the next time you go to purchase a new computer.
    (P.S. Something else to think about: If you bought a Mac before October 2007 (when OSX 10.5 was introduced), your computer won't run iTunes 10.5 unless you buy an upgrade. But a PC user, who purchased their computer as long ago as Sept. 2004(!), can run iTunes without an OS upgrade.)
    I got so angry thinking about this, that I ended up writing an angry note to Apple on their feedback page. After repeating what I just wrote here, I asked them to commit to providing at least the same level of support to Mac users that they do for PC users when it comes to their cross platform products (iPhone, iPad, iCloud, Apple TV, Safari, iTunes, etc.) And, really, is that so much to ask?
    I wish I knew how to start a petition requesting that Mac users get comparable treatment as PC users. But then again, shouldn't that go without saying?
    Please leave feedback about this revolting double standard on the Apple feedback page. They should be thinking long and hard about why their own customers are treated worse than the customers of their competition.

  • HT1918 How can I unauthorize (from an itunes account) a computer that has "Died"?

    How can I unauthorize (from an itunes account) a computer that has "Died"?

    Use the Deauthorize All command documented in this article.
    (82745)

  • Applying [None] character style

    I have a script that finds text with a certain character style, cuts that text from the main story and anchors it in a frame that sits in the margin.
    Everything works fine except that I'd like to have the option of removing the character style. However, when I apply the [None] character style InD shows [None] in the character style lists but the formatting for the character style that was just removed remains on the text.
    Is there a way to have it work as if the [None] was manually selected from the character style list? i.e.: where the character style formatting is removed as well?
    Thanks,
    Ken

    Hello!
    I'm trying to start understanding this javascript thing... Does anyone know how I can modify this so it will also have the option of removing all the character styles in all the text frames, or all the stories in the document? I have several documents with 10 stories each that will need to have the character styles removed before we continue formatting.
    I took a swing at it myself, but haven't been able to get it to work. I really don't know much about scripting! Here's what I tried:
    if (app.documents.length == 0) ErrorExit("Please open a document and try again.");   
    var gScriptName = "Apply character style None keeping overrides"; 
    var gScriptVersion = "1.0"; 
    var doc = app.activeDocument; 
    var sel = doc.selection[0]; 
    var all = app.documents[0].stories.everyItem()
    if (doc.selection.length != 1) ErrorExit("One text frame or some text should be selected, or the cursor should be inserted into the text."); 
    if (sel.constructor.name == "TextFrame") { // a text frame is selected 
         ApplyNone(sel.texts[0]); 
    else if (sel.constructor.name == "Character" || // some text is selected  
         sel.constructor.name == "Word" || 
         sel.constructor.name == "TextStyleRange" || 
         sel.constructor.name == "Line" || 
         sel.constructor.name == "Paragraph" || 
         sel.constructor.name == "TextColumn" || 
         sel.constructor.name == "Text") 
              ApplyNone(sel); 
    else { 
         ApplyNone(all); 
    //===================================== FUNCTIONS  ====================================== 
    function ApplyNone(sel) { 
         var noneStyle = doc.characterStyles.item("[None]"); 
         var basedOnNone = app.activeDocument.characterStyles.add({name:"None", basedOn:noneStyle}); 
         sel.applyCharacterStyle(basedOnNone); 
         basedOnNone.remove(noneStyle); 
    function ErrorExit(error, icon) { 
         alert(error, gScriptName + " - " + gScriptVersion, icon); 
         exit(); 
    I also tried this, but to no avail.
    ar gScriptName = "Apply character style None keeping overrides"; 
    var gScriptVersion = "1.0"; 
    var doc = app.activeDocument; 
    var sel = doc.selection[0]; 
    var all = app.documents[0].stories.everyItem()
    ApplyNone(all); 
    //===================================== FUNCTIONS  ====================================== 
    function ApplyNone(sel) { 
         var noneStyle = doc.characterStyles.item("[None]"); 
         var basedOnNone = app.activeDocument.characterStyles.add({name:"None", basedOn:noneStyle}); 
         all.applyCharacterStyle(basedOnNone); 
         basedOnNone.remove(noneStyle); 
    function ErrorExit(error, icon) { 
         alert(error, gScriptName + " - " + gScriptVersion, icon); 
         exit(); 
    Any thoughts? I'm thinking that app.documents[0].stories.everyItem() probably isn't right...
    Thanks for your help!

Maybe you are looking for

  • Download itunes 10.3 - unknown publisher??

    when i try to download itunes 10.3 I am getting a internet security warning pop-up screen that states Name: itunes64Setup.exe  Publisher: Unknown Publisher... then it goes on to say that 'this file has been blocked because it does not have a valid di

  • IDOC Interface Error

    Hi Experts, I am getting the same error: and from the forums I came to know that we need to use the IDOC name in the Interface mapping. I used the modified IDOC structure(External Definition) in mapping, but when I select the original interface in In

  • Searching for clip in Premiere using the keywords assigned while ingesting same slip in Prelude...

    Created keywords while ingesting a clip in Prelude , but I can't search for those keywords in premiere and bridge CC... Help!!!

  • From 3.5 to 11.1

    Hi all, i need to migrate an application built on version 3.5 to 11.1. Is there anyone who can tell me the steps to do the migration?? Thanks in advance.

  • Unresolved kernel ... weird error screen - what does it mean?

    My Powerbook just crashed with vertically scrolling black-boxed lines of text reading "Unresolved kernel trap", or something similar (I turned it off before making a note of it foolishly). Can anyone tell me what this means? Does this spell imminent