3 Replies Latest reply on Aug 7, 2013 11:03 AM by Jennifer Hearing

    CS6 – Order of numbered lists in a table?

    Mataclysm

      I'm not sure how to do this, and Google hasn't turned anything up.

       

      I have a few tables that have numbered lists in them. Each cell has a numbered bit of text, using a numbered list style.

       

      I want the numbering order to go down the first column, then down the next column, etc. (see below)

       

      14
      25
      36

      InDesign defaults to numbering across a row, then across the next row, etc. (see below)

       

      12
      34
      56

      Does anyone know how to change the way the table cells will order? My solution at the moment is to make the list outside the table, convert list to text, then paste the list into the cells one by one. Obviously this is a pain in the a** way of doing it.

       

      Any help would be appreciated.

        • 1. Re: CS6 – Order of numbered lists in a table?
          Laubender Adobe Community Professional & MVP

          @Mataclysm – you could use a one-column table in a two-column text frame to make it work:

           

          OneColumnTableInATwoColumnTextFrame.png

          But that means you have to struggle with cell heights, if it happens that one of your cells is higher than the one beneath.
          That will work with numbered lists.

           

          Or you abandon numbered lists and use the following JavaScript (ExtendScript) on a selected table. It will add numbers cell by cell column by column together with a delimiter character. Pre-defined is a tab. If you want, you can change that in line 13 of the code.

           

          Before using the script just insert your contents to the table.

          The script will add the numbers together with the delimiter character at the first insertion point of every cell of the table.

           

          To use the script you have to select the whole table.

           

          //InsertNumbersInCellsColumnByColumn_SELECTION_TABLE.jsx
          //Uwe Laubender
          /**
          * @@@BUILDINFO@@@ InsertNumbersInCellsColumnByColumn_SELECTION_TABLE.jsx !Version! Thu Nov 01 2012 07:39:54 GMT+0100
          */
          
          app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
          
          app.doScript(_InsertNumbersInCellsColumnByColumn, ScriptLanguage.JAVASCRIPT, [], UndoModes.ENTIRE_SCRIPT, "Insert numbers in cells column by column");
          
          function _InsertNumbersInCellsColumnByColumn(){
          
          var delimiter = "\t"; //Tab after the number: "\t"; if you want nothing just set its value to: "". If you want a blank change it to: " ";
          
          var myTable = app.selection[0];
          
          if(myTable.constructor.name !== "Table"){
              alert("You have to select a Table. Script stops here.")
              exit(0);
              };
          
          var counter = 0;
          var tColumns = myTable.columns;
          
          for(var n=0;n<tColumns.length;n++){
              
              var myCellsPerColumn = tColumns[n].cells;
              
              for(var c=0;c<myCellsPerColumn.length;c++){
                  counter = counter+1;
                  myCellsPerColumn[c].insertionPoints[0].contents = counter.toString()+delimiter;
                  };
              
              };
          
          alert("Done. "+counter+" cells were filled with numbers column by column.");
          
          };
          
          app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
          

           

          Hope, that helps!
          Uwe

          • 2. Re: CS6 – Order of numbered lists in a table?
            peter minneapolis Level 4

            Tables in Adobe's FrameMaker have a property that controls the sequence of auto-numbered paragraphs: Row first or Column first. For your example, you'd want Column first.

             

            If you'd like this feature in InDesign tables, consider posting a format request at https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform.

             

             

            HTH

             

             

            Regards,

             

             

            Peter

            _______________________

            Peter Gold

            KnowHow ProServices

             

            Mataclysm wrote:

             

            I'm not sure how to do this, and Google hasn't turned anything up.

             

            I have a few tables that have numbered lists in them. Each cell has a numbered bit of text, using a numbered list style.

             

            I want the numbering order to go down the first column, then down the next column, etc. (see below)

             

             

            14
            25
            36

             

            InDesign defaults to numbering across a row, then across the next row, etc. (see below)

             

             

            12
            34
            56

             

            Does anyone know how to change the way the table cells will order? My solution at the moment is to make the list outside the table, convert list to text, then paste the list into the cells one by one. Obviously this is a pain in the a** way of doing it.

             

            Any help would be appreciated.

            • 3. Re: CS6 – Order of numbered lists in a table?
              Jennifer Hearing

              If I only wanted to number one column instead of the whole table, what would I need to change on this script?

               

              Thanks!