CN108319724A - A kind of Homepage Publishing method and device with formula file - Google Patents
A kind of Homepage Publishing method and device with formula file Download PDFInfo
- Publication number
- CN108319724A CN108319724A CN201810165785.6A CN201810165785A CN108319724A CN 108319724 A CN108319724 A CN 108319724A CN 201810165785 A CN201810165785 A CN 201810165785A CN 108319724 A CN108319724 A CN 108319724A
- Authority
- CN
- China
- Prior art keywords
- formula
- format
- format formula
- mathtype
- content
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 58
- 239000004816 latex Substances 0.000 claims description 92
- 229920000126 latex Polymers 0.000 claims description 92
- 238000006243 chemical reaction Methods 0.000 claims description 22
- 230000008569 process Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present invention provides a kind of Homepage Publishing method and devices with formula file, wherein this method includes:Obtain the first format formula that original document includes;First format formula is converted into the second format formula;Wherein, the second format formula includes the formula of multiple format;The format formula to match with the performance rate of browser residing for webpage to be released is found out from the first format formula and the second format formula, to generate web page files according to the format formula and original document that find, is issued on webpage to be released.The present invention can determine the format formula that the performance rate supported with webpage to be released matches and carry out file distribution from the multiple format formula converted in advance, more adaptable.
Description
Technical Field
The invention relates to the technical field of formula publishing, in particular to a webpage publishing method and device with a formula file.
Background
The formula is used as an important component of the journal paper, so that the typesetting effect of the journal paper is directly influenced on the typesetting quality of the formula. To date, formulas have been well laid out in PDF documents. However, when a user needs to put a journal paper on a website for publication, the original appearance of the formula cannot be well shown due to weak support of the formula by the HTML document in the webpage, so that there is a great problem in displaying the formula on the webpage.
Therefore, a technical scheme for publishing a document applicable to a webpage is urgently needed.
Disclosure of Invention
In view of this, an object of the present invention is to provide a method and an apparatus for publishing a web page with a formula file, which are capable of determining a format formula matching a performance level supported by a web page to be published from a plurality of format formulas converted in advance and publishing the file, and have higher adaptability.
In a first aspect, the present invention provides a method for publishing a web page with a formula file, including:
acquiring a first format formula included in an original file;
converting the first format formula into a second format formula; wherein the second format formula comprises a plurality of formats of formula;
and searching a format formula matched with the performance level of the browser in which the webpage to be published is located from the first format formula and the second format formula, generating a webpage file according to the searched format formula and the original file, and publishing the webpage file on the webpage to be published.
With reference to the first aspect, the present invention provides a first possible implementation manner of the first aspect, where the original file is an XML file, and the first format formula includes a mathml format formula or a latex format formula; the converting the first format formula into a second format formula includes:
extracting the content of a first formula in the mathml format formula;
calling a mathtype interface, and converting the content of the first formula into the content in the mathtype format;
generating a mathtype format formula based on the content in the mathtype format;
generating a corresponding picture format formula and a latex format formula based on the mathtype format formula;
taking the mathtype format formula, the latex format formula and the picture format formula as a second format formula;
or,
extracting the content of a second formula in the latex format formula;
calling a mathtype interface, and converting the content of the second formula into the content in the mathtype format;
generating a mathtype format formula based on the content in the mathtype format;
generating a corresponding picture format formula and a mathml format formula based on the mathtype format formula;
and taking the mathtype format formula, the mathml format formula and the picture format formula as a second format formula.
With reference to the first aspect, the present invention provides a second possible implementation manner of the first aspect, where the original file is a WORD file, and the first format formula includes a mathtype format formula; the converting the first format formula into a second format formula includes:
extracting the content of a third formula in the mathtype format formula;
calling a mathtype interface, and converting the third formula content into content in a mathml format and content in a latex format;
generating a mathml format formula based on the content of the mathml format, and generating a latex format formula based on the content of the latex format;
generating a corresponding picture format formula based on the mathtype format formula;
and taking the mathml format formula, the latex format formula and the picture format formula as a second format formula.
With reference to the first possible implementation manner of the first aspect, the present invention provides a third possible implementation manner of the first aspect, where after the converting the first format formula into the second format formula, the method further includes:
when it is determined that the user needs to edit the first format formula, providing a first editable interface;
receiving first editing information of the user on the first editable interface; wherein the first editing information comprises mathml editing information or latex editing information;
editing the mathml format formula based on the mathml editing information, or editing the latex format formula based on the latex editing information;
and obtaining an updated first format formula according to the edited mathml format formula or the latex format formula.
With reference to the second possible implementation manner of the first aspect, the present invention provides a fourth possible implementation manner of the first aspect, where after the converting the first format formula into the second format formula, the method further includes:
when it is determined that the user needs to edit the first format formula, providing a second editable interface;
receiving second editing information of the user on the second editable interface; the second editing information comprises matchtype editing information;
editing the mathtype format formula based on the second editing information;
and obtaining an updated first format formula according to the edited mathtype format formula.
With reference to the first aspect, the present invention provides a fifth possible implementation manner of the first aspect, where before the finding out a format formula that matches the performance level of the browser where the web page to be published is located from the first format formula and the second format formula, the method further includes:
detecting the performance index of a browser where a webpage to be released is located;
determining a performance grade corresponding to the detected performance index according to the corresponding relation between each performance index and each performance grade;
the finding out the format formula matched with the performance level of the browser where the webpage to be published is located from the first format formula and the second format formula comprises:
and searching a format formula matched with the determined performance grade from the first format formula and the second format formula according to the corresponding relation between each performance grade and each format formula.
In a second aspect, the present invention further provides a web page publishing apparatus with a formula file, including:
the formula acquisition module is used for acquiring a first format formula included in the original file;
the formula conversion module is used for converting the first format formula into a second format formula; wherein the second format formula comprises a plurality of formats of formula;
and the file publishing module is used for searching out a format formula matched with the performance level of the browser where the webpage to be published is located from the first format formula and the second format formula, so as to generate a webpage file according to the searched format formula and the original file, and publish the webpage file on the webpage to be published.
With reference to the second aspect, the present invention provides a first possible implementation manner of the second aspect, wherein the original file is an XML file, and the first format formula includes a mathml format formula or a latex format formula;
the formula conversion module is specifically used for extracting first formula content in the mathml format formula; calling a mathtype interface, and converting the content of the first formula into the content in the mathtype format; generating a mathtype format formula based on the content in the mathtype format; generating a corresponding picture format formula and a latex format formula based on the mathtype format formula; taking the mathtype format formula, the latex format formula and the picture format formula as a second format formula; or extracting the content of a second formula in the latex format formula; converting the content of the second formula into the content in the format of mathtype by using a mathtype interface; generating a mathtype format formula based on the content in the mathtype format; generating a corresponding picture format formula and a mathml format formula based on the mathtype format formula; and taking the mathtype format formula, the mathml format formula and the picture format formula as a second format formula.
With reference to the second aspect, the present invention provides a second possible implementation manner of the second aspect, wherein the original file is a WORD file, and the first format formula includes a mathtype format formula;
the formula conversion module is specifically used for extracting the content of a third formula in the mathtype format formula; calling a mathtype interface, and converting the third formula content into content in a mathml format and content in a latex format; generating a mathml format formula based on the content of the mathml format, and generating a latex format formula based on the content of the latex format; generating a corresponding picture format formula based on the mathtype format formula; and taking the mathml format formula, the latex format formula and the picture format formula as a second format formula.
With reference to the first possible implementation manner of the second aspect, the present invention provides a third possible implementation manner of the second aspect, where the third possible implementation manner further includes:
the formula updating module is used for providing a first editable interface when determining that a user needs to edit the first format formula; receiving first editing information of the user on the first editable interface; wherein the first editing information comprises mathml editing information or latex editing information; editing the mathml format formula based on the mathml editing information, or editing the latex format formula based on the latex editing information; and obtaining an updated first format formula according to the edited mathml format formula or the latex format formula.
The invention provides a webpage publishing method and a webpage publishing device of a file with a formula.A first format formula included in an original file is firstly obtained; then converting the first format formula into a second format formula; wherein the second format formula comprises a plurality of formats of formula; and finally, searching a format formula matched with the performance level of the browser where the webpage to be published is located from the first format formula and the second format formula, generating a webpage file according to the searched format formula and the original file, and publishing the webpage file on the webpage to be published, namely, the method can determine the format formula matched with the performance level supported by the webpage to be published from a plurality of format formulas which are converted in advance and publish the file, and has stronger adaptability.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 shows a flowchart of a method for publishing a web page with a formula file according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating another method for publishing a web page with a formula file according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating another method for publishing a web page with a formula file according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating another method for publishing a web page with a formula file according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating another method for publishing a web page with a formula file according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating another method for publishing a web page with a formula file according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating another method for publishing a web page with a formula file according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram illustrating a web page publishing device with a formula file according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
In view of the technical scheme that a document publishing technique suitable for a web page is urgently needed in the related art, embodiments of the present invention provide a web page publishing method and apparatus with a formula document, which can determine a format formula matching a performance level supported by a web page to be published from a plurality of format formulas that are converted in advance, and publish the document, so that the adaptability is higher.
Referring to fig. 1, a flowchart of a method for publishing a web page with a formula file according to an embodiment of the present invention is shown, where an execution subject of the method for publishing a web page with a formula file is a computer device or a server, and the method for publishing a web page includes the following steps:
s101, obtaining a first format formula included in the original file.
Here, different original files in the embodiment of the present invention correspond to different first format formulas. The original file may be an XML file or a WORD file. For an XML file, a mathml format formula or a latex format formula included in the XML file can be obtained, and for a WORD file, a mathtype format formula in the WORD file can be obtained. Therefore, the embodiment of the invention can be suitable for different original files and has stronger applicability.
S102, converting the first format formula into a second format formula; wherein the second format formula comprises a plurality of formats of formula.
Here, in order to ensure the document publishing effect of the web page as much as possible, the embodiment of the present invention further converts the first format formula into a second format formula including formulas of multiple formats, so as to meet different display requirements.
Wherein, for the case that the first format is a mathml format formula, the second format formula can be a mathtype format formula, a latex format formula and a picture format formula; for the first format formula being a latex format formula, the second format formula may be a format formula including a mathtype format formula, a mathml format formula and a picture format formula; for the first format formula being a mathtype format formula, the second format formula may be a format formula including a mathml format formula, a latex format formula, and a picture format formula. Therefore, formulas in various formats can be obtained through conversion in the embodiment of the invention so as to meet different display requirements.
S103, searching a format formula matched with the performance level of the browser where the webpage to be published is located from the first format formula and the second format formula, generating a webpage file according to the searched format formula and the original file, and publishing the webpage file on the webpage to be published.
Here, based on the first format formula and the second format formula obtained by converting the first format formula, the embodiment of the present invention uploads the first format formula and the second format formula to the website, and provides a javascript script program to be embedded in the webpage. The javascript script program can achieve the following technical purposes:
and selecting a matched format formula from the first format formula and the second format formula according to the performance level of the browser where the webpage to be published is located, inserting the selected format formula into a preset position of the original file to generate a corresponding webpage file, and publishing the webpage to be published.
The webpage publishing method with the formula file provided by the embodiment of the invention comprises the following steps of firstly, acquiring a first format formula included in an original file; then converting the first format formula into a second format formula; wherein the second format formula comprises a plurality of formats of formula; and finally, searching a format formula matched with the performance level of the browser where the webpage to be published is located from the first format formula and the second format formula, generating a webpage file according to the searched format formula and the original file, and publishing the webpage file on the webpage to be published, namely, the method can determine the format formula matched with the performance level supported by the webpage to be published from a plurality of format formulas which are converted in advance and publish the file, and has stronger adaptability.
The embodiment of the invention corresponds to different original files, and the first format formulas contained in the original files are different. The first format formula in the embodiment of the invention at least comprises any one of a mathml format formula, a latex format formula and a mathtypee format formula. The three first format formulas are further explained below.
In the first case: for the first format formula including the mathml format formula, the embodiment of the present invention realizes the conversion of the second format formulas such as the mathtype format formula, the latex format formula, and the picture format formula based on the call of the mathtype interface, and referring to fig. 2, the conversion process from the first format formula to the second format formula is specifically realized through the following steps:
s201, extracting first formula content in a mathml format formula;
s202, calling a mathtype interface, and converting the content of the first formula into the content in a mathtype format;
s203, generating a mathtype format formula based on the content in the mathtype format;
s204, generating a corresponding picture format formula and a latex format formula based on the mathtype format formula;
s205, taking the mathtypeformat formula, the latex format formula and the picture format formula as second format formulas.
The embodiment of the invention firstly calls a mathtype interface to convert the first formula content extracted from the mathml format formula into the content in the mathtype format, then generates the corresponding mathtype format formula based on the content in the mathtype format, and generates the corresponding picture format formula and the latex format formula based on the mathtype format formula, thereby obtaining a plurality of second format formulas. And generating a simulated screen display result based on the mathtype format formula.
In the second case: for the first format formula including the mathml format formula, the embodiment of the present invention realizes the conversion of the second format formulas such as the mathtype format formula, the mathml format formula, and the picture format formula based on the call of the mathtype interface, and referring to fig. 3, the conversion process from the first format formula to the second format formula is specifically realized through the following steps:
s301, extracting the content of a second formula in a latex format formula;
s302, calling a mathtype interface, and converting the content of the second formula into the content in the mathtype format;
s303, generating a mathtype format formula based on the content in the mathtype format;
s304, generating a corresponding picture format formula and a mathtml format formula based on the mathtype format formula;
s305, taking the mathtype format formula, the mathml format formula and the picture format formula as second format formulas.
The embodiment of the invention firstly calls a mathtype interface to convert the second formula content extracted from the latex format formula into the content in the mathtype format, then generates the corresponding mathtype format formula based on the content in the mathtype format, and generates the corresponding picture format formula and the mathml format formula based on the mathtype format formula, thereby obtaining a plurality of second format formulas. And generating a simulated screen display result based on the mathtype format formula.
In the third case: for the first format formula including the mathtypeformat formula, the embodiment of the present invention realizes the conversion of the second format formulas such as the mathml format formula, the latex format formula, the picture format formula, and the like based on the call of the mathtypeinterface, and referring to fig. 4, the conversion process from the first format formula to the second format formula is specifically realized through the following steps:
s401, extracting the content of a third formula in the mathtype format formula;
s402, calling a mathtype interface, and converting the third formula content into content in a mathml format and content in a latex format;
s403, generating a mathml format formula based on the content of the mathml format, and generating a latex format formula based on the content of the latex format;
s404, generating a corresponding picture format formula based on the mathtype format formula;
s405, taking the mathml format formula, the latex format formula and the picture format formula as second format formulas.
Here, in the embodiment of the present invention, first, a mathtype interface is called to convert the content of the third formula extracted from the mathtype format formula into the content of the mathml format and the content of the latex format, then, a corresponding mathml format formula is generated based on the content of the mathml format and a corresponding latex format formula is generated based on the content of the latex format, and finally, a corresponding picture format formula is generated based on the mathtype format formula, so as to obtain a plurality of second format formulas. And generating a simulated screen display result based on the mathtype format formula.
When the conversion from the first format formula to the second format formula is realized, the embodiment of the invention also extracts the available format formula according to the pre-defined formulas with different formats, and then converts the format formula to generate the formula with the lacking format. For example: the XML file only has a formula in a latex format, and the formula in the mathtypee format is obtained by calling the mathtypee interface for conversion. The following example is provided for the definition of formulas of different formats provided by embodiments of the present invention:
wherein the meaning is:
< disp-format > and </disp-format > later represent the beginning and end of the formula, the intermediate content is the formula;
the content between < formula-label > and </formula-label > represents the label of the formula, namely the number displayed on the right side of the formula;
the content between < tex-math > and </tex-math > represents the latex code of the formula (corresponding to the second formula content in the latex format formula);
mathml code of formula is expressed by content between < mathml > and </mathml > (corresponding to the first formula content in the mathml format formula)
The content between < graphics > and </graphics > represents the picture file name of the formula, its content is in the file under the appointed catalogue of the hard disk;
the content between < mathtype > and </mathtype > represents the name of the mathtype file of the formula (corresponding to the third formula content in the mathtype format formula), and the content is in the file under the appointed directory of the hard disk.
It should be noted that the format of the picture and the mathtype does not directly put formula content but a file name, which means that the corresponding content is not in a text format, and the HTML format is damaged when the corresponding content is directly put in the format, so that the file is illegal.
The embodiment of the invention also provides an editable interface, so that a user can conveniently edit the first format formula, and the second format formula can be updated according to the edited first format formula. The embodiment of the invention can adopt a text editing mode (namely editing a mathml format formula or a latex format formula) and can also adopt a visual editing mode (namely editing a mathtype format formula). The following is a further description in two cases.
In the first case: for the text editing mode, the embodiment of the present invention may edit the mathl editing information or the latex editing information based on the mathl editing information or the latex editing information to obtain the updated first format formula, and then implement the conversion from the updated first format formula to the updated second format formula based on the conversion process from the first format formula to the second format formula. Referring to fig. 5, the editing process is specifically implemented by the following steps:
s501, when it is determined that a user needs to edit the first format formula, providing a first editable interface;
s502, receiving first editing information of a user on a first editable interface; wherein the first editing information comprises mathml editing information or latex editing information;
s503, editing the mathml format formula based on the mathml editing information, or editing the latex format formula based on the latex editing information;
s504, obtaining the updated first format formula according to the edited mathml format formula or the latex format formula.
Here, the embodiment of the present invention receives first editing information input by a user based on the first editable interface, and then edits the mathml format formula or the latex format formula based on the first editing information to obtain an updated first format formula. And based on the updated first format formula, automatically calling the mathtype interface to convert to obtain a mathtype format formula, and further obtaining a mathml and latex format formula and a picture format formula.
In the second case: for a visual editing mode, the embodiment of the invention can obtain the updated first format formula after editing the basic mathtype editing information, and then realize the conversion from the updated first format formula to the updated second format formula based on the conversion process from the first format formula to the second format formula. Referring to fig. 6, the editing process is specifically implemented by the following steps:
s601, when it is determined that a user needs to edit the first format formula, providing a second editable interface;
s602, receiving second editing information of the user on a second editable interface; the second editing information comprises mathtype editing information;
s603, editing the mathtype format formula based on the second editing information;
s604, obtaining an updated first format formula according to the edited mathtype format formula.
Here, the embodiment of the present invention receives second editing information input by a user based on a second editable interface, and then edits the mathtype format formula based on the second editing information to obtain an updated first format formula. And based on the updated first format formula, automatically calling the mathtype interface to convert to obtain a mathtype format formula, and further obtaining a mathml and latex format formula and a picture format formula.
The embodiment of the invention also needs to find and obtain the corresponding format formula based on the determined performance level after determining the performance level of the browser where the webpage to be released is located. Referring to fig. 7, the method for publishing a web page provided by the embodiment of the present invention further includes the following steps:
s701, detecting the performance index of a browser where a webpage to be released is located;
s702, determining the performance grade corresponding to the detected performance index according to the corresponding relation between each performance index and each performance grade.
Here, in the embodiment of the present invention, the determination of the performance level corresponding to the currently detected performance index is implemented through the preset corresponding relationship between each performance index and each performance level. And searching a format formula matched with the determined performance grade from the first format formula and the second format formula according to the corresponding relation between each performance grade and each format formula.
The preset corresponding relation can mean that the browser corresponding to the performance index supports an SVG label or a canvas label, and the performance grade is determined to be a superior grade at the moment; the method can also mean that a browser corresponding to the performance index supports the mathml format or does not support the mathml format but supports the web embedded font in the CSS specification, and the performance level is determined to be a middle level at the moment; for those that do not meet the performance index, a picture format display formula may be used.
In addition, the webpage publishing method provided by the embodiment of the invention can also automatically calculate the page width, arrange the formula to a reasonable position, and additionally display the formula number, so that the practicability is higher.
The webpage publishing method with the formula file provided by the embodiment of the invention comprises the following steps of firstly, acquiring a first format formula included in an original file; then converting the first format formula into a second format formula; wherein the second format formula comprises a plurality of formats of formula; and finally, searching a format formula matched with the performance level of the browser where the webpage to be published is located from the first format formula and the second format formula, generating a webpage file according to the searched format formula and the original file, and publishing the webpage file on the webpage to be published, namely, the method can determine the format formula matched with the performance level supported by the webpage to be published from a plurality of format formulas which are converted in advance and publish the file, and has stronger adaptability.
Based on the same inventive concept, the embodiment of the present invention further provides a web page publishing apparatus with a formula file corresponding to the web page publishing method with a formula file, and since the principle of the apparatus in the embodiment of the present invention for solving the problem is similar to the web page publishing method with a formula file described above in the embodiment of the present invention, the apparatus can be implemented by referring to the method, and repeated details are not repeated. As shown in fig. 8, which is a schematic view of a web page publishing device with a formula file according to an embodiment of the present invention, the web page publishing device with a formula file includes:
the formula obtaining module 11 is configured to obtain a first format formula included in an original file;
a formula conversion module 22, configured to convert the first format formula into a second format formula; wherein the second format formula comprises a plurality of formats of formula;
the file publishing module 33 is configured to find a format formula matching the performance level of the browser where the web page to be published is located from the first format formula and the second format formula, generate a web page file according to the found format formula and the original file, and publish the web page file on the web page to be published.
In one embodiment, the original file is an XML file, and the first format formula includes a mathml format formula or a latex format formula;
the formula conversion module 22 is specifically used for extracting the first formula content in the mathml format formula; calling a mathtype interface, and converting the content of the first formula into the content in the mathtype format; generating a mathtype format formula based on the content in the mathtype format; generating a corresponding picture format formula and a latex format formula based on the mathtype format formula; taking the mathtype format formula, the latex format formula and the picture format formula as second format formulas; or extracting the content of a second formula in the latex format formula; converting the content of the second formula into the content in the format of mathtype by using a mathtype interface; generating a mathtype format formula based on the content in the mathtype format; generating a corresponding picture format formula and a mathml format formula based on the mathtype format formula; and taking the mathtype format formula, the mathml format formula and the picture format formula as second format formulas.
In another embodiment, the original file is a WORD file, and the first format formula includes a mathtype format formula;
the formula conversion module 22 is specifically used for extracting the content of a third formula in the mathtype format formula; calling a mathtype interface, and converting the third formula content into content in a mathml format and content in a latex format; generating a mathml format formula based on the content of the mathml format, and generating a latex format formula based on the content of the latex format; generating a corresponding picture format formula based on the mathtype format formula; and taking the mathml format formula, the latex format formula and the picture format formula as second format formulas.
The web page publishing device with the formula file further comprises a formula updating module 44;
in one embodiment, the formula update module 44 is configured to provide a first editable interface when it is determined that the user needs to edit the first format formula; receiving first editing information of a user on a first editable interface; wherein the first editing information comprises mathml editing information or latex editing information; editing the mathml format formula based on the mathml editing information, or editing the latex format formula based on the latex editing information; and obtaining the updated first format formula according to the edited mathml format formula or the latex format formula.
In another embodiment, the formula updating module 44 is further configured to provide a second editable interface when it is determined that the user needs to edit the first format formula; receiving second editing information of the user on a second editable interface; the second editing information comprises mathtype editing information; editing the mathtype format formula based on the second editing information; and obtaining an updated first format formula according to the edited mathtype format formula.
The web page publishing device with the formula file further comprises a performance grade determining module 55;
the performance level determining module 55 is configured to detect a performance index of a browser where a web page to be published is located; determining a performance grade corresponding to the detected performance index according to the corresponding relation between each performance index and each performance grade;
the file publishing module 33 is specifically configured to find a format formula matching the determined performance level from the first format formula and the second format formula according to the corresponding relationship between each performance level and each format formula.
The computer program product of the method for publishing a webpage of a file according to the embodiment of the present invention includes a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment, and will not be described herein again.
The device for publishing the webpage of the file provided by the embodiment of the invention can be specific hardware on the equipment or software or firmware installed on the equipment, and the like. The device provided by the embodiment of the present invention has the same implementation principle and technical effect as the method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the method embodiments without reference to the device embodiments. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments provided by the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the present invention in its spirit and scope. Are intended to be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. A webpage publishing method with formula files is characterized by comprising the following steps:
acquiring a first format formula included in an original file;
converting the first format formula into a second format formula; wherein the second format formula comprises a plurality of formats of formula;
and searching a format formula matched with the performance level of the browser in which the webpage to be published is located from the first format formula and the second format formula, generating a webpage file according to the searched format formula and the original file, and publishing the webpage file on the webpage to be published.
2. The method of claim 1, wherein the original document is an XML document, and the first format formula comprises a mathml format formula or a latex format formula; the converting the first format formula into a second format formula includes:
extracting the content of a first formula in the mathml format formula;
calling a mathtype interface, and converting the content of the first formula into the content in the mathtype format;
generating a mathtype format formula based on the content in the mathtype format;
generating a corresponding picture format formula and a latex format formula based on the mathtype format formula;
taking the mathtype format formula, the latex format formula and the picture format formula as a second format formula;
or,
extracting the content of a second formula in the latex format formula;
calling a mathtype interface, and converting the content of the second formula into the content in the mathtype format;
generating a mathtype format formula based on the content in the mathtype format;
generating a corresponding picture format formula and a mathml format formula based on the mathtype format formula;
and taking the mathtype format formula, the mathml format formula and the picture format formula as a second format formula.
3. The method of claim 1, wherein the original file is a WORD file, and wherein the first format formula comprises a mathtype format formula; the converting the first format formula into a second format formula includes:
extracting the content of a third formula in the mathtype format formula;
calling a mathtype interface, and converting the third formula content into content in a mathml format and content in a latex format;
generating a mathml format formula based on the content of the mathml format, and generating a latex format formula based on the content of the latex format;
generating a corresponding picture format formula based on the mathtype format formula;
and taking the mathml format formula, the latex format formula and the picture format formula as a second format formula.
4. The method of claim 2, wherein after said converting said first format formula to a second format formula, further comprising:
when it is determined that the user needs to edit the first format formula, providing a first editable interface;
receiving first editing information of the user on the first editable interface; wherein the first editing information comprises mathml editing information or latex editing information;
editing the mathml format formula based on the mathml editing information, or editing the latex format formula based on the latex editing information;
and obtaining an updated first format formula according to the edited mathml format formula or the latex format formula.
5. The method of claim 3, further comprising, after said converting said first format formula to a second format formula:
when it is determined that the user needs to edit the first format formula, providing a second editable interface;
receiving second editing information of the user on the second editable interface; the second editing information comprises matchtype editing information;
editing the mathtype format formula based on the second editing information;
and obtaining an updated first format formula according to the edited mathtype format formula.
6. The method of claim 1, before the finding out the format formula matching the performance level of the browser where the web page to be published is located from the first format formula and the second format formula, further comprising:
detecting the performance index of a browser where a webpage to be released is located;
determining a performance grade corresponding to the detected performance index according to the corresponding relation between each performance index and each performance grade;
the finding out the format formula matched with the performance level of the browser where the webpage to be published is located from the first format formula and the second format formula comprises:
and searching a format formula matched with the determined performance grade from the first format formula and the second format formula according to the corresponding relation between each performance grade and each format formula.
7. A web page publishing device with formula files is characterized by comprising:
the formula acquisition module is used for acquiring a first format formula included in the original file;
the formula conversion module is used for converting the first format formula into a second format formula; wherein the second format formula comprises a plurality of formats of formula;
and the file publishing module is used for searching out a format formula matched with the performance level of the browser where the webpage to be published is located from the first format formula and the second format formula, so as to generate a webpage file according to the searched format formula and the original file, and publish the webpage file on the webpage to be published.
8. The apparatus of claim 7, wherein the original file is an XML file, and the first format formula comprises a mathml format formula or a latex format formula;
the formula conversion module is specifically used for extracting first formula content in the mathml format formula; calling a mathtype interface, and converting the content of the first formula into the content in the mathtype format; generating a mathtype format formula based on the content in the mathtype format; generating a corresponding picture format formula and a latex format formula based on the mathtype format formula; taking the mathtype format formula, the latex format formula and the picture format formula as a second format formula; or extracting the content of a second formula in the latex format formula; converting the content of the second formula into the content in the format of mathtype by using a mathtype interface; generating a mathtype format formula based on the content in the mathtype format; generating a corresponding picture format formula and a mathml format formula based on the mathtype format formula; and taking the mathtype format formula, the mathml format formula and the picture format formula as a second format formula.
9. The apparatus of claim 7, wherein the original file is a WORD file, and wherein the first format formula comprises a mathtype format formula;
the formula conversion module is specifically used for extracting the content of a third formula in the mathtype format formula; calling a mathtype interface, and converting the third formula content into content in a mathml format and content in a latex format; generating a mathml format formula based on the content of the mathml format, and generating a latex format formula based on the content of the latex format; generating a corresponding picture format formula based on the mathtype format formula; and taking the mathml format formula, the latex format formula and the picture format formula as a second format formula.
10. The apparatus of claim 8, further comprising:
the formula updating module is used for providing a first editable interface when determining that a user needs to edit the first format formula; receiving first editing information of the user on the first editable interface; wherein the first editing information comprises mathml editing information or latex editing information; editing the mathml format formula based on the mathml editing information, or editing the latex format formula based on the latex editing information; and obtaining an updated first format formula according to the edited mathml format formula or the latex format formula.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810165785.6A CN108319724B (en) | 2018-02-28 | 2018-02-28 | A kind of Homepage Publishing method and device with formula file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810165785.6A CN108319724B (en) | 2018-02-28 | 2018-02-28 | A kind of Homepage Publishing method and device with formula file |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108319724A true CN108319724A (en) | 2018-07-24 |
CN108319724B CN108319724B (en) | 2019-04-09 |
Family
ID=62901640
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810165785.6A Active CN108319724B (en) | 2018-02-28 | 2018-02-28 | A kind of Homepage Publishing method and device with formula file |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108319724B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109284487A (en) * | 2018-08-28 | 2019-01-29 | 广州视源电子科技股份有限公司 | Method and device for rendering data in canvas, electronic equipment and storage medium |
CN110059628A (en) * | 2019-04-18 | 2019-07-26 | 广东小天才科技有限公司 | Image recognition method, device, equipment and storage medium |
CN110765743A (en) * | 2019-09-25 | 2020-02-07 | 青岛励图高科信息技术有限公司 | System for editing, displaying and exporting mathematical formulas in HTML to Word documents |
CN111079385A (en) * | 2019-12-25 | 2020-04-28 | 小船出海教育科技(北京)有限公司 | Method and device for converting scientific formula format |
CN111126006A (en) * | 2019-12-25 | 2020-05-08 | 小船出海教育科技(北京)有限公司 | Method and device for exporting Word document with MathType formula, electronic equipment and storage medium |
CN111737949A (en) * | 2020-07-22 | 2020-10-02 | 江西风向标教育科技有限公司 | Topic content extraction method and device, readable storage medium and computer equipment |
CN112509402A (en) * | 2019-08-26 | 2021-03-16 | 北京广益三文教育科技有限公司 | Establishment, issue and anti-counterfeiting method of competitive question bank based on three-dimensional teaching materials and teaching system thereof |
CN116108326A (en) * | 2023-04-12 | 2023-05-12 | 山东工程职业技术大学 | Mathematic tool software control method, device, equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101714133A (en) * | 2009-11-18 | 2010-05-26 | 佛山市数苑科技信息有限公司 | WEB-based mathematical formula editing system and method |
KR100963976B1 (en) * | 2007-12-24 | 2010-06-15 | 엔에이치엔(주) | Method, apparatus, system and computer-readable recording medium for arithmetical operation based on image information |
CN102033858A (en) * | 2009-09-30 | 2011-04-27 | 北大方正集团有限公司 | Method and system for typesetting and outputting formula |
CN103176954A (en) * | 2013-03-27 | 2013-06-26 | 重庆市科学技术研究院 | Mathematical formula display method and mathematical formula display system based on hypertext markup language (HTML) 5 canvas |
CN103235945A (en) * | 2013-03-27 | 2013-08-07 | 重庆市科学技术研究院 | Method for recognizing handwritten mathematical formulas and generating MathML (mathematical makeup language) based on Android system |
KR20140132114A (en) * | 2013-05-07 | 2014-11-17 | 숙명여자대학교산학협력단 | System and method for converting equation contents into hangeul sounds |
CN105868177A (en) * | 2016-03-24 | 2016-08-17 | 河北师范大学 | Universal formula search method |
-
2018
- 2018-02-28 CN CN201810165785.6A patent/CN108319724B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100963976B1 (en) * | 2007-12-24 | 2010-06-15 | 엔에이치엔(주) | Method, apparatus, system and computer-readable recording medium for arithmetical operation based on image information |
CN102033858A (en) * | 2009-09-30 | 2011-04-27 | 北大方正集团有限公司 | Method and system for typesetting and outputting formula |
CN101714133A (en) * | 2009-11-18 | 2010-05-26 | 佛山市数苑科技信息有限公司 | WEB-based mathematical formula editing system and method |
CN103176954A (en) * | 2013-03-27 | 2013-06-26 | 重庆市科学技术研究院 | Mathematical formula display method and mathematical formula display system based on hypertext markup language (HTML) 5 canvas |
CN103235945A (en) * | 2013-03-27 | 2013-08-07 | 重庆市科学技术研究院 | Method for recognizing handwritten mathematical formulas and generating MathML (mathematical makeup language) based on Android system |
KR20140132114A (en) * | 2013-05-07 | 2014-11-17 | 숙명여자대학교산학협력단 | System and method for converting equation contents into hangeul sounds |
CN105868177A (en) * | 2016-03-24 | 2016-08-17 | 河北师范大学 | Universal formula search method |
Non-Patent Citations (4)
Title |
---|
MATHTYPE中文官网: "MathType在Word中的使用", 《MATHTYPE中文官网》 * |
互联网: "《在网页或者论文中显示数学公式--MathType+MathJax:LaTex+MSWord2007》", 《HTTP://WWW.IT610.COM/ARTICLE/1381598.HTM》 * |
郭会芳: "基于MathML的数学公式格式转换研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
陈立: "基于MathML的web数学公式的解决方案", 《百度文库》 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109284487A (en) * | 2018-08-28 | 2019-01-29 | 广州视源电子科技股份有限公司 | Method and device for rendering data in canvas, electronic equipment and storage medium |
CN109284487B (en) * | 2018-08-28 | 2023-12-05 | 广州视源电子科技股份有限公司 | Method and device for rendering data in canvas, electronic equipment and storage medium |
CN110059628A (en) * | 2019-04-18 | 2019-07-26 | 广东小天才科技有限公司 | Image recognition method, device, equipment and storage medium |
CN112509402A (en) * | 2019-08-26 | 2021-03-16 | 北京广益三文教育科技有限公司 | Establishment, issue and anti-counterfeiting method of competitive question bank based on three-dimensional teaching materials and teaching system thereof |
CN110765743A (en) * | 2019-09-25 | 2020-02-07 | 青岛励图高科信息技术有限公司 | System for editing, displaying and exporting mathematical formulas in HTML to Word documents |
CN111079385A (en) * | 2019-12-25 | 2020-04-28 | 小船出海教育科技(北京)有限公司 | Method and device for converting scientific formula format |
CN111126006A (en) * | 2019-12-25 | 2020-05-08 | 小船出海教育科技(北京)有限公司 | Method and device for exporting Word document with MathType formula, electronic equipment and storage medium |
CN111126006B (en) * | 2019-12-25 | 2024-08-02 | 小船出海教育科技(北京)有限公司 | Word document method and device for exporting MathType formula, electronic equipment and storage medium |
CN111737949A (en) * | 2020-07-22 | 2020-10-02 | 江西风向标教育科技有限公司 | Topic content extraction method and device, readable storage medium and computer equipment |
CN116108326A (en) * | 2023-04-12 | 2023-05-12 | 山东工程职业技术大学 | Mathematic tool software control method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108319724B (en) | 2019-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108319724B (en) | A kind of Homepage Publishing method and device with formula file | |
US11790029B2 (en) | System and method for converting the digital typesetting documents used in publishing to a device-specific format for electronic publishing | |
JP4926004B2 (en) | Document processing apparatus, document processing method, and document processing program | |
US9697193B2 (en) | Associating captured image data with a spreadsheet | |
US10642925B2 (en) | System and method to facilitate content distribution | |
US10417267B2 (en) | Information processing terminal and method, and information management apparatus and method | |
JP2011523133A (en) | Layout file structure processing method and apparatus | |
US20130174024A1 (en) | Method and device for converting document format | |
CN106503212A (en) | A kind of method to set up of web page element pattern and device | |
CN105138586A (en) | File searching method and apparatus | |
JP2012123093A (en) | Electronic book display device, method and program | |
US11238215B2 (en) | Systems and methods for generating social assets from electronic publications | |
CN112733056B (en) | Document processing method, device, equipment and storage medium | |
US20120102385A1 (en) | Determining heights of table cells | |
CN110941616A (en) | Method, device and equipment for generating associated data in publication and storage medium | |
US9977794B2 (en) | Management apparatus, design management method, and non-transitory computer readable medium | |
US8788926B1 (en) | Method of content filtering to reduce ink consumption on printed web pages | |
US8572474B1 (en) | Printing non-visible, overflowing content by placing an indicator in a text box and printing the content outside the boundaries of the text box | |
CN115879417A (en) | Media editing method, device, computer and readable storage medium | |
CN104615601A (en) | Webpage based recording system and method thereof | |
CN110807298B (en) | Method and system for processing marking information | |
CN111259276A (en) | Method and device for displaying title content, electronic equipment and storage medium | |
JP2005115541A (en) | Structured document display processing device, method, and program | |
CN107168684B (en) | Method and device for generating content editing form | |
JP2015069235A (en) | Information processing device and information processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |