Creating TOC: order of anchored objects

Hey scripting experts,
i have a question creating an automated table of contents.
The problem is, that I am using anchored objects (text) in a text frame/story. Let's assume there is a text frame, starting with the anchor of an anchored object that contains the "headline # 1" and is placed e.g. on the top of the page. The anchor is followed by "headline #2" and "headline #3" (both simple text, no anchored object).
When generating toc, the order of the headlines will not be read as desired. The anchored object unfortunately is not added at first, but at the end. So the generated order is: #2, #3, #1. I would prefer #1, #2, #3.
Do you think, there might be a suitable (and scriptable) way to teach InDesign, to count an anchored object according to the position of the corresponding anchor in the text? Yes? I would be glad for any advice!
Thank you!
Jan

Hi Peter,
thank you very much for your quick and technically versatile reply! Unfortunately my answer reaches you slightly late – due to Easter/holidays (hopefully you spend them relaxed ...).
Nevertheless i am really glad having received your hint. At the moment i am still a bloody beginner in scripting/xml-rules, but trying hard to forge ahead. Maybe aming for a specific target causes progress ... You signalized me there probably is a solution, so with your hint at the back of my mind, i will start practicing now.
Many thanks and best regards
Jan

Similar Messages

  • Creating an order within an object

    Need some help with this porblem:
    I need to create a class that will have to represent some column name and the sequance that it should be order by. For example, a user wants to select specific columns from database in specifc order, for example column1 (2nd order by), column2 (3rd order by), column3 (1st order by). What is the best way for doing this?
    I though of this approach, but it does not look like the right approach. (client would have to invoke setOrderBy in correct sequance for as many times as necessary)
    public class OrderBy() {
    public static final int COLUMN_ONE = 1;
    public static final int COLUMN_TWO = 2;
    public static final int COLUMN_THREE = 3;
    private ArrayList orderBy;
    public OrderBy() {
    orderBy = new ArrayList();
    public void setOrderBy( int columnName ) {
    orderBy.add( new Integer( columnName ) );
    public ArrayList getOrderBy() {
    return orderBy;
    Thanks for your help

    You want a list of column names to order by. And it looks like that is what you have (except you have a list of column numbers instead of names). All I would change is to name the method addOrderBy() instead of setOrderBy().

  • Table of Content Help - Anchored Objects/Listing Order

    For the love of god this is extremely frustrating.   I have been searching for literally hours trying to find the solution.
    I have a large document, linked frames from page 1 through page 44 for example.
    On many pages I have figures, and using an incrementing paragraph style, these figure captions are numbered sequentially.
    When generating a table of contents, any figures that are in the main linked frames are created in the proper order.
    My issue is that on a few pages, I have figures inside anchored objects - basically an anchored text frame with a picture and the figure label text using my paragraph style.
    These anchored objects are not being put in the table of contents in the proper order - they are being added to the end of the toc!  Indesign should be smart enough to add items on the page in the proper order - be it the main frame or an anchored one!
    For example
    Figure 1 - page 1
    Figure 2 - page 1
    Figure 3 - page 2
    Figure 5 - Page 3
    Figure 4 - Page 2 <<< huh?
    Any assistance would be GREATLY appreciated.

    After looking at this a bit more, this may or may not work so we might need to get dirty on this one .....................
    Some clues can be found here : http://www.oracle.com/technetwork/middleware/bi-publisher/bip-bookbinding-176639.pdf
    Looking at Page 7, it should be obvious that we can add additional deatils to the reports, including cover pages.
    Though, after looking at Page 8, I think I may have you slightly in the wrong direction. toc-template appears to simply cover the commands for the table of contents and there is another template to control everything. But is that file visible to edit?
    If you run FRConfig.cmd, you can find more clues.
    Go to the MBeans tab, expand com.hyperion, then expand Financial Reporting, and Attributes.
    The two attributes that immeidately jump out are TextPrintTemplate and BookTOCPrintTemplate
    - TextPrintTemplate is the FR_TextTemplate.doc file in <<EPM_ORACLE_INSTANCE>>/products/FinancialReporting/bin/ folder
    - BookTOCPrintTemplate is the toc-template.rtf file previously discussed.
    Once again, though, the other template exposed to us is most likely just driving the content and is not at a high enough definition level for this to work how you want it to.
    I would say to use the example in the PDF and try adding that to the table of contents page before it does all of the loops. Perhaps it will work from there, perhaps not.
    If that doesn't work, Thursday we can attempt to drill into this more.
    :)

  • TOC scrambled with headings from anchored objects

    I have a book design with first-level headings in the main text flow and second-level headings inside of anchored objects in the left margin of the pages. When I generate a TOC the headings used to be in the correct order, precisely as intended. After installing the 5.0.2 update however the TOC gets scrambled when I update it. The second-level headings from the anchored objects are printed before the first-level heading (in the TOC) when they are both on the same page. Second-level headings on pages after the first-level heading are printed after the first-level heading (in the TOC) where they should be.
    The source of this problem may be the altered search-order for headings that should be included in the TOC. Although it seems only logical that the main text flow defines the order from top to bottom and anchored objects should be included from the anchor in the main text flow. Now it seems that the search order is from left to right on the pages.
    Adobe says to have made major fixes in the areas of both anchored objects and table of content generation, but whatever they did the only difference I find is for the worse.
    Is there a fix for this fix?

    Long shot, but go to the application preferences and uncheck the box in the General section that says Prevent Selection of Locked Objects.

  • Error: Object type '' could not be generated when creating sales order

    Hello Friends,
    I am using a SAP standard ITS service to create sales order.
    When I am creatin SO, it gives me error Object type '' could not be generated.
    Can you plz suggest me what is that issue & how I can reslove it.
    Regards,
    Narendra

    any inputs around this plz??

  • TOC and anchored objects

    Hi!
    I'm experiencing some problems generating the TOC.
    I design the chapter titles to stay into an anchored object before the first paragraph title but generating the TOC the chapter title is putted after the first paragraph title!
    There's a way to make indd to read the title into the anchored object first?
    Thank you!

    Thanks to everyone for the help and sorry if I can answer just now.
    I'm probably doing something wrong in anchoring the object, I don't use this method often. I need to put the chapter title in a frame that everything is within a fluid text, so that if I remove or add some text the title box moves accordingly.
    The method I used to anchor the text frame with the title chapter is to hold down the shift key and drag (I'm using windows7) on the black square. And it works great, if not for this issue of the TOC!
    I accept any kind of suggestion!
    @ Uwe: using this method to anchor I can't move the frame to right or left... So nothing change...

  • How settlement rule will be created for Sales order with cost object

    Dear Experts,
    We are using product cost by sales order with valuated stock. In addition we are not using COPA
    We also consume some materials at sales order level and at the end of month we want to do the result analysis and settlement for the same amount. In this case can any on explain how system will behave regarding settlement of sales order cost and what entries will get pass in the system.
    In our case we have done below activities...
    we have created sales order,
    All production order activities completed till final GRN including month end activities
    Material consumption against sales order
    Result analysis executed
    At the time of sales order settlement, system throwing error (Sender doesn't have valid receiver, please create settlement rule for sender object)
    Then i checked in sales order there sales order settlement rule not defined.
    I guess this settlement rule need be generated by system automatically. If not, please let me know the process of it.

    HI kishore
          the reason is that sale order always carry the revenue  and production order and production period carry the cost .
       cost you can settle to the Material and even management want  to be settle the cost to material only in production order OR period
    but in sales order  when u sell the product it carry the revenue not the cost and management want see and analysis based on profitability segment are profit center level .
    Prerequisites
    If CO-PA is active, the system generates a settlement rule when you create the sales order. The settlement rule determines whether data is settled to other objects or other areas in Controlling. In accordance with this settlement rule, the relevant data is settled to CO-PA.
    If CO-PA is not active, create a settlement rule. This settlement rule that you create manually normally contains a G/L account as a receiver (such as 399999). You can also settle costs and revenues or results analysis data to objects with revenue.
    You can also settle the cost of sales calculated in results analysis to a fixed asset or a cost center. To do this, you must add to the allocation structure the results analysis cost elements under which the cost of sales is updated to the order.
    The settlement rule includes a distribution rule for the sales order item. The distribution rule is made up of a settlement receiver, a settlement share, and a settlement type:
    The settlement receiver (such as profitability segment or G/L account) specifies the object to which the actual costs and revenue of the sales order item are settled. The settlement receiver can be proposed through the settlement profile.
    The settlement share defines the percentage or the equivalence numbers used to distribute the costs to the individual settlement receivers. The settlement share for sales order items is usually 100%. A settlement share of 100% is preset in the system.
    The settlement type specifies full settlement of the sales order item. This ensures that all the data on the sales order is available for results analysis.
    Settlement still takes place in each period. The revenues and the cost of sales are transferred to CO-PA by period, and the work in process and the reserves are transferred to FI.

  • How to create Anchored Object (CS2)

    Hi,
    Indesign CS2(PC version)
    Javascript
    Any one help me, How to create Anchored object within TextFrame and inside anchor object i want to paste one image.
    by
    Sudar

    Hi Hemi,
    Sure--tell the insertion point to create the object. For example, to add a text frame:
    //Given a reference to an insertion point "myInsertionPoint"...
    var myFrame = myInsertionPoint.textFrames.add();
    Now you have a text frame anchored/inline in the story. Next, recompose the story containing the frame:
    myInsertionPoint.parentStory.recompose();
    ...and resize the frame.
    //Given a frame width and height "myFrameWidth" and "myFrameHeight"...
    var myX1 = myFrame.geometricBounds[1];
    var myY1 = myFrame.geometricBounds[0];
    var myX2 = myX1 + myFrameWidth;
    var myY2 = myY1 + myFrameHeight;
    myFrame.geometricBounds = [myY1, myX1, myY2, myX2];
    At this point, you can adjust the frame's anchored object settings (your settings will probably vary, but this should give you the idea).
    var myAnchoredProperties = myFrame.anchoredObjectSettings;
    myAnchoredProperties.anchorPoint = AnchorPoint.topLeftAnchor;
    myAnchoredProperties.anchoredPosition = AnchorPosition.anchored;
    //NOTE inconsistent "o" in "offset".
    myAnchoredProperties.anchorXoffset = 0;
    myAnchoredProperties.anchorYoffset = -13;
    Hope this helps!
    Thanks,
    Ole

  • Object RESB within Critical Area - creating Maintenance Order

    Hi All,
    We are getting warning message while creating Maintenance Order. It says " Object RESB within Critical Area". After checking we found that 90% of the number range for reservation documents have been consumed and it is maintained in settings that the warning will come up when number range enters last 10%.
    we have changed this setting to 5% but still the issue is not resolved. We are still facing the same warning message.
    Kindly guide.
    Regards
    DM

    DM,
      This maybe due to the buffering of the number range numbers on the application servers.once these numbers are exhausted and new  block of numbers are picked up  from the database server this should go off.  Ideally you may want to adjust to a new  number range so that this warning message doesn't irritate the end users.
    Regards
    Narasimhan

  • Manual Create TOC Anchors in Exported ePub

    Does anyone have a good tutorial on how to manually insert invisible TOC Anchors into the ePub xhtml files?
    I have just finished laying out a novel in which I'm using images as chapter headings instead of actual text.  Because of this, I can't just highlight the chapter name and assign it my TOC Style.  I had created a hidden layer with a single text field, which fixed the problem as far as the print output goes, but the ePub export process discards this data and breaks all the TOC anchors.  If I knew what lines I had to insert into the XHTML files for each chapter, I could then hack the TOC into working.  (I can get at the files, just don't know what to add to each one.)  My navigational TOC is working just fine, although it still needed some cleanup as the export process hates spaces apparently.
    Any help would be greatly appreciated.  Thanks!

    I'm not sure of a link to a tutorial I could send you. You can just put anchors (<a id="CHAPTER"></a>) after the p and span classes and before the img class with the chapter name and then link the text toc to the anchor you just made.

  • Create Maintenance Order for Object Link

    how can I create a notification or order through an object link?
    it doesn't work here. it doesn't use object link number in order.

    Greetings Daniel,
    It's not possible to create a Notification or Order for the Object link - unless you create a technical object for the object link itself, which is entirely possible in CN04 / CN07 (for example, a cable connects 2 circuits - create 3 FLs and 1 Object Link, assign the cable FL as the link itself)

  • Creating anchored objects underneath a textframe?

    Hi,
    I'd like to make a box underneath a textframe and anchor it so that it will move along with a special section of the text. When I anchor the box it is automaticly placed on top of the text wich is not my intension. Also if I place the box in the back befor anchoring. Can you help me:)?
    Best,
    Sara

    Hi,
    In some contexts (eg., black text on white background), you can easily use anchored objects with "Incrustation" effect (in French). 

  • New technique to place multiple anchored objects in InDesign story

    Hello,
    For a while I have been trying to figure out how to insert multiple anchored objects into an Indesign story. As far as I can tell, you cannot copy multiple objects that have already been placed in a document (such as a multi-page pdf) into an InDesign story, but must copy and paste them one-by-one into the story. This is a problem for a project I am working on where I want to have a large number of 340x52 pt pdfs to flow throughout a document in a master text frame interspersed with text.
    I have now found a solution for this issue that I thought I would share in case it would be helpful for anyone. It utilizes Automator actions for Mac OS X and Microsoft Word 2011 [2008 may work also, but I don't have a copy of that to test]; I am not good with scripting but perhaps similar solutions could be found for other systems and programs.
    1. If you want to place a multipage pdf within a text frame, first it into individual files for each page (with Acrobat Pro or pdftk or something similiar).
    2. Create an Automator service or program with the action "Create New Word Document". You can also use another automator action to save the document, or save it manually (to change the filename). In the finder, select the items you want, then run the service or drag them into the Automator program you have created.
    3. Place the word document into your InDesign story. Your items will now be anchored objects ordered in your text frame as they were in the finder.
    Please let me know if this is helpful or if anyone has suggestions for doing this process is a more efficient way. I am not sure, but it may be the case that this approach would only work on Macs, as I gather from this thread.

    I might note that I am using InDesign CS 5, and importing from a document stored in docx format.

  • Callouts and anchored objects - there must be a better way to do this

    I've spent a lot of time in the last six months rebuilding PDF files in InDesign. It's part of my ordinary responsibilities, but I'm doing a lot more of it for some reason. Because I'm sending the text of these rebuild documents out for translation, I like to keep all of the text in a single story. It really helps to have the text in "logical order," I think; when I'm prepping a trifold brochure, I try pretty hard to make sure that the order in which the readers will read the text is duplicated in the flow of the story throughout the ID document.
    So, I'm rebuilding a manual that has a 3-column format on lettersize paper, and it's full of callouts. Chock full of 'em. They're not pull quotes, either; each of these things has unique text. Keeping in mind that I'd like the text in these callouts to remain in the same position in the text once I've linked all the stories and exported an RTF for translation, what's the best way to handle them? What I've been doing is inserting an emptly stroked frame as an anchored object, sized and positioned to sit above the text that is supposed to be called out. When my translations come back, they're always longer than the source document, so as I crawl through the text, I resize the anchored frames to match the size and position of the newly expanded translated text, and then nudge them into place with the keyboard.
    There Has To Be a Better Way.
    There is a better way, right? I'm not actually too sure. If I want to actually fill those anchored frames with text, I can't thread them into the story. I suppose that I could just thread the callout frames and assign two RTFs for translation instead of one, but then the "logical order" of my text is thrown out the window. So, I'm down to asking myself "what's more important? reduction of formatting time or maintenance of the flow of the story?" If there's something I'm missing that would let me dodge this decision, I'd love to hear about it. The only thing I can think of would work like this:
    1) Duplicate callout text in the story with a custom swatch "Invisible"
    2) Create "CalloutText" parastyle with "Invisible" swatch and apply it to callout text
    3) Insert anchor for anchored frame immediately before the CalloutText content
    4) Send it out for translation
    5) While I'm waiting for it to come back, write a script that would (dunno if this is possible):
       a) Step through the main story looking for any instance of CalloutText
       b) Copy one continguous instance of that style to the clipboard
       c) Look back in the story for the first anchor preceeding the instance of CalloutText
       d) Fill the anchored object with the text from the clipboard (this is where I'm really clueless)
       e) Apply a new parastyle to the text in the callout
       f) Continue stepping through the story looking for further instances of CalloutText
    If this really is the only decent solution, I'll just head over to the Scripting forum for some help with d). Can any of you make other suggestions?

    In-Tools.com wrote:
    The use of Side Heads saves weeks of manual labor.
    Yup, Harbs, that is exactly what I was describing. If I use the Side Heads plugin to set up a job, will my clients get a missing plug-in warning when they open up the INDD? Will roundtripping through INX strip the plugin but leave the text in the callout? (My clients don't care if the logical flow of the story is broken; it's just me.)
    I'm just curious; seems like a pretty obvious purchase to me. I'll probably try to script a solution anyways, after I buy the plugin; that way I get to learn about handling anchored objects in scripts AND deliver the job on time!

  • Need anchored objects to be behind text

    Anchored objects have aways had lot of shortcomings for my workflow. One shortcoming I'd really like to see fixed in future versions of ID is the inability to choose for the anchored object to appear behind the text it is anchored with. Here are just a few uses that I can think of that would be helpful in my workflow:
    Creating numbered lists that have specialty art behind the numbers. To do this currently, you have to either do manual numbering and group it with each object and anchor the object with the number into the line of text or you have to keep the auto-number list and the objects for the numbers separate and manually reposition the number objects whenever the text reflows.
    Creating paragraph backgrounds that flow with the paragraph. Right now about the only way to do that is using the paragraph rules or tables which have severe formatting limitations (no rounded corners, ignore text wrap, etc.), and the rules are difficult to resize. If you could create the background as a ID object or placed art and anchor it to the beginning or end of the paragraph, you could manually resize it to the size of the paragraph and it will flow with the paragraph whereever you need it (this currently will not work unless the object can be made transparent to the text using an effect.
    Captioning anchored images could actually overlap the image if and where necessary. Right now, if you want captions to appear on top of an anchored image, you have to group the caption with the image before anchoring it into the text flow.
    There are workarounds obviously for these tasks (as I've indicated), but by their nature workarounds are time consuming. I'm always looking for ways to automate tasks and save time in ID. Having the option to make an object appear behind the text it is anchored with would be a tremendous time saver.
    Anyone else see a use for stacking order option with anchored objects?

    @Obi-wan – you say: "Despite the fact that, like all anchored boxes, it is foreground, text color is truly visible with no effect on the blue block !!"
    With anchoring "Above Line" the anchored objects are really stacked behind. At least that stacking order is true for all characters after the anchor character. Using a different anchoring method will always yield in anchored objects stacked above (foreground).
    Doing some tricks with the effects panel on the anchored object is alright, so that all the other text, that is stacked below will showing through, but you should be aware, that these effects will change the game when it comes to color separation for print workflows.
    Separation preview with all channels visible CMYK:
    Separation preview with [Black] not visible CMY:
    As you can see, the usually overprinting color [Black] on the text below is left out. When exporting a PDF, I think nearly no prepress tool in the world will find an automatic way to change this because of the stacking order of the elements.
    If the green rectangle would be stacked behind the text like in anchoring "Above Line" we will see the following with separation preview CMYK:
    Turn off K in the separation preview will give a surprising image:
    All black text, that comes after the anchor character will overprint, all text before will not. And that "will not" is definitive. If we look at the objects in Acrobat Pro after exporting to PDF, we will see that not overprinting characters "ut endis" in my little screenshot here are below the green rectangle, all characters following after the anchor are above the green rectangle.
    Here a screen shot from Acrobat Pro that will reveal the stacking order a bit (the transparent background of the page is shown as gray; an option in Acrobat Pro's view preferences):
    So in the end, "ut endis" will be printed with a total amount of color:
    0 Cyan
    0 Magenta
    0 Yellow
    100 Black
    Sum: 100%
    The "black" text following due to overprinting* (EDIT) will be printed with:
    75 Cyan
    5 Magenta
    100 Yellow
    100 Black
    Sum: 280%
    * AND of stacking order of course!
    All other black text will overprint as well, but there is no effect for the green rectangle because the text is stacked behind the rectangle.
    Uwe

Maybe you are looking for

  • Migrating open POs and GR/IR clearing account balance

    Hello gurus, I've got the following problem concerning migration of open POs: For example: In my source system there is a PO for 10 pcs. of some material. There has been a goods receipt for 5 pcs. (200$ each). Now, when I import this order and the co

  • Can't figure out last part of a powershell script

    Hey guys, First time posting here. I have a powershell project for school that I'm trying to figure out. I don't have a lot of experience with powershell, but I've gotten most of my project done. I am having issues with this last part. Here is the pa

  • Disk repair utility

    What do forum members like to use besides the disk utilites supplied with the mac to repair hard dive problems. are ther more rubust disk utilites out there???

  • Message Mapping takes long time to save and activate

    I have one problem in my present interface... the message structure is large and when mappping is over and I click save button it will take long time for activation.. should I change any parameter in admin? or is it bcos of java web start version? ne

  • Problem in SQL Loader

    Hi Experts, i'm using SQL Loader for loading data from an XML file into the DB , my control file was some thing like that : load data infile 'D:data.xml' "str '</dataNode>'" replace into table MY_TABLE where dataNode is the records' separator, this w