Text too close to page number in TOC

Most of the time I can take care of unattractive line breaks in the TOC by putting in non-breaking spaces in a paragraph.
However, I sometimes have a situation where the text of a TOC entry is too close to the page number on the right. The text is so close to the page number that in some cases no leader dots show, or only one or two leader dots show.
The entry and its page number fit on a single line, so putting in non-breaking spaces won't solve the problem. I could put in a soft return (Shift-Enter) in the TOC entry to force a line break, but it isn't efficient because I have to put in the soft return manually each time the TOC is updated.
If anyone has a tip on how to handle this problem efficiently, I'd love to know about it.

Van
That is absolutely brilliant. It also seems to prevent multi-line TOC entries from encroaching on the page number area in general.
For ages I thought the only way around this ugly problem would be to wait 200 years for Adobe to give us four different indent options (first line left, left, right, and last line right) instead of the three that we currently have. (Last line right doesn't exist.)
I'll just add one more suggestion that might make your line breaks and page number positions in the TOC 100% automatic instead of merely 98%.
(It doesn't sound like much of an improvement, but if you've ever had to manually adjust the TOCs for 50 manuals every time you regenerated them, then you'll know where I'm coming from.)
If you have any TOC paragraph specifications that use more than one tab, for handling section or chapter numbers at the front of the paragraph for example, then you'll notice that if a TOC entry wraps to two or more lines then the page number will no longer be printed at its intended tab stop, but will use one of the earlier tab stops instead (because in the new line there are no longer any previous tab characters to fill the earlier tab stops).
The cure for this is to go to the TOC specification flow on the Reference pages, and in the problematic paragraph format add an extra tab character in front of the <$pagenum> building block.Then...
If the TOC entry only covers one line, the extra tab character will be ignored.
If the TOC entry covers two or more lines, the extra tab character will be used to fill up the previous stop so the page number settles at its intended tab stop.
If you have TOC specifications that rely on more than two tab positions, just add more tab characters in front of the <$pagenum> building block (and regenerate) until the page number (in multi-line entries) lands at the correct tab stop.
Thank goodness FM uses absolute tabs and not relative ones.

Similar Messages

  • How to print logical page number in TOC of report

    My report has three sections - header, main, trailer.
    after each group break in the main section the page number is saved using the srw.get_page_num(pageNum).
    this records are used to build the toc in the trailer section.
    Problem: srw.get_page_num delivers only the logical pagenum of the section,
    means if the header section spans more than one page (for example 2), the main section starts at physical pagenum 3.
    If I don't know how many pages my header contains I never have the real page number in my toc, beacuse i have to add the number of "header pages" to the saved pagenum of the main section to compute the "physical pagenum".
    Is there a possibility to save the physical pagenum in the header section (in a trigger) ?
    Message was edited by:
    [email protected]

    Thats my huge problem - i can not calculate the number of pages
    nor in the main section neither in the header section.
    The problem is not to know how many pages are in the trailor section.
    I have to know, how many pages are in the header section without to start multiple the report.
    If I have this number i can add it to the "logical" page number" of the main section to get the physical page number of the report.
    the page numbers of the main section are available.
    Message was edited by:
    [email protected]

  • How do I get rid of -1 page number from TOC

    When I create and import a TOC in to my document, the first TOC page has no number, which is OK, the second page is numbered -1 and the last TOC page also has no number. I am trying to get rid of the -1 from the second page. I have tried a number of things from Format >Document>Numbering and Format>Page Layout>Master  Page Usage but nothing succeeds. Would be grateful for any help if anyone recognises this problem. Thanks.

    Got to where the page number is, usually a Master Page, and either delete it, or set it to a color that is set to invisible (via Color Views) prior to publication.
    Check both Left and Right MPs.
    View > Master Pages
    In most templates, the page number is a "#" in the header or footer.

  • Sort Array of Foundtext as well as respective Page Number

    Hi All,
    I am a novice scripter. Also this is my first Indesign script. Please do help anyone for my first script. Following is my requirement.
    I want to generate a particular character style applied text with belonging "Page Number". Also i need to Sort the found text alphabetically with belonging page number itself. I just generated the text as well as belonging page number by writing the following code.
    var myDoc = app.activeDocument;
    var myDocPath = app.activeDocument.filePath;
    var myDocName = app.activeDocument.name;
    app.findTextPreferences = null;
    app.findTextPreferences.appliedCharacterStyle = myDoc.characterStyles.item("Test");
    var myText = myDoc.findText();
    var myPageNumber = new Array;
    var myFoundText = new Array;
    var myFoundTextSort = new Array;
    for (var i = 0; i < myText.length; i++)
         myFoundText.push (myText[i].contents);
    for (j = 0; j < myText.length; j++)
         var r = getPageFor(myText[j].characters[0]);
         myPageNumber.push ( r.name);
        var inc=0;
        var myLogFile = new File(myDocPath.fsName + "/Text_Report_" + app.activeDocument.name.split(".")[0] +".log");
        if(myLogFile.open("w", undefined, undefined))
            if(myFoundText.length!=0)
                for (var k=0; k<myFoundText.length; k++)
                    serialno = k+1;
                    myLogFile.writeln("  "+serialno+".  "+myFoundText[k]+" --- Page " +myPageNumber[k]);
        myLogFile.close();
        myDoc.close();
    function getPageFor (element)
         while (!(element instanceof Page || element instanceof Application))
              if (element instanceof Character)
                   element = element.parentTextFrames[0].parent;
              else
                   element = element.parent;
         if (element instanceof Page)
              return element;
         return null;
    Please do help anyone. Thanks in advance

    Hi John,
    I tried using Array of Objects method given by you... I wrote like this...
    var MYResults = MYDoc.findText();
    var MYFoundText = new Array;
    for (var i = 0; i < MYResults.length; i++)
        var r = getPageFor(MYResults[i].characters[0]);
        MYFoundText.push (MYResults[i].contents, r.name);
    MYResults[i].contents --- For finding the Text
    r.name ---- For finding the Page Number
    I got the result like this:
      1.  greeking - "Character style applied text"
      2.  1            - "Belonging Page Number"
      3.  reptamu
      4.  1
      5.  molenis non
      6.  2
      7.  doluptae
      8.  3
      9.  ligendem
      10.  4
      11.  Ab is quunto
      12.  5
    If it comes in a same line, i can easily sort alphabetically.
    Please do help me.
    Many thanks for your help.

  • How to increment a value in a textfield based on page number

    Hi,
    I am doing PDF based print forms which is non interactive, i got a requirment where i have to increment the binded value of a text field based on page number.
    presently i am using this code in initialize event of that textfield.
    var curpage = $layout.page ( ref ( $ ) )
    var totpages = $layout.pageCount()
    $.rawValue = $.rawValue - totpages
    $.rawValue = $.rawValue + curpage
    but this is not helping me, can anyone help me regarding this

    Thanks for yor reply.please you can tellme clearly how to set use 'NQ_SESSION.USER' to set the value to logged in User.i.e i have circle table in that users and circle names will be there.it is teradata database.so how can i set that in to the dashboard prompt and one thing along with that prompt the follwing prompts will be there
    mobile no<>
    date<>
    circle name<"user">
    this is my requirement so please help me step by step what to do for achiving this.
    thanking oyu

  • Error with master page "insert current page number" when exporting book

    Using InDesign CS 5.5 for Windows
    Recently upgraded from InDesign CS (the really old one from 2003). I did save a copy of all my old version files and kept the old ID installed just in case (after reading all the horror stories on here).
    In my old version of ID, I created a book made up of about 70 documents. Some of these documents are one page, others have multiple pages. In the multiple page documents, I used the "insert ... current page number" character (or whatever the command was in the old version) on a master page, and formatted it to read, for example: Page 1 of 17, Page 2 of 17, Page 3 of 17, etc. When I exported my book to a pdf, it worked fine. (I do not want/have consecutive page numbers throughout the book, only in individual documents. By this I mean my entire book is about 280 pages, but not all of these 280 pages are numbered, just the groups of pages from these multi-page documents. It doesn't read page 1 through 280.)
    Got my upgrade to 5.5 a few months ago, added some documents to the book, and (if i remember right) when I saved the book it asked to convert every old version document to the new version, which I said okay. When I exported the book to a pdf, some documents that are longer than 2 pages are now numbered wrong; the numbers are now going like this: Page 1 of 17, Page 2 of 17, Page 2 of 17 (supposed to be page 3), Page 2 of 17 (supposed to be page 4), etc. Every page but page 1 is now page 2 of whatever.
    If I open the individual document and export it to pdf, the page numbers work fine. It's only when the document is exported with the book that the page numbers mess up. And it's not all the documents in my book; this error starts at a particular document and continues from that point throughout the rest of the book, affecting any document longer than 2 pages. Multi-page documents before this point in the book export with the correct page numbers.
    I create new documents by doing a "save as" with a previously created document and cut and paste as needed, so I'm not having to reformat or set up page numbers on each new document. I don't use layers or styles (I'm sure there's a better way to do what I need, but I've only had time learn the basics, just enough to be functional.)
    My attempts to fix this so far (using version 5.5), testing with the first document where the error appears: (1) I've removed the document from the book, deleted the insert current page number character, re-entered the insert current page number character, saved, exported the individual document to pdf and it worked fine. Put it back in the book, save, export, and it's wrong. (2) I took the document out of the book again, exported the document to .idml, saved as new .indd with new name, exported to pdf and it worked fine. Put it back in the book, save, export, and it's wrong. (3) I started up my old ID version, opened the old version of this document, exported to .inx, closed, opened .inx in ID 5.5, saved as new .indd with new name, exported to pdf and it worked fine. Put it back in the book, save, export, and it's wrong. (4) I moved the document up in the book order, putting it above a document that has correctly numbered pages, saved, exported to pdf, and this document was still wrong, but the one that has been numbered correctly all along is still correct. (5) I've compared settings for this document to others that number correctly and cannot find any difference.
    It's like the page numbers get hung on "2" when I export the book, but only in the last two-thirds of the book. Sorry it's so lengthy, but I hope this description of my problem is understandable. Any advice, other than going back to my old version documents and starting over?
    Thanks for your time and for all the awesome information this forum provides!
    alice

    Mr. Spier
    Right after I posted my question, I saw a post from last year where somebody had similar problems. (I cringed because I spent almost 3 days researching this problem and never ran across that post; thanks for not scolding me for posting a semi re-run.) I decided to try one of the easier solutions: I opened the problem document from the book panel, went to the master page and deleted the text box containing the page number, copied the page number box from a document that worked correctly, and pasted it into the problem document. Saved that doc, closed, saved book, exported to pdf, and it worked!! The page number problem was fixed. I went back and did the same thing for the other problem documents and they all number correctly now. 
    Probably not the best way, but for now this will fix it; I may have to do it again next time I add to the book. Although I didn't follow your instructions, I'll mark this as answered since it's working now. If it keeps giving me problems, I'll try the .inx export/new book route.
    thanks for your time
    alice

  • How to retrieve page number of a page

    Hi
    I need to retrieve page numbers that have been placed on InDesign pages. However these page numbers are autogenerated based on markers (formula) created using a master page. (Insert special characters -> markers).
    When i try to retrieve page items on a page, I am not able to get the page number item. If I try to get the pageitem corresponding to the page number from the master page, I get back the marker but not the page number that exists on my page.
    I am wondering if there is any way I can retrieve the page number on a given page using the SDK
    many thanks
    Sam

    Hi
    Thanks a lot for the quick reply.. For my usecase i now realize i have a different sort of problem.
    I am trying to take snapshot of pageitems on a page (using snapshotUtils sample). Now since the page number marker comes from the master page, when i take the snapshot of the page number item on my page,  this page item exists on the master page. On the master page, this pagenumber does not contain the actual page number but the marker text in it. So mysnapshot gives me the image of the marker text rather than the page number. I am wondering what I can do to basically get a snapshot of a page item which comes from a marker on the master page
    Thus on my master page i have a text box with Pagenumber: "Marker A" for page number
    on my page, I want to take snapshot of  Pagenumber:10 which is what gets displayed on my page
    However when i take snapshot, since i am taking snapshot of master page item, i get Pagenumber: Marker A as my snapshot
    thanks
    Sam
    Here is my code snippet for what I am doing
    InterfacePtr<IMasterPage>   masterPage(currentDocumentDataBase, pageUID, UseDefaultIID());
      if(masterPage  !=  nil)
          UID masterSpreadUID = masterPage->GetMasterPageUID();
            uint16 masterPageIndex = masterPage->GetMasterIndex();
           //get the  master  spread
            InterfacePtr<ISpread>   masterSpread( currentDocumentDataBase, masterSpreadUID, UseDefaultIID()  );
           if(masterSpread   != nil)
                    UIDList masterPageItems( currentDocumentDataBase );
                       masterSpread->GetItemsOnPage(masterPageIndex,   &masterPageItems, kFalse, kFalse);
    The problem is  that  SnapShotUtilsEx captures the item as it appears on the master page, not  on  the current page.  So thing like page markers are wrong.
    thanks

  • Text flows create a delay when an overflow creates a new page, preventing you from reading the page number, giving error

    Hi all!
    I am creating a script to generate automatically a photo catalog; the idea is to prepare a master document with a text frame in the master spread with auto flowing, then insert images with their caption by the script, letting the system create automatically the subsequent pages when necessary by an unique flow of text.
    My catalog is divided in sections, each represented by a different master spread; so I have to know in which page I am working when the script put there an image, just to link the current page to the proper master spread.
    To simplify everything I have resumed the core of my script here, using text instead of images:
    /* load a master document, only containing an empty text frame in the master spread, connected to the main text flow */
    var doc = app.open(new File("~/Desktop/mySampleDoc.indd"));
    /* I work on the story, thinking that whenever the textframe of the first page will be full, another text frame will be created in the next page (automatically created) */
    var story = doc.pages[0].textFrames[0].parentStory;
    /* now I put some lines of text into the story, expecting the creation of a new page when the first one will be full */
    for (var i = 0; i < 100; i++) {
       /* this is next line: */
        story.insertionPoints[-1].contents = "this is line n. " + i + "\r";
        /* here I want to know on which page is the line just created (error is generated here just during the creation of the new page + text frame) */
        thisPage = story.insertionPoints[-1].parentTextFrames[0].parentPage.documentOffset;
       /* and now I print page number */
        story.insertionPoints.item(-1).contents = "current page: " + thisPage + "\r";
    The big problem is: when the first text frame is full and an overflow is generated, a new page with a new text frame belonging to the main text flow (as the master spread wants) is generated; but it seems my script requests the page number before the new page with the new text frame is born, and an error is given.
    It seems like the script goes too fast in respect to the creation of the new page.
    If I delete the line thisPage = story.insertionPoints[-1].parentTextFrames[0].parentPage.documentOffset; everything is ok.
    I tried to introduce a delay until 3 seconds without any effect.
    I tried also to show or zoom the new page before the page number request, thinking to force the system to wait until page is really born, also without any effect (by the way, I was not able to show the page during the script's additions of text!).
    Someone can help me?
    Many thanks to everyone
    Roberto

    Many thanks: you are right!
    Unfortunately, I am at the very beginning with ExtendScript, and there are so many things I don't know until now...
    With recompose() everything works very well, and it give me a solution also for redrawing the page while the script is working...
    Many thanks, again!
    Roberto

  • Can I set up a master page to show custom alternating footer text dependant on page number?

    Hi,
    Is it possible to set up a master page to show different messages in the footer of a brochure dependant on page number? For example;
    Page 1: Buy from us because...
    Page 2: Our website address is...
    Page 3: Here's a special offer...
    Page 4: Our website address is...
    Page 5: Buy from us because...
    Page 6: Our website address is...
    ...and so on, repeating until the end of the brochure. The intention is for the footers to update automatically if the pagination of the brochure in question needs moving around - or if the messages need changing.
    Thanks!

    Thanks, but the text needs to be on a single master page which every page is assigned to. This is so the text alternates correctly regardless of whether new pages are inserted or moved. If I assigned separate master pages to individual pages and then moved the pages to a different location, the alternating footer text would then fall out of sync. I hope that made sense!

  • I have a question about extracting pages.  When I do the function, adobe saves the individual files as " file name space page number ", so the files look like this "filename 1.pdf", "filename 2.pdf", "filename 3.pdf".  Without too many gory details, I a

    I have a question about extracting pages.  When I do the function, adobe saves the individual files as "<file name><space><page number>", so the files look like this "filename 1.pdf", "filename 2.pdf", "filename 3.pdf".  Without too many gory details, I am using excel to concatenate some data to dynamically build a hyperlink to these extraced files.  It casues me problems, however, for the space to be the the file name.  Is there any way to change the default behavoir of this function to perhaps use a dash or underscore instead of a space?

    No, you can't change the default naming scheme. You can do it yourself if you extract the pages using a script instead of using the built-in command.

  • Printing  page number and continu text in sap script

    Hi
      I have created sapscript to print PO and using standard print program with three pages.
    My thrid page called with NEWPAGE <> from Main window of first or sencond page wokign fine but the page number is coming like page 1 of 2, 2 of 2 and 3 of 2
    another issue: I want to print continue text if sapscript has more than one page, Not included last above newpage <page>
    Please give me some idea how to go about above two
    Regrads,
    challa

    Hello,
    TO print the page number do like this
    <b>&Pages& of &SAPSCIPTS-FORMPAGES&</b>
    To print continues pages. Put the text in the <b>MAIN</b> Page.
    and use <b>PROTECT ..... ENDPROTECT</b>
    If useful reward.
    Vasanth

  • Is there any way to link page number with the reference page number within text in InDesign CC and CS6?

    Is there any way to link page number with the reference page number within text in InDesign CC and CS6?

    You should ask in InDesign
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • Text Variable Help? Beginning section page number required

    Hi guys,
    My name is Arjun and I am working on a book in Indesign. I've created quite a few sections and want to create a header on top that displays,
    for example
    "Summary FirstX to LastX" (in bold are the variables)
    First X being that Sections first page number
    Last X being that Sections last page number
    There is a default preset that came with Indesign CS4 that allows you to create a Text variable for the last page number of that section. What about the beginning? I don't wan to turn that to static text as i have a lot of page shuffling to do and the more the automated the better.
    Thanks,
    Arjun

    I hadn't noticed that there isn't a First Page Number text variable building block. How odd.
    I would try setting up a "cross-reference" to the first paragraph in your section. (This is not part of the text variable dialog. Use the cross-reference window under Type & Tables in the Windows menu). I assume these will work on master pages, though I haven't tried it. It does seem odd that you'd need to use completely different tools for each page number!
    Be aware that there's now a hidden marker at the beginning of that paragraph, which the cross reference uses to know what page number to insert. So if you accidentally remove it (for instance, if you delete and retype the whole paragraph), you'll have to set up the cross reference again. And you'll have to explicitly create that cross reference in each section of your book, while the text variables are pretty automatic. So there could easily be a better solution that I haven't thought of.
    Good luck, and tell us what finally works...

  • Page number after printing a text element in SAPScript

    Hello to all,
    is it possible to know the page number in which SAPScript print a text element?
    Thanks and regards
    Franco

    Hi!
    &PAGE& variable gives you the actual page.
    /E MYELEMENT
    /: DEFINE &MYPAGE& = &PAGE&
    I hope it works...
    Regards
    Tamá

  • TOC page number as roman numerals, body as decimal

    Pretty new to the DDX world.  I'm using Cold Fusion 8 to generate a PDF.  I then use DDX to open the pdf, add a Table of Contents and headers/footers.  The Footers contain the page numbers.  Right now, the page numbers just start with the TOC (1) and go to the nd of the document.
    I'm trying to figure out a way to number the TOC with roman numerals, but the rest of the document with decimals.  Right now, I'll accept i, ii, iii, iv, 5, 6, 7... but I'm guessing my customer will want the numbering started over at 1 when we hit the body of the document.  I'll cross that bridge later.  Right now, I can't seem to find a way to mix the numbering.  I know PageLabel is the place to attack, but I've had no luck so far.  My basic DDX markup looks like:
    <DDX>
         <PDF result="out1">
              <TableOfContents>
                   <Header>
                   </Header>
                   <Footer>
                   </Footer>
              </TableOfContents>
              <PDF source="Doc1">
                   <Header>
                   </Header>
                   <Footer>
                   </Footer>
              </PDF>
         </PDF
    </DDX>
    I've placed <PageLabel format="lowerRoman"> at various placing with varying degrees of success.  Any help is greatly appreciated!

    Hello,
    i think the best way ist to create a 2 variables and add at every master page 1 to var1 or var2 .
    At every following site of the first master pages add "1" to var1 .
    At every following site of the second master pages add "1" to var2 .
    With this coding you can fill your var1 and var2 i think
    Put this on every site then i think you can fill var1 and var2 different.
    If not you must make a simple coding var1 = var1 + 1 at site1 and var2 = var2 + 1 at site2
    // data.#pageSet[0].Seite1.AktuelleSeite::ready:layout - (JavaScript, client)
    this.rawValue = xfa.layout.page(this);
    Regards
    Edited by: Florian Martin on Jun 28, 2011 10:51 AM

Maybe you are looking for

  • ADC to DVI adapter for 30" compatability

    My G5 has the Radeon 9600 Pro with a DVI and a ADC output. Can this card drive an Apple 30" display if I had a ADC to DVI dongle cable to get two DVI outputs? Does such a thing exsist? G5 dual 1.8GHZ (4 RAM slot model)   Mac OS X (10.4.8)  

  • Table field comparison

    Hi All I ran following query for field comparison in Tab1 and Tab2. Needs to check what are the Col1 values missing in Tab2 SELECT Tab1.* FROM Tab1 LEFT JOIN Tab2 IM ON Tab1.Col1 = Tab2.Col2 WHERE Tab2.Col2 Is Null; Here count is 16177 When I run sam

  • Modul pool

    hi, In a tablecontrol and I have add a scroll vertical in PBO_dypnro, so: DATA: vlines type i. DESCRIBE TABLE gt_itab  lines lv_lines. lv_lines = lv_lines + 1. tablecontrol-v_scroll = 'X'. This is OK, but now, when I press the vertical scroll, the PA

  • Urgent !! create a new database

    Please assist, how do I create a new database Solaris 9 server Oracle9i Thank you.

  • Photo-Sort app. for iPad won't let me open it after purchase!

    Hello, I just purchased the Photo-Sort app for iPad but when I click on the icon it does not open. It does a little strange blip and then nothing happens. Anyone know how I can use this app and ix this problem?