Forum Replies Created
-
AuthorPosts
-
Allan Shearer
ParticipantWell … you could SORT of do this, but, I haven’t tried with an Object Style. Rather, with a Paragraph and Character Style.
Assuming you want to trigger a Heading to be styled based on something you have typed … then … you could type, say: Head=Books, or, Head=Tools, etc.
Then … setup a GREP Style to look for the “Head=” text string and if found HIDE this string (apply a Character Style with No Fill and a Font Size of 0.1pt) and to whatever follows the Head= to the carriage return you could then apply a “Heading” Character Style.
So, the GREP string might look like this: Head=.*~b (which means: Look for “Head=” followed by ANY amount of text, followed by a Standard Carriage Return).
But then you’ll need a second GREP style to deal with the Head= and make it disappear. Thus, apply a different Character Style called “Hidden” to the text “Head=”.
The Pro: you can hammer away using a single Paragraph Style and not give much thought to ‘applying’ a Heading style … instead, by merely typing “Head=” in front of a string of text you will make that text ‘become’ a heading.
The Con: you don’t get much control over the style options. E.g., you cannot change the Alignment of the text from the ‘base’ paragraph style that you are typing in … and, you cannot add a Ruling line (background) to make the Heading stand out. You can only apply character level styles using this ‘trick’.
So … I don’t think it’s really what you’re looking for … is it? But … it was fun to try, anyway.
Allan
Allan Shearer
ParticipantHi Eugene and Dwayne
I’ve been trying to get this to work with Nested LINE Styles … and I’m finding that the Running Header won’t pickup a Character Tag that has been applied using a Nested Line Style. Too bad … cuz this would have been great: just being able to say “apply ‘abc’ to Line 1, and ‘xyz’ to Line 2 … and then have the Running Head pickup each line.
Curious to know if there’s a way to make this work with Nested Line Styles, rather than have to know ‘how many’ words to set the ‘normal’ nested styles to look for.
Thanks
Allan
December 9, 2014 at 3:41 pm in reply to: GREP Tricks: Using LookBehind and LookAhead expressions to convert a SPACE into a NON-BREAK SPACE #72153Allan Shearer
Participant>>Sorry for the nit-picking
Not at all! Quite welcome … that’s how I (we) learn. :)
I wish I could post images here … cuz I’d love to show what I’ve managed to accomplish using GREP. I really made it work through it’s paces and it was absolutely pivotal to our laying-out of 450+ page books, and GREP helped me create 1000’s of IMAGES. Say what!? Well … sort of. :)
Allan
December 9, 2014 at 2:58 pm in reply to: GREP Tricks: Using LookBehind and LookAhead expressions to convert a SPACE into a NON-BREAK SPACE #72149Allan Shearer
ParticipantThanks A.A.
Yeah, I didn’t bother to refine it further. Just hammered out some examples that would be somewhat easy to read, rather than optimising it and possibly making it a little more difficult for a novice (like me!) to read.
Thanks for the refinement.
Allan
December 9, 2014 at 2:55 pm in reply to: GREP Tricks: More LookBehind and LookAhead examples … #72148Allan Shearer
ParticipantCool! Thanks. Had never heard of \K. Thanks!
It’s not something that is available in the UI … guess you just gotta know about it.
Here’s what I’ve found on it, as posted in an Adobe forum:
————————snip————————
(?<=pattern) \KA zero-width positive look-behind assertion. For example, /(?<=)\w+/ matches a word that follows a tab, without including the tab in $& . Works only for fixed-width look-behind.
There is a special form of this construct, called \K , which causes the regex engine to “keep” everything it had matched prior to the \K and not include it in $& . This effectively provides variable-length look-behind. The use of \K inside of another look-around assertion is allowed, but the behaviour is currently not well defined.
For various reasons \K may be significantly more efficient than the equivalent (?<=…) construct, and it is especially useful in situations where you want to efficiently remove something following something else in a string.For instance
s/(foo)bar/$1/g;
can be rewritten as the much more efficient
s/foo\Kbar//g;
————————snip————————Allan
Allan Shearer
ParticipantHi Noman
In the example you mention (“Classified Section” template), open the Paragraph Styles panel and select/modify the “Body 1 Rule” style.
Go to the Paragraph Rules page. Then, click the drop-down list which likely currently reads “Rule Above” and change it to “Rule Below”.
Now you should be able to see what-all settings have been used for this Below Rule, e.g., Weight = 0.5pt, Colour = Black, Offset = 0.1389in, etc.
Hope this helps.
Yours,
Allan
December 5, 2014 at 5:26 pm in reply to: GREP Tricks: More LookBehind and LookAhead examples … #72079Allan Shearer
ParticipantAh ha! I forgot to look for the solution to that. Yes, much cleaner. Thanks. :)
Allan
December 5, 2014 at 8:50 am in reply to: GREP Tricks: Using LookBehind and LookAhead expressions to convert a SPACE into a NON-BREAK SPACE #72073Allan Shearer
ParticipantOh sorry … I wasn’t trying to include the line break in that find. I was just presenting a list of examples that I want to find.
In my case, I cannot simply look for any digit followed by any character (or vice versa). It’s only specific combinations that need to be glued together, where it is an undetermined digit that will be in the combination.
Allan
Allan Shearer
ParticipantI initially went down the path of trying to Import XML . . . but in the end, I found I could achieve a lot more if I simply (ahem … to use that word loosely) transformed my XML into something that I could ‘drop’ into place inside an IDML file. And this is how I’ve built the two books for my Australia client. Essentially: writing the entire file with anchored images, index markers, etc. outside InDesign, and then simply (to use that word literally!) double-click on the IDML file to reveal all the hard work is done!
I’m *sure* XML works really, really well in InDesign. But what I was trying to get it to do … either I’m not ready to learn what InDesign expects, or, InDesign isn’t ready for what I expect. So … we came to a compromise. :)
Allan
Allan Shearer
ParticipantSlight correction:
.?(?!\u*+)
So, How does this work?
Well … rather than looking at what you’re trying to apply Bold to … look at what we’re NOT trying to apply Bold to! Huh!? :)
The magic is in something called a “Negative Lookahead”. That part of the code is: (?!) [opens with (?! and closes with ) … and whatever is in-between is what you’re looking for]
Thus, with this string: .?(?!\u*+) we’re saying:
1. Look for “Any Character” “Zero or One” times: .?
2. WHICH IS FOLLOWED BY “Zero or More” “Any Uppercase Letter”: \u*
3. and “One or More” “Any Lowercase Letter”: +
4. BUT, ONLY apply the Bold to whatever is found UP TO and NOT INCLUDING what is found inside the Negative Lookahead (?!)
5. So … to accomplish No. 4 above, we wrap No. 2 and No. 3 inside No. 4 … and we get: (?!\u*+)
6. Take No. 1 and No. 5 above and write them together: .?(?!\u*+)The Negative Lookahead is w-a-y cool. It allows you to ‘look ahead’ when searching for something with the intent of NOT (negative) applying whatever Character Style to this part that is found.
Sounds VERY confusing, I know … but … it works. :)
Hope this helps. :)
Allan
Allan Shearer
ParticipantHi Carlton
This seems to work for me:
.?(?!\u)
Let me know if it works well for you.
Yours,
Allan
Allan Shearer
ParticipantHi Sebastian
I too have tried getting ID to process certain XSLT instructions which I soon found out it ignored (or … there’s always a chance that I did it wrong).
I’ve learned NOT to trust the “Apply XSLT” when Importing XML and I simply re-process the XML using a tool such as Oxygen (for a visual process), or once you get your XSLT refined to a perfect science, then, you could use a command line process such as Saxon.
I’ve just found that if I leave it to ID (or, other apps for that matter – e.g., when Exporting out of FileMaker) to ‘apply XLST’, I’m never happy with the results. It’s very much a gamble, as we don’t really know what parsing engine ID is using (do we? – ok, perhaps *I* don’t know…). Thus … when I use a tool such as Oxygen, I can choose which parsing engine I want to use (I chose Saxon) and then I can test and see the results. If happy, then I toss everything at Saxon via the command line and end up with XML that I know has all the refinements I want.
Not sure if this helps at all. Hope it does.
Yours,
Allan
Allan Shearer
ParticipantHi evegate94
I’m intrigued by this, as I haven’t yet had InDesign crash on me.
I happen to be using InDesign CC 2014, running on Yosemite. I’ve had all of the previous versions on ID installed, but never really did any ‘serious’ work on them until recently, and for that I had decided to upgrade to CC 2014.
Perhaps it’s possible that the file(s) you’re working-on when ID crashes have a bit of ‘corruption’ in them. I seem to recall that you can pretty successfully rid the file of corruption if you do a Save As and choose IDML. Then, open that IDML file back into InDesign and save as a new INDD file.
That’s what I would first do, and then see if ID continues to crash using these new files.
Sorry I don’t have much else to offer.
Yours,
Allan
Allan Shearer
ParticipantI should add …
Having done a bit more testing in Ventura and comparing to InDesign, when it comes to Footnotes, there are some ‘interesting’ results.
I’ve noticed that InDesign does not allow you to insert a Footnote into a Table (seems to be a long time ‘wish list’ item). Ventura let’s you do this. BUT … the jury is out whether Ventura’s implementation is any better. Why? Read on.
In Ventura, you can insert a Footnote marker anywhere you like . . . but . . . the Footnote frame will ALWAYS attach itself to the Page.
I erroneously stated in my previous message that Ventura now let’s you decide whether Footnotes respect the columns of the “… page (or frame)…”. But I mis-spoke. It’s “page” only, since a Footnote frame will not attached itself to a floating frame in Ventura.
That’s where InDesign has the advantage … when you insert a Footnote, the Footnote frame that is created will attached to the bottom of whatever frame it finds itself in. That is something that Ventura simply cannot do. Score 1 for InDesign!
And so … when it comes to “Footnote frames respecting the page columns”, yes, sure, Ventura CAN do this – but, that’s not all that useful if the Footnote reference was placed in a floating frame. In this case, Ventura will still place the Footnote frame at the bottom of the PAGE, whether or not the Footnote reference in the text is in a floating frame or in the page-frame.
Maybe that’s why we don’t use floating frames for linked text flows much in Ventura. Oh … Ventura CAN flow a story across MANY frames*, and do it well … but, at the head-scratching expense of “what to do with footnotes?”.
* It so happens that I used linked text in floating frames for the project here in Ireland … linking and flowing out a text file through 4 columns (each a single-column floating frame) across approximately 200 pages. So … Ventura can do this very well (using this technique here for the past 9 years) … but … it’s not ‘normally’ how things are done in the Ventura-world.
As for Footnotes in Tables … yes, ok, Ventura can do this. And, it so happens that one of my next major Ventura-to-InDesign projects has TONS of tables with footnotes in them. But … these tables are ALL in floating frames – disconnected from the body/main text which itself flows across the pages. AS SUCH … the footnotes in these tables are NOT real footnotes! If they were, then, the footnotes would appear snapped to the bottom of the page, rather than the floating frame containing the table. Uu-gly!
Yep … so … my experience with Ventura doing Footnotes in Tables ends up being ‘fake’ footnotes in tables. Thus, it looks like ‘how’ I’ll choose to do this project in InDesign will be the very same: ‘faked’ … and I’m content with that. :)
Sure, one day, it would be cool to see Footnotes in Tables and Column Respecting/Disrespecting Footnotes, both as welcome new features in InDesign. But to be honest with you … I would suspect that the discussion of both of these must send shivers up the spine of the programmers. It may SEEM like a simply request … but, I think it could well be a recipe for disaster, with all of the other w-a-y cool things that InDesign allows you to do. But if we see it one day, you can be sure that whoever took-on the challenge to code it, deserves serious KUDOS! :)
Allan
Allan Shearer
ParticipantInteresting poser!
Back in the day, Ventura Publisher could ONLY do what you now want, but the last couple of versions the functionality to “Use page columns” was introduced so that the Footnotes would respect the columns of the page (or frame).
Alas … what you want is an OLD version of Ventura! No … just kidding. :)
But I’ll be keen to hear of a solution for this one, as it would indeed be of interest to Ventura users who currently have the choice, and who may find themselves faced with the same poser that you’ve found.
I even thought of placing a frame within a frame and see if that would do it … but, no. At least, not on my initial attempt.
Here’s hoping someone will find an answer for you! :)
Yours,
Allan
-
AuthorPosts
