Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaying footnotes #226

Open
Kyrklund83 opened this issue Dec 10, 2021 · 8 comments
Open

Displaying footnotes #226

Kyrklund83 opened this issue Dec 10, 2021 · 8 comments

Comments

@Kyrklund83
Copy link

Hi!

I'm very new to XML and have only just started to use this wonderful solution for displaying them on the web. I'm using the integrated OJS version. Everything works very well, except the footnotes of our articles will not display in any way.

I wonder if the problem is in our XML-coding or if maybe footnotes are not a feature of this solution? If so, can it be implemented in some way?

I apologize if this is not the forum for these kinds of questions.

@gnott
Copy link
Member

gnott commented Dec 15, 2021

It's likely Lens does not display footnotes, and some enhancements would be required to do so. You add an example of some footnote XML you have, if you are able, to this issue for others to see.

@Kyrklund83
Copy link
Author

Thank you for your quick reply! The footnotes looks like this in the xml-files we received from our supplier:

Markup in the paragraphs looks like this:

Eva Ström, Ina Thörngren, Kristina Lugn, Marie Louise Ramnefalk, Margareta Renberg och Tua Forsström var poeter som omnämndes i sammanhanget.
<xref ref-type="bibr" rid="B1">1</xref>
En vid den här tiden övervägande manlig kritikerkår 

And the footnote content, at the bottom of the file, looks like this:

<back>
<ref-list>
<title>Noter</title>
<ref id="B1">
<label>1</label>
<mixed-citation publication-type="journal">
<collab>
Tack till de anonyma granskarna för välriktad kritik och kommentarer
</collab>
.
<string-name>
<given-names>Se Eva</given-names>
<surname>Bruno</surname>
</string-name>
,
<article-title>
”Den berömda verkligheten” och Anders Olsson ”Före orden, för-orden”
</article-title>
, i
<source>Bonniers litterära magasin</source>
, nr
<issue>5</issue>
(
<year>1978</year>
):
<fpage>283</fpage>
–
<lpage>285</lpage>
och 287–289. Framförallt Olssons text, som ingick i en enkät där
<italic>Bonniers litterära magasin</italic>
försökte skapa en överblicksbild över den samtida poesin genom att bland annat be fyra kritiker reflektera över den, refererades ofta till i litteraturkritiken vid den här tiden.
</mixed-citation>
</ref>

@gnott
Copy link
Member

gnott commented Dec 16, 2021

I think perhaps in the case above, the converter logic does not currently support parsing the <mixed-citation> tags. It would reach these lines of code https://github.com/elifesciences/lens/blob/develop/converter/lens_converter.js#L2183-L2185 Only <element-citation> tags are currently parsed and shown.

@gnott
Copy link
Member

gnott commented Dec 16, 2021

Though, in addition to the above, lines https://github.com/elifesciences/lens/blob/develop/converter/lens_converter.js#L2106-L2111 indicates if there is a <person-group> tag inside the <mixed-citation> then some of the data may be extracted. You could test by editing the XML to be <person-group><collab>...</collab></person-group> and maybe it would display more citation data.

@Kyrklund83
Copy link
Author

Again, thank you for replying! Am I correct though, in understanding as the tag that gives the reference function? And that I may be able to 'hack' what is displayed by that function by using the tag?

Or is this a separate tag that may create footnotes?

@gnott
Copy link
Member

gnott commented Jan 21, 2022

I think what you would see is in the left-side content panel, the 1 of the <xref ref-type="bibr" rid="B1">1</xref> will appear as an underlined link. Clicking on it will cause the right-side panel to focus on the "References" tab and to highlight the B1 reference / citation.

As described in comment #226 (comment) above the XML tagging inside the <ref> tag may need some changes for the Lens parser to extract the data from it, since <mixed-citation> is not as well supported by the parsing logic.

@Tiago-Manzato
Copy link

Hi folks! How's y'all doing?
My issue isn't exactly the same as stated in the comments above but since this issue is open and with the subject that matches my problem I'll post here.

So, the citation references for my XMLs works just fine, however, the cross references such as author/foot notes doesn't.
Let me elaborate a little further.

The tagging on the XMLs are as shown below:

<body>
    <sec sec-type="intro">
        <title>Introduction</title>
            <p>...<xref ref-type="fn" rid="fn1"><sup>1</sup></xref></p>
            <p>...<xref ref-type="fn" rid="fn2"><sup>2</sup></xref></p>
    </sec>
</body> 
<back>
    <ref-list>
    ...
    </ref-list>
    <fn-group>
        <fn id="fn1">
            <label><sup>1</sup></label>
            <p>generic foot note text 1</p>
        </fn>
        <fn id="fn2">
            <label><sup>2</sup></label>
            <p>generic foot note text 2</p>
        </fn>
    </fn-group>
</back>

I'm using stand-alone Lens Viewer on my localhost webserver (by the way, it's an amazing feature, very appreciated!!) so the URL I get in the navigator address bar when I launch Lens is something like "http://localhost/lensreader/#toc" and one thing that I noticed is that when I click on a citation reference the URL points to http://localhost/lensreader/#content/citation_reference_1 and the citation reference gets highlighted perfectly, but when I click on a foot note cross reference the URL points to http://localhost/lensreader/#content/cross_reference_1 which displays nothing.
By inspecting these cross reference elements on Chrome I could see that a citation reference:
citation div

links the citation to it's reference inside "div resources/panel citations resource-view":

reference div

while a footnote cross reference :

crossref citation div

doesn't have a panel at all:

div resources

So unless a footnote is intended to be displayed under the "div panel citations resource-view" the cross reference is not being recognized from it's XML tag or Lens is failing to create the proper container "cross_reference_1" for footnotes.

I'm no programmer myself but I hope this information I gathered makes any sense to actual developers to figure out how to solve this issue/bug.

Thanks in advance

@gnott
Copy link
Member

gnott commented Jun 13, 2022

Thanks for your examples @Tiago-Manzato and adding to the discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants