Back

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

Forum Replies Created

Viewing 15 posts - 376 through 390 (of 1,338 total)
  • Author
    Posts
  • in reply to: scaling a document up #61764

    Oh wait, I don't think you would want to apply your custom values to “app”. That would set it as the new default for all of your new documents! Better only change your current active document; change your first line to

    with (app.activeDocument.pasteboardPreferences)

    in reply to: scaling a document up #61763

    I don't know, I haven't been scripting specifically for Cs5. But the ref says it's an array, not a single value, so you could try

    pasteboardMargins = [ “6in”, “6in”, “6in”, 6in ];

    The ref does not mention how it works; I would guess it adds these amounts all around. If you cannot get it to work, look at what is reported for the values are in your current document:

    alert (“Pasteboard is :”+app.activeDocument.pasteboardPreferences.pasteboardMargins.join(“, “)+” big”);

    in reply to: Selected text formatting #61757

    What does it mean to “select text between a specific paragraph style”?

    Both my suggested GREP and the script work on a selection, it doesn't actually sound to me like this is “something similar”.

    in reply to: scaling a document up #61756

    Is it horizontal or vertical scaling that's causing problems?

    Horizontally, the pasteboard extends to again your entire page width — which, interestingly enough, I never thought about before. So it would seem you are quite safe scaling up to 200%.

    The vertical extent is in your Preferences: Guides & Pasteboard: Minimum Vertical Offset, and has a default of 1 inch. I wonder why your “slug” trick doesn't work; if I increase it, there is still 1 inch extra above and below it. (But changing the slug back also resets the pasteboard to what it was before.)

    But you can set this pasteboard size directly from within a script.

    CS4:

    app.activeDocument.pasteboardPreferences.minimumSpaceAboveAndBelow = “15cm”;

    (see https://jongware.mit.edu/idcs4j…..rence.html)

    CS5 and 5.5: uh.

    It changed; see https://jongware.mit.edu/idcs5j…..rence.html. Apparently it's now “pasteboardMargins”, and now you can set the space all around at will.

    in reply to: Drop cap inside a box #61751

    That's an excellent idea. You can fool InDesign into displaying the character at a smaller size by setting its Horizontal and Vertical scale to something like 75%.

    in reply to: PDF Import Problem #61742
    in reply to: How to best optimize an old, scanned newspaper? #61739

    If you want to preserve as much as possible of the original black and white contrast, try this:

    1. Zoom in on a spot with some text that's in the worst shape (muddled, lots of grey).

    2. Add a Brightness/Contrast adjustment layer and switch on the toggle that says “Legacy” — I find it's much easier than ''the new method' :)

    3. Drag “Contrast” almost all the way to the right. You should see a clear, crisp image by now — but with 'too much' or 'too little' black pixels.

    4. Dragging “Brightness” alters the amount of gray that gets converted to almost black/almost white. Drag to & fro until you find a setting that looks best for both “good” parts of the image and “bad” parts.

    5. Now slightly reduce “Contrast” again to get rid of the stark edges — it will bring back a slight softening so it won't look too artificial.

    cleaned up newspaper scan

    If there is lot of “dirt” in your scans, you can use this trick: add another adjustment layer and drag both Brightness and Contrast to the far right. That way you can spot the worst black splotches and use the eraser to remove them.

    in reply to: Updating of font name #61736

    Furry, in the Find Font dialog there is a checkbox that makes the font also change inside styles when ticked. Doesn”t that work for you?

    By the way a caveat emptor! Your new font “Souvenir Std” is not guaranteed to be the exact new same as your old version. There may be minor differences, and adding those up may cause text re-flow. That's why Adobe chose to add “Std” to the font name, so one could choose to use the new one or stick with the old. (And so it was not done in a fit of malice, just to aggrevate you!)

    in reply to: Capturing the first page number of a section #61734

    Use a cross-reference, perhaps.

    in reply to: Selected text formatting #61711

    It can be done with a GREP replace: search for

    .+

    and replace with

    “$0”

    In essence, it finds “everything” and then replaces this with the found text, surrounded by double quotes. But you have to remind yourself to make sure it uses “Selection” in the GREP replace dialog every time. Otherwise you will get double quotes around 'everything' (depending what on the search scope says).

    A better way is to use a mini-javascript that first checks if you have a valid selection and only if so inserts the quotes for you. ( I went a little nuts here, loads of extra functionality :) )

    //DESCRIPTION:Add Quotes around text selection
    // Remove next line for CS3 or older!
    app.doScript(function() {
    if (app.documents.length != 0 && app.selection != 0 && app.selection[0].hasOwnProperty(“baseline”))
    {
    sel = app.selection[0];
    sel.insertionPoints[0].contents = sel.insertionPoints[-1].contents = '”';
    app.select (sel.characters[0],SelectionOptions.ADD_TO);
    }
    // Remove next line for CS3 or older!
    }, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, 'Add Quotes');

    You can save this script in your Scripts folder and then use the Keyboard Shortcut Editor to assign a hotkey combo to it.

    in reply to: GREP — Moving "one-letter" words to next line #61682

    Manually:

    Search for this GREP string

    b[ul] ww

    and specify “No Break” in the Replace With Formatting (you don't need to put anything in the Replace With Text field).

    Maybe better:

    1. Create a new character style called “No Break”, and only switch on the No Break attribute.

    2. Add this GREP style to the paragraph style you are using for the little piggy text:

    b[ul] ww

    3. Set the character style to apply to your “No Break” style.

    .. and from hence on all single letter words will always be kept with the next one, totally fully 100% automatic!

    The GREP works like this: b is the word delimiter — before the next code there should not be another letter. [ul] is a set, consisting of all Uppercase and all Lowercase letters. Any single one of these will be matched. Then there is a space, which will match a regular space only. Next, there should follow a word consisting of at least two more characters — w stands for 'any word character at all', and repeating it tells ID to use two in a row.

    in reply to: Batch opening multiple text boxes in InDesign CS 5.5 #61675

    The word “Here” shows blue on my iPad, and indeed it is an hyperlink. (It takes you here: https://kasyan.ho.com.ua/find_o…..text.html)

    (Related reading: Christopher Dean's plea on Typophile to “Please, stop using “click here when writing” — click on the name of this article to read :) )

    in reply to: GREP Style question #61663

    What The GREP doesn't catch this one? Hmmm … I'll have to look into adding this then (well, some day). This is exactly one of those things that mysteriously may make a GREP not work.

    in reply to: GREP Style question #61641

    Lots of ways to skin this particular kitten. For example, this very short one may be all that's needed:

    (?<=m)d

    – it works on all of your examples :)

    But I can see where you are heading for, you only want to superscript the digit for [digit][space][measurement][²³]. In that case you were very close indeed, but the only point of failure is this:

    You cannot use lookbehind strings of variable length.

    So that's why your (cm|m|km) doesn't work — this string may be either 2 or 3 characters long. The workaround trick is to use | to separate two lookbehinds, and whatever matches first will work:

    ((?<=d [kc]m)|(?<=d m))db

    I added a b “Word break” at the end to ensure no digit or letter should follow the superscript number.


    The trick to post a single backslash is to insert two of 'em \ when posting. If you edit your post, they will be reverted to a single backslash again so then you have to hunt through your text, \doubling\ all of them again :( (Edit: I just noticed a typo, of all things right smack in the middle of my “good” GREP, so I had ta do just that! :p )

    in reply to: Object Layer Options Scripting #61637
Viewing 15 posts - 376 through 390 (of 1,338 total)