Script to apply Italics to your word choice
Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / Script to apply Italics to your word choice
Tagged: character styles, InDesign, scripts
- This topic has 8 replies, 5 voices, and was last updated 6 years, 11 months ago by Kelli Fleck.
-
AuthorPosts
-
-
May 8, 2017 at 12:01 pm #94324Kelli FleckMember
I am wondering if someone could help me write a script for applying a character style “italics” to a list of words. I want to use this to apply italics to species names and I have a list of common names that need to be italicized. For example “E. Coli” is always italics.
-
May 8, 2017 at 12:25 pm #94326Kai RübsamenMember
Kelli, this is possible with minor effort. But it’s not good practice (anymore) to call for a script and someone will write it for free. So if you interested in a paid version, mail me at [email protected]
Kai
-
May 8, 2017 at 12:32 pm #94327Masood AhmadParticipant
Kelli, you don’t need a script for this simple task. Try GREP styles…
Sorry Kai :)
-
May 8, 2017 at 12:34 pm #94328Kai RübsamenMember
Masood, no problem, but this will not work in a good way with GREP-Styles. The reason is simple: I assume, that Kelli have a long list and if it should work with a Grep-Style, you need a alternation. This can slow down the performance of the doc, so I would do it with find/change. Of couse, this can work with a alternation (Kelli|Masood|Kai) too, but is maybe confusing.
-
May 8, 2017 at 12:50 pm #94329Masood AhmadParticipant
Well that depends how you take it. For me I will go for GREP styles. At least you don’t have to verify whether the style has been applied or not.
-
May 8, 2017 at 12:54 pm #94330Michel Allio for FRIdNGEParticipant
Hi all!
Kai is totally right!
Just [and only] for comment:
I’ve written a script for that one year ago! [ 0006_ApplyCharStyleByList_MichelAllio.jsx ]
It’s very cool because it plays with x different lists with x char styles to be applied!
Masood, maybe a video!? ;-)
(^/)
-
May 8, 2017 at 1:29 pm #94337Kelli FleckMember
I will just use the GREP styles and I have the “chainGREP” script that will combine the greps into one click, for now. I wanted to learn how to write a script so I could easily edit the script with the term list rather than create a GREP command each time. I think it would be fairly easy to write this script, so I will research it. Thanks all!
-
May 8, 2017 at 4:31 pm #94353David BlatnerKeymaster
Hi Kelli, that’s awesome that you want to learn how to script InDesign! This sounds like a great example of something that could be scripted.
(As others have said: If it were just 4 or 5 words, then grep styles would be okay. But if you had 20 or 200 or more words, then a script is the way to go!)
Here are some resources for learning scripting:
https://creativepro.com/learn-to-automate-indesign-by-scripting.php
https://creativepro.com/javascript-for-the-absolute-beginner.php -
May 8, 2017 at 4:55 pm #94356Kelli FleckMember
Thanks David!
-
-
AuthorPosts
- You must be logged in to reply to this topic.