Index Markers

I don't see anything in the object model for getting the index markers in a document. True?
Many thanks,
Ken

You want Topic.pageReferences.
Harbs
http://www.in-tools.com
Innovations in Automation

Similar Messages

  • How can I assign index markers to a list of names coming from Excel

    I have to build up indexes on directories. The list of names comes from Microsoft Excel and is saved as a text file. I need to assign index markers to the list (sometimes up to 2000 names) so I can build up an index after the layout is done.

    Indesign cs6
    On Thu, Feb 19, 2015 at 11:07 AM, John T Smith <[email protected]>

  • Problem with index markers and importing MS Word 2007 files

    This was ugly in that it wasn't caught until after a book had been typeset and the index was being finalized. I'm now having to go back and manually insert a zillion index markers. Not fun.
    This was my first project since migrating from FM 7.1 to FM9.0.3.
    Source documents are Microsoft Word 2007. Am working in Microsoft Windows 7 64-bit.
    When the Word files were imported into FrameMaker, only SOME of the index markers were imported. The difference between those that were imported and those that weren't was seemingly random.
    I did some testing and found the problem and a solution.
    Looking at the source Word .docx file, and displaying hidden text shows two types of index markers:
    1. { XE "word to be indexed"}
    2. {xe "word to be indexed"}
    Note the difference in case and the extra space after the opening brace in #1. Markers of type 1 were imported fine. Markers of type 2 were stripped by the import process.
    The solution:
    Backsave the Word file to Word 2003 format (.doc) before importing into FrameMaker.
    I backsaved to Word 2003 and imported using both the "Microsoft Word" and "Microsoft Word 2007" filters and both filters imported correctly. It's only when trying to import a Word 2007 .docx file directly that things run amok.
    Grr...

    Thank you for posting your solution, Dan. It's cold comfort, but I've also ran into this issue in the past, almost certainly well before Word2003 though, probably as far back as Word2000 or earlier.
    In your testing, did you try saving as RTF to see if the markers were homogenized, by any chance? In my simple testing just now, Word itself recognized the index field correctly no matter whether I changed the field to "xe" or "XE", but FM's import of the .docx file format wouldn't recognize "xe", only "XE". But importing an RTF file handled both upper- and lower-case entries.
    Ah, yes, that's it -- saving the Word2007 file as RTF (with 2 fields, one caps, one lower-case) changed cap field to lower-case when the RTF is opened in Word again, so saving as RTF does homogenize the fields to lower-case. Is it possible that your file(s) were changed to or saved as RTF at any point in their life-cycle? I believe some older versions of Word were actually RTF under the hood, too -- if you do Save As in Word2007 you can scroll through the File Type entries and see "Word 97-2002 & 6.0/95 - RTF (*.doc)"  I believe some doc management systems change binaries to RTF too, or conversely some apps create RTF but they name the files as doc.
    So Word itself recognizes either lower- or upper-case, and FM's RTF import handles both, but not the .docx import.
    Sheila

  • Problem with index markers

    My index markers are not recognizing page ranges when using the "to next use of style" in one of my book documents but works in all the other documents. I tried to export as IDML but it didn't fix the problem. I do notice that the marker looks different in the story editor from the ones in the other documents. I tried to delete the marker and reindex but the it didn't fix the problem and the marker still looks different.

    Thank you for posting your solution, Dan. It's cold comfort, but I've also ran into this issue in the past, almost certainly well before Word2003 though, probably as far back as Word2000 or earlier.
    In your testing, did you try saving as RTF to see if the markers were homogenized, by any chance? In my simple testing just now, Word itself recognized the index field correctly no matter whether I changed the field to "xe" or "XE", but FM's import of the .docx file format wouldn't recognize "xe", only "XE". But importing an RTF file handled both upper- and lower-case entries.
    Ah, yes, that's it -- saving the Word2007 file as RTF (with 2 fields, one caps, one lower-case) changed cap field to lower-case when the RTF is opened in Word again, so saving as RTF does homogenize the fields to lower-case. Is it possible that your file(s) were changed to or saved as RTF at any point in their life-cycle? I believe some older versions of Word were actually RTF under the hood, too -- if you do Save As in Word2007 you can scroll through the File Type entries and see "Word 97-2002 & 6.0/95 - RTF (*.doc)"  I believe some doc management systems change binaries to RTF too, or conversely some apps create RTF but they name the files as doc.
    So Word itself recognizes either lower- or upper-case, and FM's RTF import handles both, but not the .docx import.
    Sheila

  • PDFMaker 9 adding bookmarks to Word index markers

    Hi folks,
    I recently updated to Acrobat 9.5.1 and am seeing an odd, annoying problem. I use Microsoft Word 2007 to create a document with a non-standard heading style called "Message Bar." When I make my PDF, I ask PDFMaker to create a Level 3 bookmark for this style. This has worked well, without a hitch for several years.
    In recent document updates, however, PDFMaker appears to be picking up the index marker that sits next to the Message Bar heading and creating a separate bookmark. Curiously enough, it also adds consecutive numbering at the front of the bookmark, so that the first "index bookmark" is 1b<Message>, the second is 2b<DifferentMessage> and so on, through the document (and there are close to 1000 of these messages). After doing that, the normal bookmarks for this style are also listed. Both bookmarks point to the same (correct) location in the PDF doc.
    In the PDF preferences, the only headings/styles checked for bookmarks are Heading 1, Heading 2 and Message Bar.
    As a quick workaround, I deleted all the "index bookmarks" in Acrobat Pro and moved the standard bookmarks (with no extraneous numbering) into the proper place. As we update the doc and PDF every couple of months, I hope I won't have to do this forever. Nor am I keen to move my index markers to another line (or style).
    Is this a bug? Has anyone else seen something like this? Google didn't turn anything up. Appreciate any advice.

    Thanks Bill, yes I've created an index in Word but the links don't convert as they do for a table of contents.
    In PDFmaker, enabling Create Bookmarks, Add Links, Convert cross-references, Convert footnotes, Enable advanced tagging, and all options on the Bookmarks tab doesn't have any effect.
    Word doesn't build an index in quite the same way as a ToC (in Word itself the index entries aren't bookmarked) so I'm a bit pessimistic about this feature being in PDFMaker but it'd be nice if someone could confirm this. I've only tested in Word 2003 but I doubt 2007 works differently.

  • How I generate index markers using Applescript and tagged text!

    One of the challenges I've faced in automating the book making process using Applescript with inDesign is that there don't seem to be any AS commands for making new index markers (anyone please correct me I if I'm wrong about this).
    I've tried various js scripts which do an OK job, but they don't make the actual native markers. This means you have to wait until the book (consistiing of multiple ID files) is complete (so that all the page numbers have been established) to generate the index.
    Recently, I read a tweet from someone with a link to a technique which uses tagged text and find and replace with GREP to edit the tags, inserting the tagged text index tags in the text file and then re-placing the text file in the ID page. In itself, this works great. But I'm dealing with literally thousands of separate text frames, none of them connected in a story.
    The books typically consist of around 1200 pages with almost that many people, each of whose names I need to index with "Lastname, Firstname" references. And those particular strings don't (can't) appear anywhere on the pages. There will also be about 50 ID files all combined into one book. So it is imperative that I have ID generate the native index markers. To help keep things straight and efficient, I'm creating separate small text frames to hold the lastname, firstname strings. I created an object style for these frames which sets the attributes to "nonprinting", and I place the frames in the margin.
    Then I realized that I don't actually have to have ID export the tagged text files for each. I exported one prototype and copied its tags to properties in my script, and then I concatenate them with the respective list item values I import from the database.
    At the proper point in the page building script, I tell "textwrangleer" to make a new document, set its contents to the index string for the current record, save it to disk, overwriting the previous one, and then tell ID to "place" it in the index text frame, which generates the ID index mark.
    I actually got an AS error when I first tried this: "file doesn't exist" or some such. Then I realized that the "place" command was happening too soon, so I inserted a .5 sec delay in the script, and it worked.
    This is actually my first major script for actual work, and I'm so excited about it! I promises to cut production time down to about a thenth of what it was.
    I still have to add some logic to branch between handlers with slightly different parameters for five different page formats, but the same page building handler will work on all of them.

    A note on this:
    Daniel Swanson wrote:
    I've tried various js scripts which do an OK job, but they don't make the actual native markers. This means you have to wait until the book (consistiing of multiple ID files) is complete (so that all the page numbers have been established) to generate the index.
    These scripts typically search for words and immediately write out the page numbers they are found on -- one shot indexing.
    The solution is to add both the topic and its page reference to the current document's index:
    if (app.activeDocument.indexes.length == 0)
        app.activeDocument.indexes.add();
    app.activeDocument.indexes[0].topics.add(app.selection[0].contents).pageReferences.add(app.selection[0]);
    The first lines only make sure there is an index to add to (per default, a new document has none).
    The last line adds a selected word to the index (it must be a plain text string, hence the use of its 'contents'), and then adds a reference to the selection in the text itself.
    Adding the same word a second time will for a change (quite untypically for ID's Scripting) not result in an error but simply add another page reference to the existing one.
    When doing this in a loop: remember to work backwards, because the index marker itself gets inserted into the running text, and that will throw off your text indices.

  • X-refs and index markers in absolute paths don't work

    A problem has arisen that did not exist before:
    If I have added files to a book using an absolute path, all X-refs and index markers in those files then don't work. The index *generates* without trouble, but if I then try to Alt-click an item in the index that refers back to a file with an absolute path I get the error "Cannot find the file named X. Make sure the file exists." This also means, of course, that the corresponding hyperlinks in a generated PDF file also don't work.
    X-refs and index markers in files added using *relative* paths work okay.
    What is wrong?
    (I use FM9 / Windows 7.)
    Regards,
    Knut Högvall

    Hi Michael,
    Yes, I use 9.0p255.
    No, the files don't have to be on different volumes. They can even be in the same folder (not that they are, but they *could* be; they are in fact in separate folders, but on the same volume). What matters is how I select the file in the File dialog box when I add the file to the book. To get an absolute link, I first click the Network button, select the top volume, and then navigate down to the file. The absolute path is displayed in the book window as \\<volume>\folder\file.fm" while a relative path is indicated by "..\..\file.fm".
    If I add a file using an absolute path it doesn't work; if I add the exact same file using a relative path, it works.
    How do I check the hypertext content in the index?
    Regards,
    - Knut

  • FM save as RTF -- how to keep index markers?

    I have to export an FM book with a comprehensive index (from index markers) to word-processor files for the author to update for a new edition. But when I open the RTF in Word, there are no index markers. Curiously, I've done this before, and can't recall having any difficulty. Am I missing something obvious?

    What's puzzling me is that I've done this before: I'm looking at Word documents from a book exported from FM with all the index markers present. I did this in February 2008, and can't remember that I'd had any problems doing it, so I assumed that it had been just a simple Save As.
    But now it seems I must've done it via some workaround. I agree that mif2go will probably do it, but I'm not keen to buy it for a one-off job: I haven't got mif2go, but I have got Ixgen (http://www.fsatools.com/), and one option that seems likely to work is to use Ixgen to expand index markers to text (with a specific character format); then save as RTF; then, in the word processor, convert that text to index markers.
    (It's a bit of a drag, but better than having to redo three indexes — subject, cases, statutes — when the edited docs come back to me.)
    Any better ideas?

  • [CS3] Search Index Markers

    Is there a way to search for index markers and then get the content from it to put it in a new created anchored inline textframe? I wan't to create side-heading like in Framemaker.

    Hi Peter,
    what a nice script!
    I have took the liberty of doing some modifications to take use of the conditional text feature in
    InDesign CS4. So one can make the previous index entries visible or not.
    Here it goes with the (new) function 'conditional_note()' instead of 'side_note()':
    // index2text.jsx
    // based on a script of Peter Kahrel, modified to take use of InDesign CS4 conditional text
    Object.prototype.get = function( )
       try {
          var myObject = this.item( arguments[0].name );
          myObject.name;
       catch (e) {
          var myObject = this.add( arguments[0] );
       return myObject;
    var myConditionSet = app.activeDocument.conditions.get( {name:'Index',  indicatorMethod:ConditionIndicatorMethod.USE_HIGHLIGHT} )
    index2text (app.activeDocument);
    //delete_index (app.activeDocument);
    myConditionSet.visible = false;
    function index2text (doc)
       var tops = doc.indexes[0].allTopics;
       for (var i = 0; i < tops.length; i++)
          for (var j = tops[i].pageReferences.length-1; j > -1; j--)
             var ip = tops[i].pageReferences[j].sourceText;
             var p_ref = topic_path (tops[i], tops[i].name);
             conditional_note (ip, p_ref)
    // create topic string. Subtopics are separated by '#'
    function topic_path (top, str)
       if (top.parent.constructor.name == 'Index')
          return str;
       else
          return topic_path (top.parent, top.parent.name + '#' + str)
    function delete_index (doc)
       // delete page references and topics
       doc.indexes[0].topics.everyItem().pageReferences.everyItem().remove();
       doc.indexes[0].topics.everyItem().remove();
    function conditional_note (ins_point, s)
       ins_point.appliedConditions = myConditionSet;
       ins_point.contents = s;
    function side_note (ins_point, s)
       var sidebar = ins_point.textFrames.add ();
       sidebar.geometricBounds = [0,0,10,70];
       sidebar.appliedObjectStyle = app.activeDocument.objectStyles.get( { name:'sidebar' } );
       sidebar.itemLayer = app.activeDocument.layers.get( { name:'sidebar' } );
       sidebar.contents = s;
       sidebar.fit (FitOptions.frameToContent);
    Thanks
    Martin Fischer

  • Is there a script that will generate Index Markers based on Notes?

    I need a way to generate index markers/entries within InDesign based on content that has been added in InCopy. I need this becasue InCopy users can't add Index Markers. One type of content they can add is Notes. Can I use these to generate index markers?
    N.b. I have figured a way for InCopy users to add character styles to words I can then generate a simple keyword index based on these. However I now need to be able to cater for sub level topics, cross references to other topics in the index and equivalent terms, and the character style method won't suffice.
    Any advice/tips on other methods to create indexes based on IC content would be useful.
    Thanks
    I'm using InCopy CS6 and InDesign CS6.

    Me again ;-)
    couldn't test with InCopy but I hope those lines will create a note if some text is selected. contents of the note = the selected text. create a shortcut to the script.
    #target InCopy
    try{
    currSel = app.selection[0];
    currContent = currSel.texts[0].contents;
    newNote = currSel.parentStory.notes.add(LocationOptions.BEFORE, currSel.insertionPoints[0]);
    newNote.texts[0].contents = currContent;
    }catch (e){
    alert(e)   
    changed the first script slightly. Note it's still just a example of how it could work:
    var currDoc = app.activeDocument,
    allStories = currDoc.stories,
    l = allStories.length;
    //checking for at least one existing index ...
    if(!currDoc.indexes[0].isValid){
            currDoc.indexes.add();
    while(l--){
    currStory = allStories[l];
    allNotes = currStory.notes;
    n = allNotes.length;
    while(n--){
    currNote = allNotes[n];
    noteContents = currNote.texts[0].contents
    //create the source
    currSource = currStory.characters.itemByRange(currNote.insertionPoints[0].index, currNote.insertionPoints[0].index + noteContents.length);
    currTopic = currDoc.indexes[0].topics.add(noteContents);
    //this is by default PageReferenceType.CURRENT_PAGE ... changes optionally
    currTopic.pageReferences.add(currSource)
    currDoc.indexes[0].update();
    currNote.remove();
    Hope it'll be of some help
    Hans-Gerd Claßen

  • Clipboard Preference: All information (Index Markers, Swatches, Styles, etc.)

    Where I work we paste text often from PDFs into InDesign. For the longest time, since CS2, we have had our InDesign's Paste Preferences set to "Text Only" instead of "All information (Index Markers, Swatches, Styles, etc.)"
    I am not sure why, but I think it was based on the fear of the unknown. Has anybody experiences any pitfalls with having "All information (Index Markers, Swatches, Styles, etc.)" checked?
    I notice it carries over RGB swatches, which is rather annoying because we don't want them. And this is what I don't understand…
    If I create an InDesign document and assign some copy a CMYK swatch, then export the PDF to X1-a, then open the PDF in Reader and paste this text into the same InDesign document, I will get a new RGB swatch that when switched/changed to CMYK has different C,M,Y,K values than the original CMYK swatch that I began with.
    Is there any way to retain the same swatch values through this process?

    You will notice that in the Text Properties for text selected in Acrobat it does not have a CMYK colour picker. It only has a RGB colour picker.
    That's why when you select text it copies it as RGB and not CMYK.
    The RGB is only for displaying onscreen, rest assure it does in fact keep the CMYK data safe, regardless of whether you include the profile or not in the PDF.
    It removes any swatches, any styles and anything else to make a basic "portable document format". Acrobat has no colour pallete for CMYK. So when you select the CMYK text in Acrobat, then Acrobat colour pallete itself converts those values to RGB. If you understand what I'm saying. So the CMYK data is still there, only Acrobat has no way for you to select that colour so it converts it to RGB in the Colour Pallete only.
    I'm not sure if I explained that very well?
    I usually leave on the option to retain all swatches, styles, etc. because I don't like having to apply bold, italic, swatch colours etc. to text. Hyperlinks come in as character styles and can be easily changed.
    I've not had any problems with it. There are times I do need to turn the option off - but that's why it's there, it's a preference, a choice, an option.

  • [FM11] Print Image Link and Index Markers with specific Character Style

    Hello,
    I'm new with scripting for Framemaker. I want to export FM docs to RTF so I can import these into InDesign. For the placed images I want to insert a text line that is showing the image link (reference). Besides that I want to show the Index Markers at the mark insertion position with a different Character Style. Can someone help me with that?
    Regards, Sjoerd

    Hello Sjoerd,
    One note about your method to retrieve all linked graphics: this will also process the graphics that might be linked into the master and reference pages. Just to be safe against unwanted side effects you should restrict your list of graphics to the ones in the main flow of your document.
    About the tLoc: you are really looking for the anchor of the anchored frame that contains graphic. It is a little confusing that FM calls both the anchored frame and the imported graphic by the same name. Even if you add an anchored frame to the text to put an equation or a text box in your document, the anchored frame will show up in the linked list of graphics in the document. If you do have an anchored frame containing an imported graphic file, you have a list of graphic objects inside the anchored frame, which itself appears in the list of graphic objects of the document.
    This function should do what you want to do:
    function ListGraphics(doc)
              var aframe = doc.FirstGraphicInDoc;
         while (aframe.ObjectValid()) {
             if (aframe.constructor.name == "AFrame") {
                                            graphic = aframe.FirstGraphicInFrame;
                 if ( graphic.type == Constants.FO_Inset )
                                                 doc.AddText ( aframe.TextLoc, graphic.InsetFile );
             aframe = aframe.NextGraphicInDoc;
    I assume you will also want to remove the anchored frames (the imported image files) from the text. This can be done in the same routine, but you must first catch the following element in the linked list of graphics in the doc before you can delete the current one. Otherwise you will only remove the first and end up with an invalid object. The easiest and safest method to do this is to create an array of elements to be deleted. After ending the while loop, you delete those objects. The full code looks like this:
    function ListGraphics(doc)
              var toDelete = [];
              var aframe = doc.FirstGraphicInDoc;
         while (aframe.ObjectValid()) {
             if (aframe.constructor.name == "AFrame") {
                                            graphic = aframe.FirstGraphicInFrame;
                                            if ( graphic.type == Constants.FO_Inset ) {
                                                           doc.AddText ( aframe.TextLoc, graphic.InsetFile );
                                                           toDelete.push ( aframe );
           aframe = aframe.NextGraphicInDoc;
              for ( i = 0; i < toDelete.length; i++ ) {
                             toDelete[i].Delete();
    This works on a small test file I created. If you need more support, feel free to contact me: jang at jang dot nl

  • Can you import xml index markers into InDesign?

    My tech writer is putting index markers in the xml as he writes. Is there a way to import the xml and InDesign recognize the xml index markers?

    We are having the same issue and haven't been able to find a solution.  Ideally we would like to import the XML into an InDesign layout with XML markup that would be interpreted by InDesign as an index item and would then create the appropriate index term.  Does anyone know if this type of XML feature is supported?
    Thanks,

  • Converting FrameMaker Index Markers to LaTeX

    I would like to convert a 600-page FrameMaker 7.2 book to LaTeX.
    Converting the text from FrameMaker to LaTeX is not a problem.
    However, I am not sure how to preserve the index markers in the text. Any suggestions?

    If I understand what you're doing in this case, the script should be loading the converted part numbers into custom index markers for each specific product (or variant). The when you create the index, you specify which index marker to use (not just re-using the same generic index maker), i.e. have a different book file & corresponding index for each different product. This is much easier to control than trying any conditional approach for the index content.
    However, I do not understand how Index markers could in any way affect your Table of Contents. Could you please elaborate or provide an example.

  • Remove All InDex Markers in empty cells

    I have a doc with lots of tables & empty cells. Each empty cells have an index markers in it and I need to remove all of them.
    The find/change replacing  '^I' by '' (nothing) don’t remove them.
    Is their a way to remove all Index Markers via a script?
    Jean-Claude

    Can you send an example idml or inx?
    Otherwise perhaps you can try something like this:
    var aDoc = app.documents[0]; 
    var allTables = aDoc.stories.everyItem().tables.everyItem().getElements();
    app.findTextPreferences = app.changeTextPreferences = null;
    app.findTextPreferences.findWhat = "<FEFF>";
    app.changeTextPreferences.changeTo = "";
    aDoc.stories.everyItem().tables.everyItem().changeText();
    app.findTextPreferences = app.changeTextPreferences = null;
    alert("done");
    This is a part of a script written by Uwe Laubender. I think this could help you.

  • PM7 index markers recognized by InDesignCS3?

    InDesign CS3 v5.0.4; WinXP SP3, 2gb RAM. I am migrating my autobiography with over 300 pages from PM7 to InDesign CS3. I have not yet moved the text from the PM7 pages and am wondering if the Index Markers will be recognized by InDesign when I make that text transfer. I see some messages that indicate this may be a problem. Any help or suggestions would be most appreciated.
    Thanks, Stu

    The only file I ever moved from PageMaker to InDesign with an index was
    a PageMaker 6.5 ME file to InDesign 2.0 ME. IIRC, the index came through
    fine.
    Like Ian said: the best way to know for sure is to try it...
    Harbs
    http://www.in-tools.com

Maybe you are looking for