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

Footnote callouts displaying in "Jump To" article TOC #3521

Closed pgoussy closed 12 months ago

pgoussy commented 1 year ago

Describe the bug If there happens to be a footnote callout on a section heading (not terribly common, but certainly not unheard of) then the number of the footnote will display as plain text in the "Jump To" list of section links. If you're reading the "Jump To" list, and you haven't checked the section heading itself for comparison, it looks like a seemingly random number has been appended to the end of the section title.

Janeway version 1.4.3

To Reproduce Steps to reproduce the behavior:

  1. Go to https://journals.publishing.umich.edu/ergo/plugins/typesetting/preview_galley/article/1141/galley/1363/
  2. Click on "5.2. Ainslie42"
  3. Notice that the link to footnote 42 is (correctly) displayed as a superscript in the section heading, but in the "Jump To" list, the title of the section runs directly into the footnote number.

Expected behavior Ideally, Janeway should be able to recognize when a footnote has been tagged within a section <title>, and hide that portion of the <title> text when populating the "Jump To" list

Screenshots 2023-05-03_15-53-55

ajrbyers commented 1 year ago

@pgoussy its funny because I was playing around with this today. There is a problem with allowing HTML in the TOC because you can have links in headers and this will break the TOC. I wonder if we can exclude a tags but allow others.

ajrbyers commented 1 year ago

@pgoussy we’ve got a fix that allows the TOC elements to contain HTML so that they display the TOC link exactly as the title is represented in the article. This means that any sup element would display exactly as is rather in regular case.

Is this an acceptable resolution for you?

https://github.com/BirkbeckCTP/janeway/pull/3526

pgoussy commented 1 year ago

I think that should be acceptable!

On Thu, May 18, 2023 at 4:22 AM Andy Byers @.***> wrote:

@pgoussy https://github.com/pgoussy we’ve got a fix that allows the TOC elements to contain HTML so that they display the TOC link exactly as the title is represented in the article. This means that any sup element would display exactly as is rather in regular case.

Is this an acceptable resolution for you?

3526 https://github.com/BirkbeckCTP/janeway/pull/3526

— Reply to this email directly, view it on GitHub https://github.com/BirkbeckCTP/janeway/issues/3521#issuecomment-1552712650, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIUQ43G536OCX453PTH6KCTXGXL23ANCNFSM6AAAAAAXU3YCJU . You are receiving this because you were mentioned.Message ID: @.***>

-- -- *Patrick Goussy (he/him/his) Senior Digital Publishing Coordinator Michigan Publishing Services University of Michigan Library My office phone number is temporarily disconnected while I work remotely due to COVID-19. Please contact me via email: **@.***