Back

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

Forum Replies Created

Viewing 15 posts - 661 through 675 (of 1,338 total)
  • Author
    Posts
  • in reply to: My GREP Nightmare! #58303

    Well, you are getting there. Take small steps, that's all.

    Your GREP would work … apart from two tiny things. The '+' at the end is not necessary! After any GREP command, you can add a 'repetition' code, which may be one of ?, *, or +, or an exact number or number range, like {5} or {3,6}. (And after that you can add another ?; this indicates that the lowest possible number of repetitions ought to be taken, rather than the largest number — which is the default setting.) In this case, I think that InDesign will interpret it as “5 digits-plus-a-period”, and then repeat this as much as possible, marking all possible sets of 5, rather than what you intended, only one set of 5.

    The other thing is, you set a lower limit (the {5}) but you don't specify what ought to be next. So five digit-headings would be marked, but the first 5 of a six-digit heading as well. To prevent that, matching should stop right after the five you already have, and the easiest way is: because you don't want to find a match for a number after the 5th digit, it should match “not-a-digit” … (Obvious, really.) The code for not-a-digit is this: D, so your GREP will work like this:

    ^(d+.){5}D

    There is a tiny, tiny catch: if 5 digits (and their periods) are matched, the character right after it (the I-Am-Not-A-Digit) will also be marked, because it's 'inside' the regular expression. Now in ordinary use, like bolding or italicizing the heading number, and assuming the next character will typically be a space, it won't really matter; but if you change the heading marker to be underlined, you will see the underlining stick out into the next character. So a slightly better version is, with the help of my little friend Lookahead:

    ^(d+.){5}(?=D)

    meaning that it will find a set of 5 digits-plus-periods which must be followed by a Not-A-Digit character — the Lookahead matches, but does not mark, the text.

    (This is a Positive Lookahead; there is also a Negative Lookahead, slightly more logical in this case:

    ^(d+.){5}(?!d)

    — the same as above, only it now reads “.. which must not be followed by a digit”, which is more natural than the double negative.)

    By the way #1: use d+, rather than d! Or else it will fail (silently) on “1.2.5.6.10. “

    By the way #2: this forum eats backslashes for breakfast. Only feeding it a double breakfast makes it spit out a single one: type “\d” to get “d”. Be careful when editing your post, all double backslashes will appear as singles again.

    in reply to: My GREP Nightmare! #58300

    David, you might want to allow more than 9 consecutively numbered headings:

    ^(d+.)+

    Biggedy, your GREP ^d{5}? will select 5 digits at the start of a line (although I wonder what side-effects the ? has), but GREP is extremely literal: only if there are 5 digits in a row, it will be styled. As you already noticed, 5 times a digit-then-a-period does not qualify; GREP is not for “sort of like, you know, 5 digits”.

    in reply to: CS4: paragraphs break too early at bottom of some pages #58280

    Joe, there is no text box for the footnotes. It's much simpler than that.

    Look at the first line of the next page: you can see a tiny superscript '1' in there. I bet that's another footnote, and that footnote text is longer than can fit (with the text line attached to it) in the space available above the footnote 2 on the previous page, and I also bet that Jahmin does not allow footnotes to break across pages. So … InDesign has no choice but to move the footnote (along with the text line it belongs to) to the next page.

    in reply to: Allow row to break across pages in table #58264

    Not automatically, no.

    It's totally intentionally, and correct behavior. You are used to left-to-right text, so the arrows on your cursor seem to “point the right way”. However, you should interpret them as “move to previous character” and “move to next character” — and in that case, it's logical that they move in the other direction for RTL languages, such as Hebrew and Arabic.

    Imagine the confusion if this hadn't been done this way — what ought the Backspace key do?

    in reply to: settiing baseline grid and preferences in an InDesign book #58227

    A “Book” has nothing to do with individual files' settings … You can synchronize lots of things in a Book, though, and Master Pages is one of them. Try it — I think Baseline Grid is not a Master Page setting, but a 'global document' preference instead, but there are several different ways of defining one, so you might get lucky.

    Next time, create a blank file containing just one or two pages, and all the styles and settings you can think of. Then save it as a template, and use this for all of the new documents. You still cannot change any random stuff throughout your entire book, but at least every document will start out with the same settings.

    in reply to: GREP for txt in italic #58226

    There is no “unless” or “otherwise”, option you will have to do the S&R in two steps.

    First search for this:*

    (?<=d)(bis|ter|quater)b

    and specify “Regular” in the Find formatting; put your italics char style in the Change To formatting field.

    Then make a new char style “Regular”, and this time look for Italics in the Find formatting. It will work, not picking up any of the texts you replaced above with italics, because of this little GREP Gripe!

    (* See how you can do lots of searches in one go? The b End-of-Word code at the end assures it won't pick up anything nasty.)

    in reply to: 'Grep is making me insane'… or 'troubleshooting' #58220

    I'm not an expert in FindChangeList ops (I still use the “old style” findchangelist, albeit much enhanced over the years by yrs truly ;) ), but the syntax seems correct. Double-check if there is one single tab, and no spaces at all, between each command — I've read elsewhere that's a sure killer.

    It doesn't explain why your InDesign goes out of whack, though. Malformed lines usually are plainly ignored.

    Oh, by the way, to insert a in a post on this forum, you have to type two of them: \. And if you edit your post, the double 's will have disappeared and only occur once, so you have to scrutinize your post again for all and double . Woe on you if you forget one, because you have to edit again, and then you're sure to miss yet another. Endless fun.

    in reply to: 'Grep is making me insane'… or 'troubleshooting' #58214

    Hmm, no idea really. Can you try and see what happens with this?

    (?!D)LT

    (essentially, “LT” not preceded by not a digit :) — be warned, it will also pick up LT's at the start of a line …).

    You could try resetting your preferences; perhaps some leftovers of the Christmas dinner got stuck in ID's throat.

    in reply to: Do text variables work on master pages? #58213

    A paragraph is anything between two returns, so check if you don't have a hard return at the end of the first line.

    in reply to: Do text variables work on master pages? #58210

    A-ha — at least that last thing makes sense. Text variables pick up stuff by the paragraph, and can use either the first occurrence on a certain page, or the last occurrence. And yes: it'll only pick up one paragraph.

    in reply to: Nested style question #58205

    Are you mixing up GREP Find and Replace and GREP styles? The latter is sort of automatic 'replace' (of character styles only), and can be set in your Paragraph Style — only once, since it's “in” a style, and then your formatting Char Style will be applied automagically. It's sort of like your nested styles, but better because it allows far more exact control. And yes: you'd typically use one or the other.

    (All of this is only if you have CS4 or newer, of course.)

    in reply to: Nested style question #58203

    Do you mean you want to replace the nested style with a GREP style? That can be done in a number of ways, the exact way depends on your 'normal' ways. This one, for example, will apply its character style up to and including the first comma, regardless of the number of characters/words:

    ^w+,

    If there may or may not be a comma, you can use this — it detects the text that ought to follow:

    ^.+(?= from page)

    … You can also “cheat” and tack the two words together with a fixed space ;)

    in reply to: Do text variables work on master pages? #58201

    Can you describe in more detail what you are doing? I never have to put variables on a live page, mine are always on master pages. Works a treat, too.

    Perhaps they are set up to pick up a certain paragraph style, and you accidentally applied that style to blank lines, as well as the 'correct' paragraphs — that'll throw off InDesign every time.

    in reply to: Allow row to break across pages in table #58200

    No.

Viewing 15 posts - 661 through 675 (of 1,338 total)