Add styling to parsed citations - italic

Hello,

I successfully upgraded our journal OJS version 3.2.1.1. Thanks for all the work done. It looks beautiful and works like a charm.

Since the current implementation of references is basically a raw text on lines I would like to ask few questions regarding styling:

1. Is there a plan to reintroduce any way of styling (we need only italics) to the output of citations on article detail?
2. Is it feasible to have references text fields with TinyMCE formatting tools?
3. Is it a problem to have html tags in the raw_citation column in database regarding the export to CrossRef etc.?

I noticed the parser leaves <em> tags in the citation. So right now styling is possible only by editing references outside and then pasting back to the references textarea. Which is not very comfortable for editors. :slight_smile:

In our journal I added the TinyMCE editor to the references metadata on publications for editors. So they can style the citations. Also a preview of how the citations will look since after publication the changes are versioned.

However this introduces <p> tags to parsed citations in database.

So then I have to change the output of parsed citations to avoid putting twice the <p> tag since it is added manualy on printing the citations in article detail. But then I need to reparse also older articles which were parsed using raw text field. Currently not a big problem since we upgraded just few days ago.

Hi Domek

As far as I know, the

tag is important for indexing so that the reference data can be pulled from the article.
However if you still need to change the format you actually can do it by add custom css to your journal.

Regards

There are no immediate plans to add TinyMCE-like editing of citations. As you’ve seen, this doesn’t interact well with the citation parsing and may inhibit downstream consumers like Crossref, or use of our Crossef linking plugin, for example.

That said, we are still pursuing an option for full-text HTML publishing. And this work would probably include an option to use plain-text references like we currently have or to enter full reference information that can be passed to something like CitationStyleLanguage to be formatted according to the selected citation style.

That’s not something that’s right around the corner, but in terms of citation styling that’s probably where we’ll put most of our effort.

I’m not sure, but I’ll see if there is anyone who knows more about the Crossref deposits.

@navotera
However if you still need to change the format you actually can do it by add custom css to your journal.

Thank you for the reply. Yes, I will have to adjust the template for citations to get rid of the <p> tag when printing the citation from db.

@NateWr
That said, we are still pursuing an option for full-text HTML publishing. And this work would probably include an option to use plain-text references like we currently have or to enter full reference information that can be passed to something like CitationStyleLanguage to be formatted according to the selected citation style.

Having the full reference information would be perfect and kinda a breakthrough in publishing. However, obtaining it will be the most difficult I think. Since reverse engineering the citation requires a lot of effort with uncertain result. Getting the information from authors would add a lot of extra work and the same goes for the editors. :exploding_head:

Maybe allowing basic styling for citations and stripping html tags for export as necessary could be an easy to implement alternative option. This way you keep the styling from the author when they submit. Editor revises it. And you still have it parsed by rows for export.

Just a thought. :slight_smile:

I asked about what happens with Crossref and was told that it seems like they do strip HTML tags out, so it is likely that your approach is not causing any problems with the deposit. Do let us know how you get on with it, if there are any issues, or whether the deposits look ok!

Getting the information from authors would add a lot of extra work and the same goes for the editors.

I think we’ll always support a fallback to plain copy-pasted citations for precisely this reason.

1 Like

More information about Crossref. It appears that HTML tags inside of references may cause a deposit to fail with a schema error. I’d encourage you to check your Crossref deposits to see what they look like when the references contain HTML tags.

Hey all… just adding a bit more information from Crossref:

we don’t accept face markup in the title and other elements within our citation tag with the exception of the <unstructured_citation> tag - it’s included there to support markup that is needed for things like chemical names, math formulas, etc, but not for style reasons.

we don’t use it for reference matching at this point and they may be stripped from the JSON output (I’ll have to verify this, not sure) so it’s OK to strip most markup if you need to but it’s not necessary. I’d advise leaving any MathML or <sup> and <sub> tags in references as that does have value beyond formatting

At the moment, our plugin does write to <unstructured_citation> so the potential downside or likelihood of a validation error due to HTML in the references is relatively low. For best results, though, I’d recommend keeping things as simple as possible.

Best,
Mike

1 Like

Hi @NateWr and @Domek

As you can see on some indexing service the proper <p> tag is important for some indexing service like Dialnet that required the <p> tag for theme to get the references.

Please check this document :

I still suggest that if @Domek want to change the reference item for italic styling using only the css approach.

Thank you

Hello @navotera,

thank you for mentioning the Dialnet crawler in the discussion. I intend to keep the <p> tag for every citation. But it is good to know there are services crawling the journal that require certain structure. The document does not specify text styling tags to be an issue.

My problem is that I need to put italic only on a fraction of the citation so it is more human readable. Also so the citation is actually styled in a way we require it from the authors when they submit. Like this
Demo, G., Neiva, E. R., Nunes, I., and Rozzett, K. (2012) ‘Human Resources Management Policies and Practices Scale (HRMPPS): Exploratory and Confirmatory Factor Analysis’. <em>Brazillian Administration Review</em>, Vol. 9, No. 4, pp. 395-420.

I cannot do this simply by applying css since the italic part changes for different source types (article, web page, thesis, book, book with anonymous authors, …). Therefore I need either the author to create the citation with proper formatting or code a citation parser that would reverse engineer raw citation and put the <em> tag where it belongs. I decided to use the first option since authors are required to style citations in the actual text of the submission anyway.

1 Like