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 PDF

Info

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
formats
mathtype
mathml
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
Application number
CN201810165785.6A
Other languages
Chinese (zh)
Other versions
CN108319724B (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

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

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 technology
Important component of the formula as journal article so that periodical opinion is directly affected for the quality of formula typesetting The typesetting effect of text.For at present, formula can be very good in typesetting to PDF document.However, when user needed the phase Periodical paper is put into when being issued on website, since the html document in webpage is weaker to the support of formula, cannot show public affairs well Formula original appearance shows that there are prodigious problems so as to cause formula is carried out on webpage.
It can be seen that, it would be highly desirable to a kind of file distribution technical solution suitable for webpage of demand.
Invention content
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, determine that the format that the 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, including:
Obtain the first format formula that original document includes;
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 residing 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 formats formula or latex format formula;It is described by described One format formula is converted to the second format formula, including:
Extract the first formula content in the mathml formats formula;
Mathtype interfaces are called, by the content that the first formula Content Transformation is mathtype formats;
Based on the content of the mathtype formats, mathtype format formula are generated;
Based on the mathtype formats formula, corresponding picture format formula and latex format formula are generated;
Using the mathtype formats formula, the latex formats formula and the picture format formula as second Format formula;
Alternatively,
Extract the second formula content in the latex formats formula;
Mathtype interfaces are called, by the content that the second formula Content Transformation is mathtype formats;
Based on the content of the mathtype formats, mathtype format formula are generated;
Based on the mathtype formats formula, corresponding picture format formula and mathml format formula are generated;
Using the mathtype formats formula, the mathml formats 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, including:
Extract the third formula content in mathtype format formula;
Mathtype interfaces are called, by the content and latex lattice that the third formula Content Transformation is mathml formats The content of formula;
Based on the content of the mathml formats, mathml format formula are generated, and based in the latex formats Hold, generates latex format formula;
Based on the mathtype formats formula, corresponding picture format formula is generated;
Using the mathml formats formula, the latex formats 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 into the second format formula after, further include:
When determining that user needs to the first format formula into edlin, the first editable interface is provided;
Receive first editor information of the user on first editable interface;Wherein, the first editor letter Breath includes that mathml edits information or latex edits information;
Information is edited to the mathml formats formula into edlin based on the mathml, alternatively, being based on the latex Information is edited to the latex formats formula into edlin;
According to the edited mathml formats formula or the latex formats formula, updated first lattice are obtained Formula formula.
Second of possible embodiment 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 into the second format formula after, further include:
When determining that user needs to the first format formula into edlin, 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;
Based on second editor's information to the mathtype formats formula into edlin;
According to the edited mathtype formats 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 residing for webpage to be released Format formula before, further include:
Detect the performance indicator of browser residing for webpage to be released;
According to the correspondence 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 from the first format formula and the second format formula and browser residing for webpage to be released The format formula that performance rate matches, including:
According to the correspondence 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, including:
Formula acquisition module, the first format formula for including for obtaining 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 residing browser matches, to be given birth to 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 formats formula or latex format formula;
The formula conversion module is specifically used for extracting the first formula content in the mathml formats formula;It calls Mathtype interfaces, by the content that the first formula Content Transformation is mathtype formats;Based on the mathtype formats Content, generate mathtype format formula;Based on the mathtype formats formula, generate corresponding picture format formula with And latex format formula;By the mathtype formats formula, the latex formats formula and the picture format formula As the second format formula;Alternatively, extracting the second formula content in the latex formats formula;It, will with mathtype interfaces The second formula Content Transformation is the content of mathtype formats;Based on the content of the mathtype formats, generate Mathtype format formula;Based on the mathtype formats formula, corresponding picture format formula and mathml lattice are generated Formula formula;Using the mathtype formats formula, the mathml formats 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, the third formula content being specifically used in extraction mathtype format formula;It calls Mathtype interfaces, by the content of content and latex formats that the third formula Content Transformation is mathml formats;It is based on The content of the mathml formats generates mathml format formula, and the content based on the latex formats, generates latex Format formula;Based on the mathtype formats formula, corresponding picture format formula is generated;By mathml formats public affairs Formula, the latex formats 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 when determining that user needs to the first format formula into edlin, providing first 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 formats based on the mathml Formula is into edlin, alternatively, editing information to the latex formats formula into edlin based on the latex;After editor The mathml formats formula or the latex formats formula, obtain updated first format formula.
Homepage Publishing method and device provided by the invention with formula file, obtaining original document first includes 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 residing 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 determined and 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 cited below particularly, and coordinate Appended attached drawing, is described in detail below.
Description of the drawings
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 for Homepage Publishing method with formula file that the embodiment of the present invention is provided;
Fig. 2 shows the flow charts for another Homepage Publishing method with formula file that the embodiment of the present invention is provided;
Fig. 3 shows the flow chart for another Homepage Publishing method with formula file that the embodiment of the present invention is provided;
Fig. 4 shows the flow chart for another Homepage Publishing method with formula file that the embodiment of the present invention is provided;
Fig. 5 shows the flow chart for another Homepage Publishing method with formula file that the embodiment of the present invention is provided;
Fig. 6 shows the flow chart for another Homepage Publishing method with formula file that the embodiment of the present invention is provided;
Fig. 7 shows the flow chart for another Homepage Publishing method with formula file that the embodiment of the present invention is provided;
Fig. 8 shows a kind of structural representation for Homepage Publishing device with formula file that the embodiment of the present invention is provided Figure.
Specific implementation mode
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 Applying the component of example can be arranged and designed with a variety of different configurations.Therefore, below to provide in the accompanying drawings the present invention The detailed description of embodiment is not intended to limit the range of claimed invention, but is merely representative of the selected reality of the present invention Apply example.Based on the embodiment of the present invention, the institute that those skilled in the art are obtained without making creative work There is other embodiment, shall fall within the protection scope of the present invention.
In view of there is an urgent need for a kind of file distribution technical solutions suitable for webpage for the relevant technologies, 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 executive agent 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 that original document includes is obtained.
Here, original document different in the embodiment of the present invention is by the first different format formula of correspondence.Above-mentioned original text Part can be XML file, can also be word file.For XML file, can obtain the XML file includes Mathml formats formula or latex format formula can obtain the mathtype in the word file for 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 ensureing 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 include Mathtype formats formula, latex formats formula and picture format formula;It is that latex formats are public for the first format formula Formula, the second format formula can be include mathtype formats formula, mathml formats formula and picture format formula;For First format formula be mathtype format formula, the second format formula can be include mathml formats formula, latex formats 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 residing 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 that the first format formula and the first format formula are converted to, the present invention are based on First format formula, the second format formula are uploaded to website, and provide javascript shell scripts by embodiment, are embedded into In webpage.Wherein, following technical purpose may be implemented in above-mentioned javascript shell scripts:
According to the performance rate of browser residing 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, obtaining original document first includes 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 residing 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 determined and 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 formats formula, latex formats 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 interfaces realizes second lattice such as mathtype formats formula, latex formats formula and picture format formula The conversion of formula formula, referring to Fig. 2, the transfer 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 interfaces are called, by the content that the first formula Content Transformation is mathtype formats;
S203, the content based on mathtype formats generate mathtype format formula;
S204, mathtype format formula are based on, generate corresponding picture format formula and latex format formula;
S205, using mathtype formats formula, latex formats formula and picture format formula as the second format public affairs Formula.
Here, the embodiment of the present invention is first by calling mathtype interfaces, the will extracted in mathml format formula One formula Content Transformation is the content of mathtype formats, and the content generation for being then based on above-mentioned mathtype formats is corresponding Mathtype format formula are based on above-mentioned mathtype formats formula, generate corresponding picture format formula and latex formats Formula, to obtain multiple second format formula.Wherein, the generation of above-mentioned picture format formula is based on above-mentioned mathtype formats The simulation screen display result of formula.
The second situation:For the first format formula includes mathml format formula, the embodiment of the present invention is based on The calling of mathtype interfaces realizes second lattice such as mathtype formats formula, mathml formats formula and picture format formula The conversion of formula formula, referring to Fig. 3, the transfer 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 interfaces are called, by the content that the second formula Content Transformation is mathtype formats;
S303, the content based on mathtype formats generate mathtype format formula;
S304, mathtype format formula are based on, generate corresponding picture format formula and mathml format formula;
S305, using mathtype formats formula, mathml formats formula and picture format formula as the second format public affairs Formula.
Here, the embodiment of the present invention is first by calling mathtype interfaces, second will extracted in latex format formula Formula Content Transformation is the content of mathtype formats, and the content generation for being then based on above-mentioned mathtype formats is corresponding Mathtype format formula are based on above-mentioned mathtype formats formula, generate 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 display result of formula formula.
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 interfaces realizes second formats such as mathml formats formula, latex formats formula and picture format formula The conversion of formula, referring to Fig. 4, the transfer 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 interfaces are called, by the content and latex lattice that third formula Content Transformation is mathml formats The content of formula;
S403, the content based on mathml formats generate mathml format formula, and the content based on latex formats, Generate latex format formula;
S404, mathtype format formula are based on, generate corresponding picture format formula;
S405, using mathml formats formula, latex formats formula and picture format formula as the second format formula.
Here, the embodiment of the present invention is first by calling mathtype interfaces, by what is extracted in mathtype format formula Third formula Content Transformation is the content of mathml formats and the content of latex formats, is then based on above-mentioned mathml formats Content generate corresponding mathml formats formula and to generate corresponding latex formats based on the content of above-mentioned latex formats public Formula is finally based on mathtype format formula and generates corresponding picture format formula, to obtain multiple second format formula. Wherein, simulation screen display result of the generation of above-mentioned picture format formula based on above-mentioned mathtype formats 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 conversions is called to obtain the formula of mathtype formats.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 is:
<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 codes of content representation formula (corresponding latex formats are public The second formula content in formula);
<mathml>With</mathml>Between content representation formula mathml codes (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 filenames it is (corresponding Third formula content in mathtype format formula), in this document of content under the agreement catalogue of hard disk.
It is worth noting that picture and mathtype formats do not put formula content directly but put a filename, this Should be corresponding contents not is text formatting, and html format can be destroyed here by being placed directly in, and causes file illegal.
The embodiment of the present invention additionally provides editable interface, in order to which user couple the first format formula is into edlin, and can To update the second format formula according to edited first format formula.The embodiment of the present invention may be used text editing (namely Edit mathml formats formula or latex formats formula) mode, visual edit (namely editor mathtype can also be used 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 be edited based on mathml information or Latex edits that information edits information to mathml or latex edits information into after edlin, and it is public to obtain updated first format Then formula realizes updated first format based on above-mentioned first format formula to the transfer 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 the first format formula into edlin, 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 to mathml format formula into edlin, alternatively, editing letter based on latex Breath is to latex formats formula into edlin;
S504, according to edited mathml formats formula or latex format formula, it is public to obtain updated first format Formula.
Here, the embodiment of the present invention is based on the first editable interface and receives the first editor information input by user, then base In above-mentioned first editor information to mathml formats formula or latex formats formula into edlin, to obtain updated first Format formula.It is automatic that mathtype interface conversions 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.
The second situation:For visual edit mode, the embodiment of the present invention can edit information with base mathtype Into after edlin, updated first format formula is obtained, is then based on above-mentioned first format formula again to the second format formula Between transfer process realize conversion of the 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 the first format formula into edlin, 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, based on second editor's information to mathtype formats formula into edlin;
S604, according to edited mathtype formats formula, obtain updated first format formula.
Here, the embodiment of the present invention is based on the second editable interface and receives the second editor information input by user, then base In above-mentioned second editor information to mathtype formats formula into edlin, to obtain updated first format formula.It is based on Updated first format formula, it is automatic that mathtype interface conversions 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 to after determining the performance rate of browser residing 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 residing for S701, detection webpage to be released;
S702, according to the correspondence 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 correspondence 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 Correspondence 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 correspondence can refer to the corresponding browser of performance indicator and support SVG labels or canvas Label determines that performance rate is top grade at this time, and the embodiment of the present invention can use latex formats to show formula, and such effect is most It is good;The corresponding browser of performance indicator is can also refer to support mathml formats or do not support mathml formats but support Web embedded fonts in CSS specifications determine that performance rate is middle rank at this time, and the embodiment of the present invention can use mathml formats Show that formula, such formula effect are preferable;For not meeting above-mentioned performance indicator, it is public that picture format display may be used 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, obtaining original document first includes 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 residing 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 determined and 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 same inventive concept, additionally provided in the embodiment of the present invention corresponding with the Homepage Publishing method of 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 implemented with the present invention 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, 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 acquisition module 11, the first format formula for including for obtaining original document;
Formula conversion module 22, for the first format formula to be converted to the second format formula;Wherein, the second format formula Include the formula of 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 formats formula or Latex format formula;
Formula conversion module 22, the first formula content being specifically used in extraction mathml format formula;It calls Mathtype interfaces, by the content that the first formula Content Transformation is mathtype formats;It is raw based on the content of mathtype formats At mathtype format formula;Based on mathtype format formula, generates corresponding picture format formula and latex formats are public Formula;Using mathtype formats formula, latex formats formula and picture format formula as the second format formula;Alternatively, extraction The second formula content in latex format formula;It is mathtype formats by the second formula Content Transformation with mathtype interfaces Content;Based on the content of mathtype formats, mathtype format formula are generated;Based on mathtype format formula, generate Corresponding picture format formula and mathml format formula;By mathtype formats formula, mathml formats 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 formats are public Formula;
Formula conversion module 22, the third formula content being specifically used in extraction mathtype format formula;It calls Mathtype interfaces, by the content of content and latex formats that third formula Content Transformation is mathml formats;It is based on The content of mathml formats generates mathml format formula, and the content based on latex formats, and it is public to generate latex formats Formula;Based on mathtype format formula, corresponding picture format formula is generated;By mathml formats 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 into edlin, 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 formats based on mathml Formula is into edlin, alternatively, editing information to latex formats formula into edlin based on latex;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 additionally operable to determining that user needs to the first format When formula is into edlin, 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 are compiled based on second editor's information Volume;According to edited mathtype formats 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, the performance indicator for detecting browser residing for webpage to be released;According to each Correspondence between a performance indicator and each performance rate determines performance corresponding with the performance indicator detected etc. Grade;
Above-mentioned file distribution module 33 is specifically used 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 for the progress file that the embodiment of the present invention is provided, including storage The computer readable storage medium of program code, the instruction that said program code includes can be used for executing previous methods embodiments Described in method, specific implementation can be found in embodiment of the method, details are not described herein.
The device of the Homepage Publishing for the file that the embodiment of the present invention is provided can be specific hardware or peace in equipment Loaded on the software or firmware etc. in equipment.The technique effect of the device that the embodiment of the present invention is provided, realization principle and generation Identical with preceding method embodiment, to briefly describe, device embodiment 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 can refer to the corresponding process in above method embodiment, 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 Volume function divides, formula that in actual implementation, there may be another division manner, in another example, multiple units or component 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, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple In network element.Some or all of unit therein can be selected 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 be integrated in a processing unit, also may be used It, can also be during two or more units be integrated in one unit to be that each unit physically exists alone.
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 read/write memory medium.Based on this understanding, technical scheme 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 expressed 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 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: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 disc or CD.
It should be noted that:Similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined, then it further need not be defined and explained in subsequent attached drawing in a 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 specific implementation mode 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, it will be understood by those of ordinary skill in the art that:Any one skilled in the art In the technical scope disclosed by the present invention, it can still modify to the technical solution recorded in 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.The protection in the present invention should all be covered Within the scope of.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. a kind of Homepage Publishing method with formula file, which is characterized in that including:
Obtain the first format formula that original document includes;
The first format formula is converted into the second format formula;Wherein, the second format formula includes multiple format Formula;
The performance rate with browser residing for webpage to be released is found out from the first format formula and the second format formula The format formula to match is waited for generating web page files according to the format formula and the original document that find described It is issued on publishing web page.
2. according to the method described in claim 1, it is characterized in that, the original document is XML file, first format is public Formula includes mathml formats formula or latex format formula;It is described that the first format formula is converted into the second format formula, Including:
Extract the first formula content in the mathml formats formula;
Mathtype interfaces are called, by the content that the first formula Content Transformation is mathtype formats;
Based on the content of the mathtype formats, mathtype format formula are generated;
Based on the mathtype formats formula, corresponding picture format formula and latex format formula are generated;
Using the mathtype formats formula, the latex formats formula and the picture format formula as the second format Formula;
Alternatively,
Extract the second formula content in the latex formats formula;
Mathtype interfaces are called, by the content that the second formula Content Transformation is mathtype formats;
Based on the content of the mathtype formats, mathtype format formula are generated;
Based on the mathtype formats formula, corresponding picture format formula and mathml format formula are generated;
Using the mathtype formats formula, the mathml formats formula and the picture format formula as the second format Formula.
3. according to the method described in claim 1, it is characterized in that, the original document be word file, first format Formula includes mathtype format formula;It is described that the first format formula is converted into the second format formula, including:
Extract the third formula content in mathtype format formula;
Mathtype interfaces are called, by the content and latex formats that the third formula Content Transformation is mathml formats Content;
Based on the content of the mathml formats, mathml format formula, and the content based on the latex formats are generated, Generate latex format formula;
Based on the mathtype formats formula, corresponding picture format formula is generated;
Using the mathml formats formula, the latex formats 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 include:
When determining that user needs to the first format formula into edlin, 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;
Information is edited to the mathml formats formula into edlin based on the mathml, alternatively, being edited based on the latex Information is to the latex formats formula into edlin;
According to the edited mathml formats formula or the latex formats 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 include:
When determining that user needs to the first format formula into edlin, 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;
Based on second editor's information to the mathtype formats formula into edlin;
According to the edited mathtype formats formula, updated first format formula is obtained.
6. according to the method described in claim 1, it is characterized in that, described public from the first format formula and the second format Before finding out the format formula to match with the performance rate of browser residing for webpage to be released in formula, further include:
Detect the performance indicator of browser residing for webpage to be released;
According to the correspondence between each performance indicator and each performance rate, determination and the performance indicator phase detected Corresponding performance rate;
The performance found out from the first format formula and the second format formula with browser residing for webpage to be released The format formula that grade matches, including:
According to the correspondence between each performance rate and each format formula, from the first format formula and the second format The format formula to match with the performance rate determined is found out in formula.
7. a kind of Homepage Publishing device with formula file, which is characterized in that including:
Formula acquisition module, the first format formula for including for obtaining 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 found out from the first format formula and the second format formula with residing for webpage to be released The format formula that the performance rate of browser matches, to generate net according to the format formula and the original document that find Page file is issued on the webpage to be released.
8. device according to claim 7, which is characterized in that the original document is XML file, and first format is public Formula includes mathml formats formula or latex format formula;
The formula conversion module is specifically used for extracting the first formula content in the mathml formats formula;It calls Mathtype interfaces, by the content that the first formula Content Transformation is mathtype formats;Based on the mathtype formats Content, generate mathtype format formula;Based on the mathtype formats formula, generate corresponding picture format formula with And latex format formula;By the mathtype formats formula, the latex formats formula and the picture format formula As the second format formula;Alternatively, extracting the second formula content in the latex formats formula;It, will with mathtype interfaces The second formula Content Transformation is the content of mathtype formats;Based on the content of the mathtype formats, generate Mathtype format formula;Based on the mathtype formats formula, corresponding picture format formula and mathml lattice are generated Formula formula;Using the mathtype formats formula, the mathml formats formula and the picture format formula as second Format formula.
9. device according to claim 7, which is characterized in that the original document is word file, first format Formula includes mathtype format formula;
The formula conversion module, the third formula content being specifically used in extraction mathtype format formula;It calls Mathtype interfaces, by the content of content and latex formats that the third formula Content Transformation is mathml formats;It is based on The content of the mathml formats generates mathml format formula, and the content based on the latex formats, generates latex Format formula;Based on the mathtype formats formula, corresponding picture format formula is generated;By mathml formats public affairs Formula, the latex formats formula and the picture format formula are as the second format formula.
10. device according to claim 8, which is characterized in that further include:
Formula update module, for when determining that user needs to the first format formula into edlin, providing first can to compile 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 formats formula based on the mathml Into edlin, alternatively, editing information to the latex formats formula into edlin based on the latex;According to edited institute Mathml formats formula or the latex formats 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 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)

* Cited by examiner, † Cited by third party
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)

* 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
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

Patent Citations (7)

* 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
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)

* Cited by examiner, † Cited by third party
Title
MATHTYPE中文官网: "MathType在Word中的使用", 《MATHTYPE中文官网》 *
互联网: "《在网页或者论文中显示数学公式--MathType+MathJax:LaTex+MSWord2007》", 《HTTP://WWW.IT610.COM/ARTICLE/1381598.HTM》 *
郭会芳: "基于MathML的数学公式格式转换研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
陈立: "基于MathML的web数学公式的解决方案", 《百度文库》 *

Cited By (9)

* Cited by examiner, † Cited by third party
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
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
US9875229B2 (en) Template-based page layout for web content
CN101408898B (en) Method and device for extracting web page text
CN103488423A (en) Method and device for implementing bookmark function in electronic reader
US10417267B2 (en) Information processing terminal and method, and information management apparatus and method
CN103544176A (en) Method and device for generating page structure template corresponding to multiple pages
CN101706821A (en) Tag-based mobile internet page design system and method
US7602972B1 (en) Method and apparatus for identifying white space tables within a document
CN108681547A (en) A kind of web content converting method and device based on small routine
CN104571978A (en) Method for paging and printing documents based on HTML (Hypertext Markup Language) labels
KR101147256B1 (en) Producing apparatus and method for a standized electronic book
CN103268340A (en) Format reflowable file establishing and drawing method based on hierarchical index
Mitra et al. Differences in rate of response to web-based surveys among college students
CN112199929A (en) Form processing method and device, storage medium and electronic equipment
WO2012012949A1 (en) Visual separator detection in web pages by using code analysis
JP2012014545A (en) Content deliverly system, method and program
US10628526B2 (en) Providing suggested diagrammatic representations of user entered textual information
US9619445B1 (en) Conversion of content to formats suitable for digital distributions thereof
CN101639993A (en) Multimedia point-reading learning device and teaching material production method thereof
CN103294819B (en) The method that Pagination Display is carried out to web page contents using HTML5 technologies
CN114625996A (en) Webpage content paging method and device, electronic equipment and readable storage medium
CN112433995B (en) File format conversion method, system, computer device and storage medium
CN104516865B (en) Association desktop based on Web demonstrates the online presentation file edit methods of subdocument
CN108664511A (en) Obtain webpage information method and apparatus
CN108108339B (en) A kind of method and device of the boundary PDF and grid lines mark

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