TECHNICAL FIELD

The present disclosure relates to publishing documents and in particular to systems and methods for publishing text files containing mathematical expressions to a web-ready file.

BACKGROUND

Many authors, particularly in the educational space, generate content in a text file such as Microsoft® Word™ that they wish to have published as a web output (e.g. as a webpage, web application, etc.). However, existing techniques for publishing text documents to web files are manually driven and user intensive. Typically, a developer manually writes the contents of the text document in an appropriate web language format that is readable by a web browser for publishing the text document's content as a webpage or web application. In some instances, software programs exist that can convert the document's text into a desired web language format. However, this operation still involves a user using the software program to perform the conversion, and a developer is generally required for assembling the webpage or web application so that it can be presented in a manner desired by the author.

A further challenge exists when content or data in the text file to be published includes mathematical expressions such as mathematical formulas, equations, and/or symbols. Mathematical expressions written by a developer in the desired web language format is both time consuming and susceptible to user error. Additionally, current techniques for converting such mathematical expressions generate undesirable formatting which requires extensive user-editing beyond simply re-keying the expressions.

Accordingly, existing techniques for publishing text files require substantial user involvement and have several drawbacks that significantly reduce scalability and throughput of a publishing operation.

Systems and methods that enable additional, alternative, and/or improved publishing of text files containing mathematical expressions remain highly desirable.

SUMMARY

In accordance with an aspect of the present disclosure, a method of publishing text files containing mathematical expressions to a web-ready file is disclosed, comprising: receiving a template document as a text file having a template structure comprising a plurality of identifier fields and content fields, each of the content fields being associated with a respective of the plurality of identifier fields, wherein the content fields are authored with data, and the data in at least one content field comprises a mathematical expression; converting the mathematical expression to a first web language format within the template document; exporting the template document to a second web language format to generate an exported file; and generating the web-ready file from the exported file by assembling contents of the exported file in accordance with the plurality of content fields and associated respective identifier fields defined in the template document.

In a further aspect of the method, the method further comprises determining whether a format of the mathematical expression is compatible for converting to the first web language format, and if the format of the mathematical expression is not compatible, modifying the format of the mathematical expression to a format compatible for converting to the first web language format.

In a further aspect of the method, the method further comprises unencoding the mathematical expression in the first web language format from the second web language format in the exported file.

In a further aspect of the method, the first web language format is MathML.

In a further aspect of the method, the second web language format is HTML.

In a further aspect of the method, the web-ready file is generated in a third web language format, and the contents of the exported file are embedded within the third web language format.

In a further aspect of the method, the third web language format is any of JSON, XML, and SQL inserts.

In a further aspect of the method, generating the web-ready file in the third web language format comprises: generating a plurality of content snippets from the contents of the exported file, the plurality of content snippets corresponding to the content fields of the template document; and embedding, in the third web language format, the plurality of content snippets to generate the web-ready file in accordance with the respective identifier fields.

In a further aspect of the method, generating the web-ready file in the third web language format further comprises: saving the plurality of content snippets in non-volatile storage based on the respective identifier fields associated with the corresponding content fields; or buffering the plurality of content snippets in memory.

In a further aspect of the method, the plurality of identifier fields are defined according to the third web language format.

In a further aspect of the method, the method further comprises: creating a table of contents using a subset of the plurality of identifier fields or content fields; and including the table of contents in the web-ready file.

In a further aspect of the method, the method further comprises: processing the contents of the exported file to check each content field for errors; and if there is an error in the contents of the exported file, outputting a warning.

In a further aspect of the method, the method further comprises: processing the contents of the exported file to check each content field for image references; and adding images corresponding to the image references to the web-ready file.

In a further aspect of the method, the method further comprises one or more of: generating a new web application using the web-ready file; modifying an existing web application using the web-ready file; and creating an offline file from the web-ready file.

In a further aspect of the method, the template document is received through a web portal from a user.

In a further aspect of the method, the template structure is uniquely defined for a desired output of the web-ready file.

In a further aspect of the method, the template structure is one of a plurality of template structures that are pre-defined for standardized outputs of web-ready files.

In accordance with another aspect of the present disclosure, a document publishing system for publishing text files containing mathematical expressions to a web-ready file is disclosed. The document publishing system comprises a publishing server, configured to: receive a template document as a text file having a template structure comprising a plurality of identifier fields and content fields, each of the content fields being associated with a respective of the plurality of identifier fields, wherein the content fields are authored with data, and the data in at least one content field comprises a mathematical expression. The document publishing system also comprises one or more computer processing devices, configured to: convert the mathematical expression to a first web language format within the template document; export the template document to a second web language format to generate an exported file; and generate the web-ready file from the exported file by assembling contents of the exported file in accordance with the plurality of content fields and associated respective identifier fields defined in the template document.

In a further aspect of the system, the publishing server is further configured to: task a target computer of the one or more computer processing devices to perform one or more of: converting the mathematical expression, exporting the template document, and generating the web-ready file; or add one or more of the template document, the exported file, and the web-ready file to a message queue that the one or more computer processing devices are listening to.

In a further aspect of the system, the system further comprises a web front end providing a web portal through which the template document is received.

In a further aspect of the system, the system further comprises a storage repository storing and timestamping one or more of the template document, the exported file, and the web-ready file.

