Proportional Column Widths

<oXygen/> general issues.
JHenry
Posts: 5

Proportional Column Widths

Sat Mar 03, 2018 11:39 pm

I'm trying to set the Column Widths to Proportional on a table in oXygen (I'm using the newest version 19.1 and working in Author mode but can do it in Text if needed). I can see the option for Porpotional Column Widths using the "Insert Table" menu when I create a new table from scratch but not how to do this if I copy and paste a table in from Word. I have a massive table I need to just copy over but need to set some menu options that I can't seem to find once I paste the table in. Can anyone help?
Radu
Posts: 5514

Re: Proportional Column Widths

Mon Mar 05, 2018 10:59 am

Hello,

For any table pasted from MS Word to Oxygen, Oxygen will create the equivalent DITA table without any column widths specified. After the table is created you can resize the columns by dragging the border between columns using the mouse and Oxygen will ask if you want proportional or fixed column widths.
About this remark:

I need to just copy over but need to set some menu options that I can't seem to find once I paste the table in.


Maybe you could tell me more about what you are looking for. If you right click inside a table there should be a "Table Properties" action which should have quite a lot of possible settings.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
JHenry
Posts: 5

Re: Proportional Column Widths

Mon Mar 05, 2018 3:38 pm

Radu, Thank you for answering so quickly. I have a job converting a document and they asked that the properties on the table be set to "topbot" and Proportional. The table is about 27 pages long in a word document so I really don't want to type it in by hand lol. So I copied and pasted it into a concept DITA file. When I click on the "table" tag it brings up the attribute menu for the table. In the attributes menu I found "frame topbot" but could not find "column widths" to set to proportional. The only place I could find "column widths" was in the inset table menu but I don't get that menu when I copy and paste in a table only when I create a table from scratch. My job ask that the column widths be set to certain numbers but that the table be proportional and topbot. I got the columns set to the numbers they asked and figured out how to set the frame to topbot and add in a title section in the text editor (could not figure out how to add the title in author mode either so I did it in the text editor). I tried dragging the columns to resize just a little to see if it would pop up and ask me to set as proportional but it didn't.

Thank you,
Jessica
Radu
Posts: 5514

Re: Proportional Column Widths

Mon Mar 05, 2018 3:55 pm

Hi Jessica,

Let's say you paste a simple 2 column table from MS Word to an Oxygen DITA topic (opened in the Author visual editing mode). Then you switch the editing mode to the "Text" editing page. The table will look probably like this:

Code: Select all

            <table>
                <title>test</title>
                <tgroup cols="2">
                    <colspec colname="c1" colnum="1"/>
                    <colspec colname="c2" colnum="2"/>
                    <thead>
                        <row>
                            <entry/>
                            <entry/>
                        </row>
                    </thead>
                    <tbody>
                        <row>
                            <entry/>
                            <entry/>
                        </row>
                    </tbody>
                </tgroup>
            </table>


On that <table> element you can set attributes like frame="topbot" rowsep="1" colsep="1".
Those <colspec> elements define specifications for each column and you can specify proportional widths on them like for example:

Code: Select all

                    <colspec colname="c1" colnum="1" width="1*"/>
                    <colspec colname="c2" colnum="2" width="1*"/>


if you want the width space to be split in half.
or

Code: Select all

                    <colspec colname="c1" colnum="1" width="2*"/>
                    <colspec colname="c2" colnum="2" width="1*"/>


if you want the first column to be two times larger than the second one. And so on.
If your table is missing completely the "<colspec>" elements you can add them manually to the <tgroup>. Resizing the table's columns in the Author visual editing mode will actually change the @width attributes set on each <colspec>.


Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
JHenry
Posts: 5

Re: Proportional Column Widths

Mon Mar 05, 2018 4:26 pm

Thank you so much.

Return to “Other Issues”

Who is online

Users browsing this forum: No registered users and 0 guests