Plugin for displaying JATS XML on article detail page under abstract for OJS3+

Hi @anupent,

Probably when working with css you don’t take into consideration css priority rules. Modified manuscript theme includes bootstrap and jquery ui that already use own styles. In order to overwrite it there is a need to know some css rules. For example this code:

td {
  text-align: center;
}

will be overwritten by this code:

tr td {
  text-align: left;
 }

which can be also overwritten by this code:

 tr > td {
      text-align: center;
 }

and the latter can be overwritten by this code:

table.table.table-striped.table-bordered  tr > td {
      text-align: right;
 }

and so on…

here is an article about css specifiers: Specifics on CSS Specificity | CSS-Tricks
or if serious front-end changes are in your mind, I can recommend free courses, that helped me: https://www.coursera.org/learn/html-css-javascript-for-web-developers

As for superscript - this functionality is not added yet. Can you show me, how superscript/subscript are coded inside JATS XML, so I can add it?

1 Like

What about the table heading/title? I want to centralise it as well. I have started liking coding and its all because of you!! :slight_smile:

Typical table structure in HTML and JATS XML:

<table>
  <thead>
    <tr>
      <th colspan="1" rowspan="1">table head cell data</th>
      <th colspan="1" rowspan="1">table head cell data</th>
    </tr>
  <thead>
  <tbody>
    <tr>
        <td colspan="1" rowspan="1">table body cell data</td>
        <td colspan="1" rowspan="1">table body cell data</td>
    </tr>
  </tbody>
</table>

So in order to work with table head, for example:

thead th {
  text-align: center;
  vertical-align: middle;
}

but browsers usually center table head automatic upon rendering HTML page.

Dear @Vitaliy,
Can you please add some more tags as below from JATS in the coming updates?

<sub> Subscript
<sup> Superscript

<.break> Line Break (period removed)

Warm regards,
@anupent

Greetings @anupent,

Thanks for reporting
I had done several fixes and adopted new feature in master branch, including super- ,subscript inside paragraphs, tables and more complex cases like:
<p>some text <bold>more important text <italic>most important text <sup>11</sup></italic><sub>22</sub>></bold></p>
This commit: add superscript and subscript · Vitaliy-1/JATSParserPlugin@4b01071 · GitHub

As for break https://jats.nlm.nih.gov/publishing/tag-library/1.1/element/break.html according to NLM:

Usage is discouraged. The intent of this Tag Set is not to capture the “look-and-feel” of a document.

Can you tell me in what context this element is used? Inside which elements and for what purpose? Maybe it can be omitted or provided with other option?

I planning to create new release when there will be enough changes. Maybe in next month.

1 Like

Dear @Vitaliy,
Thanks for the update, especially the sup and sub.
But, I found a problem with sup (I have not checked sub).
There seemed to be a gap before the superscripted item. (see below)

Here is the xml code:

Here is the output:

Would you please look into it?

Regarding return tag:
We are using xml file for display of whole article in article detail page and as such we need to have some customization for visual appeal. (Visual customization is not the goal of xml file in real sense.)
I am in need of return tag to display data in header and cells of tables, for eg, in a header cell if I want to write “Variable, n (%)”, I want n (%) in a next line below Variable but in the same cell. Similarly some other td data need to be arranged that way.

I would like to hear your opinion on this regard.

Warm regards,
@anupent

Hi @anupent,
You can handle sup and sub elements like every other html element. Just modify css accordingly (margin-left for these elements). Let me know if you need more guidance in this.
Ok, will add support for break element if php supports elements with no open tag. But we successfuly rely on automatic word transfer in table cells.

1 Like

Hi @anupent, @varshilmehta

Take a look at this fix of displaying tables without thead and tbody elements in JATS XML:
https://github.com/Vitaliy-1/JATSParserPlugin/commit/8f7eb30b28a37c06ca6bb1b8819ed6e7743f9437

2 Likes

Dear @Vitaliy,
Previously we had to use tbody tags else everything looked bold and centered.

With this fix, we dont need to write thead or tbody if we dont need header column, but we need to write thead tags only if we need header in our table.

So, tbody tags can be totally avoided.

Did I understand it properly or is there any more changes?

Regards,
@anupent

Thanks a lot Dr. Vitaliy. I ll make the deemed changes.

Yep. now thead and tbody tags can be totally avoided. I simply didn’t notice the problem earlier, cause every time use them.

1 Like

Hi @Vitaliy
Thanks for your incredible plugin. I have used it.
I want to change the blue color and add text “OPEN ACCESS and PEER-REVIEWED”

What css codes they refer to? I have tried using inspect element but I could not find.

Hi @kawahyu,

For changing the look of those tabs you will need to pick needed colors from the jquery-ui site: http://jqueryui.com/themeroller/ download theme with needed colors and overwrite jquery-ui folder with it. These colors are hardcoded inside jquery ui css and javascript and changing the code with standard way will lead to side effects.

open access label is coded here: defaultManuscript/article_details.tpl at master · Vitaliy-1/defaultManuscript · GitHub

There is a need to add an additional translate key there, and write its meaning here: defaultManuscript/locale.xml at master · Vitaliy-1/defaultManuscript · GitHub

1 Like

Greetings,

Dear @Vitaliy,
Is there a way to write foot-notes under figure in “JatsParser”. I have a figure with some abbreviations and want explanation of them as foot notes.

Regards

<fig id="fig1">
  <label>Figure 1</label>
  <caption>
    <title>Figure title.</title>
    <p>Figure footnotes.</p>
  </caption>
  <graphic xlink:href="fig1.jpg"/>
</fig>
2 Likes

Thanks, it works.

Regards,

OJS 3 Theme with built-in JATS Parser Plugin is ready for testing (not ready for production use yet, not all pages are ready). Don’t forget to rename to oldGregg after downloading. If someone is interested in testing don’t hesitate to open an issue on GitHub if something goes wrong.
Later I will make a demonstration instance.

3 Likes