CN108319724B - 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 PDF

Info

Publication number
CN108319724B
CN108319724B CN201810165785.6A CN201810165785A CN108319724B CN 108319724 B CN108319724 B CN 108319724B CN 201810165785 A CN201810165785 A CN 201810165785A CN 108319724 B CN108319724 B CN 108319724B
Authority
CN
China
Prior art keywords
formula
format
mathtype
format formula
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.)
Active
Application number
CN201810165785.6A
Other languages
Chinese (zh)
Other versions
CN108319724A (en
Inventor
王盛华
周祖胜
尹真
冯宇
李艳红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Renhe Huizhi Information Technology Co Ltd
Original Assignee
Beijing Renhe Huizhi Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Renhe Huizhi Information Technology Co Ltd filed Critical Beijing Renhe Huizhi Information Technology Co Ltd
Priority to CN201810165785.6A priority Critical patent/CN108319724B/en
Publication of CN108319724A publication Critical patent/CN108319724A/en
Application granted granted Critical
Publication of CN108319724B publication Critical patent/CN108319724B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation

Abstract

The present invention provides a kind of Homepage Publishing method and devices with formula file, wherein this method comprises: obtaining the first format formula for including in original document;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 locating 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

A kind of Homepage Publishing method and device with formula file
Technical field
The present invention relates to formula distribution technology fields, in particular to a kind of Homepage Publishing method with formula file And device.
Background technique
Important component of the formula as journal article, so that directly affecting periodical opinion for the quality of formula typesetting The typesetting effect of text.For at present, formula can be very good typesetting into PDF document.However, when user needed the phase Periodical paper is put into when issuing on website, since support of the html document in webpage to formula is weaker, cannot show public affairs well Formula original appearance, so as to cause on webpage carry out formula display there is a problem of it is very big.
It can be seen that, it would be highly desirable to a kind of file distribution technical solution suitable for webpage of demand.
Summary of the invention
In view of this, the purpose of the present invention is to provide a kind of Homepage Publishing method and device with formula file, it can From the multiple format formula converted in advance, the format that the determining performance rate supported with webpage to be released matches is public Formula simultaneously carries out file distribution, more adaptable.
In a first aspect, the present invention provides a kind of Homepage Publishing methods with formula file, comprising:
Obtain the first format formula for including in original document;
The first format formula is converted into the second format formula;Wherein, the second format formula includes a variety of lattice The formula of formula;
The performance with browser locating for webpage to be released is found out from the first format formula and the second format formula The format formula that grade matches, to generate web page files according to the format formula and the original document that find, in institute It states and is issued on webpage to be released.
With reference to first aspect, the present invention provides the first possible embodiments of first aspect, wherein described original File is XML file, and the first format formula includes mathml format formula or latex format formula;It is described by described One format formula is converted to the second format formula, comprising:
Extract the first formula content in the mathml format formula;
Mathtype interface is called, is the content of mathtype format by the first formula Content Transformation;
Based on the content of the mathtype format, mathtype format formula is generated;
Based on the mathtype format formula, corresponding picture format formula and latex format formula are generated;
Using the mathtype format formula, the latex format formula and the picture format formula as second Format formula;
Alternatively,
Extract the second formula content in the latex format formula;
Mathtype interface is called, is the content of mathtype format by the second formula Content Transformation;
Based on the content of the mathtype format, mathtype format formula is generated;
Based on the mathtype format formula, corresponding picture format formula and mathml format formula are generated;
Using the mathtype format formula, the mathml format formula and the picture format formula as second Format formula.
With reference to first aspect, the present invention provides second of possible embodiments of first aspect, wherein described original File is word file, and the first format formula includes mathtype format formula;It is described to turn the first format formula It is changed to the second format formula, comprising:
Extract the third formula content in mathtype format formula;
Mathtype interface is called, is the content and latex lattice of mathml format by the third formula Content Transformation The content of formula;
Based on the content of the mathml format, mathml format formula is generated, and based in the latex format Hold, generates latex format formula;
Based on the mathtype format formula, corresponding picture format formula is generated;
Using the mathml format formula, the latex format formula and the picture format formula as the second lattice Formula formula.
The possible embodiment of with reference to first aspect the first, the third the present invention provides first aspect are possible Embodiment, wherein it is described the first format formula is converted to the second format formula after, further includes:
When determining that user needs to edit the first format formula, the first editable interface is provided;
Receive first editor information of the user on first editable interface;Wherein, the first editor letter Breath edits information including mathml or latex edits information;
It edits information based on the mathml to edit the mathml format formula, alternatively, being based on the latex Editor's information edits the latex format formula;
According to the edited mathml format formula or the latex format formula, updated first lattice are obtained Formula formula.
The possible embodiment of second with reference to first aspect, the 4th kind the present invention provides first aspect are possible Embodiment, wherein it is described the first format formula is converted to the second format formula after, further includes:
When determining that user needs to edit the first format formula, the second editable interface is provided;
Receive second editor information of the user on second editable interface;Wherein, the second editor letter Breath includes that mathtype edits information;
The mathtype format formula is edited based on the second editor information;
According to the edited mathtype format formula, updated first format formula is obtained.
With reference to first aspect, the present invention provides the 5th kind of possible embodiments of first aspect, wherein it is described from It finds out in the first format formula and the second format formula and matches with the performance rate of browser locating for webpage to be released Format formula before, further includes:
Detect the performance indicator of browser locating for webpage to be released;
According to the corresponding relationship between each performance indicator and each performance rate, determination refers to the performance detected Mark corresponding performance rate;
It is described to be found out and browser locating for webpage to be released from the first format formula and the second format formula The format formula that performance rate matches, comprising:
According to the corresponding relationship between each performance rate and each format formula, from the first format formula and second The format formula to match with the performance rate determined is found out in format formula.
Second aspect, the present invention also provides a kind of Homepage Publishing devices with formula file, comprising:
Formula obtains module, for obtaining the first format formula for including in original document;
Formula conversion module, for the first format formula to be converted to the second format formula;Wherein, second lattice Formula formula includes the formula of multiple format;
File distribution module, for being found out and webpage to be released from the first format formula and the second format formula The format formula that the performance rate of locating browser matches, with raw according to the format formula and the original document that find At web page files, issued on the webpage to be released.
In conjunction with second aspect, the present invention provides the first possible embodiments of second aspect, wherein described original File is XML file, and the first format formula includes mathml format formula or latex format formula;
The formula conversion module, specifically for extracting the first formula content in the mathml format formula;It calls The first formula Content Transformation is the content of mathtype format by mathtype interface;Based on the mathtype format Content, generate mathtype format formula;Based on the mathtype format formula, generate corresponding picture format formula with And latex format formula;By the mathtype format formula, the latex format formula and the picture format formula As the second format formula;Alternatively, extracting the second formula content in the latex format formula;It, will with mathtype interface The second formula Content Transformation is the content of mathtype format;Based on the content of the mathtype format, generate Mathtype format formula;Based on the mathtype format formula, corresponding picture format formula and mathml lattice are generated Formula formula;Using the mathtype format formula, the mathml format formula and the picture format formula as second Format formula.
In conjunction with second aspect, the present invention provides second of possible embodiments of second aspect, wherein described original File is word file, and the first format formula includes mathtype format formula;
The formula conversion module, specifically for extracting the third formula content in mathtype format formula;It calls Mathtype interface, by the content of content and latex format that the third formula Content Transformation is mathml format;It is based on The content of the mathml format generates mathml format formula, and the content based on the latex format, generates latex Format formula;Based on the mathtype format formula, corresponding picture format formula is generated;The mathml format is public Formula, the latex format formula and the picture format formula are as the second format formula.
In conjunction with the first possible embodiment of second aspect, the third the present invention provides second aspect is possible Embodiment, wherein further include:
Formula update module, for providing first when determining that user needs to edit the first format formula Editable interface;Receive first editor information of the user on first editable interface;Wherein, first editor Information includes that mathml edits information or latex edits information;Information is edited to the mathml format based on the mathml Formula is edited, and is edited alternatively, editing information based on the latex to the latex format formula;After editor The mathml format formula or the latex format formula, obtain updated first format formula.
Homepage Publishing method and device provided by the invention with formula file, first acquisition original document in include First format formula;Then the first format formula is converted into the second format formula;Wherein, the second format formula includes a variety of lattice The formula of formula;The performance with browser locating for webpage to be released is finally found out from the first format formula and the second format formula The format formula that grade matches, to generate web page files according to the format formula and original document that find, to be released It is issued on webpage, that is, it can be determining to be supported with webpage to be released from the multiple format formula converted in advance Format formula that performance rate matches simultaneously carries out file distribution, more adaptable.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 shows a kind of flow chart of the Homepage Publishing method with formula file provided by the embodiment of the present invention;
The flow chart of Homepage Publishing method Fig. 2 shows another kind provided by the embodiment of the present invention with formula file;
Fig. 3 shows the flow chart of Homepage Publishing method of the another kind provided by the embodiment of the present invention with formula file;
Fig. 4 shows the flow chart of Homepage Publishing method of the another kind provided by the embodiment of the present invention with formula file;
Fig. 5 shows the flow chart of Homepage Publishing method of the another kind provided by the embodiment of the present invention with formula file;
Fig. 6 shows the flow chart of Homepage Publishing method of the another kind provided by the embodiment of the present invention with formula file;
Fig. 7 shows the flow chart of Homepage Publishing method of the another kind provided by the embodiment of the present invention with formula file;
Fig. 8 shows a kind of structural representation of the Homepage Publishing device with formula file provided by the embodiment of the present invention Figure.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention Middle attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only It is a part of the embodiment of the present invention, instead of all the embodiments.The present invention being usually described and illustrated herein in the accompanying drawings is real The component for applying example can be arranged and be designed with a variety of different configurations.Therefore, of the invention to what is provided in the accompanying drawings below The detailed description of embodiment is not intended to limit the range of claimed invention, but is merely representative of selected reality of the invention Apply example.Based on the embodiment of the present invention, those skilled in the art institute obtained without making creative work There are other embodiments, shall fall within the protection scope of the present invention.
In view of the relevant technologies need a kind of file distribution technical solution suitable for webpage, in view of this, the present invention is real It applies example and provides a kind of Homepage Publishing method and device with formula file, it can be from the multiple format formula converted in advance In, it determines the format formula that the performance rate supported with webpage to be released matches and carries out file distribution, it is more adaptable.
The flow chart of Homepage Publishing method provided in an embodiment of the present invention with formula file shown in Figure 1, it is above-mentioned The executing subject of Homepage Publishing method with formula file is computer equipment or server, and above-mentioned Homepage Publishing method includes such as Lower step:
S101, the first format formula for including in original document is obtained.
Here, original document different in the embodiment of the present invention the first format formula that correspondence is different.Above-mentioned original text Part can be XML file, can also be word file.For XML file, include in the available XML file Mathml format formula or latex format formula, the mathtype for word file, in the available word file Format formula.As it can be seen that the embodiment of the present invention can be adapted for different original documents, applicability is stronger.
S102, the first format formula is converted into the second format formula;Wherein, the second format formula includes multiple format Formula.
Here, for the possible file distribution effect for guaranteeing webpage big to the greatest extent, the embodiment of the present invention is also by the first format public affairs Formula is converted to the second format formula of the formula comprising multiple format, to meet different display demands.
Wherein, for the first format be mathml format formula the case where, the second format formula can be including Mathtype format formula, latex format formula and picture format formula;It is that latex format is public for the first format formula Formula, the second format formula can be including mathtype format formula, mathml format formula and picture format formula;For First format formula is mathtype format formula, and the second format formula can be including mathml format formula, latex format Formula and picture format formula.As it can be seen that the formula of various formats can be converted in the embodiment of the present invention, to meet difference Display demand.
S103, performance with browser locating for webpage to be released is found out from the first format formula and the second format formula The format formula that grade matches, to generate web page files according to the format formula and original document that find, to be released It is issued on webpage.
Here, the second format formula being converted to based on the first format formula and the first format formula, the present invention First format formula, the second format formula are uploaded to website, and provide javascript shell script by embodiment, are embedded into In webpage.Wherein, following technical purpose may be implemented in above-mentioned javascript shell script:
According to the performance rate of browser locating for webpage to be released from above-mentioned first format formula and the second format formula Matched format formula is selected, the format formula after selection is inserted into the predeterminated position of original document, to generate corresponding net Page file, and issued on webpage to be released.
Homepage Publishing method provided in an embodiment of the present invention with formula file, first acquisition original document in include First format formula;Then the first format formula is converted into the second format formula;Wherein, the second format formula includes a variety of lattice The formula of formula;The performance with browser locating for webpage to be released is finally found out from the first format formula and the second format formula The format formula that grade matches, to generate web page files according to the format formula and original document that find, to be released It is issued on webpage, that is, it can be determining to be supported with webpage to be released from the multiple format formula converted in advance Format formula that performance rate matches simultaneously carries out file distribution, more adaptable.
In the embodiment of the present invention correspond to different original documents comprising the first format formula it is also different.The present invention The first format formula in embodiment includes at least mathml format formula, latex format formula and mathtype format formula In any one.Next three kinds of the first format formula is further illustrated.
The first situation: for the first format formula includes mathml format formula, the embodiment of the present invention is based on The calling of mathtype interface realizes second lattice such as mathtype format formula, latex format formula and picture format formula The conversion of formula formula, referring to fig. 2, the conversion process of above-mentioned first format formula to the second format formula is especially by following steps It realizes:
The first formula content in S201, extraction mathml format formula;
S202, mathtype interface is called, is the content of mathtype format by the first formula Content Transformation;
S203, the content based on mathtype format generate mathtype format formula;
S204, it is based on mathtype format formula, generates corresponding picture format formula and latex format formula;
S205, using mathtype format formula, latex format formula and picture format formula as the second format public affairs Formula.
Here, the embodiment of the present invention passes through first calls mathtype interface, the will extracted in mathml format formula One formula Content Transformation is the content of mathtype format, and the content generation for being then based on above-mentioned mathtype format is corresponding Mathtype format formula is based on above-mentioned mathtype format formula, generates corresponding picture format formula and latex format Formula, to obtain multiple second format formula.Wherein, the generation of above-mentioned picture format formula is based on above-mentioned mathtype format The simulation screen of formula shows result.
Second situation: for the first format formula includes latex format formula, the embodiment of the present invention is based on The calling of mathtype interface realizes second lattice such as mathtype format formula, mathml format formula and picture format formula The conversion of formula formula, referring to Fig. 3, the conversion process of above-mentioned first format formula to the second format formula is especially by following steps It realizes:
The second formula content in S301, extraction latex format formula;
S302, mathtype interface is called, is the content of mathtype format by the second formula Content Transformation;
S303, the content based on mathtype format generate mathtype format formula;
S304, it is based on mathtype format formula, generates corresponding picture format formula and mathml format formula;
S305, using mathtype format formula, mathml format formula and picture format formula as the second format public affairs Formula.
Here, the embodiment of the present invention passes through first calls mathtype interface, second will extracted in latex format formula Formula Content Transformation is the content of mathtype format, and the content generation for being then based on above-mentioned mathtype format is corresponding Mathtype format formula is based on above-mentioned mathtype format formula, generates corresponding picture format formula and mathml lattice Formula formula, to obtain multiple second format formula.Wherein, the generation of above-mentioned picture format formula is based on above-mentioned mathtype lattice The simulation screen of formula formula shows result.
The third situation: for the first format formula includes mathtype format formula, the embodiment of the present invention is based on The calling of mathtype interface realizes second formats such as mathml format formula, latex format formula and picture format formula The conversion of formula, referring to fig. 4, the conversion process of above-mentioned first format formula to the second format formula is especially by following steps reality It is existing:
Third formula content in S401, extraction mathtype format formula;
S402, mathtype interface is called, is the content and latex lattice of mathml format by third formula Content Transformation The content of formula;
S403, the content based on mathml format generate mathml format formula, and the content based on latex format, Generate latex format formula;
S404, it is based on mathtype format formula, generates corresponding picture format formula;
S405, using mathml format formula, latex format formula and picture format formula as the second format formula.
Here, the embodiment of the present invention passes through first calls mathtype interface, by what is extracted in mathtype format formula Third formula Content Transformation is the content of mathml format and the content of latex format, is then based on above-mentioned mathml format Content generate corresponding mathml format formula and to generate corresponding latex format based on the content of above-mentioned latex format public Formula finally generates corresponding picture format formula based on mathtype format formula, to obtain multiple second format formula.Its In, the generation of above-mentioned picture format formula shows result based on the simulation screen of above-mentioned mathtype format formula.
When stating conversion of the first format formula to the second format formula in realization, the embodiment of the present invention is also according to fixed in advance The formula of the different-format of justice, first extracts getable format formula, and then conversion generates the formula of the format lacked.Such as: There was only latex format formula in XML file, mathtype interface conversion is called to obtain the formula of mathtype format.Next Following example is carried out to the definition of the formula of different-format provided in an embodiment of the present invention:
Wherein meaning are as follows:
<disp-formula>with it is subsequent</disp-formula>the beginning and end of representation formula, medium content is just It is formula;
<formula-label>with</formula-label>between content representation formula label, be just shown in Number on the right of formula;
<tex-math>with</tex-math>between the latex code of content representation formula (corresponding latex format is public The second formula content in formula);
<mathml>with</mathml>between content representation formula mathml code (corresponding mathml format formula In the first formula content)
<graphics>with</graphics>between content representation formula picture file name, content is in hard disk Arrange in this document under catalogue;
<mathtype>with</mathtype>between content representation formula mathtype filename it is (corresponding Third formula content in mathtype format formula), content is in this document under the agreement catalogue of hard disk.
It is worth noting that picture and mathtype format do not put formula content directly but put a filename, this It is because corresponding contents are not text formattings, html format can be destroyed here by being placed directly in, and cause file illegal.
The embodiment of the invention also provides editable interfaces, in order to which user edits the first format formula, and can To update the second format formula according to edited first format formula.The embodiment of the present invention can using text editing (namely Edit mathml format formula or latex format formula) mode, it can also be using visual edit (namely editor mathtype Format formula) mode.Next it is further illustrated in two kinds of situation.
The first situation: for text editing mode, the embodiment of the present invention can based on mathml edit information or Latex edits that information edits information to mathml or latex is edited after information edits, and it is public to obtain updated first format Then formula realizes updated first format based on above-mentioned first format formula to the conversion process between the second format formula again Formula to updated second format formula conversion.Referring to Fig. 5, above-mentioned editing process is realized especially by following steps:
S501, when determining that user needs to edit the first format formula, the first editable interface is provided;
S502, first editor information of the user on the first editable interface is received;Wherein, first editor's information includes Mathml edits information or latex edits information;
S503, information is edited based on mathml mathml format formula is edited, alternatively, editing letter based on latex Breath edits latex format formula;
S504, according to edited mathml format formula or latex format formula, it is public to obtain updated first format Formula.
Here, the embodiment of the present invention receives first editor's information of user's input based on the first editable interface, then base Mathml format formula or latex format formula are edited in above-mentioned first editor information, to obtain updated first Format formula.It is automatic that mathtype interface conversion is called to obtain mathtype format public affairs based on updated first format formula Formula, and then obtain mathml and latex format formula, picture format formula.
Second situation: for visual edit mode, the embodiment of the present invention can edit information with base mathtype After being edited, updated first format formula is obtained, then again based on above-mentioned first format formula to the second format formula Between conversion process realize the conversion of updated first format formula to updated second format formula.Referring to Fig. 6, on Editing process is stated to realize especially by following steps:
S601, when determining that user needs to edit the first format formula, the second editable interface is provided;
S602, second editor information of the user on the second editable interface is received;Wherein, second editor's information includes Mathtype edits information;
S603, mathtype format formula is edited based on second editor's information;
S604, according to edited mathtype format formula, obtain updated first format formula.
Here, the embodiment of the present invention receives second editor's information of user's input based on the second editable interface, then base Mathtype format formula is edited in above-mentioned second editor information, to obtain updated first format formula.It is based on Updated first format formula, it is automatic that mathtype interface conversion is called to obtain mathtype format formula, and then obtain Mathml and latex format formula, picture format formula.
The embodiment of the present invention also needs after the performance rate for determining browser locating for webpage to be released, based on determining property Energy grade searches to obtain corresponding format formula.Referring to Fig. 7, Homepage Publishing method provided in an embodiment of the present invention further includes as follows Step:
The performance indicator of browser locating for S701, detection webpage to be released;
S702, according to the corresponding relationship between each performance indicator and each performance rate, determine and the performance that detects The corresponding performance rate of index.
Here, the embodiment of the present invention is by the corresponding relationship between preset each performance indicator and each performance rate, Realize the determination to the currently detected corresponding performance rate of performance indicator.According to each performance rate and each format Corresponding relationship between formula finds out from the first format formula and the second format formula and matches with the performance rate determined Format formula.
Wherein, above-mentioned preset corresponding relationship can refer to that the corresponding browser of performance indicator supports SVG label or canvas Label determines that performance rate is top grade at this time, and the embodiment of the present invention can be used latex format and show formula, and such effect is most It is good;It can also refer to the corresponding browser of performance indicator to support mathml format or do not support mathml format but support Web embedded font in CSS specification determines that performance rate is middle rank at this time, and mathml format can be used in the embodiment of the present invention Show formula, such formula effect is preferable;It, can be public using picture format display for not meeting above-mentioned performance indicator Formula.
In addition, Homepage Publishing method provided in an embodiment of the present invention can also calculate page width automatically, formula is laid out To rational position, and display numbering of equation is supplemented, practicability is stronger.
Homepage Publishing method provided in an embodiment of the present invention with formula file, first acquisition original document in include First format formula;Then the first format formula is converted into the second format formula;Wherein, the second format formula includes a variety of lattice The formula of formula;The performance with browser locating for webpage to be released is finally found out from the first format formula and the second format formula The format formula that grade matches, to generate web page files according to the format formula and original document that find, to be released It is issued on webpage, that is, it can be determining to be supported with webpage to be released from the multiple format formula converted in advance Format formula that performance rate matches simultaneously carries out file distribution, more adaptable.
Based on the same inventive concept, it is additionally provided in the embodiment of the present invention corresponding with the Homepage Publishing method with formula file The Homepage Publishing device with formula file, the principle solved the problems, such as due to the device in the embodiment of the present invention and the present invention are implemented The above-mentioned Homepage Publishing method with formula file of example is similar, therefore the implementation of device may refer to the implementation of method, repeats place It repeats no more.As shown in figure 8, for the Homepage Publishing schematic device with formula file provided by the embodiment of the present invention, the band The Homepage Publishing device of formula file includes:
Formula obtains module 11, for obtaining the first format formula for including in original document;
Formula conversion module 22, for the first format formula to be converted to the second format formula;Wherein, the second format formula Formula comprising multiple format;
File distribution module 33, for being found out from the first format formula and the second format formula and webpage institute to be released The format formula that the performance rate of place's browser matches, to generate webpage according to the format formula and original document that find File is issued on webpage to be released.
In one embodiment, original document is XML file, the first format formula include mathml format formula or Latex format formula;
Formula conversion module 22, specifically for extracting the first formula content in mathml format formula;It calls First formula Content Transformation is the content of mathtype format by mathtype interface;It is raw based on the content of mathtype format At mathtype format formula;Based on mathtype format formula, generates corresponding picture format formula and latex format is public Formula;Using mathtype format formula, latex format formula and picture format formula as the second format formula;Alternatively, extracting The second formula content in latex format formula;It is mathtype format by the second formula Content Transformation with mathtype interface Content;Based on the content of mathtype format, mathtype format formula is generated;Based on mathtype format formula, generate Corresponding picture format formula and mathml format formula;By mathtype format formula, mathml format formula and figure Piece format formula is as the second format formula.
In another embodiment, original document is word file, and the first format formula includes that mathtype format is public Formula;
Formula conversion module 22, specifically for extracting the third formula content in mathtype format formula;It calls Mathtype interface, by the content of content and latex format that third formula Content Transformation is mathml format;It is based on The content of mathml format generates mathml format formula, and the content based on latex format, and it is public to generate latex format Formula;Based on mathtype format formula, corresponding picture format formula is generated;By mathml format formula, latex format formula And picture format formula is as the second format formula.
The above-mentioned Homepage Publishing device with formula file further includes formula update module 44;
In one embodiment, above-mentioned formula update module 44, for determining that user needs to the first format formula When being edited, the first editable interface is provided;Receive first editor information of the user on the first editable interface;Wherein, First editor's information includes that mathml edits information or latex edits information;Information is edited to mathml format based on mathml Formula is edited, and is edited alternatively, editing information based on latex to latex format formula;According to edited mathml Format formula or latex format formula, obtain updated first format formula.
In another embodiment, above-mentioned formula update module 44 is also used to determining that user needs to the first format When formula is edited, the second editable interface is provided;Receive second editor information of the user on the second editable interface;Its In, second editor's information includes that mathtype edits information;Mathtype format formula is compiled based on second editor's information Volume;According to edited mathtype format formula, updated first format formula is obtained.
The above-mentioned Homepage Publishing device with formula file further includes performance rate determining module 55;
Above-mentioned performance rate determining module 55, for detecting the performance indicator of browser locating for webpage to be released;According to each Corresponding relationship between a performance indicator and each performance rate determines performance corresponding with the performance indicator detected etc. Grade;
Above-mentioned file distribution module 33, specifically for according to the corresponding pass between each performance rate and each format formula System finds out the format formula to match with the performance rate determined from the first format formula and the second format formula.
The computer program product of the method for the Homepage Publishing of file, including storage are carried out provided by the embodiment of the present invention The computer readable storage medium of program code, the instruction that said program code includes can be used for executing previous methods embodiment Described in method, specific implementation can be found in embodiment of the method, details are not described herein.
The device of the Homepage Publishing of file provided by the embodiment of the present invention can be the specific hardware or peace in equipment Loaded on the software or firmware etc. in equipment.The technical effect of device provided by the embodiment of the present invention, realization principle and generation Identical with preceding method embodiment, to briefly describe, Installation practice part does not refer to place, can refer to preceding method embodiment Middle corresponding contents.It is apparent to those skilled in the art that for convenience and simplicity of description, foregoing description is The specific work process of system, device and unit, the corresponding process during reference can be made to the above method embodiment, it is no longer superfluous herein It states.
In embodiment provided by the present invention, it should be understood that disclosed device and method, it can be by others side Formula is realized.The apparatus embodiments described above are merely exemplary, for example, the division of the unit, only one kind are patrolled Function division is collected, there may be another division manner in actual implementation, in another example, multiple units or components can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some communication interfaces, device or unit It connects, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in embodiment provided by the invention can integrate in one processing unit, it can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing, in addition, term " the One ", " second ", " third " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
Finally, it should be noted that embodiment described above, only a specific embodiment of the invention, to illustrate the present invention Technical solution, rather than its limitations, scope of protection of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair It is bright to be described in detail, those skilled in the art should understand that: anyone skilled in the art In the technical scope disclosed by the present invention, it can still modify to technical solution documented by previous embodiment or can be light It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make The essence of corresponding technical solution is detached from the spirit and scope of technical solution of the embodiment of the present invention.Should all it cover in protection of the invention Within the scope of.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. a kind of Homepage Publishing method with formula file characterized by comprising
Obtain the first format formula for including in original document;
The first format formula is converted into the second format formula;Wherein, the second format formula includes multiple format Formula;
Detect the performance indicator of browser locating for webpage to be released;
According to the corresponding relationship between each performance indicator and each performance rate, determination and the performance indicator phase detected Corresponding performance rate;
According to the corresponding relationship between each performance rate and each format formula,
The performance rate with browser locating for webpage to be released is found out from the first format formula and the second format formula The format formula to match, to generate web page files according to the format formula that finds and the original document, it is described to It is issued on publishing web page.
2. first format is public the method according to claim 1, wherein the original document is XML file Formula includes mathml format formula or latex format formula;It is described that the first format formula is converted into the second format formula, Include:
Extract the first formula content in the mathml format formula;
Mathtype interface is called, is the content of mathtype format by the first formula Content Transformation;
Based on the content of the mathtype format, mathtype format formula is generated;
Based on the mathtype format formula, corresponding picture format formula and latex format formula are generated;
Using the mathtype format formula, the latex format formula and the picture format formula as the second format Formula;
Alternatively,
Extract the second formula content in the latex format formula;
Mathtype interface is called, is the content of mathtype format by the second formula Content Transformation;
Based on the content of the mathtype format, mathtype format formula is generated;
Based on the mathtype format formula, corresponding picture format formula and mathml format formula are generated;
Using the mathtype format formula, the mathml format formula and the picture format formula as the second format Formula.
3. the method according to claim 1, wherein the original document is word file, first format Formula includes mathtype format formula;It is described that the first format formula is converted into the second format formula, comprising:
Extract the third formula content in mathtype format formula;
Mathtype interface is called, is the content and latex format of mathml format by the third formula Content Transformation Content;
Based on the content of the mathml format, mathml format formula, and the content based on the latex format are generated, Generate latex format formula;
Based on the mathtype format formula, corresponding picture format formula is generated;
Using the mathml format formula, the latex format formula and the picture format formula as the second format public affairs Formula.
4. according to the method described in claim 2, it is characterized in that, the first format formula is converted to the second lattice described After formula formula, further includes:
When determining that user needs to edit the first format formula, the first editable interface is provided;
Receive first editor information of the user on first editable interface;Wherein, the first editor packet Include that mathml edits information or latex edits information;
It edits information based on the mathml to edit the mathml format formula, alternatively, editing based on the latex Information edits the latex format formula;
According to the edited mathml format formula or the latex format formula, it is public to obtain updated first format Formula.
5. according to the method described in claim 3, it is characterized in that, the first format formula is converted to the second lattice described After formula formula, further includes:
When determining that user needs to edit the first format formula, the second editable interface is provided;
Receive second editor information of the user on second editable interface;Wherein, the second editor packet It includes mathtype and edits information;
The mathtype format formula is edited based on the second editor information;
According to the edited mathtype format formula, updated first format formula is obtained.
6. a kind of Homepage Publishing device with formula file characterized by comprising
Formula obtains module, for obtaining the first format formula for including in original document;
Formula conversion module, for the first format formula to be converted to the second format formula;Wherein, second format is public Formula includes the formula of multiple format;
File distribution module, for detecting the performance indicator of browser locating for webpage to be released;According to each performance indicator and respectively Corresponding relationship between a performance rate determines performance rate corresponding with the performance indicator detected;According to each Corresponding relationship between performance rate and each format formula is found out from the first format formula and the second format formula The format formula to match with the performance rate of browser locating for webpage to be released, according to the format formula and institute found It states original document and generates web page files, issued on the webpage to be released.
7. device according to claim 6, which is characterized in that the original document is XML file, and first format is public Formula includes mathml format formula or latex format formula;
The formula conversion module, specifically for extracting the first formula content in the mathml format formula;It calls The first formula Content Transformation is the content of mathtype format by mathtype interface;Based on the mathtype format Content, generate mathtype format formula;Based on the mathtype format formula, generate corresponding picture format formula with And latex format formula;By the mathtype format formula, the latex format formula and the picture format formula As the second format formula;Alternatively, extracting the second formula content in the latex format formula;It, will with mathtype interface The second formula Content Transformation is the content of mathtype format;Based on the content of the mathtype format, generate Mathtype format formula;Based on the mathtype format formula, corresponding picture format formula and mathml lattice are generated Formula formula;Using the mathtype format formula, the mathml format formula and the picture format formula as second Format formula.
8. device according to claim 6, which is characterized in that the original document is word file, first format Formula includes mathtype format formula;
The formula conversion module, specifically for extracting the third formula content in mathtype format formula;It calls Mathtype interface, by the content of content and latex format that the third formula Content Transformation is mathml format;It is based on The content of the mathml format generates mathml format formula, and the content based on the latex format, generates latex Format formula;Based on the mathtype format formula, corresponding picture format formula is generated;The mathml format is public Formula, the latex format formula and the picture format formula are as the second format formula.
9. device according to claim 7, which is characterized in that further include:
Formula update module, for when determining that user needs to edit the first format formula, providing first can be compiled Editing interface;Receive first editor information of the user on first editable interface;Wherein, the first editor information Information is edited including mathml or latex edits information;Information is edited to the mathml format formula based on the mathml It is edited, the latex format formula is edited alternatively, editing information based on the latex;According to edited institute Mathml format formula or the latex format formula are stated, updated first format formula is obtained.
CN201810165785.6A 2018-02-28 2018-02-28 A kind of Homepage Publishing method and device with formula file Active CN108319724B (en)

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 CN108319724A (en) 2018-07-24
CN108319724B true 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)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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-recognizing 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
CN111126006A (en) * 2019-12-25 2020-05-08 小船出海教育科技(北京)有限公司 Method and device for exporting Word document with MathType formula, electronic equipment and storage medium
CN111079385A (en) * 2019-12-25 2020-04-28 小船出海教育科技(北京)有限公司 Method and device for converting scientific formula format
CN111737949B (en) * 2020-07-22 2021-07-06 江西风向标教育科技有限公司 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

Citations (3)

* Cited by examiner, † Cited by third party
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
CN103235945A (en) * 2013-03-27 2013-08-07 重庆市科学技术研究院 Method for recognizing handwritten mathematical formulas and generating MathML (mathematical makeup language) based on Android system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
KR101469715B1 (en) * 2013-05-07 2014-12-05 숙명여자대학교산학협력단 System and method for converting equation contents into hangeul sounds
CN105868177A (en) * 2016-03-24 2016-08-17 河北师范大学 Universal formula search method

Patent Citations (3)

* Cited by examiner, † Cited by third party
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
CN103235945A (en) * 2013-03-27 2013-08-07 重庆市科学技术研究院 Method for recognizing handwritten mathematical formulas and generating MathML (mathematical makeup language) based on Android system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《在网页或者论文中显示数学公式--MathType+MathJax:LaTex+MSWord2007》;互联网;《http://www.it610.com/article/1381598.htm》;20151030;全文
基于MathML的web数学公式的解决方案;陈立;《百度文库》;20110603;全文

Also Published As

Publication number Publication date
CN108319724A (en) 2018-07-24

Similar Documents

Publication Publication Date Title
CN108319724B (en) A kind of Homepage Publishing method and device with formula file
US9875229B2 (en) Template-based page layout for web content
CN103488423A (en) Method and device for implementing bookmark function in electronic reader
CN102650999B (en) A kind of method and system of extracting object attribute value information from webpage
US10417267B2 (en) Information processing terminal and method, and information management apparatus and method
CN103309806B (en) The device and method of a kind of quick development and testing
CN102819561A (en) Picture display method and device based on webpage
WO2012012916A1 (en) Selection of main content in web pages
CN104063148A (en) Method and system for dynamically fitting interface of Web application program on mobile terminal
CN108228777A (en) Html text exports to the method and device of word document
CN103970750A (en) Method and device for generating HTML (Hypertext Markup Language) web pages
CN103136259B (en) A kind of method and apparatus based on content block identification processing web page contents
EP2599013A1 (en) Visual separator detection in web pages by using code analysis
KR101147256B1 (en) Producing apparatus and method for a standized electronic book
CN103942211A (en) Text page recognition method and device
CN102902794B (en) Web page classification system and method
CN103853770B (en) The method and system of model content in a kind of extraction forum Web pages
CN102682109A (en) Patent information analysis method and device
CN106095674B (en) A kind of website automation test method and device
CN110309457A (en) Web data processing method, device, computer equipment and storage medium
CN105183843B (en) list page identification system and method
CN108804472A (en) A kind of webpage content extraction method, device and server
CN110413765A (en) A kind of interactive system and its method of mass data set analysis and displaying
CN106951405B (en) Data processing method and device based on typesetting engine
CN102262731A (en) Character recognizing method based on sparse coding

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