Forum Replies Created
-
AuthorPosts
-
September 19, 2016 at 11:21 am in reply to: Applying Diacritical marks for transliteration of Arabic language #88492
Theunis De Jong
MemberYou 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.
September 18, 2016 at 3:36 am in reply to: Applying Diacritical marks for transliteration of Arabic language #88431Theunis De Jong
MemberYour 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.
Theunis De Jong
MemberYour 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.
Theunis De Jong
MemberOw! The linked file has disappeared.
Direct download link: https://jongware.com/binaries/ftnoptcopier.zip
Theunis De Jong
MemberAri, Edward is right. That line calls “main” but the function is called “Main”. (So to fix, change one of the two to the other.)
Theunis De Jong
Member“Spam Cleanup in Isle #2. Spam Cleanup in Isle #2.”
Theunis De Jong
MemberThe 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,
~igets 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.August 3, 2015 at 7:03 am in reply to: Help with a script to find text in a Table Cell and apply Cell style #77098Theunis De Jong
MemberYou 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 thecontentsis 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"; } }Theunis De Jong
MemberEspecially not with such a poor level of English. Not the most convincing piece of advertising :P
August 3, 2015 at 1:52 am in reply to: GREP: Different behaviour of positive lookahead/lookbehind #77093Theunis De Jong
MemberI’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^[^"]*\KblahTheunis De Jong
MemberRegarding 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.)
Theunis De Jong
MemberYou 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
insertionPointsproperty points to possible cursor positions (i.e., ‘between’ characters), and the shortcut[-1]is to set it to the very last position. Setting itscontentsto something is the same as inserting a character on that position.Theunis De Jong
MemberI 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. -
AuthorPosts
