How to create multiple lines in DITA table cell

Post here questions and problems related to editing and publishing DITA content.
IsleofGough
Posts: 34
Joined: Fri Dec 02, 2016 9:55 pm

How to create multiple lines in DITA table cell

Post by IsleofGough »

Is there a way of creating multiple lines in a single DITA table cell without excessive spacing? I created a pdf target using HTML/CSS and I've tried three options: adding <p></p> to each line within an <entry></entry> and using the <line></line>. Both give a lot of extra spacing. The closest I can get is:

Code: Select all

<table >
            <title>Adjustment for hypoxia and hypercarbia</title>
            <tgroup cols="3">
                <colspec colname="c1" colwidth="53.67pt"/>
                <colspec colname="c2" colwidth="45.16pt"/>
                <colspec colname="c3" colwidth="173.45pt"/>
                <thead>
                    <row>
                        <entry>Mode</entry>
                        <entry>Hypoxia</entry>
                        <entry>Hypercarbia</entry>
                    </row>
                </thead>
                <tbody>
                    <row>
                        <entry morerows="1" scope="rowgroup"><b>AC</b></entry>
                        <entry scope="row">FiO<sub>2</sub></entry>
                        <entry>TV</entry>
                    </row>
                    <row>
                        <entry scope="row">PEEP</entry>
                        <entry>RespRate</entry>
                    </row>
                    <row>
                        <entry morerows="3" scope="rowgroup"><b>Bilevel</b></entry>
                        <entry scope="row">P<sub>H</sub></entry>
                        <entry>T<sub>H</sub></entry>
                    </row>
                    <row>
                        <entry scope="row">FiO<sub>2</sub></entry>
                        <entry>P<sub>H</sub></entry>
                    </row>
                    <row>
                        <entry scope="row">T<sub>H</sub></entry>
                        <entry>T<sub>LO</sub></entry>
                    </row>
                    <row>
                        <entry scope="row">T<sub>LO</sub></entry>
                        <entry>P<sub>LO</sub></entry>
                    </row>
                    <row>
                        <entry morerows="3" scope="rowgroup"><b>APRV</b></entry>
                        <entry scope="row">P<sub>H</sub></entry>
                        <entry>lighten sedation</entry>
                    </row>
                    <row>
                        <entry scope="row">T<sub>H</sub></entry>
                        <entry>T<sub>H</sub> if above 4</entry>
                    </row>
                    <row>
                        <entry scope="row">FiO<sub>2</sub></entry>
                        <entry>P<sub>H</sub> if below 28</entry>
                    </row>
                    <row>
                        <entry scope="row">  </entry>
                        <entry>T<sub>LO</sub></entry>
                    </row>
                    <row>
                        <entry morerows="5" scope="rowgroup"><b>VDR</b></entry>
                        <entry scope="row">FiO<sub>2</sub></entry>
                        <entry>P<sub>H</sub></entry>
                    </row>
                    <row>
                        <entry>P<sub>H</sub></entry>
                        <entry>T<sub>LO</sub></entry>
                    </row>
                    <row>
                        <entry scope="row">T<sub>LO</sub></entry>
                        <entry>T<sub>H</sub></entry>
                    </row>
                    <row>
                        <entry scope="row">T<sub>H</sub></entry>
                        <entry>P<sub>LO</sub></entry>
                    </row>
                    <row>
                        <entry scope="row">Hz</entry>
                        <entry>Hz</entry>
                    </row>
                    <row>
                        <entry scope="row">T<sub>H</sub></entry>
                        <entry> </entry>
                    </row>
                    <row>
                        <entry morerows="2" scope="rowgroup"><b>HFr</b></entry>
                        <entry scope="row">FiO<sub>2</sub></entry>
                        <entry>Hz</entry>
                    </row>
                    <row>
                        <entry>P<sub>H</sub></entry>
                        <entry>IP</entry>
                    </row>
                    <row>
                        <entry scope="row"> </entry>
                        <entry>MAP to 35 and allow cuff leak to reduce MAP to 30</entry>
                    </row>
                   
                </tbody>
            </tgroup>
        </table>
The only problem with this is that the irregular lines are not centered vertically within a cell:
Image
You do not have the required permissions to view the files attached to this post.
aaddi
Posts: 1
Joined: Tue Jun 18, 2024 6:14 pm

Re: How to create multiple lines in DITA table cell

Post by aaddi »

Hi IsleofGough,
I am dealing with the same troubles in my tables.
Did you find a fix for your issue??
Last edited by aaddi on Tue Jun 18, 2024 6:19 pm, edited 1 time in total.
chrispitude
Posts: 922
Joined: Thu May 02, 2019 2:32 pm

Re: How to create multiple lines in DITA table cell

Post by chrispitude »

Hi IsleofGough,

In structured authoring, visual formatting is separate from content structure. Your approach of using <p> elements inside <entry> is correct; you just need some formatting directives to get what you want. Your post was in 2022 - do you still need help with this?


Hi aaddi,

Can you describe what your table contents are and what formatting you need?
Post Reply