Page 1 of 1

How to create multiple lines in DITA table cell

Posted: Wed Nov 02, 2022 7:51 pm
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

Re: How to create multiple lines in DITA table cell

Posted: Tue Jun 18, 2024 6:17 pm
by aaddi
Hi IsleofGough,
I am dealing with the same troubles in my tables.
Did you find a fix for your issue??

Re: How to create multiple lines in DITA table cell

Posted: Sat Jul 06, 2024 3:31 pm
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?