Forum Replies Created
-
AuthorPosts
-
September 8, 2011 at 3:07 pm in reply to: Can GREP remove hyphens between characters and put the characters back in? #60476
Theunis De Jong
MemberThat's what Numbered Groups are for. Search for this:
(l)-(l)
and replace with
$1$2
But it can be done with a bit more flair — by not 'finding' the lowercase characters at all! (Don't worry, I'll walk you thru it.)
For that, you have to visualize how a regular Find works: you type in what needs to be found, press the Find button once, and InDesign selects the 'found text'. What if you coud find only the hyphens which have a lowercase character before and after it? — Notice how this is distinctly different from what you do right now, that is, looking for the exact sequence “lowercase – hyphen – lowercase”!
This lil' bit of magic can be done using “lookbehind” and “lookforward” sequence. Inside the “lookbehind” sequence you can specify what needs to be to the left of 'the text you actually found'. This fragmentatte:
(?<=l)-
will only find-and-select individual hyphens that are preceeded by a lowercase character. A phrase worthy of emphasizing.
Simlarly, this one:
-(?=l)
will only find-and-select hyphens that are followed by a lowercase character. And yes! you can combine these two:
(?<=l)-(?=l)
will only select hyphens that … well, see the above :) Replace with Nothing-At-All, and thus you'll be effectively removing the hyphens without touching anything else.
So what is the advantage of this method? In this case, it's rather miniscule. InDesign will not 'touch' the characters left and right of the hyphen; in particular, it will not “remove” them and then “re-insert” them again for the Replace operation. (I think this is rather how Search-and-Replace works, internally.) So it'll run fractionally faster. But consider a situation where you want to apply formatting to these occurrences of hyphens only when preceeded and succeeded by lowercase. You cannot do this with regular Search/Replace, and nor with the Numbered Grouping method. But with the lookbehind and lookahead function means you can!
Theunis De Jong
MemberHi Anne-Marie! No, no vacation for me — I've bin a bit quiet lately for the very opposite of that, alas.
I don't think the script is broken. Mind, I developed preptext primarily for fixating First Import of Word text; and, typically, headings and such wouldn't have been marked up yet with bold or italics. Every now & then an author does so manually, and if I see it in time I remove the spurious formatting before prepping the entire document.
In your case, your text is already formatted as-it-should, but preptext doesn't “know” that the boldness in your headings is due to the paragraph style and thus marks it “again” as a character style. It might be possible to make it “paragraph style-aware”, just as it's already “character style-aware”, but I need to look into it.
Interestingly, it is smart enough to ignore nested styles; as far as I can tell, but it double-hits GREP styles too.
Now there's a puzzler. If I had to guess I'd say either both or none …
Theunis De Jong
MemberIt's this entirely new learning paradigm: “don't you go and tell me where to find the solution, just tell me what it is!” I don't know, maybe I'm old fashioned.
This is the discussion I remembered it from: https://www.pigsgourdsandwikis……-bugs.html – but you'll still have to read it top to bottom by yourself, I'm not going to summarize it.
Theunis De Jong
MemberCrap, it doesn't work! And it's your own fault at that. Why is your company name “XYZ” in its stand-alone version but “XYC” in the web address?
Okay, on to the decidedly-not-simple-anymore solution. The web address contains periods to its left & right, and while there may be a period to the right of the actual name, there never should be one at its left.
Try this:
(?<!.|w)XYZb
Here is, by the way, another reason not to use this trick to capitalize your company name. If the company name is a common word in all caps (“WORD”, for example), all occurrences of that word in lowercase will be automatically picked up as the company name.
Theunis De Jong
MemberThere is a not-that-simple way :)
The name in the web address contains periods to its left and right; adding “word breaks” to your name is enough to make the single word version distinctively different:
bXYZb
That said, I think it's bad practice to use GREP styles to capitalize phrases that are supposed to be capitals to begin with. It's generally much 'cleaner' to bite the bullet and use Find/Change to have actual capitals in your text. Imagine, for example, what happens if you export this text out of InDesign to re-use in a web page.
Theunis De Jong
MemberIt would be helpful if you could tell on what device the page doesn't center.
(And if that's an iPad or Android tablet, using what software. If the answer is “iBooks on the iPad”, you might want to read all of Liz Castro's Pigs, Gourds and Wikis blog posts — she has a couple of pointers on how to wrestle iBooks into submission.)
Theunis De Jong
MemberInDesign is not a PDF editor. (Adobe really needs to sell t-shirts with that statement.)
Safest you can do is NOT EDITING a press-ready PDF, and use the original document to re-create it. You never know what side-effects post-editing has — I'm thinking of transparency, font embedding, color profiles, and lots of other things I should not think of.
Second best is to use dedicated PDF editing software — which is not, I repeat not one of InDesign, Illustrator, or Acrobat Pro itself. Pitstop does a better job.
Last best is place the PDF in an InDesign document and paste white rectangles over the errors, so you can type in new text. Obviously, one would only do this when in real dire need of a solution.
Theunis De Jong
MemberIf you press the default key to Show/Hide the swatches panel (mine is F5), it gets activated and you can use the up & down arrows to scroll through the swatches. Press Return to commit, Escape to escape.
Unfortunately, the X key doesn't toggle between fill & stroke as long as the panel is active.
Theunis De Jong
MemberYour sample names are all on a single line. If that's what you have right now, all you need is to find everything that's on a single line …
If not, there are a couple of other avenues you might proceed into (or something — I'm mixing metaphors I think).
Your own suggestion is a valiant try but will also match any two words, even starting with a lowercase! That's because of the use of the * operator – zero or more. You are also limiting yourself to accentless names … which might be okay if they are all American
but hey, let's go nuts.Try this one:
ul+( l+)*( ul+)+
Theunis De Jong
MemberKris, would that be a similar issue as what I ran into when I installed Acrobat X? I prefer the ol' reliable v.9 (if only because we have a Pitstop installed on top of that) but every time I instruct my Mac to use the older version, Acrobat blithely ignores me!
August 29, 2011 at 2:17 am in reply to: Inserting a page that is automatically the same size? #60390Theunis De Jong
MemberDid you possibly create your document as 8.5 x 11″ and afterwards used the Page Resize tool to get the size you wanted?
Check the size that's reported in Document Setup.
Theunis De Jong
Member1. No. Not without cheating, and doing the first note manually.
2. What?
Theunis De Jong
MemberEugene Tyson said:What?
David thinks he needs to create a single double-sized page per what the rest of the world calls “a spread”.
Of course you don't need to. ID does all of this, automatically and invisibly.
August 17, 2011 at 3:05 pm in reply to: Help! Need to include Article panel entries when combining INDD files #60315Theunis De Jong
MemberThe good news is the Scripting Model for CS5.5 has entries for Article and Articles (plural!), and — silent hints of how it was coded inside ID — each article apparently has one or more ArticleMembers which point to pageItems; and then there are ArticleChildren as well, which also point to pageItems (apparently this one has something to do with grouped items).
So it seems it's feasible to write you up a script.
The bad news is, we still don't have a CS5.5 at the 'ffice so I can't personally offer my services.
Theunis De Jong
MemberA-ha, you were referring to the Navigator panel. You'll have to “live peacefully without the Navigator”.
(The biggest joke of this sort of 'improvements' is Bob also remarks it's still available in both Illustrator and Photoshop. How's that for a “Creative Suite” of like-minded programs and interfaces, Adobe?)
-
AuthorPosts
