allign paragraph and numbers on same line [CS3]
I have a little problem with paragraph and numbering.
i'm creating a a little TOC with ownly my Chapters.
What i want to accomplis:
Page nr. Chapter nr.
Chapter 2 1
Chapter 6 2
the Chapter names, is text that is retrieve from my document.
behind the names i want the page number following with a chapter number.
in the example below i have split the paragraph in 2.
outherwise my page number will stand on the next line.
the Chapter nr is not implement in the example, but you got the idea ![]()
for (var j= 0; j<foundInstances.length; j++)
{
page = foundInstances
myTextFrame.parentStory.insertionPoints.item (-1).contents = page.allPageItems[2].paragraphs[0].contents.substr(0,page.allPageItems[2].paragraphs[0].contents.length-1);
myTextFrame.parentStory.paragraphs
myTextFrame.parentStory.insertionPoints.item (-1).contents = page.name;
myTextFrame.parentStory.insertionPoints.item (-1).contents = page.allPageItems[2].paragraphs[0].contents.substr(page.allPageItems[2].paragraphs[0].contents.length-1,page.allPageItems[2].paragraphs[0].contents.length);
myTextFrame.parentStory.paragraphs
}
1. is there a way, so i can align the numbers?
2. or is it only possible to allign ownly 1 of the 2 numbers?
3. is it posssible to give the numbers a different paragraphStyle?