Forum Replies Created
-
AuthorPosts
-
Theunis De Jong
MemberBy script: sure! This was a bit of fun.
Place your text cursor into your numbered list as it is now, and be sure to place it inside the first numbered paragraph that should be changed. This script scans to the end of the current list, then reverses the list, putting the first number (which may not be '1'!) into the last item and counting down as it goes up to where you started the script.
(Copy, paste into a plain text editor — Notepad, Textedit in plain text mode; best is Adobe's own ESTK Editor –, save as “ReverseNumberedList.jsx” into your User Scripts folder; it should automatically appear in the Scripts panel.)
if (app.selection.length == 0 || !(app.selection[0] instanceof InsertionPoint))
{
alert (“Please place the text cursor in the first paragraph with a numbered list…”);
exit(0);
}
firstp = app.selection[0].paragraphs[0];
if (firstp == null || firstp.bulletsAndNumberingListType != ListType.NUMBERED_LIST)
{
alert (“That's not a numbered list…”);
exit(0);
}
lastp = firstp;
while (lastp.paragraphs.nextItem(lastp) != null && lastp.paragraphs.nextItem(lastp).bulletsAndNumberingListType == ListType.NUMBERED_LIST)
lastp = lastp.paragraphs.nextItem(lastp);// Reached the end of this numbered list. So…
var count = firstp.numberingResultNumber;
do
{
lastp.properties = ({numberingContinue:false, numberingStartAt:count});
count++;
if (lastp == firstp)
break;
lastp = lastp.paragraphs.previousItem(lastp);
} while (1);Theunis De Jong
MemberWell, no, in this case you can't. The image needs to be a monochrome image in Photoshop – a bitmap. In that mode, you cannot have other colors than black and white (and certainly not transparent).
these are just color fills, in InDesign
and I meant precisely that. If you select a monochrome bitmap in InDesign with the white arrow, you can change the 'foreground' (black) and 'background' (white) colors by changing the Fill and Stroke swatches of that image. It's been a while since I last used this, but it might even be ID automatically sets “white” to transparent on placing a monochrome image, so you only have to set the black parts to use a white (Paper) swatch.
Theunis De Jong
MemberMy first though it, better make it a quadruple-click, just in case the subhead spans more than a single line ;-)
February 22, 2010 at 1:36 pm in reply to: Macro/Script for multiple text find-change queries? #54960Theunis De Jong
MemberJongware said:
“January 123:321″ would be changed to “Januar 123:321″, but “January” alone would not be.
That's a good candidate for search-and-replace with GREP.
Try this, with plain InDesign, using the GREP Search and Replace dialog. Search for
<January(?= ddd:ddd)
and replace with
Januar
(Mind not to forget the space immediately following the equals.) If you press the “Find next” button, you will see it miraculously skips all Januaries that stand on their own …
The (?= ..) stuff is called a lookahead. It means “January” will only be found when it is followed by a space, three digits, a colon, and then three more digits. However, this suffix will not be “marked” by the Find function — only the plain text “January” will be selected! And only this selected part will be replaced with whatever you put into the “Replace” field.
You can put this straight into the FindChangeBy script data file for every month to replace (or, better, use the Record script because the syntax of that data file can be a bit daunting).
February 22, 2010 at 1:36 pm in reply to: Macro/Script for multiple text find-change queries? #54959Theunis De Jong
Member“January 123:321″ would be changed to “Januar 123:321″, but “January” alone would not be.
That's a good candidate for search-and-replace with GREP.
Try this, with plain InDesign, using the GREP Search and Replace dialog. Search for
<January(?= ddd:ddd)
and replace with
Januar
(Mind not to forget the space immediately following the equals.) If you press the “Find next” button, you will see it miraculously skips all Januaries that stand on their own …
The (?= ..) stuff is called a lookahead. It means “January” will only be found when it is followed by a space, three digits, a colon, and then three more digits. However, this suffix will not be “marked” by the Find function — only the plain text “January” will be selected! And only this selected part will be replaced with whatever you put into the “Replace” field.
You can put this straight into the FindChangeBy script data file for every month to replace (or, better, use the Record script because the syntax of that data file can be a bit daunting).
Theunis De Jong
MemberYou can create a monochrome (pure black & white) mask in Photoshop and place that in InDesign on top of the photo. Then make the black pixels white and the white pixels transparent — these are just color fills, in InDesign. But these work exclusively with monochrome bitmaps.
It means you have to create the complete mask per photo to size in Photoshop; and, unless you make a lot of different masks, you would need to re-use each one a couple of times in your ID doc.
All in all, use Photoshop. (Or perhaps Illustrator instead, as you can convert a rectangle to scratchy drawn white lines with that.)
Theunis De Jong
MemberWell, no, in this case you can't. The image needs to be a monochrome image in Photoshop – a bitmap. In that mode, you cannot have other colors than black and white (and certainly not transparent).
these are just color fills, in InDesign
and I meant precisely that. If you select a monochrome bitmap in InDesign with the white arrow, you can change the 'foreground' (black) and 'background' (white) colors by changing the Fill and Stroke swatches of that image. It's been a while since I last used this, but it might even be ID automatically sets “white” to transparent on placing a monochrome image, so you only have to set the black parts to use a white (Paper) swatch.
Theunis De Jong
MemberMy first though it, better make it a quadruple-click, just in case the subhead spans more than a single line ;-)
February 22, 2010 at 6:36 am in reply to: Macro/Script for multiple text find-change queries? #51955Theunis De Jong
MemberJongware said:
“January 123:321″ would be changed to “Januar 123:321″, but “January” alone would not be.
That's a good candidate for search-and-replace with GREP.
Try this, with plain InDesign, using the GREP Search and Replace dialog. Search for
\<January(?= \d\d\d:\d\d\d)
and replace with
Januar
(Mind not to forget the space immediately following the equals.) If you press the “Find next” button, you will see it miraculously skips all Januaries that stand on their own …
The (?= ..) stuff is called a lookahead. It means “January” will only be found when it is followed by a space, three digits, a colon, and then three more digits. However, this suffix will not be “marked” by the Find function — only the plain text “January” will be selected! And only this selected part will be replaced with whatever you put into the “Replace” field.
You can put this straight into the FindChangeBy script data file for every month to replace (or, better, use the Record script because the syntax of that data file can be a bit daunting).
February 22, 2010 at 6:36 am in reply to: Macro/Script for multiple text find-change queries? #51954Theunis De Jong
Member“January 123:321″ would be changed to “Januar 123:321″, but “January” alone would not be.
That's a good candidate for search-and-replace with GREP.
Try this, with plain InDesign, using the GREP Search and Replace dialog. Search for
<January(?= ddd:ddd)
and replace with
Januar
(Mind not to forget the space immediately following the equals.) If you press the “Find next” button, you will see it miraculously skips all Januaries that stand on their own …
The (?= ..) stuff is called a lookahead. It means “January” will only be found when it is followed by a space, three digits, a colon, and then three more digits. However, this suffix will not be “marked” by the Find function — only the plain text “January” will be selected! And only this selected part will be replaced with whatever you put into the “Replace” field.
You can put this straight into the FindChangeBy script data file for every month to replace (or, better, use the Record script because the syntax of that data file can be a bit daunting).
Theunis De Jong
MemberYou can create a monochrome (pure black & white) mask in Photoshop and place that in InDesign on top of the photo. Then make the black pixels white and the white pixels transparent — these are just color fills, in InDesign. But these work exclusively with monochrome bitmaps.
It means you have to create the complete mask per photo to size in Photoshop; and, unless you make a lot of different masks, you would need to re-use each one a couple of times in your ID doc.
All in all, use Photoshop. (Or perhaps Illustrator instead, as you can convert a rectangle to scratchy drawn white lines with that.)
Theunis De Jong
MemberThree viable solutions:
1. Don't do anything. You heard it right! Ask the printer to magnify/reduce your PDF to the correct size (you can try out a few percentages on a good photocopier).
2. Export your current doc to a PDF. Make a new ID document of the correct size. Import the entire PDF and place them at the correct size. Don't worry, no manual labour involved, there are Javascripts out there that make it a fairly painless process. Downside is if you alter something in your original text, you will have to re-create the PDF and update the image document.
3. Make a new ID document of the correct size. Import and place the original ID document into this (there are scripts for that as well). Works almost the same as (2) above, but in this case, editing is a snap. Just use “Edit original” on the image of an ID page and ID will open the original document into its own application — InDesign itself.
Am I missing something? I don't think so — adjusting layout is possible with the document you have right now, but you have to scale the text frames “manually”. If you just resize them, the text will run radically different; and ID is just too good with typesetting to assume “if I reduce the frame by 10% and I make the text 10% smaller, it'll be the same” — it won't.
Theunis De Jong
MemberThree viable solutions:
1. Don't do anything. You heard it right! Ask the printer to magnify/reduce your PDF to the correct size (you can try out a few percentages on a good photocopier).
2. Export your current doc to a PDF. Make a new ID document of the correct size. Import the entire PDF and place them at the correct size. Don't worry, no manual labour involved, there are Javascripts out there that make it a fairly painless process. Downside is if you alter something in your original text, you will have to re-create the PDF and update the image document.
3. Make a new ID document of the correct size. Import and place the original ID document into this (there are scripts for that as well). Works almost the same as (2) above, but in this case, editing is a snap. Just use “Edit original” on the image of an ID page and ID will open the original document into its own application — InDesign itself.
Am I missing something? I don't think so — adjusting layout is possible with the document you have right now, but you have to scale the text frames “manually”. If you just resize them, the text will run radically different; and ID is just too good with typesetting to assume “if I reduce the frame by 10% and I make the text 10% smaller, it'll be the same” — it won't.
Theunis De Jong
MemberNo joy there. GREP's “start of line” and “end of line” markers are for paragraphs, not for single lines.
You could make the entire thing a table — one single row to auto-grow, two columns, where the left one has a solid white fill. But I bet you are going to say, “Doesn't work — single cells do not break over pages!”
Theunis De Jong
MemberWindows seems to know which type is which, because it shows a CS3 icon for a CS3 document, and CS4 for CS4. Annoyingly though, double-clicking a CS3 document will open in CS4.
The one thing where Windows appears to have an advantage, and it does it wrong!
Working on Windows, I use “Open with” — fortunately, ID CS3 is listed there… I showed Soxy to my Mac colleagues a while ago and haven't heard them complain on this issue afterwards, so it seems to work perfectly. Where is the Windows version :(
-
AuthorPosts
