Back

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

Forum Replies Created

Viewing 15 posts - 316 through 330 (of 340 total)
  • Author
    Posts
  • in reply to: Export *.indd to INX #79022
    Peter Kahrel
    Participant

    Are you sure they want INX? That would mean they’re still using CS3. If they use CS4, 5, 5.5, or 6, you can export your file to IDML, which your customer can then open in their version. If they really want INX, then you’ll have to export your file to IDML, then open the file in CS4 and export it to INX from there.

    Peter

    in reply to: little rant with Find/Change #78684
    Peter Kahrel
    Participant

    For me the ideal behaviour would be that if the screen shows the full spread or page, Find doesn’t change the position. But when you’re zoomed in, find should centre the result. Should be an option.

    Peter

    in reply to: GREP style formatting suppression #78571
    Peter Kahrel
    Participant

    To make text disappear, add a character style and name it e.g. ‘hide’. Set the point size to 0.1 and the horizontal scale to 1%. And for good measure set the colour to Paper. Then define two GREP styles in the paragraph style(s) using the ‘hide character style:

    ^\[E\d:
    ^.+?\]

    The first one hides [E1:, [E2:, etc, the second one hides the first bracket in the paragraph. This assumes that the first ] in every paragraph is the closing bracket of the code.

    As to conditional formatting, you could look into conditional text if you want to maintain two texts in one document.

    in reply to: Possible GREP for Indexing Help? #78570
    Peter Kahrel
    Participant

    Noel,

    It’s going to be tough to change that with GREP, if it’s at all possible. Why don’t you mark up the text with index entries, so that when you generate the index you get the desired output?

    Peter

    in reply to: Shortcut Help #78351
    Peter Kahrel
    Participant

    Here’s a script that, if the current selection is a text frame, places the cursor at the first insertion point:

    if (app.documents.length > 0 && app.selection.length > 0 && app.selection[0] instanceof TextFrame) {
       app.selection[0].insertionPoints[0].select();
    }

    You can assign it to a shortcut key.

    Peter

    in reply to: Code snippets #78345
    Peter Kahrel
    Participant
    . . .

    it is then! Thanks!

    in reply to: Code snippets #78331
    Peter Kahrel
    Participant

    Well, why it didn’t work earlier with those quotes I don’t know. Seems to work fine, David, thatnks for trying that.
    Indents have to be done with non-breaking spaces:   as normal spaces and tabs don’t work.

    in reply to: Code snippets #78330
    Peter Kahrel
    Participant

    Anothertest. . .

    I am typing text with "straight quotes" inside this 'code tag'
    Pasted things:
    xxx "xxx" xxx 'xxx'
      indent with nobreaking spaces
    indent with spaces
    indent with tabs

    Text

    Peter Kahrel
    Participant

    So a script would look for all instances of the character style, add a vertical bar in the margin at the whole range of the character style, and increment the revision number. The only problem with this is that when you apply a character style to a range of text, any character styles already applied to that range will be overridden.

    Your specs are very specific, so a script like that is unlikely to exist, but it shouldn’t be particularly complicated.

    Peter Kahrel
    Participant

    Frank,

    Text variables won’t work because you won’t be able to restrict their scope to a certain page. But it’s not too difficult to update the revision number of a page using a script. The script would look for a change, override the footer on the page if it’s not already overridden, and increment the revision number.

    If only text insertions and deletions changes count as changes, then you could use InDesign’s ‘Track Changes’ feature to look for changes, increment the revision number on the page, and accept all changes to clear the document (or story, since Track Changes is story-based).

    Changes in format and object position aren’t tracked by InDesign, so if these too should be recorded, then you need to mark the text or the page with e.g. a character style, as you suggested. A script can then look for occurrences of that character style and set the revision number (and remove the instances of the character style).

    in reply to: Bug in Whatthegrep? #78314
    Peter Kahrel
    Participant

    \$ confuses WhatTheGrep probably because $ is a grep symbol. Other escaped grep symbols, too, probably confuse it. You could try \^ and and see what happens.

    Until CC, the $ symbol was problematic in another way as well. InDesign had problems finding more than one instance (on Windows anyway). In CS6 and earlier, using \x24 or [$] is a workaround.

    in reply to: GREP Question #78312
    Peter Kahrel
    Participant

    Chris,

    No need to add word boundaries for every abbreviation:

    \<(Jdsc|Jfar|Jnl|Jsf|Tdsc|Tfar|Tnl|Tsf|Tjdsc|Tjfar|Tjnl|Tjsf|Tc|Ti|Tu)\>

    does the job and save some typing.

    Peter

    PS: Thanks for mentioning the guide!

    in reply to: GREP or sth else? Number – space – number. #78130
    Peter Kahrel
    Participant

    Forgot to mention that the GREP replacement in the previous post doesn’t work if a number is the last text in a cell or a story. To make it work everywhere you’d have to add a single symbol at the end of numbers at cell- and story-end, then run the above query, and finally remove that added symbol. For that symbol I use a hair space to reduce the impact on the document.

    So you’d have three queries:

    (Place a hair space at the end of each cell and each story)
    Find what: (\d)\Z
    Change to: $1~%

    (Insert the thousands separators)
    Find what: (\d)(?=(\d\d\d)+,?)
    Change to: $1\x20

    (Remove the hair spaces at the end of cells and stories)
    Find what: ~%\Z
    Change to: <nothing>

    To make running sequences of GREP queries a bit easier, you can use this script:
    https://www.kahrel.plus.com/indesign/grep_query_runner.html

    Peter

    in reply to: GREP or sth else? Number – space – number. #78124
    Peter Kahrel
    Participant

    Insertion of thousand separators goes back to Friedl’s ‘Regular Expressions’. The one here is a slight variation in order to deal with the decimal part. \x20 is the space character.

    Find what: (\d)(?=(\d\d\d)+[,]?)
    Change to: $1\x20

    Peter

    in reply to: Locating the start of a sentence with GREP #78088
    Peter Kahrel
    Participant

    The problem is that unlike many other programs, InDesign isn’t very good at finding locations such as ^ and $ on their own. You can’t replace $ with e.g. ) to insert a parenthesis at the end of the paragraph.

    Seems to me that the only way you can get your grep to work is using (\r|\. )\K\u which assumes that a capital after a \r is the beginning of a sentence. You miss the first sentence in a story though.

    Peter

Viewing 15 posts - 316 through 330 (of 340 total)