Forum Replies Created
-
AuthorPosts
-
Theunis De Jong
MemberBe right back at you.
Theunis De Jong
Member…
That said, personally I don't see why you have to run preptext at all, right before you save as ePub.
Before I export an InDesign file to ePub, I make sure any and all local formatting is either removed (in the case of ad-hoc fixes) or is appleid through a character style. “Real” formatting such as bold, italics, and capitals should already be saved as character styles, as it's practically the very first thing I do after loading a new file.
Theunis De Jong
MemberBut when I ran preptext.jsx (Mar 30, 2010 10:41 PM version), it decoupled the all caps relationship from the paragraph style, created a Caps character style and applied to it.
That's the correct, and expected, behavior. As I noted before, preptext is not designed to work 'afterwards'. It searches for a character attribute that does not have a character style applied to it — so if your formatting (in bold, caps, underline or whatsit) is defined in the Paragraph style, rather than as plain applied formatting, it will pick up this as well.
Many scripts seem to be behind InDesign updates. I can't complain because they are free. But it would be great if script developers catch up soon.
I wrote preptext to preprocess freshly imported formatted Word files. Using it for any other purpose is at your own risk.
November 22, 2011 at 8:17 am in reply to: Script to Create an Exampe Of Every Paragraph Style? #61132Theunis 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.
-
AuthorPosts
