• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Make table row heights fit to text?

Community Expert ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

I am working on a pulication with a gazillion tables. I need to reformat the text in the table to a smaller size, and when I do that, I am left with empty space in all the rows like this. How do I make the table rows fit in smart manner without having to adjust every single row?

FrameMakerdk_1-1732185391547.png

 


Bjørn Smalbro - FrameMaker.dk

Views

173

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 21, 2024 Nov 21, 2024

The setting is saved as part of a table format, so after applying this setting you can make a table format (object) and newly made table susing the format will behave "correctly".

Existing tables will not be altered automatically.

So maybe just applying the new/altered table format is working (never tested that) or you have to go through all existing tables to apply the new cell height settings.

Regards

Stephan

Votes

Translate

Translate
Community Expert ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

Hi Bjørn ( @FrameMaker-dk ),

mark the cell or a column of the table to change all cell-heights, right-click on marked area, click on "Row format" (in german "Zeilenformat") and change the minimum to "0" and the maximum to "355,601 mm" (max. that FM accepts).

Now the height of your cells changes with the change of the content between the minimum and the maximum.

Regards

Stephan

StephanRow_Height.PNG

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

Thank you @mk-will . That will work. So... no way to do this using the table tags or some other global setting?


Bjørn Smalbro - FrameMaker.dk

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

The setting is saved as part of a table format, so after applying this setting you can make a table format (object) and newly made table susing the format will behave "correctly".

Existing tables will not be altered automatically.

So maybe just applying the new/altered table format is working (never tested that) or you have to go through all existing tables to apply the new cell height settings.

Regards

Stephan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

Thank you @mk-will Tried the make a new table tag, but was not able to make it work, ufortunately. I shall have to do this manually 🙂


Bjørn Smalbro - FrameMaker.dk

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

Bjørn, here is a script that will work on the selected table. It resets all of the row heights to the FrameMaker default. Please let me know if you have a lot of tables, and I can expand it to work on all tables in the document.

main ();

function main () {
    
    var doc;
    
    doc = app.ActiveDoc;
    if (doc.ObjectValid () === 1) {
        processDoc (doc);
    }
}

function processDoc (doc) {
    
    var tbl;
    
    // Get the table with the text cursor in it.
    tbl = doc.SelectedTbl;
    if (tbl.ObjectValid () === 1) {
        processTbl (tbl, doc);
    }
}

function processTbl (tbl, doc) {
    
    var PT, row;
    
    // Metric value for a Postscript point.
    PT = 65536;
    
    // Process all of the rows in the table.
    row = tbl.FirstRowInTbl;
    while (row.ObjectValid () === 1) {
        // Set the row minimum and maximum heights.
        row.RowMinHeight = 0;
        row.RowMaxHeight = 1008 * PT;
        row = row.NextRowInTbl;
    }
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 03, 2024 Dec 03, 2024

Copy link to clipboard

Copied

LATEST

Thank you for the script, @frameexpert ! Works excellently! This was very kind of you! I quite often use your other table cleaning scripts - they are amazing and enormous help with documents where there have been a lot of edits and different editors.


Bjørn Smalbro - FrameMaker.dk

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

Row Formatting is not saved as part of a table format. Did you check the minimum and maximum row heights? If the row height is not changing to fit the content, that is the likely cause. But someone had to set those row height values because they are not saved as part of a table format.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

Hi @frameexpert ,

quote

Row Formatting is not saved as part of a table format.

are you sure?

Afaik it must be stored somewhere in the (binary) FM files as all my tables (using the same format) have the same setting about minimum and mximum since I changed that in the past and stored that table format.

 

In a MIF I can find:

<RowMaxHeight 355.60067 mm>
<RowHeight 5.64445 mm>

But these entries relay as it seems only to existing tables in the file.

 

Regards

Stephan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

Try this:

  1. Insert a table into your FrameMaker document.
  2. Use Table > Format > Row Format and change some or all of the row heights.
  3. Click in the table, open the Table Designer and click Update All.
  4. Insert a new table with the same Table Format. It will have the default row height values, not  the ones you set in the table in step 2.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2024 Nov 21, 2024

Copy link to clipboard

Copied

Probably not relevant for you.

When you have a hidden column with a condition which has more lines than the other columns (e.g. 4 lines), then the height of the table row will adjust to these 4 lines, although they are hidden.

https://tracker.adobe.com/#/view/FRMAKER-9910

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines