JATS Parser v2.0: JATS XML to HTML and PDF conversion

jats

#1

Hi to all,

Just released JATS Parser Plugin v2.0, the new version of a plugin for displaying JATS XML article in HTML and PDF.
What’s new in this release:

  • A JATS XML to PDF conversion feature. Is based on TCPDF library (©Nicola Asuni, under GNU Lesser General Public License).
  • Improved JATS XML to HTML parsing. Is based on rewritten JATS Parser library. Now supports complex cases of formatted text, for example: <italic>italic<bold>italic and bold</bold></italic>, complex tables and nested lists.
  • An option in Plugin Settings to use OJS parsed references (rather than from JATS XML).
  • Better styling and functionality for article’s HTML page.
  • Displays article on the XML galley page.
  • Retrieves article metadata from OJS (not from JATS)
  • Works with OJS themes that use Bootstrap 4, such as Classic, Health Sciences, etc.

HTML example with a Classic theme: http://ojsdemo.e-medjournal.com/index.php/jatsparser/article/view/8/8
PDF example (is generated on the fly): http://ojsdemo.e-medjournal.com/index.php/jatsparser/article/view/8/8?download=pdf
Source JATS XML sample: https://github.com/Vitaliy-1/JATSParserPlugin/blob/master/example.xml

More readme on the Github plugin’s page and source code: https://github.com/Vitaliy-1/JATSParserPlugin

Attention to Old Gregg theme users: the latest patches should be applied for Old Gregg theme before installing the plugin, or fatal error will occur.

Download page: https://github.com/Vitaliy-1/JATSParserPlugin/releases


Installing JATSParser plugin
#2

Hi Vitaliy, Great job.
Where can I find the latest patch for Old Gregg theme?


#3

You can try to overwrite just this file:https://github.com/Vitaliy-1/oldGregg/blob/master/OldGreggThemePlugin.inc.php
As I remember changes involved only it

In autumn I’ll rewrite there article page to be just as XML galley page of the plugin


#4

As usual, speechless! Awesome work. I activated and it works great. I am planning to show this as HTML directly, since few side stuff like how to cite does not work in XML.


#5

Somehow, the abstract page doesnt have the references clickable (like when you click on reference [13] or [14] and it takes you to the reference) in OldgregG after installing this.

Edit:
It started working once I removed this plugin


#6

Yep, it is possible. When JATS Parser plugin is turned on, Old Gregg theme starts to use the JATSParser lib from this plugin, which has newer version. Some changes are associated with links parsing. Particularly, this part of a template should be rewritten: https://github.com/Vitaliy-1/oldGregg/blob/master/templates/frontend/parser/text.tpl#L23-L36

I am planning to update Old Gregg theme so it stay inline with update JATSParser library in September-October. It should move away from using Smarty templates as injecting full article’s HTML is much more easier approach.


#7

Cool. Will await. I already started adding my modifications. Lol. Now have disabled it.


#8

Hi Vitaliy, great work! It would be great to get a step by step example.

  1. how to install the jats xml to html / pdf plug in.
  2. how to modify the theme to get the display in a page with left / right columns
  3. a word 2016 document that is based on a typical template that journals would use to get authors to submit their work.
  4. the word 2016 document converted to jats xml
  5. the displayed html page
  6. the displayed pdf page

For those of us that are working through this step by step it would be very useful to get more examples to see if our existing journal word 2016 templates will work before we spend time to set this up.


#9
  1. The installation process is described on the plugin’s Github page. It’s not different from such for other OJS 3 plugins: https://github.com/Vitaliy-1/JATSParserPlugin
  2. And what are you trying to accomplish? On the first glance, it looks like a work for a developer. The plugin displays JATS XML almost the same way as all other pages are displayed in OJS. So, customizing shouldn’t be harder than other parts of the system (and should be easier compared to Lens Viewer).
  3. It depends on how you perform the transformation process. And it can be done not only from DOCX format.
  4. The plugin hasn’t such aim as DOCX to JATS XML transformation. The possible options are presented in this post: Who is who in JATS? (2018)
  5. The example is included in the first thread’s post: http://ojsdemo.e-medjournal.com/index.php/jatsparser/article/view/8/8
  6. The example is also included in the first post: http://ojsdemo.e-medjournal.com/index.php/jatsparser/article/view/8/8?download=pdf

The plugin transforms JATS into HTML and PDF automatically. HTML and PDF are immediately injected into the page, there are no intermediates in this process. You can always ask additional question here or on the plugin’s Github page if you’d stuck on something specific.


#10

Hi Vitaliy,

Q3 is a key issue. Can you please provide a link to the word document that you used in the examples Q5 and Q6?

I would be greatful (and happy to pay or donate) if I could email a word document that is typical of what our journal uses and for this document to be converted to JATS XML and displayed as html and PDF. What I’m trying to do is to work out if this will work for us before I get custom pages made to have the html and PDF in the pages (with the normal OJS columns included)


#11

Hi @MarkAGregory,

I haven’t used Word document here. Only JATS XML. Moreover, I usually use Libreoffice or Google Docs as text editors.

If you asking about the journal where I’m working and an editor, it is DOCX2JATS converter: https://github.com/Vitaliy-1/DOCX2JATS
You can also find DOCX examples there. But the produced JATS XML is not ideal and requires additional manual correction. I’m working right now on a better version.

But once again, it is not relates to JATS Parser Plugin functionality.


#12

Dear sir it is possible Displays html on article detail page like old jats parser


#13

Thank you again, I have the JATSParser installed. The setting of JATSParser does load. What does the setting do?


#14

Hi @rmosavi
The default behavior is to retrieve References from JATS XML and if there aren’t any, retrieve them from OJS (that was added as article meta and parsed by OJS). In the settings you can force to use reference list from JATS XML or OJS. The latter is good for those, who don’t want to spend time and and form JATS XML with references or who tend to use other the AMA citation style.


#15

What else do I need to have this JATSParser V2 works. I have got the JATSparser install and enabled. In order to use it do I have to have another plugin installed? How can I get that nice full-text /HTML/XMLin the article landing page.


#16

Plugin renders XML and outputs the result on the XML galley page. You need to upload XML to the production stage and, after publishing go that XML galley page.


#17

Thank you. A PMC tagged xml file would work? or it has to be just JATS xml?


#18

The plugin doesn’t provide any additional checks for the XML. As long as it has /article/body and all standard elements inside all should be fine. But doesn’t support all JATS standard tags and their combinations.

I suppose, PMC tagged XML = JATS XML

You can see an example that we use here: https://github.com/Vitaliy-1/JATSParserPlugin/blob/master/example.xml

Keep in mind that metadata is displayed actually from OJS, not JATS XML, so, basically, are not required. References can also come from OJS, but by the default - from JATS XML.


#19

I try to install this plugin and I haven’t succeeded yet. I noticed some differences. JATS Parser v2.0 looks like a theme not a plugin. Because as shown in the example link this doesn’t look like oldGregg theme and in the link after index.php jatsparser comes. “index.php/jatsparser”

I want to ask this. Also I use the oldGregg theme right now. After install this plugin is there an adjustment problem?

http://ojsdemo.e-medjournal.com/index.php/jatsparser/article/view/8/8


#20

I decompressed the jatsParser 2.0 file and copy to plugins/generic folder. This is error message. What is the problem?