Forum Replies Created
-
AuthorPosts
-
November 22, 2011 at 8:17 am in reply to: Script to Create an Exampe Of Every Paragraph Style? #61132
Theunis De Jong
MemberUh, technically, yeah sure but what sort output are you thinking of? A series of rectangles, each one with an object style assigned to it? How are you going to distinguish different amounts of text wrap, inset, or First Paragraph Style?
Theunis De Jong
Member^ Beginning of paragraph
( Start of group #1
. any character wildcard
+ one or more of the preceding code, group, or character
) End of group #1
The parentheses define one single numbered group, ready to be recalled in the Replace With expression as “$1”.
For more complicated expressions you can try my very own WhatTheGrep script.
November 20, 2011 at 2:00 pm in reply to: ID CS5 and 5.5 crash on startup after installing Blatner Tools on new PC #61115Theunis De Jong
MemberTake care: if I'm not mistaken, you should use the correct version for either your CS5 OR CS5.5. I don't think there is a single version for both IDs.
If you remove David's tools again, does that make your Indy come alive?
Theunis De Jong
MemberThat actually looks a lot like a simple table.
Create one, 3*3, put text in center cell, remove extra lines, done.
Theunis De Jong
MemberFind:
^(.+) (with font attribute Bold in Find Format)
Change to:
$1~_
This will add the em dash right after the bold text. You can then change em-dash/space to just an em-dash.
November 19, 2011 at 10:08 am in reply to: Find, copy, and paste all text styled with a character style? #61106Theunis De Jong
MemberAnything for a ladies' smile.
November 18, 2011 at 2:16 pm in reply to: Find, copy, and paste all text styled with a character style? #61099Theunis De Jong
MemberAhh, challenges are my bread and butter. Preferably, also with a slice of Gouda and a dash of mustard.
Good thing you mentioned this:
… in my real-life case, anchored text boxes
because, indeed, it takes a bit more processing to search inside textframes that are inside textframes. See the nested loop that iterates one level deeper in the frame-that-is-on-a-page.
if (app.selection.length != 1 || !app.selection[0].hasOwnProperty(“baseline”))
{
alert (“Please put your text cursor in a (preferably) empty text frame!”);
exit(0);
}
app.findTextPreferences = null;
app.findTextPreferences.appliedCharacterStyle = app.activeDocument.characterStyles.item(“Cursief”);
for (p=0; p<app.activeDocument.pages.length; p++)
for (f=0; f<app.activeDocument.pages[p].textFrames.length; f++)
{
if (app.activeDocument.pages[p].textFrames[f].contents.length)
{
sourcelist = app.activeDocument.pages[p].textFrames[f].findText().reverse();
while (sourcelist.length > 0)
app.selection[0].parentStory.insertionPoints[-1].contents = sourcelist.pop().contents+”r”;
for (af=0; af<app.activeDocument.pages[p].textFrames[f].textFrames.length; af++)
sourcelist = app.activeDocument.pages[p].textFrames[f].textFrames[af].findText().reverse();
while (sourcelist.length > 0)
app.selection[0].parentStory.insertionPoints[-1].contents = sourcelist.pop().contents+”r”;
}
}For some reason findText fails with some non-obvious error message if a text frame does not contain any text (“Object contains no text for find/change”, what's that supposed to mean?) — I expected it just to find nothing — so there is an additional test to check if the frame contains anything at all (the 'contents.length' line).
Does this come close to what you had in mind?
Theunis De Jong
MemberCindy, the first one is supposed to work for you — style groups and all. The second one was customized at the behalf of Maria964 and only lists styles inside groups (I have no idea at all why she needed that).
The script blindly inserts its text into the text frame where your text cursor is in, perhaps you got that wrong and it went somewhere else?
Theunis De Jong
MemberOw. I think I need to know more … It sounds like the script is starting up correctly, so you did everything right so far, but it encounters something I did not foresee.
November 18, 2011 at 3:05 am in reply to: Find, copy, and paste all text styled with a character style? #61091Theunis De Jong
MemberThat was a fun 5-minute exercise!
I did take a shortcut, though — copying the text immediately into a new document is sort of a bother. You have to draw an empty text frame in your source document first and put the text cursor into it. Then run this script (make sure to fill in the correct character style first).
app.findTextPreferences = null;
app.findTextPreferences.appliedCharacterStyle = app.activeDocument.characterStyles.item(“phonenumber”);
sourcelist = app.activeDocument.findText().reverse();
while (sourcelist.length > 0)
app.selection[0].parentStory.insertionPoints[-1].contents = sourcelist.pop().contents+”r”;November 17, 2011 at 4:05 pm in reply to: Customized page numbers (pg 1 starts on pg 4 w/ intro pages) #61088Theunis De Jong
MemberThe basic online Help covers it pretty much:
https://help.adobe.com/en_US/in…..710ca.html
Is this an in-house production, or a loose-leaflet ring bound book of some kind? It's pretty odd to have page 'i' at the left side and 'ii' at the right. Usually, new sections start on a right hand side, so all odd pages are on the right.
Theunis De Jong
MemberCindy, you can export a sample of your formatted text as RTF, and when opening it into Word you get the exact style names. (I didn't test with complicated style groups, though.)
There is a tiny caveat emptor: InDesign is smart so it only exports styles that are actually used in the document! Fortunately, this ties nicely in to a script I wrote the week to list each style name in its own style: https://forums.adobe.com/thread…..?tstart=30
If you run this script once (have the text cursor ready in an otherwise empty text frame), it'll fill it with all of the current paragraph styles. Export to RTF and voila (pardon my French).
If & when required I can make an amendment to catter for character styles as well.
November 17, 2011 at 9:30 am in reply to: Script to Create an Exampe Of Every Paragraph Style? #61081Theunis De Jong
MemberFor future reference:
https://forums.adobe.com/thread…..?tstart=30
is the Adobe Forum thread with the script.
November 16, 2011 at 2:10 pm in reply to: Script to Create an Exampe Of Every Paragraph Style? #61077Theunis De Jong
MemberThere is bound to be one floating around here somewhere but just last week I wrote one from scratch. Look in your post in the Adobe forum.
Theunis De Jong
MemberWell, perhaps you should check your settings then. When creating a new document you have the option “Facing Pages”, and if you have that switched on you automatically get facing master pages — by default, the New Master Dialog shows “Number of pages: 2”.
I just tested — you can change the “Facing Pages” setting after you created your document.
You can see the page icons in the Pages panel change: single pages don't have a folded corner, facing pages show a fold on the outside of their page.
And in doing this, would I simply set up a separate master for each chapter so the author name is able to be changed with each chapter? Or I could use one master and then override master items and copy and paste the vecto running heads for applicable chapters.
Jeez none of that “overriding” stuff please! Look up on how to use Text Variables in the Help, as these are practically created to do exactly this kind of work. The only master pages one would need is one per chapter start (if it has a unique design), and then the same master page again and again, which then automatically would pick up the “current” author and title in the text variables in its headers.
-
AuthorPosts
