Forum Replies Created
-
AuthorPosts
-
Matt Isaac
ParticipantWhat is the 11 referencing in this caption?
Matt Isaac
ParticipantAri’s solution was my next suggestion but i had to test a new possibility before i posted..
Although it is not possible to add characters automatically, this can still be automated using tracking. Again just as in my first post you will need to create a Character style. Though this time instead of creating a “no break” style, you will set only a tracking value of around 300 (this can be adjusted later to your liking.) In the paragraph styles options you will use the GREP Style to apply your tracking style to text:
(?=\:)
.Matt Isaac
ParticipantThanks,
I am familiar with HTML. Though I’d never thought to use it in forums. I was actually thinking that it would be something to do with text editing for premium members.Matt Isaac
ParticipantYou can do this with paragraph styles as a grep style.
You’ll need to create a character style with the “no break” setting.
Then in the paragraph style options under the GREP Styles add a New GREP Style
In the Apply Style: field you will select the “no break” character style. In the To Text: field you will put (?=\.\.)
This will create a nonbreaking space at every space followed by two periods.Matt Isaac
ParticipantAri, I know this is not connected to the topic but i was wondering if you could tell me how to put strings of text into those boxes?
Matt Isaac
ParticipantSorry i typed that on my phone last night without getting to verify the expression.. there should be parenthesis around (eg\.\,|eg\.|eg|e\.g\.) though if there are any instances where e.g. would not be enclosed by spaces on either side, (e.g.,, at the start or end of a paragraph) you may want to use (?<=[\L\U])(eg\.\,|eg\.|eg|e\.g\.)(?=[\L\U])
Matt Isaac
Participantyou would then want to use lookarounds to find spaces so it won’t pick up eg inside other words
(?<=)eg\.\,|eg\.|eg|e\.g\.(?=)Matt Isaac
Participantmy first expression should be eg\.\,|eg\.|eg|e\.g\.
Matt Isaac
ParticipantIn GREP a vertical bar (shift+\) | is used to represent OR.
so if you wanted exactly “eg. OR eg., OR eg OR e.g.” you could use [eg.|eg.,|eg|e.g.] and replace with e.g.,
though the expression e\.?g\.?\,? replace with e.g., would also work.Matt Isaac
ParticipantIn my experiences, positive lookaheads do support wildcards; though they always search for the shortest match. If you used (?=a?c) “positive lookahead of zero or one a followed by a c” it will search instead for “positive lookahead of a c” since the shortest match of “a?c” is “c”.
That being said.. In dreerr’s original expression “(?<=~P)(.+?)~b(?=~b{2})” the “(.+?)~b(?=~b{2})” part of the expressions does what it should in selecting any text followed by a carriage return that comes before two carriage returns. The only thing throwing the expression off is the positive lookbehind of a page break. which goes back to Ari’s original reply as positive lookbehinds being unable to look to a previous text frame.
Though as a workaround you can apply the paragraph style to “(?<=~P)(.+?)~b(?=~b{2})” then go through and remove the paragraph style from “.+~P(?=.+~b{3})”. It’s a bit more work but it does work in the end.
Matt Isaac
ParticipantI was hoping i could use something like find: ([Z|z]?)([X|x]?)([C|c]?)etc. Then somehow change $1 to 1 $2 to 2… etc.
Matt Isaac
ParticipantI noticed i left out a backslash in my changing formatting and slashes find expression.. Find: (\d+)\(\d+) should be (\d+)(\d+). Also i would use the first expressions for each number 0-9 before moving to the next expressions. so total i am using 11 GREP expressions and 1 script to accomplish this.
Matt Isaac
ParticipantIf i am understanding correctly, you could just use a paragraph style for each chapter name. In the Bullets and Numbering tab use a numbered list and in the list create a new list titled chapters or whatever you’d like to call it (make sure both continue numbers boxes are checked). where it shows “^#.^t” make it say “Chapter ^#” and whenever you need the chapter number just put a space and apply the paragraph style you created to that space. and it will show as “Chapter 1 ” with the ‘1’ being variable
Matt Isaac
ParticipantDavid,
I’ve never come across a situation to where i needed to include the beginningnd of paragraph symbol for a grep search. Apart from changing “HY?” to “\u+?” for the obvious reason; could you tell me the difference in using, or not using, the additional beginningnd of paragraph from my expression to yours?Riccardo,
A side note to David’s GREP expression.. If your codes use capital and lower case letters you may need to change “\u+?” to “[|\u]+?” otherwise leave his expression the way it is.Matt Isaac
ParticipantWhen the alt-8 stops working have you checked in the keyboard shortcuts menu under the type menu to see if alt-8 was still set to “Insert Special Character: Symbols: Bullet Character”?
-
AuthorPosts