substance / texture

A visual editor for research.
MIT License
1k stars 85 forks source link

Allow break in tables #1159

Open fred-atherden opened 5 years ago

fred-atherden commented 5 years ago

The JATS element <break/> is used to indicate a line break. We (eLife) need to be able to use this element within tables (most often in <td/> elements, but could also be needed in th elements) so that renderers can output breaks.

Example of it's use:

<table-wrap id="table1" position="float">
          <object-id pub-id-type="doi">10.7554/eLife.43788.003</object-id>
          <label>Table 1.</label>
          <caption>
            <title>Data collection and refinement statistics</title>
          </caption>
          <table frame="hsides" rules="groups">
            <thead>
              <tr>
                <th colspan="2" valign="top">Protein:RNA</th>
                <th valign="top">PUF-8: <break/>PBE</th>
                <th valign="top">FBF-2 SS/Y: <break/>PBE</th>
                <th valign="top">FBF-2 AS/Y: <break/>PBE</th>
                <th valign="top">FBF-2 AQ/Y: PBE</th>
              </tr>
              <tr>
                <th colspan="2" valign="top">Data collection</th>
                <th valign="top"/>
                <th valign="top"/>
                <th valign="top"/>
                <th valign="top"/>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td colspan="2" valign="top"> Space group</td>
                <td valign="top">C2</td>
                <td valign="top">P61</td>
                <td valign="top">P61</td>
                <td valign="top">P61</td>
              </tr>
              <tr>
                <td rowspan="2" valign="top"> Unit Cell</td>
                <td valign="top">
                  <italic>a</italic>, <break/>
                  <italic>b</italic>, <break/>
                  <italic>c</italic> (Å)</td>
                <td valign="top">109.2, <break/>189.0, <break/>63.2</td>
                <td valign="top">96.4, <break/>96.4, <break/>99.9</td>
                <td valign="top">96.5, <break/>96.5, <break/>101.1</td>
                <td valign="top">95.9, <break/>95.9, <break/>100.4</td>
              </tr>
              <tr>
                <td valign="top">α, <break/>
                  <italic>β,</italic> <break/>
                  <italic>γ</italic> (°)</td>
                <td valign="top">90, <break/>103.6, <break/>90</td>
                <td valign="top">90, <break/>90, <break/>120</td>
                <td valign="top">90, <break/>90, <break/>120</td>
                <td valign="top">90, <break/>90, <break/>120</td>
              </tr>
              <tr>
                <td colspan="2" valign="top">Resolution (Å)</td>
                <td valign="top">50–2.55 <break/>(2.59–2.55)<sup>*</sup>
                </td>
                <td valign="top">50–2.25 <break/>(2.29–2.25)<sup>*</sup>
                </td>
                <td valign="top">50–2.25 <break/>(2.33–2.25)<sup>*</sup>
                </td>
                <td valign="top">50–2.85 <break/>(2.9–2.85)<sup>*</sup>
                </td>
              </tr>
              <tr>
                <td colspan="2" valign="top">
                  <italic>R</italic>
                  <sub>sym</sub> or <italic>R</italic>
                  <sub>merge</sub>
                </td>
                <td valign="top">0.191 (0.692)</td>
                <td valign="top">0.101 (0.704)</td>
                <td valign="top">0.104 (0.772)</td>
                <td valign="top">0.191 (0.957)</td>
              </tr>
              <tr>
                <td colspan="2" valign="top">
                  <italic>I</italic> /σ<italic>I</italic>
                </td>
                <td valign="top">9.4 (1.9)</td>
                <td valign="top">19.2 (3.42)</td>
                <td valign="top">17.1 (2.98)</td>
                <td valign="top">12.8 (2.34)</td>
              </tr>
              <tr>
                <td colspan="2" valign="top">Completeness (%)</td>
                <td valign="top">98.9 (98.0)</td>
                <td valign="top">99.9 (100)</td>
                <td valign="top">99.9 (100)</td>
                <td valign="top">99.6 (99.2)</td>
              </tr>
              <tr>
                <td colspan="2" valign="top">Redundancy</td>
                <td valign="top">6.9 (3.6)</td>
                <td valign="top">5.7 (5.7)</td>
                <td valign="top">5.7 (5.7)</td>
                <td valign="top">10.7 (8.8)</td>
              </tr>
              <tr>
                <td colspan="2" valign="top"/>
                <td valign="top"/>
                <td valign="top"/>
                <td valign="top"/>
                <td valign="top"/>
              </tr>
              <tr>
                <td colspan="2" valign="top">
                  <bold>Refinement</bold>
                </td>
                <td valign="top"/>
                <td valign="top"/>
                <td valign="top"/>
                <td valign="top"/>
              </tr>
              <tr>
                <td colspan="2" valign="top"> Resolution (Å)</td>
                <td valign="top">33.8–2.6</td>
                <td valign="top">32.0–2.3</td>
                <td valign="top">31.6–2.3</td>
                <td valign="top">27.5–2.9</td>
              </tr>
              <tr>
                <td colspan="2" valign="top"> No. reflections</td>
                <td valign="top">37,625</td>
                <td valign="top">25,089</td>
                <td valign="top">25,386</td>
                <td valign="top">12,185</td>
              </tr>
              <tr>
                <td colspan="2" valign="top"> <italic>R</italic>
                  <sub>work</sub>/<italic>R</italic>
                  <sub>free</sub>
                </td>
                <td valign="top">0.229/ <break/>0.285</td>
                <td valign="top">0.158/ <break/>0.204</td>
                <td valign="top">0.167/ <break/>0.223</td>
                <td valign="top">0.219/ <break/>0.272</td>
              </tr>
              <tr>
                <td colspan="2" valign="top"> No. atoms</td>
                <td valign="top"/>
                <td valign="top"/>
                <td valign="top"/>
                <td valign="top"/>
              </tr>
              <tr>
                <td colspan="2" valign="top"> Protein</td>
                <td valign="top">8415</td>
                <td valign="top">3197</td>
                <td valign="top">3194</td>
                <td valign="top">3189</td>
              </tr>
              <tr>
                <td colspan="2" valign="top"> RNA</td>
                <td valign="top">507</td>
                <td valign="top">150</td>
                <td valign="top">168</td>
                <td valign="top">168</td>
              </tr>
              <tr>
                <td colspan="2" valign="top"> Solvent</td>
                <td valign="top">229</td>
                <td valign="top">169</td>
                <td valign="top">109</td>
                <td valign="top">21</td>
              </tr>
              <tr>
                <td colspan="2" valign="top"> <italic>B</italic>-factors (Å<sup>2</sup>)</td>
                <td valign="top"/>
                <td valign="top"/>
                <td valign="top"/>
                <td valign="top"/>
              </tr>
              <tr>
                <td colspan="2" valign="top"> Wilson B</td>
                <td valign="top">29.7</td>
                <td valign="top">36.6</td>
                <td valign="top">35.5</td>
                <td valign="top">48.4</td>
              </tr>
              <tr>
                <td colspan="2" valign="top"> Protein</td>
                <td valign="top">32.8</td>
                <td valign="top">45.3</td>
                <td valign="top">45.1</td>
                <td valign="top">50.2</td>
              </tr>
              <tr>
                <td colspan="2" valign="top"> RNA</td>
                <td valign="top">43.6</td>
                <td valign="top">51.4</td>
                <td valign="top">58.8</td>
                <td valign="top">64.8</td>
              </tr>
              <tr>
                <td colspan="2" valign="top"> Solvent</td>
                <td valign="top">32.7</td>
                <td valign="top">49.6</td>
                <td valign="top">44.3</td>
                <td valign="top">23.1</td>
              </tr>
              <tr>
                <td colspan="2" valign="top"> R.m.s deviations</td>
                <td valign="top"/>
                <td valign="top"/>
                <td valign="top"/>
                <td valign="top"/>
              </tr>
              <tr>
                <td colspan="2" valign="top"> Bond lengths (Å)</td>
                <td valign="top">0.002</td>
                <td valign="top">0.007</td>
                <td valign="top">0.007</td>
                <td valign="top">0.002</td>
              </tr>
              <tr>
                <td colspan="2" valign="top"> Bond angles (°)</td>
                <td valign="top">0.45</td>
                <td valign="top">0.77</td>
                <td valign="top">0.78</td>
                <td valign="top">0.38</td>
              </tr>
            </tbody>
          </table>
          <table-wrap-foot>
            <fn>
              <p>
                <sup>*</sup>Values in parentheses are for the highest-resolution shell.</p>
            </fn>
          </table-wrap-foot>
        </table-wrap>

Currently break is not allowed in the texture schema: screen shot 2019-02-06 at 12 56 52

obuchtala commented 5 years ago

This has been prepared in #1231 and only needs to be activated by allowing for <break> in <td> and <th> in TextureJATS.

obuchtala commented 5 years ago

@Melissa37 this is an example of a 'micro' task which we could address without a complex requirements engineering process. I'd like to label such issues and treat them as general backlog similar to bug fixes but with less prio. E.g. @Integral could work on such things while we are spec'ing out the more complex requests. What do you think?

michael commented 5 years ago

How about a label "backlog" for those?

Melissa37 commented 5 years ago

Hi there

@FAtherden-eLife can you add this requirement to our new Tables feature request ticket when we get to it perhaps?

@michael I'd be happier to close this and wrap it up in a new feature request than create a new label for it as it's an eLife requirement to go live and needs a proposal.

Cheers