[JS] About Paragraph Style

Hello,
There is a problem when you use following script. The error is "Object does not support method or property paragraphStyleGroups "
var myStory = myDocument.pages.item(0).place(File(mypath_new), [myX, myY], undefined, false, true)[0];
for(var myCounter = 0; myCounter < myStory.textContainers.length; myCounter++)
myStory.textContainers[myCounter].applyObjectStyle(myDocument.objectStyles.item("2 Legs Leading Top"));
myStory.texts.item(0).paragraphStyleGroups.item("NYT Byline & Text Styles").paragraphStyles.item("NYT Text");
Can anybody help me to solve this problem.

I am trying to flow the text first using command place. Then i need to apply object style to text frame and paragraph style to the text. I am getting perfect result for object style. But i am getting error for paragraph style.
I know we can include paragraph style as a part of object style and i did that. Still when i am applying the object style on text frame the paragraph style is Basic (Default). So that is why i want to apply paragraph style differently. Not as a part of object style.
This might be bug in ID.
--Avi

Similar Messages

  • About paragraph style

    Hello all,
    I created a new paragraph style 'ABC' by following the steps mentioned in Pages Help.
    Saved the document and closed it.
    Next I opened a new document, but when i checked in the style drawer the the new paragraph style 'ABC' is missing.
    Q. How do i get the new document to follow style 'ABC'? Did i miss any step while creating a new style?
    regards,
    K

    K,
    Styles are attached to specific documents. So when you create a new one, save the document, it will only apply to that saved document, and not other ones you open ...
    ... with one exception. Start with a blank document, set it up the way you want (fonts, views, rulers, styles, etc.), then click on File > Save As Template. Finally, click on Pages > Preferences > and set that template as your startup document. That way, every time Pages opens, you'll have your preferred styles right there handy.
    -Dennis

  • Trouble with CS5 InDesign Paragraph Styles

    I am creating a new template. I want one style to be "TOC Title", and another to be "TOC Level 1". All my concerns center around the Paragraph Style Options window (Type > Paragraph Styles > Create New Style >(double-click style to modify)  )
    1. No matter what I do, if I stipulate that "TOC Level 1" has leading (Tabs option, enter a "." or period in the Leader box), then InDesign does this for ALL my paragraph styles.
    For the record, under the General option, my "Based On" box is set to "[No Paragraph Style]" for both paragraph styles.
    So either I have to live with the TOC title having leading on it, or the TOC Level 1 having none, and in either case having to do something manually to the TOC everytime I use the template.
    How can I fix this so that TOC Title has no Leader and TOC Level 1 has a Leader of "." ?
    2. How can I set my TOC Title paragraph style so that it centers on the page?
    Edit: Two days later and no reply - I would have gladly supplied more information if I did not make the issue clear enough, and I would have even appreciated a simple "Sorry, I don't know." Since it is highly improbable that nobody out there knows ANYTHING about Paragraph Style tabs in Adobe CS5 InDesign, I must conclude that my issue is simply not "in" enough to be considered worthy of attention from the unnamed scores of elitists which must run this forum.

    I think the only way I'm going to be able to understand the problem is to see a sample file. Please make a sample, even if it has nothing more than your style definitions that are failing, and post a link to it here.

  • Is it possible to create table of contents without having paragraph style ?

    Hi all
    I have designed my magazine for school project in indesign including 20 pages ,now I wanted to make table of contents but I have difficultly to make I watched some tutorial online but it seems that I had to make paragraph style . actually I do not know anything about paragraph style and I just designed my pages manually ,anyone can help me please ?

    zidane010h wrote:
    actually I do not know anything about paragraph style and I just designed my pages manually
    This would be a good time to learn about styles, and if this is a class project they should have covered styles in your class.
    The built-in TOC feature depends on paragraph styles. Without them you'll be stuck making the TOC manually (though you can use cross-refernces to keep it up to date, but that's an even more advanced concept than styles).

  • Paragraph style - next style

    Hi!
    I have a question about paragraph-styles.
    For designing a book I receive a lot of unformatted text from different people. Now, of cause I need styles for different cases. One of those is a question-answer-style (interview -> see image below). You normaly can create a paragraph-style with the option to have, after pushing RETURN, another style (I think in english it has to be „use next style“). Okay, my problem is it works ONLY when I start typing the text word by word in Indesign an push RETURN and going on typing... That´s not what I want. My idea was, to copy an paste the whole text from Word (or from wherever) to Indesign and give´em the style it needs.
    Doesn´t it work somehow? With „nested styles“ it works neither. You can only make a „soft break“ to use next style. So I must insert it one by one after each paragraph. Not so ...
    Nochmal auf Deutsch, falls es missverständlich war:
    Also, ich möchte ein Absatzformat erstellen für ein Interview. Da ich die Texte alle nicht selber schreibe ,sondern lediglich fertig geschrieben erhalte und dann am Stück einfüge, würde es Sinn machen, eine Formatvorlage zu erstellen, welche mir bestimmte Schritte automatisch abnimmt. Es gibt diese praktische Einstellung unter "Absatzformatoptionen" -> "Formatvorlagen" -> "Nächstes Format". Das scheint aber nur zu funktionieren, wenn man den Text buchstabenweise in das vorformatierte Feld eintippt. Dann erst bekommt der Absatz nach jedem Umbruch das ausgewählte Format. Wenn ich das aber bei einem komplett eingefügten Text probiere (nach der Frage "Eingabe" drücken), pasiert nichts. Wieso? Wie kann man das hinbekommen, evtl. alternativ?

    Ok, I understand both, German and English.
    Ok, ich versteh’ beides, deutsch und englisch.
    When you select several paragraphs you can go to first paraagraph style in the pargraph style panel and choose with the right mouse click in the context menu:
    You can apply:
    This selected style
    This selected style and delete Overrides and/or Character Styles
    This style then next style
    This style then next style and delete Overrides and/or Character Styles
    Wenn Du mehrere Absätze ausgewählt hast, kannst Du im Absatzformatbedienfeld mit der rechten Maustaste das Absatzformat für den ersten Absatz auswählen und mit der rechten Maustauste aus dem Kontextmenü aus den verschiedenen Varianten wählen. Siehe oben in der Abbildung.
    Die Menüvarianten mit nächsten Absatz und Zeichenformate und Überschreibungen (nicht in der Abbildung) sind nur dann im Menü vefügbar, wenn das Absatzformat erstens einen entsprechenden Nächsten Absatz definiert hat bzw. Vorkommnisse von Zeichenformaten und/oder Überschreibungen vorkommen.
    PS. Es existiert auch ein deutsches Adobe U2U-Forum.
    Addition / Ergänzung:
    If the text is in only one frame or in only one cell of a table there exists as well the function next paragraph style. When you apply such an objects style to a text frame or to a cell of a table all text is formated according the first paragraph style choosen in the object style or cell style and the following paragraphs are styled as defined in next paragraph,
    Wenn der Text nur in einem Textrahmen oder innerhalb einer Zelle einer Tabelle ist, dann besteht die Möglichkeit, dass im Objekt- bzw. Zellenformat unter Absatzformat erstens dieses aktiviert wird und zweitens, das nächste Absatzformat aktiviert wird. Dadurch werden bei Anwendung des Objekt- bzw. Zellformats der erste Absatz und die darauffolgenden entsprechen mit den definierten Absatzformaten und nächsten Absatzformaten formatiert.
    Message was edited by: Willi Adelberger

  • Why aren't my Muse paragraph styles being recognized by Business Catalyst as CSS?

    We switched over to Muse for site-building so that future designers can still build sites here when my coworker leaves, so I was looking at how to integrate an existing Business Catalyst blog into Muse and found this tutorial: Building a Blog with Business Catalyst and Muse
    The problem is, I have followed his instructions, but Business Catalyst isn't recognizing the paragraph styles from Muse so that I can use them as he did in the develop tab for BC to update the look of the blog to match the site. I really need help! The customer will NOT be happy if I can't get this up and running. I feel stuck between Business Catalyst and Muse and no one seems to be able to help me or has had comments about the same problem. Has the newest version of Muse done away with converting Para. Styles to CSS? Is there a way to work around this?

    Hi
    This can happen if you are using a different module template and applying to Blog modules, or if any html format if defined in module layout.
    Please make sure that no format is defined from BC end for Blog and then page should render the style that you have added in Muse.
    If you need a detailed help, please join our Live chat team and they will help you out by removing any extra format that has been added to your site Blog module.
    Thanks,
    Sanjit

  • (new to scripting) Only allow certain paragraph styles to break to next column/page

    Hi all,
    As stated, I'm very new to scripting. I've done a few small scripts to automate Photoshop tasks and such. I'm in the process of trying to learn Javascript as much as possible, with the hope of bringing about more efficiency for our small production department. It's a daunting task, but I'm trying my darnedest.
    One of the number one goals I have is the find a way to automate pagination of weekly transaction records. These records run between 32 to 48 pages normally, with each page having 5 columns. Creation of these pages is very systematic, so it would seem that this process should be able to be automated, but there are some challenges I'm having a hard time thinking about how to attack.
    One of the key tasks needing to be figured out is getting the records to go in with headings and subheadings always starting at the top of a page/column. Just about all the copy comes in with predetermined paragraph styles, so a script should easily be able to search for instances of each style. What needs to eb accomplished is only allowing the flow of copy to break on certain styles and not others ... (counties, towns, etc.)
    For example: if you have the following  ...
    Countyland <styled "county">
    Utopiatown <styled "town">
    46 Appletree Lane ...... $500,000  <styled "listing">
    Sold by: Some Guy   <styled "listing">
    Bought by: Other Guy  <styled "listing">
    Mortgage: This Bank  <styled "listing">
    Date: 12/14/11  <styled "listing">
    Dystopia Village <styled "town">
    47 Orangeplant Road ...... $400,000  <styled "listing">
    Sold by: Some Guy   <styled "listing">
    Bought by: Other Guy  <styled "listing">
    Mortgage: This Bank  <styled "listing">
    Date: 12/14/11  <styled "listing">
    If the two records above were to fall near the end of a column, the break to the next column should NOT occur anywhere except:
    - Before the county (causing the county to start at the top of the next column
    - Before the second town (Dystopia Village, forcing that town to the top of the next column)
    - After both (forcing whatever town/county is next to goto the top of the next column)
    So basically, I need to find a way PREVENT column breaks where they should not occur. Inserting column breaks is one thing (I know how to do that). Prevention is the issue though that confounds me.
    Does anyone have any thoughts of how to achieve such a thing? I know there are "non-breaking space" characters ... is there, or could there be, some kind of a "non-breaking return" character? Or would it be more feasible to test for the paragraph style at the bottoms of columns and insert column breaks in once it finds an appropriate match?
    Am I going about this all wrong?
    Again, any help or suggestions are more than welcome.
    Thanks much.
    ~Nate
    FYI .. using InDesign cs5.5

    I am now wondering about a possible solution. It would be one hell of a challenge for me to figure out how to code it, but I at least need to figure out the theory first, then I'll try to figure out how to code it.
    Again, the issue at hand is preventing column breaks for the "listing" style in the following example. Please note, the number of "listing" lines varies. If the following two entries (in a long list of similar entries) were to be near the end of a column, I'm trying to cause the flow of text to break only before a county style, or a town style (if it's not the first town in the county).  Basically, no breaks in the middle of listings.
    Countyland <styled "county">
    Utopiatown <styled "town">
    46 Appletree Lane ...... $500,000  <styled "listing">
    Sold by: Some Guy   <styled "listing">
    Bought by: Other Guy  <styled "listing">
    Mortgage: This Bank  <styled "listing">
    Date: 12/14/11  <styled "listing">
    Dystopia Village <styled "town">
    47 Orangeplant Road ...... $400,000  <styled "listing">
    Sold by: Some Guy   <styled "listing">
    Bought by: Other Guy  <styled "listing">
    Mortgage: This Bank  <styled "listing">
    Date: 12/14/11  <styled "listing">
    Naomi previously suggested messing with the "keep options" in the styles. This will solve the issue of preventing breaks before listing details start. But it won't help in keeping listing details from breaking, since the number of lines can vary.
    I'm now thinking ... might it be possible to have a script search all copy, looking for the last line of listings, and then apply a second listing style with a different keep option setting? The "normal listing" style would "keep next 1 line". The "last listing" style would not, therefore, allowing a break.
    Here's a map of what I'm thinking: (bear with me on the terrible syntax, this is just for illustrative purposes)
    listingNormal has keep with next 1 line applied
    listingBreak does not keep with next line
    if currentLineStyle == listingNormal
    AND
    style of next line != listingNormal {
    currentLineStyle = listingBreak
    Does this make sense? If so, does this sound feasible?
    Thanks any and all.
    ~Nate

  • I copy text, paragraph styles, character styles & images from 1 document to another only text copies

    I have a few documents that have text and images that is frequently repeated through many chapters of an In Design book. (Printing, exporting etc.) I used to select all in the source document, Command + C to copy it, change to the target document, Command + V to paste it. It worked well for six months.
    About two weeks ago it stopped working (shortly after an update to In Design). I have text, paragraph styles, chacter styles and images in each document. Only the plain text copies over. This is the same for any document.
    I haven't changed Preferences in six months.
    I'm on a Mac 10.8.2, In Design CS6 version 8.0.1.
    It's driving me crazy! It's a lot of work to reformat each 2  to 10 pages after copying it in.
    Steven Hussey

    Source:
    Target:
    Here you go.
    Steve

  • Problem with footer in table style not applying paragraph style... or just me?

    I'm having a niggling problem making a table style with cell/paragraph styles for the header, body, and footer respectively. I want to make it as simple as possible for other users but one thing keeps tripping me up. I'll try and describe with screenshots. I'm using InDesign CS5 on Windows 7.
    I have a table style set up with cell styles for the header, body, and footer, and paragraph styles for each as well. Say I'm converting a list of generic text to this table:
    i convert it to my table style. The body style is a numbered list:
    I convert the header to an, err, Header. The cell applies the header paragraph style as I should expect:
    I convert the footer likewise, but it maintains the Body text paragraph style as an override!
    So naturally I clear the override and it works fine. But of course, I'd rather it acted like the header row. I can't work out where the override on the footer comes from and why it operates differently in this respect to the header row. There is nothing different about how the styles are constructed. Have I made a mistake somewhere, or is this correct behaviour I'm misinterpreting, or something...?
    edit: Here is the file, if that will help:
    https://www.dropbox.com/s/4kzgui1itaskuvz/strip%20list%20test.indd

    Hi,
    I was able to reproduce the issue you are facing.
    I will be logging a bug for this and it would be investigated.
    Thanks a lot for reporting the problem!!
    Javed

  • JS Accessing the Paragraph Styles Panel Menu?? PLEASE HELP!

    I haven't heard anything yet about this topic, can anyone help me?
    Hi all,
    I'm hoping you can help me with is, I'm about to tear my hair out! I'm using JavaScript in InDesign CS3 (PC). I have three heading scripts that I wrote that go through a series of actions when clicked, and I need to be be attached to the appropriate paragraph styles. This is so the user will receive a certain look and feel when they click the style, but they won't know a script ran at all, they'll think it's just another paragraph style.
    I ran the menu id script from the InDesign Scripting Guide, and it says that the root ID should be "Paragraph Style Panel Menu", however, that is not working. HELP! How can I get InDesign to reference the existing Paragraph Style Panel Menu?
    THANK YOU! Code below:
    myDoc = app.activeDocument;
    var setpath = "~/Application Data/Adobe/InDesign/Version 5.0/Scripts/Scripts Panel/";
    var myScript1 = new File(setpath + "Heading 1.jsx");
    var myScriptAction1 = app.scriptMenuActions.add("InD - Heading 1");
    var myEventListener1 = myScriptAction1.eventListeners.add("onInvoke", myScript1, false);
    var myScript2 = new File(setpath + "Heading 2.jsx");
    var myScriptAction2 = app.scriptMenuActions.add("InD - Heading 2");
    var myEventListener2 = myScriptAction2.eventListeners.add("onInvoke", myScript2, false);
    var myScript3 = new File(setpath + "Heading 3.jsx");
    var myScriptAction3 = app.scriptMenuActions.add("InD - Heading 3");
    var myEventListener3 = myScriptAction3.eventListeners.add("onInvoke", myScript3, false);
    try{
    var myScriptMenu = app.menus.item("$ID/Paragraph Style Panel Menu");
    myScriptMenu.title;
    catch (myError){
    var myScriptMenu = app.menus.add("$ID/Paragraph Style Panel Menu");
    var myScriptMenuItem1 = myScriptMenu.menuItems.add(myScriptAction1);
    var myScriptMenuItem2 = myScriptMenu.menuItems.add(myScriptAction2);
    var myScriptMenuItem3 = myScriptMenu.menuItems.add(myScriptAction3);

    K Jane wrote:
    "How can I get InDesign to reference the existing Paragraph Style Panel Menu?"
    var myParagraphStyle = myDoc.paragraphStyles.item("myParaStyelName");
    Is this what you are after? Don't know how it relates to your sample code though.
    Brett

  • PAGES: How change a Paragraph Style ?

    Hello all,
    there is something that is driving me crazy...
    using Pages for iPad is it possible to change the default settings of a Paragraph Style ?
    I am not talking about importing a document with a custom set of styles but simply:
    - I open my document in Pages for iPad
    - I select a line of text and apply the "Header 1" style to it
    - I am not happy - for example - with the font size of the Header 1 style and I want to make all my Header 1 paragraphs change their font size
    - In the desktop version you would simply change/update the style you need, but on the iPad I cant find a way to change those values
    (BTW, I seem to remember that I once managed to do this...)
    Thanks,

    You seem to be able to copy and paste styles, but nowhere that I can find does it let you update the defined styles.
    There is the manual which does not refer to any suitable method, and also some eBooks on the subject but I have scanned those and can find no reference to redefining styles either.
    The more I play with Pages for iPad the more of a toy it seems. Sort of amazing that it does what it does on a mobile tablet, but when you get right down to it, not very useful.
    Peter

  • Pages for iPad: change a Paragraph Style ?

    Hello all,
    there is something that is driving me crazy...
    using Pages for iPad is it possible to change the default settings of a Paragraph Style ?
    I am not talking about importing a document with a custom set of styles but simply:
    - I open my document in Pages for iPad
    - I select a line of text and apply the "Header 1" style to it
    - I am not happy - for example - with the font size of the Header 1 style and I want to make all my Header 1 paragraphs change their font size
    - In the desktop version you would simply change/update the style you need, but on the iPad I cant find a way to change those values
    (BTW, I seem to remember that I once managed to do this...)
    Thanks,

    You seem to be able to copy and paste styles, but nowhere that I can find does it let you update the defined styles.
    There is the manual which does not refer to any suitable method, and also some eBooks on the subject but I have scanned those and can find no reference to redefining styles either.
    The more I play with Pages for iPad the more of a toy it seems. Sort of amazing that it does what it does on a mobile tablet, but when you get right down to it, not very useful.
    Peter

  • [Basic Paragraph] style behaviour upon copy/paste

    Hi,
    we just get started changing from Quark to InDesign, and our lead layout-producer is not so crazy about style sheets, so everything she creates is using the [Basic Paragraph] Style.
    A by her created libary now contains groups of text objects in Basic Paragraph with format changes +
    When I use these groups, or copy and paste from another document, why does InDesign keep the changes like fontsize or -color, but does change the font?
    My basic paragraph does use another font, so its quite annoying INDD keep the changes, but keep change the font.
    What can I do to prevent INDD from changing the font?

    So, i made this beauuutiful thingy for a test. It looks disgusting, i know. The point is that it uses 4 fonts and different modifications.
    If I get you right, to prepare a "good" document, our layout-producer should clogg our documents with different paragraph-styles not to use the Basic? Sure, she can convert it into paths, but different collegues have to translate this stuff later so that isnt an option.
    Maybe she can "design" things like that in Illu, giving us an AI to use.
    I made an irritating discovery:
    As I built this thing with Futura as my Basicparagraph-font, i dragged it into a libary, closed every doc to change my default-paragraph-style to another font to see what happens. I set up a empty doc and dragged it back in again – no changes at all. I was surprised. Its in the basic, it has a +, and if i click on basic it changes to GillSans, if i alt+click the modifications (like the colors) turn to black… – this is what i was looking for :-)
    But why with my other test-object. Im nearly in closing time here, so i will upload an image tomorrow, but the only variable that haved changed to my second try minutes ago:
    – the objects were converted using Q2ID (Markzware)
    – the group just contained one (but another) font
    Maybe theres the problem somewhere.

  • FIND/CHANGE - Applying Paragraph Style

    Hello,
    I used FIND/CHANGE to apply my paragraph style and when I apply the paragraph style... it applies the style to the entire line.
    For example,
    A. #70712       resulted to         A. #70712
    I only wanted the "#70712" to be changed to my style. I used the GREP search and entered #.+ and then I choose the paragraph style I want and clicked change all. The problem is that it changed all the text on that line and applied the paragraph style.
    Please help. Thank you very much.

    graphicsoc wrote:
    Hello,
    I used FIND/CHANGE to apply my paragraph style and when I apply the paragraph style... it applies the style to the entire line.
    For example,
    A. #70712       resulted to         A. #70712
    I only wanted the "#70712" to be changed to my style. I used the GREP search and entered #.+ and then I choose the paragraph style I want and clicked change all. The problem is that it changed all the text on that line and applied the paragraph style.
    Please help. Thank you very much.
    If I understand your request correctly:
    If your paragraph style uses a numbered list to create the "A." and the remainder of the paragraph consists of only "# 70712" that you type in manually (or place from an existing file), I believe that you you don't need GREP. You can format the auto-numbered list differently from the remainder of its paragraph, by specifying a character style for the number portion.
    To extract only the non-numbered portion of an auto-numbered paragraph, for a TOC, in the Table of Contents dialog box, open the bottom part by clicking More Options if necessary, and in the Numbered Paragraphs pull-down menu, select Exclude Numbers.
    Read more about Table of Contents in Help, and/or with a Google search for terms like "InDesign table of contents numbered list exclude numbers" without quotes.
    If you need additional special formatting "tricks" in the source paragraphs, or in the TOC entry paragraphs, look into Nested Styles and GREP
    Styles in Help or Google searches.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Tagging character styles and paragraph styles in inDesign

    I'm working on a complex book in which everything on the pages is styled.
    I've been asked to tag the vocabulary terms in the text, so that the correct page number shows up in the index.
    I've been asked to tag the folios as well, for the table of contents.
    The folios are a paragraph style.
    The vocabulary terms are styled with a character style.
    How do I do this?
    Any help much appreciated.

    InDesign's built-in Table of Contents function picks up text based on paragraph styles. I'm not sure you really men, though, that you want to pick up the folios, if you are using the term as I understand it, to mean the page numbers. You really want to pick up the various headings used to identify the topics or titles. ID will supply the page numbers.
    As for the indexing, there may be a script that can find text with a particular character style assigned and add it to an index (you should ask over in the scripting forum: InDesign Scripting) but you should also read the Help on Indexes and learn more about how they operate.

Maybe you are looking for

  • Lock_set_spl

    I am having ultra 80 sun system os is solaris 8 The system boots and works fine. After oracle database is up, Once application is started , it core dumps and reboots. I am attaching the messages file for ur reference. please guide me in solving the p

  • How to change setting for 'last 5 password change prompt'

    hi friends in sap, when a user changes a password sometimes he/she gets a message "Please select a password that is different from last 5". now i am in need to change this default value of "5" to "2" but i dont know what is the parameter name for cha

  • Can't figure out how to reduce size of printed jpeg

    I have a jpeg image I want to print.  When I click on it on my desktop, it comes up in Preview.   The image as printed is too big, so I want to reduce it.  I thought I could do this by lowering the percentage of the "Scale" radio button (this is part

  • Missing or inaccessible method:

    Hi everyone, I am using Oracle Coherence 3.7.1 on OEL5. I am trying to perform filtering in CohQL but it gives me an error and I have not solved this issue yet. CohQL> select count() from customers Results 8 CohQL> select key() from customers Results

  • What is the maximun number of static NAT in ASA

    Hello everybody, someone know how many sessions of static nat can configure in cisco ASA ??? thank you for you response...