Skip to content
markup plugin for OJS3
PHP Smarty JavaScript CSS
Branch: master
Clone or download
Pull request Compare This branch is 10 commits ahead, 3 commits behind kaschioudi:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Markup plugin for OJS3


This allows OJS to work with PKP’s Open Typesetting Stack for transforming Word and PDF articles to JATS XML.

System Requirements



Works with OJS 3 or greater


  • Clone the plugin contents into the plugins/generic folder (e.g. plugins/generic/markup). If not doing this before installing OJS, you will need to then run php tools/upgrade.php upgrade or php tools/dbXMLtoSQL.php -schema execute plugins/generic/markup/schema.xml.


First, you’ll have to install and configure the plugin. To do this, after creating a journal, go to your user home by clicking your name in the top-right corner of the page, then to "Settings" -> "Website" in the sidebar, and finally "Plugins" from the top of the Settings menu. The Open Typesetting Stack plugin should be listed under "Generic Plugins".

Enable it, then refresh the page, and you should see a new "OTS Settings" menu entry at the top. Click through.

If this is your first time using OTS, you'll want to open a new browser tab and head over to our demonstration instance at at this point to sign up. You can upload jobs to the OTS stack directly from this page, but what you’ll want to do to use the functionality in OJS is get an API key for integration. You can do this by going to your Settings menu in the top-right corner of the OTS interface after registering and logging in, and then clicking "Generate Token" under API Authentication.

Once you've got a token, you can pop back over to OJS, to the OTS Settings menu. Here, you'll want to plug in the API token you just registered, as well as configuring how you want OTS to work for your journal. You can choose a citation style for all OTS output, choose the OJS editing stages that XML conversion and editing are available in, and select the output galley formats that you want OTS to produce when you're ready to publish.

After finishing with configuration, you're ready to actually use the plugin. After an author submits an article, click through to the submission, and you can use the first of the new OTS features: the option to automatically convert any Word or PDF articles to XML.

This option will only be available for all workflow stages (Submission, Review, Copyediting, Production) that you've enabled in the plugin settings menu; by default, they're all enabled, but some journals may want to restrict them to only certain stages.

After the job is complete, you should see an XML version of the same article available alongside the Word or PDF document that was originally uploaded.

Once you're done editing the document, you can move along to the final production stage of the workflow. Similar to the initial XML conversion, on the Production tab you'll have the option to generate galley files from any Word, PDF, or XML documents that you've brought forward from earlier workflow stages.

This will submit another job to OTS, which will return production-ready galley files in the formats that you selected on the plugin settings page:

​From here, you can go directly to publication.

Backlog Conversion

Additionally, if your journal has already been publishing Word or PDF articles and you want to convert them to JATS XML in bulk (with the understanding that this will probably not produce an ideal result on its own), you can do so by navigating to the "OTS Backlog convesrsion" tab of the settings menu, selecting the files you want to convert, and clicking "Start conversion".

You can also perform bulk conversion via the command line, using the provided batch.php in the plugin folder:

$ ./batch.php
     ./batch.php [user_name] <journal name>                 Batch convert a specific journal enabled
     ./batch.php [user_name] [--all]                        Batch convert all enabled journals
     ./batch.php [--print]                                  Prints the list of all enabled journals
     ./batch.php [user_name] [--list] <list of journals>    Batch convert a comma separated list of journals

The tool should generally be run as your webserver user (e.g. www-data or apache) so that it has access to OJS' cache and other dependencies. The [user_name] specified on the command line should be an OJS admin who has access to all of the journals that are to be converted. By default, this CLI tool will only convert articles which have already been published (it will use PDF galleys as conversion input when they are available), as it's primarily intended to generate JATS XML for indexing or deposit purposes; users wanting to create XML for production and reader views should use the full Texture workflow above.

Finally, when using the CLI tool you can also store OTS configuration settings in OJS' master file if you haven't configured the plugin from the settings menu in OJS, by adding a block like so:

; Markup plugin  ;


; OTS email address used for login.
ots_login_email = ''

; Token for OTS API authentication. Get this token from your OTS settings page.
ots_api_token = '' 

; Open Typesetting Stack instance to connect to. Normally you should not change this setting.
ots_host = ''

; Preferred citation style for PDF and ePub output (see OTS readme).
ots_citation_style_hash = '3f0f7fede090f24cc71b7281073996be'

Contact/Support for any issues, or open an issue on this repo!

You can’t perform that action at this time.