JATS Parser plugin v 1.0 had added Smarty templates. But it’s not the case for the v. 2.0 anymore. It is possible to return to this practice, I need more consideration here (pros and cons).
The input for JATS Parser is JATS XML. The intermediate output is a representation of the article in the plain PHP objects. The output is PHP DOMDocument, where I retrieve HTML with a simple method. I need this format because it’s passed to the TCPDF library for additional conversion to PDF.
So, if someone needs Smarty templates rather than DOMDocument, inside main theme class it should be something like:
require_once __DIR__ . '/path/to/jatsParser/library/vendor/autoload.php';
use JATSParser\Body\Document as JATSDocument;
* @var $jatsDocument JATSDocument object representation of JATS XML document
$jatsDocument = new JATSDocument("example.xml");
* @var $smarty TemplateManager
All content from the $jatsDocument could be than in the Smarty template retrieved with setters.
Does it make sense?
Any theme or child theme that uses Bootstrap 4.1+ is appropriate. I’ll definitely rewrite the code without Bootstrap some time in the future. From the official themes, it can be Classic, HealthSciences and Immersion theme. If you like another one, simply create a child theme and add Bootstrap’s JS and CSS (or SCSS).