OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Looking for practical methods for creating galley files

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Looking for practical methods for creating galley files

Postby yaliang » Mon Jan 15, 2007 3:43 am

Dear Friends,

Currently, we are beginning to publish the first issue of our journal with OJS v2.1.1. During the testing and preparation, I got several questions and could not found the answers from the previous posts. If you have any idea, please share your experience to me. Thanks a lot.
    1.Is there any practical method to generate the Html file (galley format) with Microsoft Word Document? In the pass post (http://pkp.sfu.ca/support/forum/viewtopic.php?t=420), mtrudel demonstrated an approach to convert Word into XML file automatically. Does anybody know how to do it? I tried to edit the Word file with the XML schema, but it needs lots of effort.
    2.Is it correct that the image files of the document should be uploaded one by one via the "Edit a Layout Galley" interface? Since there are more than 20 image files in each manuscript, it takes a lot of time to upload the files. Is it possible to locate the files in the same folder of the Html file by the journal manager?
    3.Among most of the on-line systems, the numbers that an article was cited could be automatically tracked and counted. Is this kind of function embedded in the OJS? Should the reference list of the article be edited with specific method for tracking the relative information about citation?

Wish you could give me any advises.
Best Regards,
Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby asmecher » Mon Jan 15, 2007 10:20 am

Hi Yaliang,

1. We're hoping to address this in our next release with a comprehensive automated system that will convert from a word processor's native format (i.e. DOC or ODT) to XML and from there to XHTML and PDF. This will still require some attention at the input end (i.e. using the appropriate styles when formatting the source document), but it will eliminate the manual production of the presentation formats.

2. Yes, images must currently be uploaded one at a time. However, if you upload images into the journal's public directory (or subdirectories of it), you can get OJS to rewrite the URLs with the proper directory if you use something like the following in your HTML:
Code: Select all
<img src="ojs://public/myImage.gif" />
This is the journal's public folder; you can address the site's public folder using ojs://sitepublic/myImage.gif. Other types URLs -- e.g. to articles, supplemental files, etc -- are also supported.

3. We'll be working with Google Scholar to provide cite lists using the Reading Tools. We don't currently have plans to track citations locally.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8860
Joined: Wed Aug 10, 2005 12:56 pm

Postby yaliang » Tue Jan 16, 2007 3:50 am

Dear Alec:

Thanks for your explanations. According to the previous discussions on this forum, it was thought as a practical method by generating the Gallery files (XHtml, PDF, or other format) with a XML file.
During these days, I tried several approaches for making the XML file with the DOC file. It was found that it was the easiest method by setting the components with specific style (such as ArticleTitle). However, when I used the application Word2XML.exe to generate a XML file with the DOC, many detail information was lost. For example, the marked contents within a paragraph (set as high_light style) were unable to be tagged in the XML file.
Currently, I am using the journalpublishing.xsd schema to manually edit the DOC file. The result is very good. Unfortunately, it takes a lot of time and efforts. Wish you can make a better approach in the coming OJS 2.2.

Best Regards,
Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby mj » Wed Feb 07, 2007 4:57 pm

Hi Yaliang,

I'm the developer working with PKP on developing tools for integrating the MEDLINE and Pubmed Central XML formats into OJS. Please accept my apologies for the delay in replying- I am a full-time student and as such, my time involvement with OJS is currently limited to spare volunteer hours only.

At present, OJS is able to export article information in MEDLINE format for indexing. However, your journal must have been selected for inclusion via NLM's application process - see: http://www.nlm.nih.gov/pubs/factsheets/jsel.html ; The format required is further defined at: http://www.ncbi.nlm.nih.gov/entrez/quer ... isher.html

One of the features to be inlcuded in OJS 2.2 is the ability to render XML articles formatted in the PubMed Central DTD (or XSD) directly to XHTML and PDF galleys. This work is nearly complete and we are hoping to test it with a few selected journals over the next few months to refine it.

Regarding PubMed Central, we are currently working on a system which converts articles (in MS-Word or similar) to the NLM Journal Publishing XML format, specifically for the purposes of depositing to PMC. This is related to the earlier forum posts which you mention (Mat Trudel, who submitted the posts, was working with an earlier version of this code). However, this is roughly 90% reliable at present, for well-formatted articles. PMC has a *very* rigourous review process for these files, which can take several weeks or months. At this time we are not ready to release the tool as being "stable", and the most common method of submitting articles to PMC is manually converting articles to XML using desktop tools, and then checking that they are up to PMC standards through their review process. See: http://www.pubmedcentral.nih.gov/about/pubinfo.html

There are also a few requirements for PMC that I should draw your attention to up front:

- all images/figures must be as high resolution and quality as possible; this often may mean separately requesting from the author higher-quality versions than were provided with the original article submission.

- PMC compares "the online presentation of an article, as generated from the XML/SGML and associated image files" against "an accurate and complete rendering of the article"; typically this means a PDF version of the article. An alternative might be to supply PMC with the rendered XHTML, which uses their code (now part of OJS) and should meet their requirements. We are working on having PDF rendering in the next release of OJS, but it has not been finalized.

If you decide to go the PMC route, I would suggest something like the following:

1. Submit a PMC Journal Application (http://www.pubmedcentral.org/pmcdoc/pmc-application.doc).
2. Once you have the final (accepted) versions of the papers to be published, make arrangements to convert them to XML.
3. Have your technical person complete the XML conversion (clean-up) to meet PMC standards.
4. Presumably you should have received an acceptance from PMC by this point. Submit the clean XML files, along with high-resolution images and PDFs to PMC for review.

My goal is to have the XML document conversion tool available for (limited) public use sometime in the spring, but again, as my time is very limited, work on it at the moment is of limited priority. You should see more development and public notices sometime around the May-June time frame.

Hope this helps,

MJ Suhonos
Open Journal Systems Development Team
mj
Site Admin
 
Posts: 304
Joined: Fri Mar 26, 2004 9:32 am
Location: Toronto, Canada

Postby yaliang » Wed Mar 07, 2007 4:44 am

Dear Alec,

Excuse me, I have a further question about the graphical galley files. Yes, the previous suggestions (put the files in ojs\public\journals and link the file with <img src="ojs://public/myImage.gif" /> in Html) is working. However, it seems a little strange that the Html file and the image files are located in different folder. I wonder that is it possible to function getHTMLContents() in ArticleHTMLGalley.inc with following suggestions:
1. In the Html, the image file are directly linked with <img src=" myImage.gif" />. This will facilitate the layout editor to create the Html files.
2. While the article was displayed in a browser, the function getHTMLContents() will get the article’s URL (the folder of the Html file) and cumulate it with the image file name.

Is it correct and possible? Please give me your suggestions to try.
Thank you very much.

Best Regards,

Yaliang
yaliang
 
Posts: 82
Joined: Tue Jul 11, 2006 1:11 am

Postby Cornelius » Tue Mar 13, 2007 6:15 am

asmecher wrote:We're hoping to address this in our next release with a comprehensive automated system that will convert from a word processor's native format (i.e. DOC or ODT) to XML and from there to XHTML and PDF. This will still require some attention at the input end (i.e. using the appropriate styles when formatting the source document), but it will eliminate the manual production of the presentation formats.


Just as a side note: the system that we used previously to OJS had such a feature and it had serious difficulties with complex formattings, e.g. things like tables and uncommon fonts. Of course XML is the absolute best way of permanently storing articles (much better than PDF or XHTML), so if this works reliably that would be awesome...
Cornelius
 
Posts: 12
Joined: Thu Dec 21, 2006 6:37 am

Postby shimrah » Thu Apr 05, 2007 10:50 am

yaliang wrote:Dear Alec,

Excuse me, I have a further question about the graphical galley files. Yes, the previous suggestions (put the files in ojs\public\journals and link the file with <img src="ojs://public/myImage.gif" /> in Html) is working.


Sadly, I haven't gotten this far. I've tried this suggestion, but haven't been able to get the images to show up in my article. Please help this newbie! :oops:

Code: Select all
<img src="ojs://public/1001abstract27a.jpg" />


and the image is in the following directories, waiting for one of them to work:

Code: Select all
C:\OJS\public\journals\1
C:\OJS\public\journals
C:\OJS\public


Any aid would be much appreciated. Thanks!
shimrah
 
Posts: 45
Joined: Thu Apr 05, 2007 10:01 am

Postby asmecher » Thu Apr 05, 2007 2:53 pm

Hi shimrah,

When you preview or view the article, is the URL getting rewritten at all, or is it remaining the orginal ojs://... URL?

Also, what version of OJS are you using?

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8860
Joined: Wed Aug 10, 2005 12:56 pm

Postby shimrah » Fri Apr 06, 2007 7:02 am

Hmm... it looks like Firefox downloads the file, then serves it locally from
Code: Select all
/Documents and Settings/User/LOCALS~1/Temp/7-20-6-PB.htm


I'm using version 2.1.1.0
shimrah
 
Posts: 45
Joined: Thu Apr 05, 2007 10:01 am

Postby asmecher » Fri Apr 06, 2007 9:42 am

Hi shimrah,

Sorry, that question wasn't very clear. I mean within that HTML, is the src=... of the <img> tag you're trying to use being rewritten? Preview that galley, go to View Source in your browser, and look for the image tag that you're having trouble with.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8860
Joined: Wed Aug 10, 2005 12:56 pm

Postby shimrah » Tue Apr 10, 2007 10:54 am

Ah, I see. And thanks, Alec, for your help.

It doesn't look like it's been rewritten. The source still says

Code: Select all
<img src="ojs://public/1001abstract27a.jpg" />
Last edited by shimrah on Tue Apr 10, 2007 2:04 pm, edited 1 time in total.
shimrah
 
Posts: 45
Joined: Thu Apr 05, 2007 10:01 am

Postby asmecher » Tue Apr 10, 2007 11:24 am

Hi Shimrah,

It sounds like OJS is having trouble determining whether the file you uploaded is HTML or not. As Editor or Section Editor, go to the submission's Editing page, scroll down to Layout, and you should see an Edit link beside your HTML file under "Galleys". When you click Edit, do you see a place to upload a matching CSS file on the page?

If not, OJS doesn't think that your HTML file is actually HTML. OJS uses the mime_content_type function to determine file types, and it may be that this PHP feature isn't configured correctly. Search this forum for mime_content_type for information.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8860
Joined: Wed Aug 10, 2005 12:56 pm

Postby shimrah » Tue Apr 10, 2007 2:04 pm

Hey Alec,

Thanks. I hope I'm getting closer, here.

I've managed to install fileinfo.dll extension and, as per another post of yours, replaced the mime_content_type function of String.inc/php with



Code: Select all
        function mime_content_type($filename) {
                if (function_exists('mime_content_type')) {
                        return mime_content_type($filename);
                } elseif (function_exists('finfo_open')) {
                        static $fi;
                        if (!isset($fi)) {
                                $fi = finfo_open();
                        }
                        if ($fi !== false) {
                                return finfo_file($fi, $filename);
                        }
                }

                // Fall back on an external "file" tool
                $f = escapeshellarg($filename);
                $result = trim(`file -bi $f`);
                // Make sure we just return the mime type.
                if (($i = strpos($result, ';')) !== false) {
                        $result = trim(substr($result, 0, $i));
                }
                return $result;
        }


But when I click on the "edit" link of an HTML galley, I now get an error message:

Code: Select all
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_fileinfo.dll' - Access is denied. in Unknown on line 0


Are there any additional dependencies that I need to install (e.g., changes to other .ini files or additional PHP extensions) in order for Fileinfo to work?

Thanks,
Shimrah
shimrah
 
Posts: 45
Joined: Thu Apr 05, 2007 10:01 am

Postby asmecher » Tue Apr 10, 2007 2:23 pm

Hi Shimrah,

This appears to be a Windows file permissions issue -- see http://www.google.ca/search?q=PHP+%22Unable+to+load+dynamic+library%22+%22access+is+denied%22. Also note that the modification you're using above isn't quite complete -- the line that reads:
Code: Select all
$fi = finfo_open();
...should be...
Code: Select all
$fi = finfo_open(FILEINFO_MIME, '/path/to/magic.mime');
...where the argument '/path/to/magic.mime' is, of course, replaced with the full path and filename of the mime database on your system.

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8860
Joined: Wed Aug 10, 2005 12:56 pm

Postby shimrah » Thu Apr 12, 2007 11:26 am

Hey Alec,

We managed to find magic.mime tucked in our PHP directory, and fileinfo.php is enabled according to phpinfo.php.

But if I upload an HTML galley, I'm getting the same problem (the HTML downloads as a file, the OJS:\\ isn't re-written, and the images don't show).

Also, after the upload, I'm shown a blank screen with no error messages, and have to BACK to the Editing screen and refresh to see what's happened.

Any thoughts?

Thanks,
James
shimrah
 
Posts: 45
Joined: Thu Apr 05, 2007 10:01 am

Next

Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 7 guests