CS3: GREP find/change with the character Style?

Hello

Was surfing autour through various resources, but have not been able to understand how / if possible...

Basically, all along of a wide catalogue, there are a lot of situations with lines of text like this:

CF2 = Double caramel icing

and I want to look for this string and apply a character style to just the "CF2" who will be "BOLD".

Is this possible?

Thank you!

Andrew

Search

\bCF2 (? == double caramel icing)

Put your character style "BOLD" in the field of formatting to replace.

Change all.

Tags: InDesign

Similar Questions

  • Grep help to apply the character style

    I could use help to refine the expression grep ((Figure|)) Table | Graph)\s\d+\.\d+) below to include Figure | Table | Graphic that have a two digits after the decimal point.

    for example below works on "Figure 1.9" but not for 'Figure 1.10 '.

    In addition, the expressions shown in the image below could be written to include the pural of each word, if there is a reference to a series? the list below

    • Figure 1.9 and 1.10
    • Tables 2.3 to 2.7
    • Chart 3.4, 3.6 - 3.8 and 3.11

    grep help.jpg

    OK, the forum has excluded the \s in the expressionand put in a space.

    (Figure |) Table | Graph)s*\s\d+\.\d+ will find as well singular and the plural of all three options.

  • [AS] [CS3] script find/repalace with style groups

    Hello world

    I've been struggling with this problem for a while and hope someone can enlighten us.

    I'm trying to use applescript to run a series of queries to search and replace.

    For example:

    Tell application "Adobe InDesign CS3"
    paragraph style applied to find the value of "Text" text preferences
    font style to find value text preferences 'italic book '.
    style character applied to change the value text preferences 'italic book '.
    tell document 1
    change the text
    tell the end
    tell the end

    This works great except if the document contains styles within groups of styles, in which case, I get an error saying

    "Adobe InDesign CS3 has been an error: invalid value for the set of"applied paragraph style"property."

    String, style section or anything, but received the "text". »

    If you do the find/replace manually, the paragraph style text (hand) indicating that the text is inside the hand of the style group.

    How can I specify it in the script?

    Thank you!

    InDesign is forgiving if you specify your style just in name, but in the case of groups of styles, be more specific.

    Tell application "Adobe InDesign CS4"

    -paragraph style applied to find the value of "Text" text preferences

    the value applied paragraph style to find text preferences for the paragraph style "Text" of the paragraph style group 'Hand' of the active document

    end say

    Dirk
  • Automate the character styles?

    Tuesday morning, I sit and one hundred and fifty summer events to pop in a leaflet. Choice is easy - I can print them and type them. In the shower, however, I started thinking about choice B, and I don't know if InDesign can do what I want.

    I have control over the database where they are hosted, and it is quite easy for me to pop in the format

    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    Date - time [CR]
    Name of the event
    ~~~~~~~~~~~~~
    Date - time [CR]
    Name of the event
    ~~~~~~~~~~~~~
    Date - time [CR]
    Name of the event
    ~~~~~~~~~~~~~

    What is all the information I need on this document. On the finished product, I'll Date and time to have character styles applied (for color and weight). It is not difficult for me to assign keys quick access to styles of character and to make this hand - twenty minutes of boredom.

    But!

    Could format that

    (where the symbols are just unique symbols)

    ~~~~~~~~~~~~~
    ªDate - ∞ £ time [CR]
    Name of the event
    ~~~~~~~~~~~~~

    and then use a find/replace to tell InDesign

    -in the case of 'ª... ". ∞ ", apply the style of character 'Style of Date'

    -in the case of "£...", apply the style of character 'Time style' "

    and then go through and remove all instances of ª ∞, £ and

    ?

    (Additional spaces applied for ease of reading)

    Or, if I'm imagining this wrong, is there another way I can format the original data to automate the application of styles?

    Even I don't think that you would need to grep for that.

    I would create two paragraph styles, one for the date and time with the following style being the name of the event and the name of the event, including the next style time.

    Then create a character for the time style and have the paragraph style base for date/time, or just for the date of the formatting you want.

    The style of time date would have a style nested with none by the hyphen and the time until the end of the paragraph.

    Place the text and then select everything from him and in paragraph styles, right panel click on time and in the context menu, choose apply date/time and following.

    Who must fully put in shape all your text.

    Bob

  • Table of contents, problems in applying the character style

    Hi all

    This is my first post, I checked if there was already something similar, but I can't find anything so I'm asking here.

    I work with Indesign 9.3 and I created a book of 80 pages and there are 20 + chapters.

    I wanted to create a table of contents, so I made an and I put my paragraph for her style, but I had problems to set the character style (he set only to the number of the page, but not to the number and the name of the chapter).

    When I create my summary style I have no problem to indicate the paragraph style that you want to use (and then it automatically applies it properly when I generate my list).

    The problem I want to solve, is that I need that my table of contents automatically the value of the character style, cause, for the moment, I have to apply it after its generation.

    Sorry for my bad English, I hope you understood

    Concerning

    Filippo

    In this case you must use the character for numers style nested within the paragraph style

    I'm usually two independent sparagraph styles (primary materials) chapters and sections (toc details). In this way, you can add a different same nested character style to stand them.

    Addibn later - style, it is not good idea. After the update of the table of contents, you have lost the

    macpawel

  • CS5: Hyperlink to anchor text in the character style?

    Is it possible to script the following:

    A text has several occurrences of the same string, for example "A10". One is marked with a character style "Anchor" and others are marked by a character style "link." The idea is to create anchors text style "Anchor" then find all occurrences of the character 'Link' style and create a hyperlink to the corresponding anchor.

    I managed to find a script that creates a character style "Anchor" text anchors Can anyone offer suggestions on how to make script creating the links?

    Written by Kasyan Servetsky

    March 13, 2011

    // http://www.Kasyan.HO.com.UA

    / / e-mail: [email protected]

    //======================================================================================== =================================

    If (app.documents.length == 0) ErrorExit ("Please open a document and try again.");

    const gScriptName = "create anchor text."

    const gScriptVersion = "1.0";

    gDoc var = app.activeDocument;

    If (! gDoc.characterStyles.item("Anchor").isValid) ErrorExit ("Character style \"Anchor\"n'existe No.");

    CreateDestinations();

    //======================================================== FUNCTIONS  =====================================================

    function CreateDestinations() {}

    app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

    app.findGrepPreferences.findWhat = '. '. + » ;

    app.findGrepPreferences.appliedCharacterStyle = gDoc.characterStyles.item ("Anchor");

    var found = gDoc.findGrep ();

    var destCounter = 0;

    for (var j = finds.length - 1; j > = 0; j-) {}

    var found = found [j];

    try {}

    If (! gDoc.hyperlinkTextDestinations.itemByName (found.contents) .isValid) {}

    var hypTextDest = gDoc.hyperlinkTextDestinations.add (found);

    hypTextDest.name = found.contents;

    destCounter ++;

    }

    }

    {catch (e)}

    }

    If (destCounter == 0) {}

    Alert ("no anchor text were created.", gScriptName + "-" + gScriptVersion);

    }

    Else if (destCounter == 1) {}

    Alert ("a text anchor is created.", gScriptName + "-" + gScriptVersion);

    }

    ElseIf (destCounter > 1) {}

    Alert (destCounter "text anchors have been created.", gScriptName + "-" + gScriptVersion);

    }

    }

    //---------------------------------------------------------------------------------------- ----------------------------------------------------------------

    function ErrorExit (error, icon) {}

    warning (error, gScriptName + "-" + gScriptVersion, icon);

    Exit();

    }

    //---------------------------------------------------------------------------------------- ----------------------------------------------------------------

    Hello

    The path is:

    create a hyperlinkTextDestination;

    create a hyperlinkTextSources;

    Create hyperlinks using a single destination and sources;

    so:

    // to create hyperlinks alike:    one destination==>many sources
    // destination is the 1st occurrence of text with charStyle "anchor" applied
    // sources are each occurrences of text with charStyle "link" applied
    
    var mDoc = app.activeDocument;
    
    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    app.findTextPreferences.appliedCharacterStyle = mDoc.characterStyles.item("anchor");
    
    var
         mAnchor = mDoc.findText()[0],
         mDest;
    
    if (mAnchor) mDest = mDoc.hyperlinkTextDestinations.add(mAnchor,{name: mAnchor.words[0].contents});
    else {alert ("no anchor found"); exit(); }
    
    app.findTextPreferences.appliedCharacterStyle = mDoc.characterStyles.item("link");
    
    var
         mSource = mDoc.findText(),
         len = mSource.length,
         currSource, currHyper;
    
    if (!len) {alert ("no link found"); exit(); }
    
    while (len-->0) {
         currSource = mDoc.hyperlinkTextSources.add(mSource[len],{name: "sourceLink_" + len});
         currHyper = mDoc.hyperlinks.add(currSource, mDest, {name: "mHyperlink_" + mDest.name + "_" + len});
         }
    
    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    

    Jarek

  • Apply the character style to the part of the paragraph

    I am inserting text in a block of text with the following code:

    story.insertionPoints [-1] .silence += pgfStr;

    story.insertionPoints [-1] .silence += "\t";

    story.insertionPoints [-1] .silence += refStr;

    story.insertionPoints [-1] .silence += "\r";

    I want to apply the character style to all of the text in refStr (only the part of this paragraph). I know how the syling paragraph applies to the entire paragraph, but not a character style. I should be grateful if you would help. Thank you!

    Hello

    Dan - BTP says:

    ... the size in points and attack can be different on each page...

    You are able to find a rule of these differences?

    ...

    What do depends on what type of rule could be defined

    ...

    The size of reference point that is 1.5 PT lower than the point size of the paragraph, whatever.

    Close to the end of the script, you can code for example:

         //     Your target is "reference" which is a text inbetween tabulator and end of story (or other criteria).
         //     So you could define:
    app.findGrepPreferences = null;      // just for clear it
    app.findGrepPreferences.findWhat = "(?<=\\t).+\\s\\Z";     //     to catch text following tab in last para of story
         //     and after:
    mFound = app.activeDocument.findGrep();
         //     so all desired text objects are in an array "mFound".
         //     you could iterate (backward) through it:
    len = mFound.length;
    while (len-->0)      //     ">0" in case of nothing found
         mFound[len].pointSize -= 1.5;
    
         //     whatever that is - is 1.5 smaller
    

    Jarek

  • Selection of parts and columns, or entire lines and apply the character style

    I am trying to apply character styles to certain parts/whole rows and columns.

    I can change individual cells with the following code...

    table = app.selection[0];
    if (table.hasOwnProperty("baseline")) table = table.parent;
    if (table instanceof Cell) table = table.parent;
    if (table instanceof Column) table = table.parent;
    if (table instanceof Row) table = table.parent;
    if (table instanceof Table)
    
    {
     table.rows[0].cells[6].texts[0].appliedCharacterStyle = "none report";
     }
    

    ... but when I try to select an entire line, I get the error 'Object does not support property or method' texts. "" "When I try one of the following two codes.

    {
     table.rows[0].cells.texts.appliedCharacterStyle = "none report";
     }
    

    {
     table.rows[0].cells.appliedCharacterStyle = "none report";
     }
    

    Anyone know how I can do the following?

    1. Select any row (or column) and apply the character style

    2. Select the last line (regardless of the number of rows in the table) and apply the character style

    3. apply the character style to specific columns (with theexception of the cells of two albums)

    Thank you!

    Hello

    Change this line:

    table.columns[a].cells.itemByRange(2,-1).texts.everyItem().appliedCharacterStyle = "chart orange";
    

    for the first 2 rows in each column

    Jarek

  • Apply the character Style to a few characters in a paragraph

    Hey,.

    Me again - I feel like I'm dumber than a shoe trying to script InDesign

    I have a block of text with several paragraphs, which I am adding one by one.

    When adding these paragraphs, sometimes I need to apply a character style to some of the characters in the paragraph (I have the clues start and end of these characters to the text of the paragraph).

    Using the Guide of the script and the object reference, I cooked up this code below, but not only it doesn't seem to find the character style, she also told me the. itemByRange() is not a function...

    What's wrong?

    var line_styles = [{
        'start': 22,
        'end': 33,
        'style': 'Price - SKU'
    }];
    
    frame.contents += "\r" + line_text;
    frame.parentStory.paragraphs[-1].applyParagraphStyle(style);
    
    for ( var j = 0, k = line_styles.length; j < k; j++ ) {
        var char_style = doc.characterStyles.item(line_styles[j].style);
        frame.parentStory.paragraphs[-1].itemByRange(
            line_styles[j].start,
            line_styles[j].end
        ).applyCharacterStyle(char_style, true);
    }
    

    frame.parentStory.paragraphs[-1].itemByRange(...

    does not compute. "paragraphs [-1]" points to a single paragraph and is not an itemByRange method. You must think of sth like

    frame.parentStory.paragraphs[-1].characters.itemByRange(...

    (Have you used another programming language Javascript front?) A matter of concern for the future: pay attention to your statements 'var '. They do not follow the block scope, as they do in other languages, and therefore persisted in this notation is very likely to bite you back somewhere in the future. Summer, done this, released as well the hair).

  • I installed the latest update of Windows. All updates. However, I find myself with the yellow warning icon in the bar of tasks and install when closing down.

    Description of the problem: a few days ago I installed the latest update of Windows. All updates, or so I think by the Windows Update Web page telling me so. However I find myself with the yellow warning icon telling me the KB2729450 update is ready on my computer and needs installation. However, the web page says that it successfully installed. I see the update in Add/REMOVE programs. I've deleted and reinstalled but still have the icon telling me to install it. Even when you turn off the computer the message is for me to install, but I think that it has already installed successfully. How can I get rid of these warnings?
    Operating system: Windows XP

    Hi depreciated,

    Thanks for posting in the Microsoft community!

    If I understand correctly, you receive a warning to install the update, even if it has already been installed. I'll try to help you the question.

    (1) did you make any changes before the show?

    The update that you are warned with seems to be question of the .net framework. I have you provided the link that will repair your .net framework.

    Microsoft .NET Framework repair tool

    http://www.Microsoft.com/en-US/Download/details.aspx?ID=30135

    Note: after using the .net Framework cleanup tool, please install all .net Framework components.

    Let us know the status of the issue. I will be happy to provide you with the additional options that you can use to get the problem resolved.

  • Help with the new Style of Table set in shape?

    I'm having all sorts of problems using the new table style trainer.  I'm not a RoboHelpHTML 8 experts (I better with version 5).  I am trying to create a table with 3 columns, of which the first is aligned to the left, the last 2 are centered.  The header (rank 1) is bold and centered.  Also I want all lines of the same thickness.  I created the table using the standard SimpleGridBlack... Image2.jpg It is actually a line at the top... don't know what happened.  Then I ran WebHelp and the situation was identical to one here.  Then I duplicated the SimpleGridBlack and apply the new style to the table.  Then I started to make changes to the new style.  I chose the first line and made all columns centered and in bold. Image4a.jpg Because I want the columns 2 and 3 to be centered, I then selected columns even for change. Image5a.jpg He took care of column 2.  Then, I chose the last column of change. Image6a.jpg He took care of column 3.  However, the results were not what I expected. Image10.jpg The upload does not quite show the image correctly.  The line under the "gg" is really there and the lines separating columns 1-2 and 2-3 in row 1 are really there.

    Image15.jpgHowever, the first line of column 3 is not centered and lines A-B-C, D-E-F, A-D-G and H-E-B are thicker than the other lines.

    I hope that someone can help you.  It took 2 days and get a website made available for my use to get to the point that I am now.  It is a document that I am out of this week and I have a lot of tables to change.  Thanks for any help.

    Virginia

    8 HR tables are boring to say the least.

    First your alignment problems, you should take a look in the HTML itself to ensure that it is properly applied. The amoun of timers told me to center text and align and the HTML behind comes usually do. To verify here quickly.

    Regarding the double lines that you seem to be around the table, this may help, but I'm not sure that using your styles around them now.

    If you select the table as a whole, right-click right table properties > tab Table > table borders > turn off all borders of the table. Then go to this tab Table > cell borders > set the thickness to be used here, this applies to all round and will give you the lines you want.

    Good luck.

  • I have toshiba laptop and I have the product key and I do not know what windows is I can find it with the product key

    I have toshiba laptop and I have the product key and I do not know what windows is I can find it with the product key or any body help, I can't use it

    You must order a set of recovery disc for the computer from the manufacturer - this will install the appropriate drivers for your system automatically, as well as packaged applications.

    If you have not formatted the disk (or replaced) existing partition recovery may still be present - see your manual for details.

    It is possible to download Vista - see here for more details - http://www.heidoc.net/joomla/technology-science/microsoft/57-windows-vista-direct-download-links -, but note that it is not a simple process!

  • "Can not open AsIO.sys (2)" I get this message when I log in after a reboot. I have search for the file, but can't find it with the research or the command prompt. What do do in this file, and can be created and put into the appropriate folder?

    "Can not open AsIO.sys (2)" I get this message when I log in after a reboot.  I have search for the file, but can't find it with the research or the command prompt.  What do do in this file, and can be created and put into the appropriate folder?

    Hi Jack,

    This driver belongs to AsIO.sys Asus Probe. Try to uninstall Asus Probe and if you need, install again. If this does not help, uninstall Asus Probe and other tools of control such as Speedfan. Open the registry (regedit.exe) editor and search for AsIO.sys and remove all the entries that you can find.

    André
    "A programmer is just a tool that converts the caffeine in code" Deputy CLIP - http://www.winvistaside.de/

  • How can I set small caps in the character style

    I use the opportunity that you people are online:

    I'm trying to define small caps in the character style and it does not work,

    It works in the paragraph style, why is this? and is it possible around it?

    I can see the option in the character Styles: isn't it of menu drop-down available in your dialog box?

  • We have 4 CS3 design facilities std and 3 sets of CS3 and a connector series CS4. The downgrade (d) CS3 serial was lost with the crash of the PC on which it was installed. How to receive a new donwgraded CS4 CS3 serial?

    We have 4 CS3 design facilities std and 3 sets of CS3 and a connector series CS4. The downgrade (d) CS3 serial was lost with the crash of the PC on which it was installed. How to receive a new donwgraded CS4 CS3 serial?

    The PC is an installation of Windows 7 Professional 64 b NL.

    Hi,

    The downgrade isn't possible for customers Volume of the former traditional products... license for individual buyers.

    Kind regards

    Sheena

Maybe you are looking for