openlibhums / janeway

A web-based platform for publishing journals, preprints, conference proceedings, and books
https://janeway.systems/
GNU Affero General Public License v3.0
168 stars 63 forks source link

Remove line break between <label> and <caption> text in figure display #2467

Open pgoussy opened 2 years ago

pgoussy commented 2 years ago

Describe the bug MIJ editors have requested that we remove the line break between the

Janeway version The version of Janeway under which the bug has been reproduced. If running off of master, please, indicate the current HEAD of the Janeway installation

To Reproduce Steps to reproduce the behavior:

  1. Go to https://journals.publishing.umich.edu/mij/plugins/typesetting/preview_galley/article/93/galley/51/
  2. Scroll down to Figure 1 (see also screenshot below)
  3. Here's the JATS tagging for this figure: `

    Mission statement excerpts of digital rights advocacy organizations, 2019–2020.

    These excerpts were pulled from the organizations’ websites.

    `

Expected behavior Instead of a line break, I think it would make sense to just insert a single space between the text of these fields.

Screen Shot 2021-09-29 at 8 48 31 am
ajrbyers commented 2 years ago

I'm not sure we can make this change, for example on Comics Grid we do not had a colon on our fig label (and I don't think there should be one!)

image

ajrbyers commented 1 year ago

@pgoussy I don't think we're going to change this one. How will that play with the MIJ editors?

joemull commented 1 year ago

Just reading this for the first time since you commented on it @ajrbyers.

I agree with MIJ that this line break isn't working great here. I think what people expect is for these elements to be inline because it's a long-standing convention. It might be just a print convention to save paper, or it might help readability because it keeps the caption block visually compact right near the image, rather than blurring with the surrounding text as it does if it takes up multiple lines.

Chicago style gives lots of examples of the inline style, and none of the line break between these elements.

Some use a colon to separate things: image

Some use a period: image

Some use styling: image

The Oxford Manual of Style also puts all captions inline with figure numbers and doesn't have any examples I could find of a line break.

I suspect the line break might have been introduced in an early version of our XSLT without any specific reason and never changed, but I could be wrong. Is there a reason for the line break, @ajrbyers?

One last thing: it looks like the XML for this article has been altered to take the figure number out of the JATS label field, and put into the caption field. So the JATS is being semantically altered to control the visual display the text--this kind of thing is not great for archiving, accessibility, etc.

<fig id="F1" position="anchor">
<caption>
<p>
Figure 1: Mission statement excerpts of digital rights advocacy organizations, 2019–2020.
</p>
<p>
These excerpts were pulled from the organizations’ websites.
</p>
</caption>
<graphic xlink:href="mij-93-f0001.jpg"/>
</fig>

Given that the inline style is what the community expects and not doing it will lead to weakened semantic markup, I think we should implement this request.

pgoussy commented 1 year ago

I guess if this change doesn't get made, it won't be the end of the world...but I think Joe has a good point, re: standard practices and semantic accuracy!

pgoussy commented 1 year ago

Worth noting that <label> seemingly always gets followed by a line break, not just in figure captions. This is particularly a problem for any ordered lists that aren't basic numbered lists (e.g., if list items are labeled alphabetically, or if numbered items are interrupted by non-list text). We get a lot of complaints about this from authors who don't like the way it looks--and I tend to agree--plus, it doesn't match the PDF formatting.

image

XML for the screenshot:


<list-item><label>(1)</label><p>&#8220;Hearing simultaneous sounds as having distinct spatial properties is sufficient to hear them as distinct sounds&#8221; (<xref ref-type="bibr" rid="B28">Nudds 2009: 81</xref>).</p></list-item>
</list>
<p>He thus claims that while spatial cues are not necessary for grouping frequency components as distinct sounds, they are sufficient. On this basis, Nudds concludes that</p>
<list list-type="simple">
<list-item><label>(2)</label><p>&#8220;we cannot simultaneously hear distinct parts of a <italic>single</italic> sound as standing in spatial relation to one another&#8221; (<xref ref-type="bibr" rid="B28">2009: 81</xref>).</p></list-item>
</list>
<p>That is, were we &#8212; <italic>per impossibile</italic>, for Nudds &#8212; to hear parts of a single sound as standing in some spatial relation, then these differently located components would be experienced as distinct sounds in their own right rather than as parts of a single spatially extended sound. Indeed, Nudds goes further, claiming that</p>
<list list-type="simple">
<list-item><label>(3)</label><p>&#8220;we cannot make sense of <italic>spatial</italic> parts of sounds&#8221; (<xref ref-type="bibr" rid="B28">2009: 81</xref>).</p></list-item>
</list>