Back

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

Forum Replies Created

Viewing 13 posts - 76 through 90 (of 1,336 total)
  • Author
    Posts
  • You can change the Unicode in the *header line* for each character. That is where the script gets the value from. But be warned that if you change your existing font, all its current codes are off! You could bite the bullet and check your entire document again, or (perhaps preferable) you could save the adjusted font under a subtly different name. Then you can keep track of what characters are still to be changed – those in the “old” font only.

    As for kerning: hum hah. Creating a kerning table out of the blue is quite hard to begin with, but aside from the technical issue, me and Marc have no idea of how we should let a user input all those values. For a typical (complete) font, there can be hundreds or even thousands of kerning pairs … Thinking out of the box, I suppose you could use a free tool such as TTX to add kerning, but I have no idea how that would work in practice.

    Your transliterated Arabic looks really great! Did you go the extra mile of using the correct Unicode code points for all the combined characters? If so, your text will look just fine when viewed on e-platforms as well (… at least on the better ones, those with proper Unicode support – as you already found out).

    Just a tiny footnote ;-) It’s “IndyFont”, without a space.

    in reply to: Same space between words #88430

    Your Justification settings are way too strict! InDesign needs at least ONE of those three items to be variable to justify text: either word spacing or letter spacing or glyph scaling (where that last one would be “yuck”).

    In your case, you should indeed set only Word Spacing to the same values. It is likely that your contradicting settings make InDesign go ‘shrug’ and just ignores what you tell it.

    in reply to: Synchronising footnote options #88307

    Ow! The linked file has disappeared.

    Direct download link: https://jongware.com/binaries/ftnoptcopier.zip

    in reply to: Object Layer Options Scripting #88261

    Ari, Edward is right. That line calls “main” but the function is called “Main”. (So to fix, change one of the two to the other.)

    in reply to: Logo Designing #83899

    “Spam Cleanup in Isle #2. Spam Cleanup in Isle #2.”

    in reply to: Two kinds of curly quotes in my doc #83897

    The steps are:

    1. Make sure “Use Typographer’s Quotes” is ON in Preferences > Type.

    2. Using regular text Find & Change, search for ^'.

    3. Change it to '

    4. This usually works because ^' looks for *exactly* the ‘straight’ quote, and replacing it with a single straight quote in “Typographer’s Quote” mode makes InDesign kick in its own smart quote replacement.

    .. but (surprise surprise!) … in this case it does not work!

    Now hold on (I said to myself), I am sure it works. So I changed the font to Times New Roman and it did. Changing the font back to Alegreya Sans made it Not Work.

    Inspecting the font itself revealed why: it actually <i>is</i> “an OpenType thing”! In the Standard Ligatures set, Alegreya Sans <b>always</b> replaces the closing quote in a combination closing-quote (any letter) with the Straight Up Quote! This is done with an OpenType feature, and so there is nothing wrong with your attempts or with InDesign – it works “the way the font creator intended”.

    [I also discovered a few other strange combinations. Type “<arriba>”, “<square>”, “<izquierda>”, “<ht>” amongst another few phrases, to see what I mean. Also, ~i gets automatically translated to ?, and a few more “tilde” codes.]

    The only way to get rid of it is to disable the OpenType Feature that enables it: Ligatures. Now you don’t want to do that for all of your text (there is nothing wrong with its “fi”, “fl”, and other ‘common’ ligatures) so I suggest the following:

    1. Make sure “Use Typographer’s Quotes” is ON in Preferences > Type.

    2. Using regular text Find & Change, search for '.

    3. Change it to ' <i>and</i> make sure “Ligatures” is switched OFF in the Change Format (Basic Formatting) field.

    You were rather close :) But the problem is that you cannot easily iterate over a text array and check if one of its elements matches other text. Your straightforward == will not do anything useful – at best, it checks if the contents is equal to the text array in its entirety.

    Try this: convert the array into a regular expression with each phrase separated by an OR, and test your cell contents with that:

    function __processTable(table)
    {
      // do something here!
    
      //Find Text in Cell and apply Cell Style
      var textInCell=['London', 'Scotland', 'South West'];
      var myRegEx = new RegExp("b("+textInCell.join("|")+")b");
      for (i=0; i<table.cells.length; i++)
      {
        if (table.cells[i].texts[0].contents.match(myRegEx))
          table.cells[i].appliedCellStyle = "District Cell";
      }
    }
    in reply to: PhD dissertation writing tips #77096

    Especially not with such a poor level of English. Not the most convincing piece of advertising :P

    I’m not behind a modern ID right now so I cannot check – but would it not work the same with the “fake” positive lookbehind, using \K? Try

    ^[^"]*\Kblah

    in reply to: Cycling through paragraph styles script – Help Needed #76615

    Regarding the selection: if this story thread is the only one spanning multiple frames, you can loop over your stories and select the one that has a ‘next’ frame:

    for (i=0; i < app.activeDocument.stories.length; i++)
    {
      if (app.activeDocument.stories[i].textContainers.length > 2)
      {
         story = app.activeDocument.stories[i];
         break;
      }
    }

    If necessary, you can only check the ones that start on your first page:

    for (i=0; i < app.activeDocument.pages[0].textFrames.length; i++)
      if (app.activeDocument.pages[0].textFrames[i].nextTextFrame &&
        app.activeDocument.pages[0].textFrames[i].parentStory.textContainers.length > 2)
      {
        story = app.activeDocument.pages[0].textFrames[i].parentStory;
        break;
      }

    … if that fails as well (if you have multiple independent text threads), maybe you could search for a paragraph style that is unique to the story you need.

    (For the record, I did not test it but the rest of your script looks fine.)

    in reply to: adding a period to the end of every footnote #76614

    You can search for the Footnote Number code, but that will only locate the first character position, not the last. So I would suggest a Javascript:

    for (st=0; st<app.activeDocument.stories.length; st++)
      for (fn=0; fn<app.activeDocument.stories[st].footnotes.length; fn++)
        app.activeDocument.stories[st].footnotes[fn].texts[0].insertionPoints[-1].contents = ‘.’;
    

    This loops over all ‘stories’ (continuous text threads), and inside each story over all of the footnotes. The insertionPoints property points to possible cursor positions (i.e., ‘between’ characters), and the shortcut [-1] is to set it to the very last position. Setting its contents to something is the same as inserting a character on that position.

    in reply to: script to close up 3 em dashes in bibliography #76437

    I do this with a GREP style that applies -120 tracking. It needs to be applied to the first 2 of the 3 dashes, but of course only when there are 3 in a row, so this needs a lookahead:

    (?<!~_)~_~_(?=~_(?!~_))

    That check at the end (?=~_(?!~_)) is so it will only be applied to 3 em-dashes, not 4 or more. This way you can easily see when there are too many.

Viewing 13 posts - 76 through 90 (of 1,336 total)