CN106897256B - Method and device for converting Office software edited formula into MathML formula - Google Patents

Method and device for converting Office software edited formula into MathML formula Download PDF

Info

Publication number
CN106897256B
CN106897256B CN201710099234.XA CN201710099234A CN106897256B CN 106897256 B CN106897256 B CN 106897256B CN 201710099234 A CN201710099234 A CN 201710099234A CN 106897256 B CN106897256 B CN 106897256B
Authority
CN
China
Prior art keywords
formula
mathtype
edited
mathml
office software
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.)
Expired - Fee Related
Application number
CN201710099234.XA
Other languages
Chinese (zh)
Other versions
CN106897256A (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.)
TCL China Star Optoelectronics Technology Co Ltd
Original Assignee
Shenzhen China Star Optoelectronics 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 China Star Optoelectronics Technology Co Ltd filed Critical Shenzhen China Star Optoelectronics Technology Co Ltd
Priority to CN201710099234.XA priority Critical patent/CN106897256B/en
Publication of CN106897256A publication Critical patent/CN106897256A/en
Application granted granted Critical
Publication of CN106897256B publication Critical patent/CN106897256B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • G06F40/154Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

Abstract

The invention is suitable for the technical field of computers, and provides a method and a device for converting an Office software edited formula into a MathML formula, wherein the method comprises the following steps: receiving a formula conversion request which is input by a user and is used for converting the formula edited by the Office software into the MathML formula, and generating the MathML formula corresponding to the formula edited by the Office software by using a pre-configured MathType formula plug-in and a macro command, thereby realizing the automatic conversion from the formula edited by the Office software to the MathML formula and improving the efficiency of converting the formula edited by the Office software into the MathML formula.

Description

Method and device for converting Office software edited formula into MathML formula
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a method and a device for converting an Office software edited formula into a MathML formula.
Background
A Mathematical Markup Language (MathML) is a standard based on an extensible Markup Language (XML) designed for transmitting, receiving and managing Mathematical expressions on the internet, and is a Markup Language for writing Mathematical symbols and formulas on the internet. The recursion and the tree structure of the marks in the MathML make the marks more convenient and simpler to realize in a computer program. The MathML uses a text mode, saves more storage space than a mapping mode, reduces the influence on the network transmission speed, is an application of the XML, and therefore inherits most advantages of the XML.
The existing Office application systems mostly use Office files, so that the formulas edited by Office software with a formula editor are often required to be converted into MathML formulas so as to be displayed and flexibly modified on a webpage. In the prior art, when a formula edited by an Office software self-contained formula editor is converted into a MathML formula, a MathType (mathematical formula editor) formula editor is used for manually re-inputting the formula in an Office file, and then the MathType formula is converted into the MathML formula by means of a conversion tool, so that a user needs to re-input and edit the formula, the working efficiency is reduced, and a large amount of manpower and financial resources are wasted.
Disclosure of Invention
The invention aims to provide a method and a device for converting an Office software edited formula into a MathML formula, and aims to solve the problem that the prior art cannot provide an effective method for converting the Office software edited formula into the MathML formula, so that the conversion efficiency from the Office software edited formula to the MathML formula is low.
In one aspect, the present invention provides a method for converting an Office software edited formula into a MathML formula, the method comprising the steps of:
receiving a formula conversion request which is input by a user and is used for converting a formula edited by Office software into a MathML formula;
and generating a MathML formula corresponding to the formula edited by Office software by using a pre-configured MathType formula plug-in and a macro command.
In another aspect, the present invention provides an apparatus for converting a formula edited by Office software into a MathML formula, the apparatus comprising:
the request receiving module is used for receiving a formula conversion request which is input by a user and used for converting a formula edited by Office software into a MathML formula; and
and the formula generation module is used for generating a MathML formula corresponding to the formula edited by Office software by using the pre-configured MathType formula plug-in and the macro command.
The method receives a formula conversion request which is input by a user and used for converting the formula edited by the Office software into the MathML formula, and generates the MathML formula corresponding to the formula edited by the Office software by using the pre-configured MathType formula plug-in and the macro command, thereby realizing the automatic conversion from the formula edited by the Office software to the MathML formula and improving the efficiency of converting the formula edited by the Office software into the MathML formula.
Drawings
Fig. 1 is a flowchart illustrating an implementation of a method for converting an Office software edited formula into a MathML formula according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus for converting an Office software edited formula into a MathML formula according to a second embodiment of the present invention;
FIG. 3 is a schematic structural diagram of an apparatus for converting an Office software edited formula into a MathML formula according to a second embodiment of the present invention; and
fig. 4 is a schematic structural diagram of a first conversion module in the apparatus for converting an Office software edited formula into a MathML formula according to the second embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The following detailed description of specific implementations of the present invention is provided in conjunction with specific embodiments:
the first embodiment is as follows:
fig. 1 shows an implementation flow of a method for converting an Office software edited formula into a MathML formula according to an embodiment of the present invention, and for convenience of description, only parts related to the embodiment of the present invention are shown, which is detailed as follows:
in step S101, a formula conversion request for converting a formula edited by Office software into a MathML formula is received from a user.
The embodiment of the invention is suitable for formula processing equipment or a formula processing system, and the file conversion request received by the formula processing equipment or the formula processing system comprises a formula edited by Office software to be converted. In the embodiment of the invention, the formula edited by the Office software is a formula edited by a formula editor carried by the Office software, the Office software comprises word and excel, the MathML formula is a formula edited by MathML, and the MathML supporting formula or the mathematical expression is used as a text in an Internet page to allow the search and the adjustment of the size of the text, thereby saving the storage space and reducing the influence on the network transmission speed.
Preferably, before the step of receiving a formula conversion request for converting a formula edited by Office software into a MathML formula, which is input by a user, a MathType formula plug-in may be configured for Office software in advance, and a macro command may be set for the MathType formula plug-in, so that a corresponding conversion environment is set for formula batch conversion in advance, so as to facilitate automatic performance of the conversion process.
In step S102, a MathML formula corresponding to the formula edited by the Office software is generated using the pre-configured MathType formula plug-in and the macro command.
In the embodiment of the invention, the formula edited by the Office software input by a user is automatically converted into the MathML formula corresponding to the formula edited by the Office software through the MathType formula plug-in and the macro command which are preset in the Office software. Specifically, a preset formula conversion function is called through an Office secondary development interface, a formula edited by Office software is converted into a MathType formula, a macro command used for conversion in a MathType formula plug-in is called, the MathType formula is converted into a MathML formula, and finally the MathML formula corresponding to the formula edited by Office software is generated.
Preferably, a preset formula conversion function is called through an Office secondary development interface, when a formula edited by Office software is converted into a MathType formula, a MathType formula plug-in is called for opening a macro command of a window, a MathType formula editing window is opened, a simulation keyboard operation instruction is executed to paste the copied formula edited by Office software into the MathType formula editing window, and the MathType formula corresponding to the formula edited by Office software is automatically generated for finally generating the MathML formula corresponding to the formula edited by Office software. Further, after the MathML formula is obtained through conversion, the MathType formula in the conversion process can be deleted, so that waste of storage resources is reduced.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the above embodiments may be implemented by relevant hardware instructed by a program, and the program may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc.
Example two:
fig. 2 shows a structure of an apparatus for converting an Office software edited formula into a MathML formula according to a second embodiment of the present invention, and for convenience of description, only parts related to the second embodiment of the present invention are shown, where the parts include:
the request receiving module 21 is configured to receive a formula conversion request, which is input by a user and used for converting a formula edited by Office software into a MathML formula.
In the embodiment of the invention, the formula edited by Office software is a formula edited by a formula editor carried by Office software, the MathML formula is a formula edited by MathML, and a MathML supporting formula or a mathematical expression is used as a text in an Internet page to allow searching and adjusting the size of the text, so that the storage space is saved, and the influence on the network transmission speed is reduced.
Preferably, before the step of receiving a formula conversion request for converting a formula edited by Office software into a MathML formula, which is input by a user, a MathType formula plug-in may be configured for Office software in advance, and a macro command may be set for the MathType formula plug-in, so that a corresponding conversion environment is set for formula batch conversion in advance, so as to facilitate automatic performance of the conversion process.
And the formula generating module 22 is configured to generate a MathML formula corresponding to the formula edited by Office software by using a preconfigured MathType formula plug-in and a macro command.
In the embodiment of the invention, a pre-configured MathType formula plug-in and a macro command are used for converting the formula edited by Office software input by a user into a MathML formula corresponding to the formula edited by Office software. Specifically, a preset formula conversion function is called through an Office secondary development interface, a formula edited by Office software is converted into a MathType formula, a macro command used for conversion in a MathType formula plug-in is called, the MathType formula is converted into a MathML formula, and finally the MathML formula corresponding to the formula edited by Office software is generated.
Preferably, a preset formula conversion function is called through an Office secondary development interface, when a formula edited by Office software is converted into a MathType formula, a macro command for windowing in a MathType formula plug-in is called, a MathType formula editing window is opened, a simulated keyboard operation instruction is executed, so that the copied formula edited by Office software is pasted into the MathType formula editing window, and the MathType formula corresponding to the formula edited by Office software is automatically generated for finally generating the MathML formula corresponding to the formula edited by Office software.
Therefore, preferably, as shown in fig. 3, the formula generation module 22 includes:
the first conversion module 221 is configured to convert a formula edited by Office software into a MathType formula through a preset formula conversion function; and
the second conversion module 222 is configured to call a macro command for conversion in the MathType formula plug-in, and convert the MathType formula into a MathML formula.
Preferably, the conversion apparatus further comprises:
the presetting module 30 is used for configuring MathType formula plug-ins for Office software in advance and setting macro commands for the MathType formula plug-ins;
and the intermediate formula deleting module 31 is used for deleting the MathType formula.
Preferably, as shown in fig. 4, the first conversion module 221 includes:
the window starting module 2211 is used for calling a macro command for opening a window in the MathType formula plug-in, and opening a MathType formula editing window; and
and a formula pasting module 2212, configured to execute the simulated keyboard operation instruction, so as to paste the formula edited by the Office software into the MathType formula editing window, and generate the MathType formula.
In the embodiment of the present invention, each module of the apparatus for converting the formula edited by Office software into the MathML formula may be implemented by corresponding hardware or software module, and each module may be an independent software module or hardware module, or may be integrated into a software module or hardware module, which is not limited herein.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A method of converting an Office software edited formula to a MathML formula, the method comprising the steps of:
receiving a formula conversion request which is input by a user and is used for converting a formula edited by Office software into a MathML formula;
generating a MathML formula corresponding to the formula edited by the Office software by using a pre-configured MathType formula plug-in and a macro command;
generating a MathML formula corresponding to the formula edited by the Office software, wherein the MathML formula comprises the following steps:
calling a preset formula conversion function through the Office secondary development interface, converting a formula edited by Office software into a MathType formula, calling a macro command used for conversion in the MathType formula plug-in, and converting the MathType formula into a MathML formula so as to generate the MathML formula corresponding to the formula edited by Office software.
2. The method of claim 1, wherein prior to the step of receiving a user-entered formula conversion request to convert an Office software-edited formula to a MathML formula, the method further comprises:
and configuring a MathType formula plug-in for Office software in advance, and setting a macro command for the MathType formula plug-in.
3. The method of claim 1, wherein the step of generating a MathML formula corresponding to the formula edited by the Office software using pre-configured MathType formula plug-ins and macrocommands comprises:
converting a formula edited by Office software into a MathType formula through a preset formula conversion function;
and calling a macro command for conversion in the MathType formula plug-in, and converting the MathType formula into the MathML formula.
4. The method of claim 3, wherein the step of converting the Office software edited formula into a MathType formula by a preset formula conversion function comprises:
calling a macro command for opening a window in a MathType formula plug-in, and opening a MathType formula editing window;
and executing the simulated keyboard operation instruction to paste the copied Office software edited formula into a MathType formula editing window to generate the MathType formula.
5. The method of claim 1, wherein after the step of generating a MathML formula corresponding to the formula edited by the Office software, the method further comprises:
and deleting the MathType formula.
6. An apparatus for converting an Office software edited formula into a MathML formula, the apparatus comprising:
the request receiving module is used for receiving a formula conversion request which is input by a user and used for converting a formula edited by Office software into a MathML formula; and
the system comprises a formula generation module, a MathML module and a MathType conversion module, wherein the formula generation module is used for generating a MathML formula corresponding to a formula edited by Office software by using a pre-configured MathType formula plug-in and a macro command, the formula generation module is also used for calling a preset formula conversion function through an Office secondary development interface, converting the formula edited by Office software into the MathType formula, calling the macro command used for conversion in the MathType formula plug-in and converting the MathType formula into the MathML formula so as to generate the MathML formula corresponding to the formula edited by Office software.
7. The apparatus of claim 6, wherein the apparatus further comprises:
the presetting module is used for configuring MathType formula plug-ins for Office software in advance and setting macro commands for the MathType formula plug-ins.
8. The apparatus of claim 6, wherein the formula generation module comprises:
the first conversion module is used for converting a formula edited by Office software into a MathType formula through a preset formula conversion function; and
and the second conversion module is used for calling the macro command for conversion in the MathType formula plug-in unit and converting the MathType formula into the MathML formula.
9. The apparatus of claim 8, wherein the first conversion module comprises:
the window starting module is used for calling a macro command used for opening a window in the MathType formula plug-in and opening a MathType formula editing window; and
and the formula pasting module is used for executing the operation instruction of the simulation keyboard so as to paste the formula edited by the Office software into the MathType formula editing window to generate the MathType formula.
10. The apparatus of claim 6, wherein the apparatus further comprises:
and the intermediate formula deleting module is used for deleting the MathType formula.
CN201710099234.XA 2017-02-23 2017-02-23 Method and device for converting Office software edited formula into MathML formula Expired - Fee Related CN106897256B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710099234.XA CN106897256B (en) 2017-02-23 2017-02-23 Method and device for converting Office software edited formula into MathML formula

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710099234.XA CN106897256B (en) 2017-02-23 2017-02-23 Method and device for converting Office software edited formula into MathML formula

Publications (2)

Publication Number Publication Date
CN106897256A CN106897256A (en) 2017-06-27
CN106897256B true CN106897256B (en) 2020-03-17

Family

ID=59185046

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710099234.XA Expired - Fee Related CN106897256B (en) 2017-02-23 2017-02-23 Method and device for converting Office software edited formula into MathML formula

Country Status (1)

Country Link
CN (1) CN106897256B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN104679726A (en) * 2013-12-03 2015-06-03 北大方正集团有限公司 Type setting method and device of word files
CN106021196A (en) * 2016-05-05 2016-10-12 广东小天才科技有限公司 Formula conversion method and system
CN106202003A (en) * 2016-06-23 2016-12-07 广东小天才科技有限公司 A kind of contents of test question processing method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679726A (en) * 2013-12-03 2015-06-03 北大方正集团有限公司 Type setting method and device of word files
CN106021196A (en) * 2016-05-05 2016-10-12 广东小天才科技有限公司 Formula conversion method and system
CN106202003A (en) * 2016-06-23 2016-12-07 广东小天才科技有限公司 A kind of contents of test question processing method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于MathML的数学公式格式转换研究;郭会芳;《中国优秀硕士学位论文全文数据库信息科技辑(月刊)》;20150815(第08期);参见第8、29页 *

Also Published As

Publication number Publication date
CN106897256A (en) 2017-06-27

Similar Documents

Publication Publication Date Title
US20160328392A1 (en) Techniques for automated document translation
CN108170426B (en) RESTful API code automatic generation method based on body
CN104965714A (en) Code generation method and system of application software
US20100318894A1 (en) Modifications to Editable Elements of Web Pages Rendered in Word Processor Applications
CN106844316B (en) Method and system for processing office document on browser online
CN104360992A (en) WEB report design system built based on EXCEL platform and implementation method
CN104142911A (en) Text information inputting method and device
CN102298575A (en) Method and system for copying and pasting Word file content with format
CN113378579A (en) Method, system and electronic equipment for voice input of structured data
CN111897553B (en) Project system building method, device, equipment and readable storage medium
CN101430684A (en) Method and apparatus for mutual conversion between Chinese work office software document and documents with other format
US20130007598A1 (en) Techniques for applying cultural settings to documents during localization
CN106897256B (en) Method and device for converting Office software edited formula into MathML formula
CN104834715A (en) Website generating method and system based on components and container
CN109617944B (en) WEB parameter management method, device, computer storage medium and equipment
CN102521008A (en) Program compiling device and method for compiling program
CN112650529B (en) System and method for configurable generation of mobile terminal APP codes
CN106815181B (en) Method and device for converting Indesign typesetted ind files into Office files
CN109446496A (en) A kind of conversion method, device, equipment and the storage medium of test language file
KR20190061895A (en) Web based document editing server for changing template of web based document and operating method thereof
CN117057318A (en) Domain model generation method, device, equipment and storage medium
CN111026451A (en) Parameter configuration method and configuration tool for transformer substation terminal interval
CN116431672A (en) Predicate logic optimization method, storage medium and equipment of database operation statement
CN113760274B (en) Front-end assembly logic injection method and device
CN112398870B (en) Cross-platform protocol generation method, device, system, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200317

CF01 Termination of patent right due to non-payment of annual fee