Forum Replies Created
-
AuthorPosts
-
Rivkah Lewis
MemberHere’s what I’ve done (which is my process for dozens of books done in the past):
I imported the text without mapping styles.
I ran a search and replace to find all italic text and replace with an italic character style.
I then applied the body text style to all the text via control+A. (I format the chapter number and header later using GREP find and change.)
Usually that does the trick and if I see there are problems, I clear the overrides (this is a straight text kids novel).What is happening here is that character style is applying to text that wasn’t italic to begin with!
When I select the text, it has the italic character style applied to it AND the paragraph style has a plus. When I clear the override, it just changes the font (all italic text is coming out in Times New Roman instead of the font I chose) but remains italic.Rivkah Lewis
MemberI was looking at it in Adobe Acrobat.
Replacing the image did the trick. I guess I should have thought of that :) I was thrown off by the fact that some of the pages were fine and some weren’t.Rivkah Lewis
MemberSilly me – I didn’t realize there was a Javascript version as well. That worked like a charm.
Thanks David – I knew I could count on you!Rivkah Lewis
MemberThanks for the quick reply.
I tried what you suggested and it didn’t work.
Then I tried placing the text into a new blank doc and everything came in OK as far as the Italics are concerned.
So maybe there is something wrong with the doc I set up.
I’m loath to set it up again from the beginning.
Any further ideas?
There are no par/char selected when I do the import.Rivkah Lewis
MemberI figured out that when you are WFH and your kids are on vacation and you have a bad head cold, you download the wrong files but reference the correct ones.
So in short, I was bringing in files with no bleed the client had originally sent.::blushing::
Rivkah Lewis
MemberI think I figured it out.
(Don’t see how to delete a topic)Rivkah Lewis
MemberI had a deadline, so I ended up doing it manually, table by table.
But the format is as described above – column one of the table in French, column two in English.I am wondering if Annotations didn’t work because the table was grouped with an image…
Rivkah Lewis
MemberAfter posting a playing, I sort of figured out it was the span messing things up.
I couldn’t figure out why, though. OK, will go get rid of those ever so convenient spans… Thanks for commenting, Kai!Rivkah Lewis
MemberJust to add on a detail:
this only happens on pages that have an indented style that includes a span in order to keep paragraph together and insert some space before and after the group of paragraphs to which the indented style is applies.Rivkah Lewis
MemberI am really embarrassed, but for the record I have to say that it worked beautifully.
I did in fact get an error message and therefor did not bother checking that it had in fact applied the master to those pages!
So I’m still not sure what the error message was about, but I LOVE this script.
Thanks for posting it, Khalid and thanks for your comments, David.Rivkah Lewis
MemberThanks for taking the time to try it out and reply.
I had found that article and followed the instructions.I was changing the style name incorrectly ::blushing::
But now I’m getting a java script error 21 that the problem is with the following line
myParas[i].parentTextFrames[0].parentPage.appliedMaster = myDocument.masterSpreads.item(“B-Master”);I tried
1. changing “B-Master”to my master name. I assumed I was supposed to keep the letter heading. Mine also is B so I wrote it as “B-chapterpage”
2. When that didn’t work, I changed the name of my master back to B-Master and reset that part of the script to the original, changing only the style name.And I’m getting that error. What am I doing wrong?
This is what my personalized script now looks like:
var myDocument = app.activeDocument;
var myParas = myDocument.stories.everyItem().paragraphs.everyItem().getElements();
var myPage = myDocument.pages;
for(i=0; i<myParas.length; i++)
{
if(myParas[i].appliedParagraphStyle.name == “chapternumber”)
{
//Works only in CS5 and later
myParas[i].parentTextFrames[0].parentPage.appliedMaster = myDocument.masterSpreads.item(“B-Master”);
//for CS4 use this
//myParas[i].parentTextFrames[0].parent.appliedMaster = myDocument.masterSpreads.item(“B-Master”);
}
}Rivkah Lewis
MemberI was super-excited to try this out… but I must be doing something wrong.
I’d love to tag someone like Jongware – is that possible here??I really know nothing about scripting, but after I tried running it, I thought perhaps I was supposed to replace the text in the script with the name of my paragraph style. It still doesn’t work.
Can anyone help?
Rivkah Lewis
MemberInteresting! Thanks for sharing, Khalid.
I will try that next time it comes up in a job.Rivkah Lewis
MemberThanks, Kelly.
The info they are sending would be final. I’m not so concerned about that. (They are pulling it from a database they already created.)
Formatting with nested styles is also something I can do just fine.
Its the conditional text part you mentioned I have minimal experience with. I guess I will have to do a search to see how to set that up. I worked with Excel and data merge on a long phone book once with David Blatner’s help and a cool script. But this has so many more variables….Rivkah Lewis
MemberAh, I’ll do a no break. Thanks (perhaps more hours of sleep at night would allow for such simple solutions to enter my brain as well…)
But I was more wondering about the inconsistency as to what is happening on the first page of the chapter and on the rest of the pages.
I’ve used soft returns before and have never had a problem where it rendered differently on different pages of the same chapter…. -
AuthorPosts
