Back

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

  • You must be logged in to reply to this topic.Login

Script for applying cell styles

Return to Member Forum

  • Author
    Posts
    • #1181863

      Hi I feel like this is something that could exist already? Does anyone know of such a thing?

      I have styled a table for a book with a thick outside border. The border bleeds into the cell insets and because of this the cell insets have to be different for each of the top, bottom and corner cells and the ones that are in the middle of the table.
      I’ve made nine cell styles to handle this.

      My question is – does anyone know of a script capable of applying these 9 styles depending on the table configuration e.g. a 2 x 2 table, 2 x 3 table, 3 x 8 table? Is it possible even to create one?
      This would be based on parsing the table for the number of rows and columns and applying the styles to the cells based on their position in the table.

      It might seem a bit stupid creating a style that InDesign isn’t set up to handle very efficiently but the logic seems quite simple so I thought there might be a script somewhere or even a way of handling this with InDesign tools that I don’t know about.

      Appreciate your help if anyone has any ideas!

    • #14324247
      Jeremy Howard
      Participant

      Hello Deborah,

      As I read your post, I am wondering whether or not you have considered housing the table in its own text frame… If you did that then you could get rid of the stroke on the table and apply the stroke to the text frame that houses the table. The advantage to this would be that you could then apply the “Align Stroke To Outside” property in the Stroke panel and then the stroke would not interfere with the table’s contents in any way.

      What do you think? Could this work in your case?

    • #14324239

      Hi Jeremy

      Thanks for your response. They could definitely be done that way. The problem is that the book has table number captions above the tables so if we make the tables in a separate text frame they’re split from the table number caption. Typesetters will have to align to the text frame before and add the space manually. It’s a fairly fine detail and it’s better if it’s automated.

      But using text frames probably beats applying cell styles especially when the imported tables have overrides.

      Deborah

Viewing 2 reply threads
  • You must be logged in to reply to this topic.
Forum Ads