Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 15 posts - 226 through 240 (of 325 total)
  • Author
    Posts
  • in reply to: GREP or sth else? Number – space – number. #78104
    Aaron Troia
    Participant

    I just realized that this GREP only works for the whole numbers and not the fractions, I’m trying to figure out a way that it will work with the fractions, but so far I haven’t had any luck.

    in reply to: GREP or sth else? Number – space – number. #78103
    Aaron Troia
    Participant

    Good question Jerzy, I was trying to figure it out and had to resort to Google to find others with the same issue, and I found one that should work for you.

    Find: (\d)(?=(\d\d\d)+)
    Replace: $1(insert a space)

    Let me know if you have any issues. Here’s the forum post where I found it for reference, https://forums.adobe.com/thread/1458885

    in reply to: InDesign CS3 and Kindle #78102
    Aaron Troia
    Participant

    Correct me if I’m wrong, but I thought CS3 did have some export option that would export to “digital book” or something, not the best but it was something, CS4 and CS5 had some/better ePub handling and export options, CS5.5 was when ePub export really took off and seemed more than a side project, and while it still had it’s bugs it was a huge leap from what came before it. Of course CS6 and beyond has better ePub features but if you know what you’re doing in the earlier versions, they do give you a least a starting point, that said you might have to do more hands on work with with the code than with the newer versions, but it’s doable.

    Im not sure if I’ve used the CS4 plugin or not, it’s been awhile. I’m guessing it’s probably exporting to Mobi7, which isn’t the latest KF8 file, but I believe all the Kindles still support it (all the way back to the original Kindle) so you shouldnt run into too many issues on the newer ones, it’s just more limited in features.

    Anyway, good luck with your ebook, I hope that plugin works for you.

    Aaron Troia
    Participant

    If you are using page/column breaks it would be possible as you would have something to reference in the GREP search, but I dont believe it’s possible with a GREP search without that since there is no reference point to refer to to distinguish between pages in the text boxes.

    in reply to: Grep help – positive look behind #76360
    Aaron Troia
    Participant

    Keep (\K) is similar to a lookbehind, it consider’s everything before it as zero width but unlike a lookbehind it isnt greedy (ie you dont have to be explicit and you can use modifiers), so in the case of your GREP search (I couldnt get it to work but just using it as an example), actually let’s change the page breaks to tabs to simplify things:

    \K.+?\r

    but what if you wanted to search for multiple tabs, in a lookbehind you would have to be explicit in how many tabs you were looking for, but with Keep you can use modifiers (such as +) to complete your search where as it would error out with a lookbehind:

    +\K.+?\r

    in reply to: Grep help – positive look behind #76358
    Aaron Troia
    Participant

    Rivkah,

    Interesting, I hadn’t run into that before. It even does it when using Keep \K as well. Considering these are InDesign specific meta characters, I’m not sure why InDesign is having trouble with them when using a Lookbehind/Keep.

    Anyway, I don’t think you’re doing anything wrong, it’s a perfect use of the Lookbehind to me, but it might be easier to search for ~P and then change them back to your body paragraph style.

    Aaron

    in reply to: "End of Story" Symbol # Find and Change #76159
    Aaron Troia
    Participant

    Hey Tuz,

    I don’t know of any way to search specifically for the end of story icon, but you could use GREP to find all the content in the story, try this

    Find: (?s:(.+?)$)(?!~b)
    Replace: $1\r~8

    This worked for me in finding all the content in a story, and then allowing me to add a new line and place a bullet at the end.

    Let me know if that helps or if it needs tweaking.

    Aaron

    in reply to: Add character with GREP #75939
    Aaron Troia
    Participant

    No problem, I’m glad that worked!

    I started learning Regex with the O’Reilly GREP Pocket Reference (https://shop.oreilly.com/product/9780596153618.do) to learn the basics, then I moved on to O’Reilly’s Mastering Regular Expressions (https://shop.oreilly.com/product/9780596528126.do) which explains more advanced features like capture groups, call backs, lookahead/lookbehind assertions and more, which really take your GREP to the next level. I would totally recommend both books for learning GREP. you might also look into the InDesign plugin WhatTheGrep by Jongware (https://www.jongware.com/idgrephelp.html) which will break down a Regular Expression and explain everything that’s going on. I could even send you some GREP searches that I use almost daily in InDesign and you could then use that script to break it down and see what each piece is doing. Also look up the InDesign metacharacters list (there are characters for double/single quotes, non-breaking spaces, even clipboard content) and print out a copy, those are invaluable to doing GREP in InDesign.

    Anyway, I’m glad that helped, and good luck with GREP it’s a great way to up your InDesign skills!! Let me know if you have any other questions.

    in reply to: Add character with GREP #75934
    Aaron Troia
    Participant

    Andrea,

    that’s totally possible with GREP, try this. I’m using a capturing groups which is represented by the parenthesis which says “group this content” and I can later call that group in the replace field by referring to it with a back reference which is a GREP variable which always starts with the dollar sign and number (1-9). So below I’m capturing all the text in the paragraph, then adding the double quotes to either side of the back reference.

    Find: ^(.+?)$
    Replace: ~{$1~}

    Let me know if that works for you and/or if it needs tweaking

    Aaron Troia
    Participant

    Hey Tim,

    First you need to unzip your epub and look in the META-INF folder and delete the encryption.xml file. That should take care of your font encryption. If it’s still giving you problems after you zip it up, I would try deleting the font files and just replacing them with the font files from your font library.

    Aaron Troia
    Participant

    Joshua,

    Your right, you will probably will need a second or third search as well. I realize I did make a mistake on the first GREP search I posted so I thought I would make that correction and give you a few more searches as well as one might not catch everything you want it to. I think these should just about cover all your parameters, I tried to explain what each does to make it easier,

    Search 1: Em Dash with some type of space on both sides, but not at the the end of a line/paragraph
    Find: ( |~S|~s)?(—)( |~S|~s)?(?!(~}|$))
    Replace: ~s$2~s

    Search 2: Em Dash followed by closing parenthesis or end of line/paragraph
    Find: ( |~S|~s)?(—)(?=(”|$))
    Replace: ~s$2

    Search 3: Em Dash preceded by opening parenthesis
    Find: ( |~S|~s)?(—)( |~S|~s)?(?=~{)
    Replace: ~s$2

    Aaron Troia
    Participant

    Hey Josh,

    You shouldn’t need a script, this is a good case for using GREP, try this, my replace is just an example of inserting fixed non-breaking spaces before and after, you can replace the ~s (fixed width non-breaking space) with what ever you need. For the GREP search itself, I have included both a regular space (you could try using as well, instead of a literal space), non-breaking space (~S), and fixed width non-braking space (~s), you can add/subtract the types of spaces that might be used throughout.

    Find: ( |~S|~s)?(—)( |~S|~s)?(?<!~})
    Replace: ~s$2~s

    Let me know if that helps or if it needs modification/tweaking.

    Aaron

    in reply to: LookBehind/LookAhead with Repeat #75377
    Aaron Troia
    Participant

    Masood,

    Yeah, Lookbehinds are non-greedy and kind of a pain when you are needing it to be greedy, one way to get around it is to use Keep or \K, it’s similar to a lookbehind but allows you to be greedy with your search, for example if you wanted to change this tab to a space but dont know how deep your list goes:

    \d+\.\K(?=.+?$)

    The Keep works pretty much the same way as a lookbehind and it adds the functionality of being non-greedy. Anyway play with the \K, it should do what you are wanting it to.

    in reply to: Find 4 first words of a sentence #75299
    Aaron Troia
    Participant

    I used pretty much the same GREP you provided with a simple tweak, try :

    Find: (^\d)((\<[A-Za-z']+\> ){4}).+
    Replace: $1$2…

    and if you find any other characters (comma’s, periods, semi-colons, etc.), just put them between the square brackets and it will find them too. Let me know if that works for you.

    Aaron Troia
    Participant

    Andy,

    From my experience the image quality that comes out of word is pretty low resolution so I always ask for the author/client for the original images, whether for print or digital, because the images that come out of Word are usually too low quality to do anything with. I do usually flow in the book into InDesign with the images as they’re at least great for placement, but if you can get the author to email you the original images (as Jpeg’s not in another Word doc, I’ve had that happen) that would probably be best.

Viewing 15 posts - 226 through 240 (of 325 total)