substance / texture

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

[Feature] Figure Attachments (WIP) #1289

Open michael opened 5 years ago

michael commented 5 years ago

Description

We want a flexible solution for various kind of content to be attached to a figure for the purpose of supporting the content of a main figure (e.g. an additional supplementary figure, dataset, table, etc.)

Work in progress to address user stories from #1282 and #1281.

XML Source Format (TextureJATS)

<sec sec-type="supplementary-figures">
  <title>Supplementary Figures</title>
  <p>Below are the supplementary figures of this article:</p>
  <fig id="suppfig1">
    <label>Supplementary figure 1</label>
    <caption id="suppfig1-caption">
      <title>Supplementary figure title (optional)</title>
      <p id="suppfig1-caption-p1">Supplementary figure caption. </p>
    </caption>
    <graphic id="suppfig1-graphic" mime-subtype="jpeg" mimetype="image" xlink:href="suppfig1.jpg" />
  </fig>
</sec>

When referenced from a main figure xref is used:

<fig id="fig2">
  <label>Figure 2</label>
  ...
  <xref ref-type="fig" rid="suppfig1" />
</fig>

Proposal

After typesetting we have a list of supplementary figures inside a dedicated section in the backmatter (e.g. "Supplementary figure").

Create supplementary figure

When cursor is in side supplementary figures section, "Insert > Figure". This inserts a regular figure into the according section, providing a label derived from context such as 'Supplementary figure 3'.

Create a supplementary file

When cursor is inside the supplementary materials section, "Insert > File" will create Supplementary file 3 (as described above).

Add attachments to a figure

3 examples that are considered a figure supplement:

Mockup to be discussed: image

Custom case: eLife figure supplements (in XML)

eLife figure supplements need to be part of the main figure in XML using a fig-group element. Therefore a translation step needs to be applied:

Precondition for this transformation to work: