About TOC style add

Hello,
We want to add TocStyleEntry to our TocStyle using javascript.
However tocStyleEntries.add accept string not paragraphystyle and we're tried with paragraphystyle name too.
We have tried these codes, none of them are working in our case. (exception thrown like this paragraphystyle name is wrong)
tocStyleEntries.add(variableOfParagraphyStyle);
tocStyleEntries.add(variableOfParagraphyStyle.name);
tocStyleEntries.add("Name of the Paragrapy STYLE");
tocStyleEntries.add("Name of the Paragrapy STYLE (It's folder)");
How we can obtain (or format) the string that tocStyleEntries.add function accept?

@handifem – you have to use a string.
So, options b or c could be right.
Is the paragraph style nested in a paragraph style group?
Then none of the proposed options will work.
The syntax for nested paragraph styles would be:
"NameOfGroup:NameOfDeeperNestedGroup:NameOfParagraphStyle"
Build a TOC Style without scripting InDesign and ask for the names of all entries of all toc styles of the document:
alert(app.documents[0].tocStyles.everyItem().tocStyleEntries.everyItem().name;);
Uwe

Similar Messages

  • Two different TOC styles in one Pages document?

    I'm a new Pages 2.0.2 user with a large document with two different tables of contents 20 pages apart. I'm trying to format them differently using different TOC styles but when I change one's style the other one changes as well. Anything I do format-wise to one goes over to the other as well. I'm hoping this is just something I have yet to learn about the product. Any thoughts?
    iMac G5   Mac OS X (10.3.9)   1GB Memory

    Hi
    Someone else might know but this doesn't look good, taken from Pages Help:
    "Changing the appearance of text in a table of contents
    You can change the appearance of text in a table of contents and also add a leader line between a TOC heading and its associated page number.
    To change the appearance of text in a table of contents:
    Select the TOC heading you want to change. When you select a TOC heading, all the entries of the same heading type are automatically selected; headings cannot be individually selected.
    Click View in the toolbar, and then choose Show Styles Drawer.
    The Styles drawer displays a list of table of contents (TOC) styles. The TOC style that corresponds to the selected entry type is also selected.
    Do one or more of the following:
    To change the appearance of text, change it as you would format any paragraph text. For example, choose Format > Font or use the Text Inspector to make edits.
    To create leader lines from a TOC heading to its associated page number, click Inspector in the toolbar, click the Text Inspector button, and then click Tabs. Click the value for the TOC in the Tab Stops list, and then choose a line style from the Leader pop-up menu."

  • New character style not showing up in TOC style

    I created a new character style called Subchapter....
    Then I went to layout>toc styles.. and hit [new]. Under "Style" my new character style "Subchapter" is not there. Also, under the "Styles in Table of Contents....include paragraph styles.." my new character style "Subchapter" is not in the other styles list.
    What am I missing?
    Thanks.
    Also, forgot to mention, I am in book mode at this point. Maybe I need to add that new character style to each .IDD chapter of the book?

    NEvermind, it was because I was making a character style, not a paragraph style. Now it shows up.
    Thanks anyways.

  • TOC freakiness: Loading TOC style from other document reset my par styles [CS4]

    I loaded a TOC style into my layout (from a template doc), only to find that all my text formatting had reverted to that used in said other doc.
    This even affected styles not used in the TOC, such as body text.
    It appears that instead of just loading the TOC style, it is loading (and replacing) paragraph styles as well.
    Anyone else have this problem? Looks to me like a bug.

    Aaron,
    You probably already checked on this but, if some or all of your styles are Based On the paragraph style known as Basic Paragraph, then you could have this unfortunately fatal accident?
    Mike Witherell in Maryland

  • TOC style template for epubs - where is it stored?

    Hello,
    some years ago I saved 3 different toc styles for my epubs. Now I added some more (for 2 levels etc.). This new ones also I saved.
    But when I start to build the epub in the first option windows at the point TOC style navigation there are still the old three templates to select. I'm not able to choose the new ones.
    Now I deleted in every dokument file the three old TOC styles by using the usual TOC tool. But in the epub-generator these templates are still there. With the result: the epub toc wich will be generated is wrong.
    Where are these templates stored?
    I use ID CC 2014.
    Thanks
    Detlef

    Hi Anshul,
    Thanks for your help. I export to epub 2.01 reflowable.
    For dokuments that might be so. But I do it with books and I deleted the TOC styles in ALL documents but it was still there in the list. Also I created a new book with all new dokuments, generates on TOC style in the first document and in the export option list there were the Default style only. It is not to figure out, where ID ist looking for that?
    Cheers
    Detlef

  • TOC style issue

    I'm working toward converting my book to an ePub.
    So, I created a new TOC style to pick up both the chapter number and chapter title on level 1.
    But the new TOC style only appears as an option with my TOC doc open. The new style doesn't appear as an option in my book chapter files.
    Is there a way to make the new TOC style available when opening another doc in my book?

    I would appreciate some clarification.
    I've attached a few screenshots.
    My style source is 03_chapter. So, do you mean to simply select the TOC doc as shown below, and then synchronize? Also, how would I know if the other styles in the TOC file are defined correctly?
    Thanks.
    All except Master Pages are checked.

  • TOC Style

    Though the TOC Style "Always Show Selection" has been checked but still in the generated chm file using RoboHelp 10 does not close the book.  When a user navigates from one link to another from topics, the related topic is not displayed.  The other books remain open, the related book from where the html file gets displayed is not displayed.  Can anyone help me with this.
    Soni

    Rick will still be in bed right now.
    What you are showing is a webhelp window. In theSSL pod, set Microsoft HTML help to be the default, unless you are using Rh10. Then go the Project Set Up pod and create a new window, in Rh 10 you will get an option for the window type.
    In the new window you will see the required option.
    Make sure you select that window when generating the help.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Setting up a TOC Style

    It is possible to set up a style such that the last line of a paragraph has a wide right margin that the read of the paragraph?
    I would like to have a TOC style that has
    FIRST LINE                                          Justified Right Margin
           INDENTED SECOND LINE             Justified Right Margin
           INDENTED THIRD LINE                                                             RIGHT JUSTIFIED PAGE MARGIN
    Such that the page numbers are away from the TOC text.

    Set the paragraph style with a right indent, and a negative last line indent ( this is kind of the opposite of a first line hanging indent). It won't be obvious with ragged right text, and may not show at all unless the last line is actually the correct length to fill the column width.
    In your example it looks as if you intend to justify, which will help, and you can use either a flush space or a right-indent tab to move the end of the last line to the margin.

  • Selected TOC style Name

    Hi All,
    Simple question for you...
    How can I alert the selected TOC style name.
    We are creating huge tool. Based on the selection Toc Style, we will process the multiple document.
    For example I want to alert the Toc Style CCC(tick mark) name in this document.
    Trying Code:
    var myTocStyle = app.activeDocument.tocStyles.selectedIndex;
    //~ var myTocStyle = app.activeDocument.tocStyles.item(-2);   //Dont want this concept
    Very urgent request. Please help.
    Thanks
    Beginner_X

    From:
    myStory.storyType
    you can determine that a story is a TOC, but how do you get from there to the TOC Style that was used to create said TOC?
    This was the question that was bugging me back in CS3 days and I see no improvement in the CC object model. Stories don't have an associatedTOCStyle property. But maybe you can get at this by lateral thinking. If a story was created as a TOC then it has certain paragraph styles in it. If the TOC Styles are designed to have unique paragraph styles that identify the TOC Style, then you're home and dry. For example, you could have a ParagraphStyleGroup for each TOC Style and the name of that group could be the same as the name of the corresponding TOC Style.
    Of course, this assumes you have control over the template for the project so that this relationship can be relied on. But given that, you can start with a text selection. Check the applied paragraph style, look at the name of its parent and bingo: there's the name of the TOC Style.
    I'm not sure if this helps in your situation.
    Dave

  • Synchronizing TOC Style issue[CS4][js]

    Dear All,
    When i synchronizing TOC style in group of documents thru
    myBook.synchronizeTableOfContentStyle  = true;
    myBook.synchronize();
    it will synchronize perfectly to all documents if TOC style exists in first document in that batch, if its not (in any other document) it will not synchronize the style.
    Help me to synchronize TOC style that will exists in any one of the document in existing batch (documents).
    Thanks & regards,
    San

    synchronize: Synchronizes the entire book to the style source document.
    The default style source document for a new book is the first one added, but you can change it to any other with
    myBook.styleSourceDocument = myBook.bookContents[...]
    or
    myBook.styleSourceDocument = ..a reference to a document..
    This does mean, however, you have to know in advance which of your documents contains the TOC style you want to copy to all others.

  • Table of Contents Issue - TOC Styles Set Correctly, but TOC Shows Two Fonts on One TOC Line

    I created a template and set up all of the styles correctly, as with every other template I've ever made.  However, I have never run into this problem before.
    I created the template to match a client's style/look.  They use a font called "Gill Sans MT."  My Normal style is set to this, and my TOC styles (TOC 1, TOC 2, TOC 3, etc.) are based off of the Normal style.  My Heading styles are
    also based off the Normal style and use the same font.
    For some reason, the TOC in the document is populating with two different styles.  The actual Heading text is showing up as Arial font, but the tab leader and the page number are showing up in the Gill Sans MT font (see below).
    Any idea what's going on here?  I have tried modifying the TOC styles, inserting a new TOC, basing the TOC styles off of "(no style)," changing the Heading styles, clearing the formatting on the Heading styles, etc.  I can't get anything
    to work.

    All I can suggest is to try your steps again. You mention everything that I would try.
    I assume that the template is a .dotx or .dotm file, and so, does not have an "attached template."
    When you tried basing your TOC styles off "no style" I assume you set the font to Gill Sans MT. I would definitely have the heading and TOC styles set to cascade.
    How styles in Microsoft Word cascade by Shauna Kelly
    Charles Kenyon Madison, WI

  • Header & TOC style in Pdf

    Hi everyone,
    I have two questions regarding pdf generated document.
    1. When I generate a pdf file a Header with the document name is automatically generated, how can I remove this Header ?
    2. Can I change the style of the TOC generated ? I would like to add blank spaces before my titles defined as Heading 1 ?
    Thank you for your help !

    You need to create a Word document instead, edit that as required and then produce the PDF.
    See Printed Documentation on my site.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Change TOC Style in Robohelp 8.0.2- Webhelp

    Hello,
    Essentially what Im trying to do is remove the highlight or focus outline around my toc item when it is clicked. On safari it has a blue border that appears and everywhere else it produces a dotted line around them. I would also like to be able to set a padding, change the font color and style on rollover and normal. My first thought was to add something like this to my style sheet for all cases of <a>, but this isnt cutting the cake.
    a {
    outline-style: none!important;
    -moz-outline-style:none!important;
    Is this functionality built into the interface or do I need to go edit the javascript file that add/edit these styles? And if so, what file do I need to edit and where?  I did run across this related post, but the reference link in it doesnt work. http://forums.adobe.com/thread/690847?tstart=0
    Also my javacript skills arent super strong, so I could use some thorough instructions if possible
    Thanks for your help

    Well, I figured since I struggled with this I would help peoples out with the easiest solution I could find.
    Theres 2 locations that should be adressed when trying to edit the your Table of Content styles manually via javascript.
    whtdhtml.htm:
    For editing the color, underline, font, font size... setting are under "setFont" for normal and hover states.
    whthost.js
    For the background box size when selected, you can add padding. Also to remove the ugly highlighting from clicking on one (focus), you can add the styles inline upon creation within the following code. You can also add whatever else you want into it from here as well. This is located within 2 spots of this file. One for the book, and one for the topic, so you need to change it in 2 places.
    Make sure you make a backup of your files before making changes, and to keep these altered files in a separate location because Robohelp will overwrite them next time you generate your webhelp, hence you will need to overwrite these files every time that you do.
    Hope this helps!

  • Question About Table Style Terminology

    I am curious about what other people might call the following two styles of table construction.
    Style 1:
    create table cust_trans_a (
        cust_nbr                varchar2(6),
        trans_date             date,
        sales                      number(11, 2)
    Style 2:
    create table cust_trans_2 (
        cust_nbr                varchar2(6),
        sales_in_2004,
        sales_in_2005,
        sales_in_2006,
        sales_in_2007   
    );I have been using the terms vertical and horizontal respectively for these two construction styles, but I would like to know if other DB professionals have another, more descriptive set of terms for them.
    Thanks,
    Gregory

    How about normalized and denormalized?
    Generally, denormalized data models (Style 2) are a pain to deal with because you're constantly having to add columns (i.e. you'll eventually want to store 2008 sales) and because you have to maintain the same information in both summary and detail tables. In Oracle, if you think you need a denormalized table, you're generally better off creating a materialized view instead.
    Justin

  • Questions about the new add folder/add item api functions ...

    I have a few questions about using the wwsbr_api.add_folder and wwsbr_api.add_item functions for 3.0.8.
    1. How do I retrieve the parent_id for the current folder or if I am running a batch add folder?
    2. How do I set a folder style other than the parent folder's?
    Any help would be appreciated.
    Bethany

    Bethany,
    This post is best suited to the Oracle9iAS Portal Content Areas forum.
    Thanks

Maybe you are looking for

  • Fan is running constantly after upgrading to Yosemite

    I have a 2007 era MacBookPro and since upgrading toYosemite, the fan will not stop running, from the moment I power on.  This is new behavior that I did not have under previous OSs.  At the moment, I have only Safari and Finder apps open and the mach

  • IE8 back button not working in Login page

    Hello all, I have a problem. When I go from one page to a Login page, Back button on IE(my IE version is 8) doesn't work. I use theme 16 - Dark Blue, APEX version - 4.0.2.00.07. Is that a problem from APEX or the theme, or the problem is in IE browse

  • Email Subject & Body

    Is there any way to change the subject line and the body message when i send a scheduled report by email from the queue manager?

  • Arch Linux User Creation Section

    I think there should be some sort of Arch Linux software/script/multimedia section in this board.  Like the various splash screens, wallpapers, scripts, and other related software/things that the users of Arch Linux have created.  It isn't very easy

  • De-activate PSE6

    Hi I am going to re load my installation disc on my imac but I have been advised to de activate my photoshop first. Does anybody know how to do this on Photoshop elements 6 for Mac ???   I have looked all over the place for the option Thanks