Help needed in creating GREP style
- This topic has 3 replies, 3 voices, and was last updated 6 years, 7 months ago by .
- You must be logged in to reply to this topic.
Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / Help needed in creating GREP style
Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / Help needed in creating GREP style
Tagged: GREP expression, grep styles
Dear Members,
I am looking for help in creating GREP style for the following.
Format will be
(Author name) et al. (Journal name) (Year of pubishing: page range).
Example:
1. Haribus AN, et al. Inim Velesequat. 2011;28:3078–3084.
2. Consed MA, et al. Inim Velesequat. 2012;18:75–79.
3. Repuda VO, et al. Inim Velesequat. 2012;13:25–27.
4. Consed MA, et al. Inim Velesequat. 2012;18:75–79
From the above example we have to make “Inim Velesequat” (Journal name will be different in all instances) Italics all the times.
Please help me out how to make this using GREP styles.
Hi,
If always this configuration, try this:
et\hal\.\h\K.+?(?=\h\d{4})
[to be tested]
(^/)
How about trying a NESTED STYLE, should work if the text is constant.
NESTED STYLE
NONE Through 2 FULLSTOPS (If you are using a Number list then 1 Full stop)
ITALIC up to 1 DIgit
If the JOURNAL NAME include numbers it will cause a problem,
If so try this.
NESTED STYLE
NONE Through 2 FULLSTOPS (If you are using a Number list then 1 Full stop)
ITALIC Through 1 Sentence
Then GREP
APPLY STYLE Normal Character Style without the Italic
TO TEXT \S+$
This will add the style to text from the end of the sentence back to the first space which is right before your numbers
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies allows us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.
You have to be logged in to save.
Not a member? Join Today - it's FREE!