Add numbers of sequential endnote using a character style

Hello

I wonder if anyone knows of a script that could insert numbers of endnote sequentially to each instance of a character style.

Our editing process, we use 'hard' note numbers that are based on numbers of items of the text. When the editing process is finished, we go through and manually change the sequential numbers. The endnote numbers have a special character style, so such a script would go to the first instance of this style of character, replace the characters by '1', then go to the next occurrence of the character style and replace the characters by '2' and so on.

Any help would be appreciated.

Alicia Dole

A standard operation. In the third line, replace "number of hard endnote" with the name of the character style that you use for notes end.

app.findGrepPreferences = null;
app.findGrepPreferences.findWhat = '\\d+';
app.findGrepPreferences.appliedCharacterStyle = 'Hard endnote number';
found = app.documents[0].findGrep();
for (i = found.length-1; i >= 0; i--) {
  found[i].contents = String (i+1);
}

Peter

Tags: InDesign

Similar Questions

  • Add a line as part of a character style in InDesign CS4

    Hi all

    I am new to InDesign and am in the process to design a 4-page newsletter inside IT Department of my company.

    Each page (A4) has 2 columns and contains one or more articles.

    I would like to create a character style to format the title of each article so that it stand out and include a line under the text.

    I took a look at in the underline options and almost found what need me except that I would like until the line is the same length as the column width and not the length of the text that she says. If I managed to get what I wanted by drawing a line; but is it possible to include this line in my style "section header" so I shouldn't draw every time?

    Or maybe there is an option to make the longer than the text underline, but I can't find it.

    Thanks in advance

    A paragraph NET is what you are looking for.

    Bob

  • Is it possible to add pictures to the collection used in Photomerge Style Match?

    When using the menu: enhance-> Photomerge® Style Match, there will be six images to choose from. The path that is (Mac):

    / Applications/contents/resources/models/while this menu is only available in Expert mode, you find yourself in guided when you choose. I therefore assume that there is actually an Action or at least a script.

    Simply by adding an image wouldn't work, that I confirmed. Even reconstruct the MediaDatabase.db3 did not help. But there must be more than the simple jpeg that the application uses to accomplish the effect... or maybe not! ;-) All I want to know is if there is a way to add images to the list of choices.

    Thank you!

    What version of photoshop elements and mac os x are you using?

    Once your in the Style game screen you add pictures using the green button

    (the screenshot is Photoshop elements 12)

  • Use GREP to apply paragraph styles, character styles not only

    I have a body of text, and in it, I would like to apply a specific style to the paragraphs corresponding to a model. I did a GREP style that applied some changes formatting of paragraphs, I tried that it affects, but in doing so, I found that I couldn't Center these lines using a character style. (The corresponding lines should be centered, and the rest should be left aligned.)

    I was thrilled to learn that the GREP function, then completely disappointed with this limitation. InDesign offers the possibility to automate this, so I must not cross and Center each paragraph corresponding to the hand?

    Thank you!

    InDesign provides a way to automate this so?

    Yes and no. There is no dynamically linked paragraph styles to a paragraph about his boss, but he has at least two alternatives:

    (1) use Grep-F/C

    (2) use the script FindChangeByList or MultiFindChange which is basically automate operations F/C

    HTH

    Loïc

  • Character styles does not indent

    I tried to create a few simple lists of names with recessed contact information but the character Style I created does not want to add the dash that I specified in the details of the text. The original lines I've used has the dash, but I had to manually add the dash on others, designed with the same style.

    Short answer. Use a paragraph style.

    It is generally quite rare to use styles character to Muse. In the vast majority of cases you want consistent formatting of an entire paragraph, so a paragraph style is used. Character styles are for formatting a range of sub in a paragraph, usually for emphasis. However, on the web these ranges sup pointed out are almost always hyperlinks, so they are formatted with a style hyperlink rather than a character style. So in the end, paragraph styles are extremely common and useful, as are the hyperlink styles, but character styles are quite rare.

  • find character styles

    Hello

    How to find styles of characters via javascript

    search for text by using the character style, the code below will do...

    app.findGrepPreferences = app.changeGrepPreferences = null;

    app.findGrepPreferences.appliedCharacterStyle = "char_style"; name of style //character

    found = app.activeDocument.findGrep (true);

    for (i = 0; i< found.length;="">

    Found [i]. Select();

    }

    app.findGrepPreferences = app.changeGrepPreferences = null;

    Vandy

  • [JS] [CS3] Apply the character Style to the first word

    I'm a noob that Javascript is concerned, and I expected a little guidance.

    Here is my scenario: I have a book that was composed in a single file; the main content is in a story. I want to select the first word in each block of text on each page and apply a character style. My goal is to use this character style to indicate the page breaks in the XML document - I maps to a specific tag style.

    So far, I have this poor specimen:

    myDocument var = app.activeDocument;
    myPage var = myDocument.pages.item (1);
    var myTextFrame = myPage.textFrames.item (0);


    If (app.activeDocument.stories [0] .paragraphs [0] .words [0]! = null)
    myTextFrame.paragraphs.item (0).words.item (0) = .appliedCharacterStyle
    myDocument.characterStyles.item ('foo');

    I know, I did not implement any kind of loop again (which will be more complicated given that there will be some blank backs, etc.). What I try to do in this is to select the first word in the first paragraph on the second page - which it does in reality. It's the first paragraph of the second begins on the first page, so I select that word on the first page, second page.

    As I said, a lot of work to do but a bit of help on getting to the right word would be most appreciated.

    Well, you were on the right track, but the "myText" test fails if there is no block of text on a page, because it fails a line earlier

    > var myTextFrame = myPage.textFrames.item (0);

    just before that, you must test the number of blocks of text:

    If (myPage.textFrames.length > 0)

    {

    ... your stuff...

    }

    Use it only if you are absolutely positive that there is just a block of text on each page! A slightly better way would be to always loop on each textframe:

    for (frames = 0; frames

    {

    var myTextFrame = myPage.textFrames.item (frames);

    .. etc.
    }

    in this case you don't have test his first length (the loop will not be executed if there is zero text blocks).

    [Grumpy] Since you have only a continuous story, an even better way would be to loop on texts related to this single story executives. You must identify the story somehow, and I usually click on the text cursor in the one that I need:

    monarticle = app.selection [0] .parentStory;

    or you can rely on the fact that the story begins as part of text on page 1:

    monarticle = app.activeDocument.pages [0] .stories [0];

    (I think this should work.) Then, each frame of the story until the end can be found in the table

    myStory.textContainers

    which are usually text blocks. Make a loop on them to help

    for (image = 0; frame)

    {

    myTextFrame = myStory.textContainers [frame];

    .. etc.

    }

  • background color in the character Style

    Hello

    Can I add padding and background color in a character Style?

    Thank you

    Not both.

    Is the common trick to add a background color to the underline for a very thick line (about the width of your leader) and the appropriate color and set the offset to move "up" behind the text (the default is to descend to the base of his thick line).

    You can not add padding left and right in a character style, you need to add some spaces (thin, or what you need) by hand.

  • The batch numbers in sequential order on my pictures to show and sell on the web.

    The batch numbers in sequential order on my pictures to show and sell on the web.

    Is there an easier way to do it? I have to manually type in each issue of the photo, and I have hundreds of them to publish.

    You can see on my site.  www.SAP.net.nz this will give you a better example of what I'm doing.

    The batch numbers in sequential order on my pictures to show and sell on the web.

    Is there an easier way to do it? I have to manually type in each issue of the photo, and I have hundreds of them to publish.

    You can see on my site.  www.SAP.net.nz this will give you a better example of what I'm doing.

    =====================================
    I noticed your site file names are not the same
    numbers on the pictures but if the names
    photos were the same numbers you wanted
    Add to the face of each photo... the freeware FastStone
    Image Viewer can do and it can omit the file
    extension.

    IOW... If you had the following file names:

    123.Le jpg
    124 jpg
    125 jpg

    FastStone could add 123, 124, 125... in the face of
    a photo of selected group in a batch.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    FastStone Image Viewer
    http://www.FastStone.org/FSViewerDetail.htm

    Add file names:

    I suggest that you create a new folder and add
    copies of your photos for experimental purposes.
    If you are unhappy with the result your originals
    will be intact.

    How to:

    "Basic steps to add text to the image files.
    using Fast Stone Image Viewer"

    Tools / open the Batch Conversion / tab Batch convert...

    Check the box... Use of advanced options...

    Advanced Options button / tab text.
    Check the box... Add text...

    Open the window drop... "Insert a Variable."
    choose... The file name / no Extension... Ok...

    Add the files you want to add...

    Choose an output Format...

    Choose an output folder...

    Click on the button convert...

    (You will need to experiment with the position and the police
    size and color to get the desired result.)

    Volunteer - MS - MVP - Digital Media Experience J - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • VBScript to add numbers of

    I'm looking to write a basic script which will add numbers from 1 to 10.  The script must define a one-dimensional array to store numbers, use a loop to assign (= Bank) values in each element of the array and must use a loop for each next sum.

    Any ideas?

    Hello

    Its a very simple script to write... is this for an assignment or something? huh? huh?. However his is not the right place for your thread. Please post your comment here - http://social.technet.microsoft.com/Forums/en/ITCG/threads/

  • How to use paragraph and character styles properly?

    I have a document in which the text has two colors (which has no style)

    Black (normal) and Red (to highlight the keywords).

    I needed to put these 2 in a style

    (black) paragraph style

    (red) character style

    Here's my question.

    How can I make sure that when I use the paragraph style, she also uses the style of character but only on the Red words?

    While I need not find/replace every word manually

    I want to do at once.

    If you want to add styles to a document already created:

    (1) create your character style that contains only the color of the characters

    (2) search and replace a text with red color search and replace with the new character style formatting. (Do not type anything in the text portion of the find and Replace dialog box)

    (3) create and apply your paragraph style to all. The text with the applied character Style will stay red.

  • A character style that puts in shape all negative numbers (-10) with red color

    How to set a character style that formats all negative numbers (-10) with red (a predefined text style)?

    I guess that I should be using GREP, but it's kind again for me and I can't find an answer to this on google.

    -\d+?,\d+?\%|-\d+?

    seems to work

    GREP is synonymous with General Regular Expression Parser - large print receive codes and you insert the code to highlight the characters you want to

    In the that I provided above is probably not the nicest way to do it, but I'll break it

    -= minus sign

    \d = any digit

    + = Continue until there are no more numbers

    ? = off at the end of a group of numbers

    This means find any number within a group of numbers

    just means a comma

    and yet once I wanted to find any group of numbers with \d+?

    % means with a percentage at the end sign

    -\d+?,\d+?\% means find: sign, followed by a group of digits followed by a comma followed of another group of numbers followed by the percent sign.

    | [vertical] means OR

    -\d+? would be to find a

    -

    Group of figures

    -\d+?,\d+?\%|-\d+?

    All means find any group of numbers separated by a comma with a sign of percentage at the end OR a sign less with a group of figures.

  • Best way to add numbers or available several pages

    I have a ticket that needs to be numbered. It is small enough to mount 5 on a sheet of 8.5 x 11.

    Each ticket must be numbered.

    I can do a master page and adds all the numbers in this way and then make a pdf.

    What is the best way to get the numbers on tickets that are printing 5 up on a sheet and I can print via a copier?

    There are several ways to do this:

    1. create single page tickets, numbered by car and use institution the Copier feature (if available and access to the)

    2. use the data with the numbered list merge and produce several cliché recording to create a 5 - up document

    3 create a 5 - model up with block of text frames for import of numbering, a numbered list that flows into the document

  • That part of my character style will apply when it is used in a number format.

    I created a NOTE: format. I used a numbering format to create it in the balls and the section number of the paragraph styles dialog box as follows:

    Type from the list: Numbers of

    Format: None

    Number:   NOTE: ^ t

    Character style: My Style of special character

    And here's my character style:
    Stress: WE
    Weight: 15 pt
    Offset:-4
    Color: Black
    Tint: 20%
    And here's the problem:
    Underscore does not show upward when the character style is used since then in the bullets and numbering section of the paragraph style. I can apply the character to plain old text and t style will work fine. But the part of the character style does not appear upward when it is referenced on the bullets and numbers of the screen. Curiously, bar has the same problem. The rest of my work of style attributes (font, color, etc.) of fine character. But underscore does not apply.
    Any ideas as to why?
    Screen shot 2010-03-24 at 2.42.42 PM.png

    Kelly Vaughn wrote:

    I created a NOTE: format. I used a numbering format to create it in the balls and the section number of the paragraph styles dialog box as follows:

    Type from the list: Numbers of

    Format: None

    Number:   NOTE: ^ t

    Character style: My Style of special character

    And here's my character style:
    Stress: WE
    Weight: 15 pt
    Offset:-4
    Color: Black
    Tint: 20%
    And here's the problem:
    Underscore does not show upward when the character style is used since then in the bullets and numbering section of the paragraph style. I can apply the character to plain old text and t style will work fine. But the part of the character style does not appear upward when it is referenced on the bullets and numbers of the screen. Curiously, bar has the same problem. The rest of my work of style attributes (font, color, etc.) of fine character. But underscore does not apply.
    Any ideas as to why?

    In my view, it is a bug known; Notes does not work in this situation, although other attributes of text, such as "BOLD", color, italic, do.

    This forum and Google search terms as to highlight auto-numbering indesign paragraph style to see some beyond the discussions on this topic.

    HTH

    Kind regards

    Peter

    _______________________

    Peter gold

    Know-how ProServices

  • Add a suffix to all of paragraph and character styles.

    As the title suggests, first of all I would like to add a suffix to all of paragraph and character styles:

    Title 1 = position 1_p

    Bold_p = "BOLD"

    Also, if possible, replace the space with an underscore:

    Title 1 = Heading_1_p

    Chapter No. 1 = Chapter_Heading 1_p

    You're not sure if this need of a script or two?

    Any help would be fantastic.

    See you soon

    Or use code below to replace all spaces with "_".

    For the paragraph Styles:

    myStyles = myDoc.paragraphStyles;

    for (oneStyle = 2; oneStyle)<>

    {

    myStyles [oneStyle] .name = myStyles [oneStyle].name.replace (/ / g, '_') + "_p";

    }

    For character Styles:

    var mycStyleslen = myDoc.characterStyles.length;

    for (a = 1;

    {

    myDoc.characterStyles [a] .name = myDoc.characterStyles [a].name.replace (/ / g, '_') + "_p";

    }

    Shonky

Maybe you are looking for

  • DeskJet 3835: Scanning Doc feeder does not

    Hi, I recently bought the above printer, abd despite it saying "automatic document feeder" on the box, when I try to scan a document, it scans only on self by dish/glass but usually feed the document in. It's very frustrating because I sometimes larg

  • Probs to install printer Lexmark X 5250

    I just bought the laptop HP G70 - 257CL Vista 32 System.  I try to install the lexmark X 5250 all about a USB printer.  I used the original installation disc supplied with the printer - installed information but I was not able to print - I have not y

  • Satellite Pro M70: How to use Bluetooth?

    the dose M70 [PSM75E-009004EN] have built in bluetooth. If it dose how do you use it... because his got the bluetooth options. his confused me! Thank you

  • Photosmart Premium C410a: Photosmart C410a does no copies.

    My printer has stopped making copies of hard documents placed on the printer screen.  It still prints from my computer.

  • Stereo does not read the Sansa Clip after firmware update

    Hello I upgraded to the last 2.01.35a of the previous 32. Before that, my channel stereo would connect to the Clip and play songs using the USB connection, I can use the remote to change songs, now with the new update of the firmware it does not read