Displaying figures in lens viewer

Where I have to load the figures so that it’s displayed in the lens viewer? Which directory? Thanks.

Hi @trace,

I presume you’re using OJS – what version are you using? (Please include this in your posts.)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi alec
We use ojs v 3.1.1.

regards

Jan

Hi @trace,

You should be able to add dependent files (images etc) by clicking Edit on the uploaded XML galley:

image

Then using the Upload link on the list of dependent files:

image

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks Alec
I’ve tried that several times before without success. Just to verify, you mean like this:
ojs

When I look at the code that shoul be correct isn’t it?
chrome

thanks
jan

Hi @trace,

You’re looking at the HTML that the Lens plugin renders. What does the image reference look like in the JATS XML you uploaded?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec
It looks like this

> <fig id="fig02" fig-type="figure" position="float">
> 					<label>Figure 2</label>
> 					<caption>
> 						<p>Backgrounds with different level of information used for the performance of the three experimental parts (Part A, B, &amp; C).</p>
> 						</caption>
> 					<graphic id="graph02" xlink:href="jemr-09-02-b-figure-02"/>
> 				</fig>

Thanks
jan

Hi @trace,

Was the file named exactly jemr-09-02-b-figure-02 on the computer you uploaded the image from? OJS attempts to match on the “original” (uploaded) filename your system provided when it uploaded the image, not the naming within OJS. It looks like you’ve named the file appropriately in OJS, but the name field in OJS is not what’s used to match the file.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec
Yes it is named exactly like this. I’ve the specific pic attached (it is a png actually but has been converted when I draged it here.).
Thanks
jemr-09-02-b-figure-02

Hi @trace,

Just to be sure, it was named on your system without having a file extension?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi alec
No it wasn‘t. I was not aware that it‘s mandatory. Thanks

Jan

Hi @trace,

Actually, it’s not mandatory – it’s just uncommon to have image files on your local machine without e.g. a .jpg extension.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

That‘s a misunderstanding. There were extensions. So it‘s a bug then?
Thanks

Jan

I mean, do i have to add extensions in the xml file? Cause the official pmc examples don‘t have any.
Thanks

Jan

Hi @trace,

It’s odd that their samples don’t have extensions – generally I’d recommend working with them, not because OJS requires them in particular, but because their absence will probably confuse your local computer about file types. That in turn may cause it to mis-inform OJS about the files being uploaded there.

However, you’ll need to make sure that whether or not you use extensions, the filename on your local computer is exactly the same thing that the XML file contains. So in this case you’ll probably need to edit the XML to add .jpg extensions (or .png or whatever) to the filenames referenced there.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec
Adding file extensions in the xml file resolved the issue.
Thanks.
Jan

1 Like