Forum Replies Created
-
AuthorPosts
-
Theunis De Jong
MemberPhotoshop allows to add 'metadata' to some image formats, and with CS5, for example, you can automatically retrieve that and use as 'caption'. It's possible to have a javascript such as Indexmatic check images for any metadata, and to have it include in its list of keywords-to-index.
All purely theoretically, as it needs Marc to rewrite Indexmatic. As I said, it's way easier just put 'invisible' text nearby your images.
Theunis De Jong
MemberIndexmatic works only on actual text. Although technically, it's possible to have it also look at every image's XML Metadata, or notes inside a private label, or a number of other ways … it may be easier to just enter your text into a frame of its own on top of (or nearby) the images, and make this text invisible by setting its color to [None].
Theunis De Jong
MemberPhotoshop allows to add 'metadata' to some image formats, and with CS5, for example, you can automatically retrieve that and use as 'caption'. It's possible to have a javascript such as Indexmatic check images for any metadata, and to have it include in its list of keywords-to-index.
All purely theoretically, as it needs Marc to rewrite Indexmatic. As I said, it's way easier just put 'invisible' text nearby your images.
Theunis De Jong
MemberIndexmatic works only on actual text. Although technically, it's possible to have it also look at every image's XML Metadata, or notes inside a private label, or a number of other ways … it may be easier to just enter your text into a frame of its own on top of (or nearby) the images, and make this text invisible by setting its color to [None].
Theunis De Jong
MemberGrouping, as in Paragraph and Char style panels, is not (yet?) possible.
Make your swatches, then save as swatch list?
June 4, 2010 at 2:21 am in reply to: Define table row heights, column widths in styles somehow? #55918Theunis De Jong
MemberHi Steve, and welcome to the wonderful world of scripting!
If you want to change “rows 2 to x“, normally you would have to 'manually' loop over these rows, and to do that, you'd have to manually loop over all tables, and to do that, well, you'd have to manually loop over all stories … Using the fast everyItem() function avoids all this work, but — it can only work on every item, not something like 'from row 2 to the end' (hence the name :-D ).
So you have no choice, other than using the much slower loops? Sure you have! You can set all rows of all tables to your 'remaining' height value, and then change only the 1st and 2nd rows' height.
Add this line before your first one, and you should be done:
app.activeDocument.stories.everyItem().tables.everyItem().rows.everyItem().height = “20mm”;
(replacing the 20 mm with the height you need).
Theunis De Jong
MemberGrouping, as in Paragraph and Char style panels, is not (yet?) possible.
Make your swatches, then save as swatch list?
June 3, 2010 at 7:21 pm in reply to: Define table row heights, column widths in styles somehow? #52823Theunis De Jong
MemberHi Steve, and welcome to the wonderful world of scripting!
If you want to change “rows 2 to x“, normally you would have to 'manually' loop over these rows, and to do that, you'd have to manually loop over all tables, and to do that, well, you'd have to manually loop over all stories … Using the fast everyItem() function avoids all this work, but — it can only work on every item, not something like 'from row 2 to the end' (hence the name :-D ).
So you have no choice, other than using the much slower loops? Sure you have! You can set all rows of all tables to your 'remaining' height value, and then change only the 1st and 2nd rows' height.
Add this line before your first one, and you should be done:
app.activeDocument.stories.everyItem().tables.everyItem().rows.everyItem().height = “20mm”;
(replacing the 20 mm with the height you need).
Theunis De Jong
MemberNeither w+ nor [lu]+ include the spaces between those words …
Throwing in an s would even be worse :-D It would add space, but also tabs and even the hard return at the end.
(FYI: I think w generally equals to [dlu] — it includes digits but excludes the hyphen, which, for example, makes it worthless when looking for proper names.)
Edit Note: if posting replaces double backslashes with single ones, Edit Post ought to do the same in reverse! As it is, posting replaces two backslashes with one, edit posting replaces one backslash with zero. I dare not try what happens when you try to edit again. I don't think Einstein predicted what would happen with negative numbers of backslashes.
Theunis De Jong
MemberWhy 4?
Erm. Why not? :-) James' example shows 6 digits, and if it's always exactly that, safest way would be to use d{6} — if only to prevent reacting to a line that happens to end with a single digit.
My GREP does work on James' example … (on copying you might accidentally have picked up a stray space or hard return).
I would advise not to use the any-character wildcard in .{26,30}, though. If there is a stray tab after the last item in his list, it will pick up the tab in between and the text thereafter as well. Use to [^t]{26,30} prevent this, as it will always limit the style to any text between two tabs.
Theunis De Jong
MemberOur scholarly gent seems to have overseen something, though.
(?<=[^d{1,100}]t).{20,25}(?=t)
A variable number of elements in the look behind does not work. It simply doesn't do anything (perhaps the GREP returns an error message, but Adobe — infinite wisdom and all — decided to not pass those through to the user, leaving him to wonder why nothing happens).
Asides, everything inside the square brackets is put inside an OR-group, and the caron at the start inverts it to a NOT-group. I'm guessing it only appears to be working: it scans for a single character not (decimal or { or 1 or comma or 0 or }).
The most reliable check you can get, for a minimum number of preceding digits n (here 4), would be
(?<=d{4}t)[^t]{25,30}(?=t)
Theunis De Jong
MemberNeither \w+ nor [\u]+ include the spaces between those words …
Throwing in an would even be worse :-D It would add space, but also tabs and even the hard return at the end.
(FYI: I think \w generally equals to [\d\u] — it includes digits but excludes the hyphen, which, for example, makes it worthless when looking for proper names.)
Edit Note: if posting replaces double backslashes with single ones, Edit Post ought to do the same in reverse! As it is, posting replaces two backslashes with one, edit posting replaces one backslash with zero. I dare not try what happens when you try to edit again. I don't think Einstein predicted what would happen with negative numbers of backslashes.
Theunis De Jong
MemberWhy 4?
Erm. Why not? :-) James' example shows 6 digits, and if it's always exactly that, safest way would be to use \d{6} — if only to prevent reacting to a line that happens to end with a single digit.
My GREP does work on James' example … (on copying you might accidentally have picked up a stray space or hard return).
I would advise not to use the any-character wildcard in .{26,30}, though. If there is a stray tab after the last item in his list, it will pick up the tab in between and the text thereafter as well. Use to [^]{26,30} prevent this, as it will always limit the style to any text between two tabs.
Theunis De Jong
MemberOur scholarly gent seems to have overseen something, though.
(?<=[^\d{1,100}]).{20,25}(?=)
A variable number of elements in the look behind does not work. It simply doesn't do anything (perhaps the GREP returns an error message, but Adobe — infinite wisdom and all — decided to not pass those through to the user, leaving him to wonder why nothing happens).
Asides, everything inside the square brackets is put inside an OR-group, and the caron at the start inverts it to a NOT-group. I'm guessing it only appears to be working: it scans for a single character not (decimal or { or 1 or comma or 0 or }).
The most reliable check you can get, for a minimum number of preceding digits n (here 4), would be
(?<=\d{4})[^]{25,30}(?=)
Theunis De Jong
MemberUh-oh. Seems the GREP style ignores paragraph Bullets & Numbering …
It makes some sense, as this type of numbering is something ID “tacks on” to the start of the paragraph. If you check with the Story Editor, you will see the text is not there!
Only two options this time, I'm afraid. First is to adjust your Bullets & Numbering setting — you can automatically have a character style applied to the custom numbering. I'm not sure what happens with cross-references to this same list, though; they might pick up that style as well. I guess you just have ta try it.
Second, you can change your fancy custom numbering to plain text — but then you'll loose the automatic numbering.
-
AuthorPosts
