Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 15 posts - 361 through 375 (of 1,338 total)
  • Author
    Posts
  • in reply to: GREP Challenge: remove linebreaks within a paragraph #61862

    I might be mis-understanding (what is a “graf”?), but it seems you do not want to have any line breaks in your text!

    What do you imagine “removing” line breaks ought to do? Assign “No Break” to the entire paragraph in your paragraph style and you will get what you asked for — no line breaks at all — but I bet that would make you reconsider.

    “Removing” one single line break is also not possible. What would you expect? That the entire “next” line will suddenly move up and join the previous line? You'll just get a new line break at another place.

    in reply to: What is the use script label panel? #61858

    For a practical use of the Script label panel, see this recent question on the Adobe forum: https://forums.adobe.com/thread/978023?tstart=0

    The script is meant to pick up an object labeled “Name_of_the_textframe” (and, presumably, then do something with that object). So, before running the script, the user has to “tell” it on what to work by assigning a label. (But note the last comment on the change for CS5 and newer — apparently you don't need the Script Label panel anymore, or maybe it's even removed in its entirety.)

    In my own scripts I've used labels this way, to “tag” items to be processed, such as textframes to do something with; and also to store script-specific information in. I also used it the other way around: during debugging, I sometimes have the script write interesting stuff into a label, so I can see in InDesign itself what the script thought it was doing by clicking an object and checking what's in the Script Label panel.

    in reply to: What is the use script label panel? #61856

    Select any object and you can assign a label to this. At times very useful for use with a script, not that much otherwise.

    I have the same reservations about the Data Merge panel. What's it for? Why doesn't it do anything when you open it? Can I safely delete it from InDesign, and if so, how? Et cetera.

    Point is, InDesign has so many features, panels, and popup dialogs, there is a pretty good chance no-one uses all of them.

    in reply to: GREP expression help #61846

    GREP is “greedy” by default, and it will try to grab as much as it can, while still doing exactly what you asked for. So in your multiple-refs case, it exactly does as told: start with 'ref”, then some unspecified other stuff, then end at (the very last) closing parens.

    Fortunately, you can switch this off and tell GREP to use the shortest possible match:

    (ref..+?)

    (Note that I inserted the — probably — missing backslashes ;) The forum software removes single s, so to get you must type \).

    There is no need, by the way, for your construction

    [.].+

    to force a “literal” full stop. Just add a single backslah before it to make it loose its magic properties.


    in reply to: Using grayscale photo images for cmyk output #61834

    Create an swatch consisting of 100% black and 50% cyan (there is no 'blue' ;) ). Select your image with the white arrow. Apply swatch.

    Not every grayscale image can be colored this way, because there are lots of ways to create one. If you applied your swatch, check with the Output Separations preview if it did anything.

    .. intense black (in his offset printworks) in the black parts of the photo ..

    It's a strange advice to get from a printer. Usually, they are pretty concerned about large full-black patches in pictures, as these may get printed as mud. Adding yet even more ink (on top of the 100% black) makes it even worse.

    The black-with-an-extra-dash-of-color is called “Rich Black”, and under that name you can find lots of advice on-line, such as David's article on this very site.

    in reply to: Skip Page #s for Divider Pages #61831

    If you save every section as a separate document, you could use a Book. Moving sections around is then as simple as dragging these around.

    in reply to: Master Pages – get back to where you came from! #61821

    It's called “Back” in the Layout Menu (and after using that, it enables “Forward” as well). I use these all the time to jump around pages I recently “visited”.

    in reply to: GREP and found text #61820

    Louise, you're almost there. But the $1 and $2 have a crucially important limitation (actually, a feature): they only get “set” to a Found Text value for Find items that are bracketed with round parentheses. That way you can be very selective about what found text you re-use in the Replace With text. Try this Find What:

    (d,)(d)

    and replace with your own “$1 space $2″.

    The first “found text”, to be stored into $1, will be any digit followed by a comma; the second set, $2, will contain the digit after that comma. When replacing, ID writes back digit #1 and comma, then the extra space you inserted into the Replace field, then digit #2. The parentheses themselves do not influence the search text at all.

    I am using “d” above to look for any single digit. So this will find any digit-comma-any digit; it doesn't matter if there are more digits before or after each of these.

    Using your parentheses correctly to mark the to-be-copied text is important, because suppose you want to find that comma but replace it with a semi-colon. In that case, you would not include the comma inside, but use “(d),(d)” instead and add the semicolon with “$1; $2″.

    You can also do other stuff, such as exchange the order of found items — look for “Second name, First Name” and replace with “First name Second name”, for example. And it's even possible to re-use the “found text” immediately in the Find Text field! This is done with a slightly different syntax, you need to use “1″, “2″ (etc.) instead of “$1″, “$2″. Try this one for fun: search for “(bw+) 1″ — it will magically find double words!

    in reply to: Release Clipping masks on all selected objects #61809

    Something like this — each “selection” item is a graphic, which contains images (always one, but it seems Adobe expects to insert more than one; hence the '[0]'). The clipping path itself is a property of this image; and you can immediately set it to “None”. The try .. catch is to prevent abnormal termination if any of the selected items is not a placed image, does not contain an image, or does not contain a clipping path.

    for (i=0; i<app.selection.length; i++)
    {
    try {
    app.selection[i].images[0].clippingPath.clippingType = ClippingPathType.NONE;
    } catch (e)
    {
    // not interested if there is none
    }
    }

    in reply to: Grep help #61793

    Is that square a Wingdings or dingbat? If so, you can include it and the Right Indent code inselfin a Lookbehind, like this:

    (?<=~yX ).+$

    — I put an 'X' where you should paste the dingbat. Note I added a space after the “X” as well, as per your sample — that way you always need a space between the dingbat and the following text.

    If you are using different dingbats, you could use the 'any' wildcard:

    (?<=~y. ).+$

    as it does roughly the same: after a Right Indent and any character at all, apply your character style up to the end of the paragraph. If possible use the first one, because this one will also pick up a stray space that might have crept in right after that Right Indent, and then the bolding is done on everything after that.

    This is for a signature so I can't target the end of the paragraph (because I want to use the same paragraph style for the last paragraph as others).

    As it is, my first suggestion will only be applied to Some more text in the exact sequence “Right Indent — Dingbat — Space — Some more text — End of the line”, and it will ignore every paragraph where this does not occur. So it's quite safe, I'd say.

    Pff :D

    Here is my take on it–it's a bit unusual as it needs to test every month name. First, you add “Italics” to the entire paragraph style. Then make everything from the start up to and including the speaker's name Roman. Finally, make everything from the start UP TO (and stopping at) the speaker's name back Italics again — this is the same as the previous one except for the very last command sequence (which in addition romanizes everything up to, but excluding, the very first comma).

    Roman:

    ^.+(June|July|Aug.) d+(~=d+)?( (d+ sessions?).)?[^,]+

    Italics:

    ^.+(June|July|Aug.) d+(~=d+)?( (d+ sessions?).)?

    Roman again: (for 2nd and further names after “;”)

    (?<=; )[^,]+

    To make it work for every month you have to add them all :) (But ain't it wonderful that if you do so once, InDesign will do the rest entirely on its own?)

    Below these three you can add your other GREP styles to embolden and no-break the various parts — I didn't test those but at a glance I'd say they ought not to interfere with the above ones.

    (You are “new to GREP”? Hah! you are giving it a very good first go!)

    All backslashes disappeared in your post (the forum editor makes single backslashes disappear; you need to type in two \ to get a single — and yes, I actually typed “” to get those two “\”) but on first sight I think the Romanization may not be working because of this bolded part (backslashes inserted where I thought appropriate):

    Apply Style: Roman

    (?<=[).s]|[d+s]|[;s])([lu]+)( )([.*?)?([lu]+)([. ]?)( )?([lu]+)

    First of all you need to re-write it without the + (it's kinda hard to understand exactly what the entire expression does ;) ) because as it stands it would do “nothing” because the '+' is ignored anyway inside a [..] bracketed section. It just adds the '+' to the list of 'allowed' characters. But putting the '+' outside the brackets is no good either, since every test inside a single lookbehind needs to have the same net length, and you cannot use variable lengths at all.

    Can you further pin-point the exact point of the expression where it fails? A good way to check what expression does what is disabling all of them but one. All you need to do is insert an invalid command at the very start — having a '*' there is invalid and will effectively kick the entire further expression out of the loop. To visually verify the expression works as expected, add this to the character style: Underline on, 12 pt thick, offset -3 pt, color Full RGB Green. That will highlight the applied style just nice.

    in reply to: Converting A Text Object Back To Text? #61784

    Not automatically, no. No chance of requesting an un-vectorized file, I guess?

    If it's a lot of text, you could try exporting it to PDF, forcing it into a bitmap format (maybe with a slightly transparent object on top) and set the transparency flattener to output bitmaps only. Then you could use Acrobat Pro's OCR feature to re-read the text.

    If this sound like too much trouble, delete the objects and re-type the text.

    in reply to: Selected text formatting #61773

    It's not possible with GREP, this needs a script.

    Unfortunately, the script has to work with the entire contents of the active story — I was foolish enough to test on my current working document (>340 pages) and it took so long to run I decided to kill off InDesign. The reason it has to “see” the entire story is because you cannot access any random paragraph at will; the Document Object Model (which is the foundation on which scripts run) must “process” an entire story before you can check the style of any “next” paragraph.

    That said: this script runs correctly on a fairly short story; it will select the paragraph containing the cursor, and then any next paragraphs as long as that's not in the same style as it started with.

    // Where am I?
    currentParagraph = app.selection[0].paragraphs[0];
    // Where do I start?
    selectedParagraphStyle = currentParagraph.appliedParagraphStyle;
    // Okay — select this one
    while (1)
    {
    // Okay — select this one
    app.select(currentParagraph, SelectionOptions.ADD_TO);
    // Check next
    nextParagraph = currentParagraph.characters.nextItem(currentParagraph.characters.item(-1));
    if (!nextParagraph.isValid || nextParagraph.appliedParagraphStyle == selectedParagraphStyle)
    break;
    currentParagraph = nextParagraph.paragraphs[0];
    }

    in reply to: Selected text formatting #61765

    I still fail to see the similarity to the original post, but you could try a Single-line GREP:

    (?s)^Name.+?(?=rName)

    Not sure if it works though.

Viewing 15 posts - 361 through 375 (of 1,338 total)