Exact Table Alignment
The script is a tool that expands the capabilities of formatting of table cells compared to the manual formatting. It allows you to specify the cell values, such as the insets, the width and the height, with increased accuracy. In addition, the changes are applied to each cell individually, relative to its original values. It is also possible to set the width of the columns for several tables the same.
Place the script in the "Startup Scripts" folder and restart InDesign. A menu item will be added to the "Table" menu and the context menu of the tables, which will call on the script window. If this does not happen after you restart the program, correct the script code yourself, as described in the article "The Acript Did Not Appear In the Menu, or One More Time About the Localization". If the problem persists, please use feedback.
If the script is not needed in the main menu, find and change the code lines that are marked with comments (it’s not difficult), and copy the script into the main folder that contains the scripts.
The numbers in the script boxes are the increments, by which you need to change the values of certain parameters of the selected cells.
"Balance" does the same, as if you dragged an inside row or column edge while holding down the Shift button. That is, the edge moves within the selected two columns, while their total width does not change. If more than two columns are selected, the width of the leftmost (+/–) and rightmost (-/+) columns in the selected area will change. You may also set the equal width for the leftmost and rightmost columns in the selected area (or equal height for rows). To do this, just set the increment to 0 (zero) and press any of the execution buttons (up/down).
It is possible to measure the selected area of a table (the number of rows and columns, their total height and width).
|auto vertical fit of the text frame content to its bottom edge by changing the height of the selected cells;|
|alignment of columns of several tables;|
|fit the columns' widths to the text widths in these columns (let's call it "Fit Cell to Content").|
The script does not block the work with the document, i.e. it is not necessary to close it after completion.
Update to the version 2.2 from 07.06.2016
The new features are added, which allow you to precisely fit the table width relative to the nearest-to-the-right text frame column by changing the width of one or several columns of the table.
To perform such a fit, you should place the cursor in any cell from the selected column, or select the cells of several columns whose width will be changed, and then press the new button:
Update to the version 3 from February 2017
In the new version, the functionality of all basic operations has been significantly expanded due to two important innovations.
First innovation: now you can assign fixed parameter values to selected cells — both cell inset spacing and width/height.
For the cell inset spacing, an option has been added that allows setting and simultaneously changing the same increment value in one click.
If this option is enabled, when you change the value of any increment for cell insets, other boxes will receive the same value. When you apply this to the selected cells, the values of all insets will change by the specified amount.
If, in addition, the new option "Fixed" is enabled, then the cell insets will get fixed values specified in the respective boxes.
Second innovation: the ability to work separately with empty cells and separately with cells containing text.
At the same time, you can choose which empty/non-empty objects — cells or columns/rows — will be affected at this moment.
These two new options make it much easier and faster to get the desired result when the table is used, for example, as a tool for creating flow-charts:
The main difference between working with balance and working with column width (or row height) is that, when you change the cell size with the balance, the total size of the table does not change (except for one case, see table below).
The table below shows how the balance now works depending on the options selected.
Balance work result with different parameters
The algorithm for adding to the menu has been redesigned so that the embedding now takes place regardless of the version and localization of InDesign. Read more about localization in the article "Localized menu: the adventure continues". Read about installing the script above (section "Installation")
Corrections and other improvements
|Vertical alignment at the bottom of the text frame||Now, before executing, the script checks and warns if the bottom edge of the frame is not aligned with the bottom margin of the page.|
|Fit column widths to text widths||If a part of the table is outside the frame (in overset), the script does not stop working as before, but works with the available cells, after which a warning is displayed in the script window that some of the cells are in overset.|
|Alignment relative to the nearest column edge on the frame||Fixed a bug, due to which the script stopped working and knocked down the units of measurement of the script in the case when the text in the cells of the selected columns was in overset.|
You can thank here
Leave a comment:
- Common Formatting of Several Tables
- Search-replace the Table Stroke Weight
- Split Table Row by Paragraphs
- Search Table Cell Overflows
- Merge Repeating Lines of Index
- Table of Contents Correction: Update Page Numbers Only
- Change Numbers In Text
- Split Text By Paragraphs
- Change Font Size In Styles
- Compare Styles
- Transliterate style names
- Copy GREP Styles
- Quick Apply Paragraph Style Then Next Style
- Change Language in Styles and in the Text
- Removing Character Styles In the Text (Controlled by User)