Help needed in creating GREP style

Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / Help needed in creating GREP style

Viewing 3 reply threads
  • Author
    Posts
    • #97797

      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.

    • #97798

      Hi,

      If always this configuration, try this:

      et\hal\.\h\K.+?(?=\h\d{4})

      [to be tested]

      (^/)

    • #98077
      Graham Park
      Member

      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

    • #98078
      Graham Park
      Member

      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

Viewing 3 reply threads
  • You must be logged in to reply to this topic.
>