[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
Similar Messages
-
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. -
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, StuThe 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 -
App-V Office 2013 MLCFG32.cpl and Search indexing
Hi there,
I used the ODT to make an app-v package of office 2013. However when I try to load the mlcfg32.cpl it displays the following error:
The operating system is not presently configured to run this application.
I start the cpl from the following location:
C:\ProgramData\App-V\D24C3BDD-8FAD-44D3-998C-933F8F053682\764C2E31-0B14-4E44-818A-2836992E7EA6\Root\Office15
Also the search indexing isn't working in Outlook 2013, whenever I try to load the indexing status it keeps on loading with no result. I wanted to remove the profile from Outlook 2013, but with no mlcfg32.cpl it's very hard.
I also tried a repair of the application with no result.
Why is there so little information on packaging office 2013 in combination with App-v from Microsoft?Well the package should be published globally, in the policy the global refresh is enabled. However when I look at the settings of the application I see the following:
PackageId : d24c3bdd-8fad-44d3-998c-933f8f053682
VersionId : 764c2e31-0b14-4e44-818a-2836992e7ea6
Name : Microsoft Office 15 ProjectProRetail_O365ProPlusRetail_V
isioProRetail_nl-nl_en-us_x86
Version : 15.0.4701.1002
Path : \\SRV-SDLP-001\Applications\AppV\Microsoft Office
2013,Visio,Project ProPlusRetail nl-nl,en-us\ProjectProR
etail_O365ProPlusRetail_VisioProRetail_nl-nl_en-us_x86.a
ppv
IsPublishedToUser : True
UserPending : False
IsPublishedGlobally : False
GlobalPending : False
InUse : False
InUseByCurrentUser : False
PackageSize : 2603951976
PercentLoaded : 100
IsLoading : False
HasAssetIntelligence : True
All of our applications state that they are published to the user... but our refreshing policy states the following:
Id : 1
SetByGroupPolicy : True
Name : appvserver
URL : http://appvserver.ourdomain.com:889
GlobalRefreshEnabled : True
GlobalRefreshOnLogon : True
GlobalRefreshInterval : 1
GlobalRefreshIntervalUnit : Hour
UserRefreshEnabled : True
UserRefreshOnLogon : True
UserRefreshInterval : 1
UserRefreshIntervalUnit : Hour
We use the native App-V management server in combination with App-V publishing server... -
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 -
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. -
Embedded Search Index AND Document Security?
I'm using Adobe Acrobat Standard 8.1.7.
It appears that I cannot have both an embedded search index and restricted security (e.g., password required to change document) on the same document.
Why is that?
If I start with security ON and then attempt to embed a search index, I get below error message:
A search index can not be embedded in this document because this document has restricted security permissions.
If I start with security OFF, successfully embed a search index, and then secure the document, Acrobat "strips off" the previously embedded search index. No warning message; no feedback to end-user; just kills it!
Why are those two functions mutually exclusive? Anyone know of a work-around?
Thank you in advance!Hi,
As to "why", that might be floating out there in Adobe's devnet space or in one of the blogs maintained by Adobe's devnet crew.
Also good to know about use of embedded index - if used, cannot apply fast web view to the PDF. It is one or the other, but not both.
Work around? I've not come across one; but, that does not mean something isn't "out there" <g>.
Be well... -
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ögvallHi 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 -
Search indexing not working in Outlook PST files
My boss recently got Office 2010 on his new laptop. I copied his PST's from his old laptop whihc had Office 2003 on it to the new one and added them to his profile. They are there and look to be workign fine, until you try any sort of search
on them.
If I am looking at the eMails in the PST and I see a whole lot from
[email protected] and then in the search box I type
[email protected] the emails are all firltered away and I am told that there are no items that match the criteria. This also happens when I try try to run an advanced search.
So according to this post,
http://social.technet.microsoft.com/Forums/en/outlook/thread/b1859770-dfb5-4224-995f-be828bd21333, I disabled Indexing of outlook, then search stops working on my default location, i.e. if I search my inbox or anything in that datafile, I get
no results returned, but if I search one of the archieve PST files for say
[email protected] the search runs for ages with out retunring any results, if I stop the search and then rerun it then I get results.
It just seems a bit strange that I have to choose iether or.
Please help ASAP as my boss leave tomorrrow on a trip to Australia and I would like to get this sorted out be fore he leave.
Regards
A user needs the admin password like nitro glycerine needs a good shake.This seems to be an ongoing problem. The instant search feature in Outlook 2010 is not working correctly for a large number of users. I have read many, many posts here in TechNet and many more that come up with a Google search. None of the solutions provided
are permanently solving the problem.
I have tried every potential solution I have found:
Rebuilding the index did not work
The registry key(s) PrevenIndexingOutlook, PreventIndexingEmailAttachments, did not exist (the Search Key did not exist). I tried adding both keys in 2 different suggested locations (HKCU and HKLM) Search indexing did not work with or without those keys
added.
I have tried everything that I have found everwhere to resolve this problem. I found one solution that appeared to work a month or so ago. Unfortunately, I cannot find it again and no new emails have been added to the index since that day (09/15/2010).
I tried rebuilding the index (again). This process has removed all of the emails from the index that had been there after I applied the fix that seemed to work. I am continuing to research this problem in the hope that I will find that previous partial solution.
It would be nice to get some feedback from Microsoft to let us know if this problem is being looked into. All of the solutions provided from Microsoft on these forums have failed to correct this long term problem.
FYI: I am running Windows 7 Ultimate (64 bit) and Office Professional Plus 2010. These were fresh installs, not upgrades. After installation the instant search feature in Outlook was working, I do not know exactly when it stopped working. -
Search index not working in String
Hello all,
I am using String.search(any sentence) in Flash builder 4. If my sentence to be searched include some special characters such as (), then String.search()
returns -1 although that sentence is present in the text. However, if I used to search the same sentence without the special characters, it returns the
appropriate index. Any help will be greatful.
-Thanks in Advance
Vishal KumarHi,
Thanks for the reply,
The text is
Volcanic ash guidelines are drawn up by the International Civil Aviation Organization, a United Nations body, but experts say there is no commonly agreed safe concentration of ash.
“The ICAO regulation that has prompted this widespread grounding is from experience gained from over 80 incidents between 1980 and 2000 and computer modeling (or) best guestimate,” said aviation consultant Chris Yates.
Now when I search
“The ICAO regulation that has prompted this widespread grounding is from experience gained from over 80 incidents between 1980 and 2000 and computer modeling (or) best guestimate,” said aviation consultant Chris Yates.
It returns -1.
However if I remove special characters () and perform search on
“The ICAO regulation that has prompted this widespread grounding is from experience gained from over 80 incidents between 1980 and 2000 and computer modeling ,
it returns proper search index .
-Thanks
Vishal Kumar -
Search Index hangs on large files
I am using the 6.1 SP4 Web Server on Windows XP. I have the default search application working. My problem is adding MS Word documents to the collection. Word documents of the size 25KB work, but when I add a large Word document 6934KB it just hangs with no CPU activity going on.
Is there a work around or a parameter that needs to changed to allow larger sized files to be indexed in the collection?I'm not sure what's going wrong, but you may want to try increasing the amount of memory the search indexer is allowed to use. To do this, you'll need to modify the searchadmin.bat batch file. You can find it in your Web Server's bin\https\bin subdirectory.
First, make a backup copy of searchadmin.bat. Next, open searchadmin.bat in a text editor and replace "-Xmx128m" with "-Xmx1024m". This will allow the search indexer to use up to 8x more memory.
Please let us know whether this helps. -
Problem in while creating text search index
Hi,
When I am tring to create a text search index I am getting the following:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10700: preference does not exist: GLOBAL_LEXER
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364
ORA-06512: at "myschema.RECREATE_SEARCHINDEX", line 31
ORA-06512: at line 2
any idea what is causing the problem?
sabyLooks like you don't have a lexer called GLOBAL_LEXER, but you're trying to use it in the create index statement.
Maybe it's owned by someone other than the current user - or maybe you meant to write WORLD_LEXER.
Perhaps you could paste the whole index creation script here. -
Problem while creating text search index
Hi,
When I am tring to create a text search index I am getting the following:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
DRG-10700: preference does not exist: GLOBAL_LEXER
ORA-06512: at "CTXSYS.DRUE", line 160
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364
ORA-06512: at "myschema.RECREATE_SEARCHINDEX", line 31
ORA-06512: at line 2
any idea what is causing the problem?
sabyHi,
I think Probably what has failed is some inner kind of operation that didn't handle the exception correctly, that is dropping the offending object automatically and it issue is raised (error). Therefore you'll have to manually drop the index and re-create the desired index (that might solve your problem)
- Pavan Kumar N
Maybe you are looking for
-
Logic X playback distortion on iMac
I have Logic X on a Mac Book Pro and two iMacs . On one of the iMacs using an Apogee Duet, I get distortion ,both headphones and speakers. Works perfectly on the other two set ups, but this one distorts on all types of audio( recorded, imported, virt
-
Compressor Cluster - Error message when attaching .scc caption files
Hello, We have a 3 XServer Cluster controlled by a 4'th XServer (Our FCServer machine). My workflow is: Source Video: 1920X1080 ProRes Video (28:30min) Resized to 640X360 ProRes LT (also de interlaced and some black restore and sharpening applied her
-
New iPhone 5, worked for two days then screen went black.
Plugged the phone in to charge, it was working, unplugged it to move it and the screen had stopped working. Like it was dead. I could still hear the phone so I knew it was still functioning. Did a soft reset, nothing, no apple logo, nothing. Turn
-
Hi Guys, Are there any Web pages that we can use to query the status of the Presentation Services Web Plug-in and/or the BI Server status via the Web Server of our choice?
-
Hi. So I decided to a class project, and found this supposedly great app. I imported all the pictures, recorded the voices, and inserted the soundtrack via iMovie. Then, once I clicked export and looked at the result, the first half of the product wa