3 Replies Latest reply on May 31, 2012 7:07 AM by sonia.robitaille

    Tables and cells

    sonia.robitaille

      Hello

       

       

      I am presently working on a 350 pages report with 6 different tables that are used often.

       

       

      These tables have all the same width but different columns.

       

       

      I made different styles of table, cells paragraphs and everything is fine, my only problem is that by default all the columns are equal and I have to manually adjust the width of every table.

       

       

      Is it possible to give columns a value in the style sheet that will be applied automatically to every tables ?

       

       

      I found nothing in the style sheet permitting me to do this

       

       

      Thank You

        • 1. Re: Tables and cells
          Peter Spier Most Valuable Participant (Moderator)

          Unfortunately you've discovered an ugly truth about tables and styles in ID. Perhaps saving a blank table as a snippet would work?

          • 2. Re: Tables and cells
            [Jongware] Most Valuable Participant

            sonia.robitaille wrote:

             

            I am presently working on a 350 pages report with 6 different tables that are used often.

             

            A short-but-effective Javascript to set all of the columns to a specific width. Adjust the sizes in the "widths" list; make sure to surround each unit with quotes, as shown, and have a comma right after. Save a different version for each of your tables; then make sure the text cursor is inside a table and run the correct script for that one.

             

            app.doScript(function(table)
            {
              widths = [
              "20mm",
              "30mm",
              "3p6",
              "10mm",
            ];
            if (table.hasOwnProperty("baseline")) table = table.parent;
            while (table instanceof Cell || table instanceof Column || table instanceof Row)
              table = table.parent;
            if (table instanceof Table)
            {
              for (i=0; c=table.columns[i],i<table.columns.length; i++)
               c.width = widths[i % widths.length];
            }
            }, ScriptLanguage.JAVASCRIPT, app.selection[0], UndoModes.ENTIRE_SCRIPT, "Resize Table");
            
            • 3. Re: Tables and cells
              sonia.robitaille Level 1

              Thank you very much for your quick reply.

               

              Bonne journée (have a nice day)!

               

              Sonia

               

               

               

               

               

               

               

              Le 2012-05-31 à 09:26, Peter Spier a écrit :

               

              Re: Tables and cells

              created by Peter Spier in InDesign - View the full discussion

              Unfortunately you've discovered an ugly truth about tables and styles in ID. Perhaps saving a blank table as a snippet would work?

               

              Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4453804#4453804

              To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4453804#4453804. In the Actions box on the right, click the Stop Email Notifications link.

              Start a new discussion in InDesign by email or at Adobe Forums

              For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

               

              Sonia Robitaille  >  Graphiste

              Téléphone : 418 266-0707 poste 236  -  Télécopieur : 418 266-0717

               

              Graphiscan  >  L’imprimeur qui fait sa part pour l’environnement !

              www.graphiscan.com