CN103425773A - Method for rapidly displaying mathematical formula in web page by utilizing native Html (Hypertext Markup Language) - Google Patents

Method for rapidly displaying mathematical formula in web page by utilizing native Html (Hypertext Markup Language) Download PDF

Info

Publication number
CN103425773A
CN103425773A CN2013103512011A CN201310351201A CN103425773A CN 103425773 A CN103425773 A CN 103425773A CN 2013103512011 A CN2013103512011 A CN 2013103512011A CN 201310351201 A CN201310351201 A CN 201310351201A CN 103425773 A CN103425773 A CN 103425773A
Authority
CN
China
Prior art keywords
html
formula
latex
web page
user
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.)
Pending
Application number
CN2013103512011A
Other languages
Chinese (zh)
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.)
SHENZHEN JYEOO NETWORK TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN JYEOO NETWORK 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 SHENZHEN JYEOO NETWORK TECHNOLOGY Co Ltd filed Critical SHENZHEN JYEOO NETWORK TECHNOLOGY Co Ltd
Priority to CN2013103512011A priority Critical patent/CN103425773A/en
Publication of CN103425773A publication Critical patent/CN103425773A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to a method for rapidly displaying a mathematical formula in a web page by utilizing a native Html (Hypertext Markup Language). The method comprises the following steps of 1, analyzing a given Latex formula character string into an Html code which accords with a W3C (World Wide Web Consortium) standard by utilizing a conversion method, wherein under the standard, the Html can operate in any browser; 2, after a user opens the web page containing the formula Html, dynamically regulating layout, positioning and the width-height ratio of the Html by utilizing Javascript and Css patterns and finally, reducing the mathematical formula and displaying the mathematical formula on the web page. The html code required for formula display nearly does not occupy bandwidth and resources of a server after being compressed; the method is not limited by a platform and is supported by all current browsers; the user does not need to install any auxiliary plug-ins. In the era that virus software overruns, plug-in installation is a very troublesome event for the user and additionally, after the plug-ins are installed, safety setting also needs to be carried out, so that obstacles are brought to use by the user. According to the invention, only 0.1 percent of traffic cost of a picture formula is needed and a loading speed is very high.

Description

A kind of primary Html quick method that shows mathematical formulae in webpage of utilizing
Technical field
The present invention relates to a kind of primary Html quick method that shows mathematical formulae in webpage of utilizing.
Background technology
Show the present situation of formula on current web page:
1, the mobile phone plane plate user can only the browsing pictures formula;
2, use the picture formula, seriously take enterprises and individuals's bandwidth;
3, need to install different demonstration plug-in units under different browsers, and install and to arrange loaded down with trivial detailsly, domestic consumer can't be used.
Summary of the invention
For address the above problem the invention provides a kind of without by plug-in unit, can on all browsers, showing fast the method for mathematical formulae.
The present invention relates to a kind of primary Html quick method that shows mathematical formulae in webpage of utilizing, the method comprises the following steps: 1, given Latex formula character string, utilize conversion method to resolve to meet the Html code of W3C standard, this substandard Html can move under any browser;
2, recycle layout, location, the wide height that Javascript, Css pattern dynamically adjust Html after the user opens the webpage that comprises above-mentioned formula Html, finally mathematical formulae reduced and be shown on the page.
The present invention has following technique effect:
1, solve the picture formula and represent the pressure brought to bandwidth and server;
2, solve the picture formula and represent the pressure brought to 3G mobile platform customer flow expense;
3, solve the user and browse formula under the prerequisite that any software (plug-in unit) is not installed, improve the user and experience;
4, solve mobile phone, the formula of the mobile devices such as panel computer represents;
5, solve compatibility, the otherness that the different browsers formula shows.
The accompanying drawing explanation
Describe in more detail exemplary embodiment of the present invention by the reference accompanying drawing, above and other aspect of the present invention and advantage will become and more be readily clear of, in the accompanying drawings:
Fig. 1 is a kind of primary Html quick step schematic diagram that shows the method for mathematical formulae in webpage that utilizes of the present invention.
Embodiment
Hereinafter, now with reference to accompanying drawing, the present invention is described more fully, various embodiment shown in the drawings.Yet the present invention can implement in many different forms, and should not be interpreted as being confined to embodiment set forth herein.On the contrary, it will be thorough with completely providing these embodiment to make the disclosure, and scope of the present invention is conveyed to those skilled in the art fully.
Hereinafter, exemplary embodiment of the present invention is described with reference to the accompanying drawings in more detail.
With reference to accompanying drawing 1, a kind of primary Html quick method that shows mathematical formulae in webpage of utilizing, the method comprises the following steps: 1, given Latex formula character string, utilize conversion method to resolve to meet the Html code of W3C standard, this substandard Html can move under any browser; 2, recycle layout, location, the wide height that Javascript, Css pattern dynamically adjust Html after the user opens the webpage that comprises above-mentioned formula Html, finally mathematical formulae reduced and be shown on the page.
Described conversion method is as follows:
A, at first the formula order abstract be object one by one, each object generates Html according to " piecing together rule " after realizing importing into parameter.
Figure BSA0000093826270000021
B, parsing Latex
As " 1+ frac{1}{2} 1t sqrt{x} ".At first we create an object array that comprises the following table data, and what in array, preserve is the symbol contrast command list object of Latex:
Figure BSA0000093826270000031
Then from left to right travel through each character in the Latex character string, if common character exclusive disjunction symbol directly call Letter object in A generate the Html code "<font > 1</font<font+</font ".If run into escape symbol “ ", “ " after often read a letter and just go to contrast array, the formula object called in the A step according to character Type attribute again after coupling generates Html, calls the Letter former state if do not match and generates.If run into, " { " used recurrence to repeat above-mentioned steps, until the parsing of all characters is complete, completes the conversion of Latex to Html.
Layout, location, wide height that the described Javascript of utilization, Css pattern are dynamically adjusted Html specifically comprise the steps:
A, Css pattern
Css is responsible for adjusting layout and the location of Html, and the thickness of element frame is set, the alignment thereof of text, the size of font;
B、Javascript
After page loaded, use javascript to obtain respectively height and the width of formula Html, then find the element of attribute " muststretch " that its wide height is set.
The similar technology in the relative market of this product has the following advantages:
1, formula takies server bandwidth and resource after showing required html code compaction hardly;
2, be not subject to platform constraints, all browsers are all supported at present;
3, do not need any auxiliary plug-in of user installation.In the age of walking crosswise in this bogusware, allow the user installation plug-in unit be very pain in the neck feelings, after installing, also will arrange safely in addition, to the user, uses and brought obstacle.
4, in the past on mobile phone, flat board formula can only occur with the picture form, but the user that Shows Picture needs the traffic fee of overspending.This product only need spend the traffic fee of picture formula 0.1%, and loading velocity is exceedingly fast.
The foregoing is only embodiments of the invention, be not limited to the present invention.The present invention can have various suitable changes and variation.All any modifications of doing within the spirit and principles in the present invention, be equal to replacement, improvement etc., within protection scope of the present invention all should be included in.

Claims (3)

1. one kind is utilized primary Html to show fast the method for mathematical formulae in webpage, it is characterized in that:
The method comprises the following steps: given Latex formula character string, utilize conversion method to resolve to meet the Html code of W3C standard, this substandard Html can move under any browser;
Recycle layout, location, wide height that Javascript, Css pattern dynamically adjust Html after the user opens the webpage that comprises above-mentioned formula Html, finally mathematical formulae reduced and be shown on the page.
2. as claimed in claim 1ly a kind ofly utilize primary Html to show fast the method for mathematical formulae in webpage, it is characterized in that:
Described conversion method is as follows:
A, at first the formula order abstract be object one by one, each object generates Html according to " piecing together rule " after realizing importing into parameter;
B, parsing Latex
At first we create an object array that comprises the following table data, and what in array, preserve is the symbol contrast command list object of Latex;
Then from left to right travel through each character in the Latex character string, if the Letter object that common character exclusive disjunction symbol directly calls in A generates the Html code; If run into escape symbol “ ", “ " after often read a letter and just go to contrast array, the formula object called in the A step according to character Type attribute again after coupling generates Html, calls the Letter former state if do not match and generates.If run into, " { " used recurrence to repeat above-mentioned steps, until the parsing of all characters is complete, completes the conversion of Latex to Html.
3. as claimed in claim 2ly a kind ofly utilize primary Html to show fast the method for mathematical formulae in webpage, it is characterized in that: layout, location, wide height that the described Javascript of utilization, Css pattern are dynamically adjusted Html specifically comprise the steps:
A, Css pattern
Css is responsible for adjusting layout and the location of Html, and the thickness of element frame is set, the alignment thereof of text, the size of font;
B、Javascript
After page loaded, use javascript to obtain respectively height and the width of formula Html, then find the element of attribute " muststretch " that its wide height is set.
CN2013103512011A 2013-08-02 2013-08-02 Method for rapidly displaying mathematical formula in web page by utilizing native Html (Hypertext Markup Language) Pending CN103425773A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013103512011A CN103425773A (en) 2013-08-02 2013-08-02 Method for rapidly displaying mathematical formula in web page by utilizing native Html (Hypertext Markup Language)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013103512011A CN103425773A (en) 2013-08-02 2013-08-02 Method for rapidly displaying mathematical formula in web page by utilizing native Html (Hypertext Markup Language)

Publications (1)

Publication Number Publication Date
CN103425773A true CN103425773A (en) 2013-12-04

Family

ID=49650512

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013103512011A Pending CN103425773A (en) 2013-08-02 2013-08-02 Method for rapidly displaying mathematical formula in web page by utilizing native Html (Hypertext Markup Language)

Country Status (1)

Country Link
CN (1) CN103425773A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102485A (en) * 2014-06-26 2014-10-15 湖北安标信息技术有限公司 Html-based module encapsulation loading method
WO2016095502A1 (en) * 2014-12-17 2016-06-23 百度在线网络技术(北京)有限公司 Mathematical formula processing method, device, apparatus and computer storage medium
CN108241604A (en) * 2016-12-26 2018-07-03 亿度慧达教育科技(北京)有限公司 A kind of interactive editor's method and its device for realizing La Taihe form formula
CN111309302A (en) * 2020-02-06 2020-06-19 杭州电子科技大学 Method for converting Verilog code based on LaTeX four-principle operation and trigonometric function mixed operation formula

Citations (2)

* 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
CN102663138A (en) * 2012-05-03 2012-09-12 北京大学 Method and device for inputting formula query terms

Patent Citations (2)

* 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
CN102663138A (en) * 2012-05-03 2012-09-12 北京大学 Method and device for inputting formula query terms

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102485A (en) * 2014-06-26 2014-10-15 湖北安标信息技术有限公司 Html-based module encapsulation loading method
WO2016095502A1 (en) * 2014-12-17 2016-06-23 百度在线网络技术(北京)有限公司 Mathematical formula processing method, device, apparatus and computer storage medium
CN108241604A (en) * 2016-12-26 2018-07-03 亿度慧达教育科技(北京)有限公司 A kind of interactive editor's method and its device for realizing La Taihe form formula
CN111309302A (en) * 2020-02-06 2020-06-19 杭州电子科技大学 Method for converting Verilog code based on LaTeX four-principle operation and trigonometric function mixed operation formula
CN111309302B (en) * 2020-02-06 2023-04-18 杭州电子科技大学 Method for converting Verilog code based on LaTeX four-principle operation and trigonometric function mixed operation formula

Similar Documents

Publication Publication Date Title
CN103500166B (en) A kind of response type webpage design method of progressive enhancing
CN108255923B (en) Image display method and device and electronic device
CN105740315A (en) Multi-screen response type webpage layout adjustment method
Jiang et al. Responsive web design mode and application
EP2687997A1 (en) Method for rearranging web page
CN101853158A (en) Method and device for adjusting Widget window
CN102929867A (en) Technology used for automatically translating a document
CN102662616A (en) Screen graphics self-adaption method and system used for mobile terminal
CN103593196A (en) Page layout self-adaptation method and device
JP4794318B2 (en) Information distribution system for network services
CN103353878A (en) Method for displaying files of different file formats in webpage
CN103823841B (en) Improve the method and its device of mobile terminal client terminal surfing
CN103425773A (en) Method for rapidly displaying mathematical formula in web page by utilizing native Html (Hypertext Markup Language)
CN105094930A (en) Image positioning system and method
CN102999336A (en) Application interface realizing method and application interface realizing system
CN103838576A (en) Website establishing method and device
CN105786207A (en) Information input method and device
Li et al. The design and implementation of responsive web page based on HTML5 and CSS3
CN103136259A (en) Method and device for processing webpage contents based on content block identification
CN104834646A (en) Webpage display method, client and system
CN102799764B (en) A kind of engineering calculation system of sing on web and method
CN104750670A (en) Page document processing method and device
CN110543307A (en) application construction method and device
US10747943B2 (en) Method, device, client apparatus, and electronic device for presenting webpages
CN105786987A (en) Page configuration method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 518000 Guangdong city of Shenzhen province Nanshan District Gao Xin Road Chinese Technology Development Institute Building No. three tower 11B

Applicant after: Shenzhen Jing gifted wisdom education Limited by Share Ltd

Address before: 518000 Guangdong city of Shenzhen province Luohu District Department Store Plaza Shennan Road East Building 1708

Applicant before: Shenzhen Jyeoo Network Technology Co., Ltd.

COR Change of bibliographic data
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20131204