Forum Replies Created
-
AuthorPosts
-
Aaron Troia
ParticipantFor finding “Chapter” followed by one or two numbers only, try:
Chapter\d{1,2}
-or-
Chapter [0-9]{1,2}Aaron Troia
ParticipantThis sounds like EPUB3, and theoretically I believe it’s possible, and it could be that it is possible now but I havent tested it so I’m not sure if its been widely supported in the ereaders that support EPUB3 (Redium might do it, Azardi might do it, and iBooks might also support it). I would ask your dev if they can send you an example ePub with that implemented and run it through different ereader apps that support EPUB3 (iBooks/Azardi/Redium/etc) and see for sure.
It’s old but you check out Liz Castro’s blog post about it:
https://www.pigsgourdsandwikis.com/2013/05/controlling-spreads-in-epub3-fixed.htmlAaron Troia
ParticipantNo problem, that can be a tough decision on how to rework that into an eBook. You might try unzipping the ePub and setting all three div’s to the same style to see if you cant get the same box size. If you would be interested, I would be willing to look at the code to see what’s possible, as it might be possible to make it work by playing with the eBook’s CSS. Just a thought, no pressure but I thought I would ask.
Aaron Troia
ParticipantThis might be a situation where you have to combine all the content into one colored box (or div if you want to think about it in HTML) and anchor it somewhere close in the body of the text that makes sense. I know that might not sound good but it’s one of those things that doesn’t carry over to ebooks and you probably will have to explain that to your client. It might also make sense to make a copy of the file that you do things that make sense for the eBook conversion, it will make you’re life easier than trying to do both print and ePub from the same file. Anyway, let me know if that makes sense.
January 20, 2015 at 3:55 pm in reply to: Grep syntax to find positive numbers and indent the number to the left #72811Aaron Troia
ParticipantIzaac, your examples are pica measurements, are you trying to find text with either positive or negative text indent? or are you trying to find literal positive and negative numbers in a tables?
Aaron Troia
ParticipantI’m not sure if this would do exactly what you are wanting but you might look as DocsFlow from Em Software, it allows you to import Google Docs into InDesign and you might be able to then use data merge within InDesign to populate the document.
January 9, 2015 at 3:42 pm in reply to: GREP Tricks: More LookBehind and LookAhead examples … #72613Aaron Troia
ParticipantYou might not need to search for capitalized words at all, this might work for you
(^\“| and )\K.+?(?= ’\d+)
of for more InDesign specific (double check the ~] as that is a single closed quotation mark and may not be the same as an apostrophe in inDesign)
(^~{| and )\K.+?(?= ~]\d+)
that should cover all the alumni names in your examples.
Aaron Troia
ParticipantNo problem :)
Aaron Troia
ParticipantYou can try something like this, which will find instances of a closing quotation mark but no opening quotation mark:
^[^\“]+\”
or
^[^~{]+~}or for just opening quotation mark with no closing quotation mark:
\“[^”]+$
or
~{[^~}]+$I used unicode opening and closing quotation marks in the first ones, and in the second I used the InDesign Specific double opening (~{) and closing (~}) quotation marks. Anyway, hope that helps.
Aaron Troia
ParticipantLookbehinds cannot be greedy (ie you cant use quantifiers), lookaheads on the other hand can be greedy, but not lookbehinds, but you can use Keep or \K to mimic the positive lookbehind while using quantifiers, try:
\=(\[?.+\])?\K.+?(?=\!\$C\$\d+)
December 9, 2014 at 3:29 pm in reply to: GREP Tricks: Using LookBehind and LookAhead expressions to convert a SPACE into a NON-BREAK SPACE #72152Aaron Troia
Participantoh gotcha! Sorry for the nit-picking. I am glad you are posting GREP Tricks, lookbehinds and lookaheads are very powerful and very useful in InDesign :)
December 9, 2014 at 3:11 pm in reply to: GREP Tricks: More LookBehind and LookAhead examples … #72150Aaron Troia
ParticipantNo problem, it’s something I started using while working in Sublime Text while doing eBook conversions and decided one day to test if it worked in InDesign and I was surprised to see that it did, so I’ve been trying to give people a heads up, esp. with positive lookbehinds. Thank you for finding that snippet, its a more thorough than I could’ve said it myself.
I would add on top of what they said that one difference between \K and (?<= ) is that \K is non-greedy so you can use things like \d+ and \w+ and even .+? (all with greedy quantifiers) before the \K in your regex, where as lookbehinds are greedy and so you have to be explicit in your search, you can use \d and \w, but not with greedy quantifiers (ie “+”).
Hope I said that right.
December 9, 2014 at 2:50 pm in reply to: GREP Tricks: Using LookBehind and LookAhead expressions to convert a SPACE into a NON-BREAK SPACE #72145Aaron Troia
ParticipantI’m wondering why you pipped and wrote out all the lookbehinds and lookaheads, the lookahead is non-greedy, unlike the lookbehind, so you could’ve done something like this
(?<=\d) (?=mile|gallon|kg|day)
or if you need both to be non-greedy, I use this more in HTML/CSS after ePub Export, but you could use Keep (\K)
\d+\K (?=mile|gallon|kg|day)
December 9, 2014 at 2:38 pm in reply to: GREP Tricks: More LookBehind and LookAhead examples … #72142Aaron Troia
ParticipantTo simplify things more you could use \K (Keep), then you don’t have to type out the lookbehind syntax.
\d{2}\KFR(?= \d{5})
-
AuthorPosts
