Method for converting formula to specified format
The method automates the conversion of mathematical expressions from Hangul documents to web-compatible formats, addressing display issues by classifying string types and adapting to output environments, ensuring accurate rendering.
Patent Information
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- ARIST CO LTD
- Filing Date
- 2025-03-04
- Publication Date
- 2026-07-27
AI Technical Summary
Users face difficulties in correctly displaying mathematical formulas from Hangul documents on the web due to the need for manual re-entry and multiple conversions using applications like MathJax, which often results in incorrect rendering.
A method for performing mathematical expression conversion using a computing device that classifies string types, determines appropriate libraries for conversion, handles return errors, and outputs strings based on the output environment, supporting multiple specifications such as MathJax, LaTeX, and HTML.
Enables accurate and automated conversion of mathematical expressions from Hangul documents to web-compatible formats, ensuring correct rendering across various output environments.
Smart Images

Figure 112025024335727-PAT00010_ABST
Abstract
Description
Technology Field
[0001] The present disclosure relates to a method for performing formula conversion, specifically a method for performing formula conversion into a specified format. Background Technology
[0002] Hangul document files are a widely used document format in South Korea and are utilized for various document tasks. In particular, the formula input function of Hangul documents is utilized importantly in fields where documents containing mathematical formulas are frequently created, such as theses, reports, and educational materials.
[0003] Mathematical formulas written in Hangul documents can be converted into syntax such as LaTeX. LaTeX is an editing language for expressing mathematical formulas and is primarily used in mathematics papers and textbooks. Content written in LaTeX generally does not display correctly on the web. To display the written content on the web, it must be converted into another syntax using a separate application. In other words, to display mathematical formulas written in a Hangul document file on the web, the formulas must be converted using syntax like LaTeX, and then converted once more using an application such as MathJax. Consequently, users experience difficulties displaying mathematical formulas written in Hangul documents on the web. Even when using applications like MathJax, there are still many formulas that do not display correctly on the web.
[0004] As a result, ordinary users are experiencing the inconvenience of having to manually re-enter formulas written in Hangul document files directly into the web. Prior art literature
[0005] Republic of Korea Published Patent No. 10-2013-0045987 The problem to be solved
[0006] The present disclosure is devised in response to the aforementioned background art and aims to provide a method for performing a mathematical expression conversion into a specified format.
[0007] The technical problems of the present disclosure are not limited to those mentioned above, and other unmentioned technical problems will be clearly understood by those skilled in the art from the description below. means of solving the problem
[0008] According to one embodiment of the present disclosure for solving the problem described above, a method for performing a mathematical expression conversion to a specified format is disclosed, which is performed by a computing device comprising at least one processor. The method for performing a mathematical expression conversion to a specified format may include: a step of classifying the type of a first string from text data included in a code file written in a first specification; a step of determining a library for instruction conversion according to the type of the first string; a step of returning a second string from the determined library, which is the first string converted to a second specification defined according to the type of the first string; a step of, if there is a return error regarding the type of the first string from the library, a step of converting the first string to a third specification and storing it in the code file; a step of returning a third string converted to the third specification; and a step of outputting at least one returned string.
[0009] Additionally, the step of returning a second string obtained by converting the first string into a second specification defined according to the type of the first string from the library determined above may include: a step of determining whether there is a command code in the library that supports conversion of the first string into a fourth specification different from the second specification; and a step of returning the second string or the fourth string obtained by converting the first string if there is a command code that supports conversion into the fourth specification.
[0010] Additionally, the step of outputting at least one returned string may include: determining an output environment in which the at least one string is to be output; determining a string identification code representing a specification in which the at least one string is written; and outputting a string according to the output environment based on the determined output environment and the string identification code.
[0011] Additionally, if the type of the first string represents a type created by a pre-specified first function, the method may further include the step of converting first target data extracted from the first string at a text position determined according to the first function into second target data based on a pre-specified format; and the step of returning a fifth string in which the first string is converted into a fifth specification based on the first function and the second target data.
[0012] Additionally, if the type of the first string represents a type written by a predetermined second function, the method may further include the step of returning a 6-1 string using a 2-1 function corresponding to at least a part of the second function, wherein the 2-1 target data extracted from the first string according to the second function at a first text position determined by the second function at the first string; the step of returning a 6-2 string using a 2-2 function corresponding to at least a part of the second function, wherein the 2-2 target data extracted from the first string according to the second function at a second text position determined by the second function at the first string at the second string at the second text position, the 6-1 string, and the 6-2 string.
[0013] The technical solutions obtainable in this disclosure are not limited to the solutions mentioned above, and other solutions not mentioned will be clearly understood by those skilled in the art to which this disclosure belongs from the description below. Effects of the invention
[0014] According to some embodiments of the present disclosure, a method for performing a mathematical expression conversion into a specified format that is also expressed on the web is provided.
[0015] The effects obtainable from the present disclosure are not limited to those mentioned above, and other unmentioned effects will be clearly understood by those skilled in the art to which the present disclosure pertains from the description below. Brief explanation of the drawing
[0016] Various aspects are now described with reference to the drawings, wherein similar reference numbers are used to collectively refer to similar components. In the following embodiments, for illustrative purposes, a number of specific details are presented to provide a comprehensive understanding of one or more aspects. However, it will be apparent that such aspect(s) may be practiced without these specific details. In other examples, known structures and devices are illustrated in block diagram form to facilitate the description of one or more aspects. FIG. 1 is a flowchart illustrating an example of a computing device according to some embodiments of the present disclosure. FIG. 2 is a diagram illustrating an example of a method in which a computing device according to some embodiment of the present disclosure performs a formula conversion into a specified format. FIG. 3 is a diagram illustrating an example of a library associated with a Font_lcmd type and Unicodes_lcmd according to some embodiments of the present disclosure. FIG. 4 is a diagram illustrating an example of a library associated with EMHCaseSensitiveCmd_lcmd according to some embodiments of the present disclosure. FIG. 5 is a diagram illustrating an example of a library associated with EMHCaseNotSensitiveCmd_lcmd according to some embodiments of the present disclosure. FIG. 6 is a flowchart illustrating an example of a method for a computing device according to some embodiments of the present disclosure to output a string according to an output environment. FIG. 7 is a flowchart illustrating an example of a method in which a computing device according to the present disclosure outputs a string corresponding to a pre-specified function. FIG. 8 is a diagram illustrating an example of a method in which a computing device according to the present disclosure outputs a string corresponding to a predetermined function. FIG. 9 is a flowchart illustrating another example of a method in which a computing device according to the present disclosure outputs a string corresponding to a predetermined function. FIG. 10 is a drawing for explaining another example of a method in which a computing device according to the present disclosure outputs a string corresponding to a predetermined function. FIG. 11 is a drawing for illustrating another example of a method in which a computing device according to the present disclosure outputs a string corresponding to a predetermined function. FIG. 12 is a diagram illustrating an example of a method for a computing device according to the present disclosure to output a specific string. Specific details for implementing the invention
[0017] The present invention is susceptible to various modifications and may have various embodiments; specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the invention to specific embodiments, and it should be understood that the invention includes all modifications, equivalents, and substitutions that fall within the spirit and scope of the invention. Similar reference numerals have been used for similar components in the description of each drawing.
[0018] Terms such as first, second, A, B, etc., may be used to describe various components, but said components should not be limited by said terms. These terms are used solely for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be named the second component, and similarly, the second component may be named the first component. The term "and / or" includes a combination of a plurality of related described items or any of a plurality of related described items.
[0019] When it is stated that one component is "connected" or "connected" to another component, it should be understood that while it may be directly connected or connected to that other component, there may also be other components in between. On the other hand, when it is stated that one component is "directly connected" or "directly connected" to another component, it should be understood that there are no other components in between.
[0020] The terms used in this application are used merely to describe specific embodiments and are not intended to limit the invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, terms such as "comprising" or "having" are intended to specify the presence of the features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, and should be understood as not precluding the existence or addition of one or more other features, numbers, steps, actions, components, parts, or combinations thereof.
[0021] Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as generally understood by those skilled in the art to which the present invention pertains. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology, and should not be interpreted in an ideal or overly formal sense unless explicitly defined in this application.
[0022] In the present disclosure, a computing device may perform a mathematical expression conversion into a specified format. The specified format may be determined by user interaction or by the environment in which the string is to be output. The computing device may classify the type of a first string from text data included in a code file written in a first specification. The first specification may represent a specification related to Hangul document files such as hwp or hwpx. The code file may be understood as a Hangul document file, etc. Text data may represent text written within a Hangul document file. The first string may be understood as a character represented by a mathematical expression. If the type for the first string is included in a pre-specified list, the computing device may return a second string converted from the first string. The second string may be a string written in the MathJax specification. If there is a return error regarding the type of the first string, the computing device may convert the first string to another specification. Hereinafter, an example of a method for a computing device according to the present disclosure to perform a mathematical expression conversion into a specified format is described with reference to FIGS. 1 to 12.
[0023] FIG. 1 is a flowchart illustrating an example of a computing device according to some embodiments of the present disclosure.
[0024] Referring to FIG. 1, the computing device (100) may include a control unit (110) and a storage unit (120). However, the above-described components are not essential for implementing the computing device (100), so the computing device (100) may have more or fewer components than the components listed above.
[0025] The computing device (100) may include any type of computer system or computer device, such as, for example, a microprocessor, a mainframe computer, a digital processor, a portable device, or a device controller.
[0026] A computing device (100) may achieve desired system performance by using a combination of typical computer hardware (e.g., a device that may include a computer processor, memory, storage, input device and output device, and other components of a conventional computing device; electronic communication devices such as routers and switches; and electronic information storage systems such as network-attached storage (NAS) and storage area network (SAN)) and computer software (i.e., instructions that cause the computing device to function in a specific way).
[0027] The control unit (110) can typically handle the overall operation of the computing device (100). The control unit (110) can provide or process appropriate information or functions to the user by processing signals, data, information, etc. that are input or output through the components of the computing device (100) or by running an application program stored in the storage unit (120).
[0028] The control unit (110) may be composed of one or more cores and may include a processor for data analysis such as a central processing unit (CPU), a general purpose graphics processing unit (GPGPU), or a tensor processing unit (TPU).
[0029] In the present disclosure, the control unit (110) can determine the output environment in which a string is to be output. The control unit (110) can determine a string identification code indicating the standard in which the string is written. For example, the control unit (110) can determine a string identification code indicating whether the string represents a first standard written in a Hangul document file or a second standard written in MathJax. The second standard may be a standard such as LaTeX, KaTeX, or MathML, in addition to MathJax. The control unit (110) can output the string based on the determined string identification code and the output environment. Hereinafter, an example of a method in which the control unit (110) outputs a string according to the output environment is described through FIG. 6.
[0030] The storage unit (120) may include memory and / or a permanent storage medium. The memory may include at least one type of storage medium among a flash memory type, a hard disk type, a multimedia card micro type, a card type memory (e.g., SD or XD memory, etc.), RAM (Random Access Memory), SRAM (Static Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), PROM (Programmable Read-Only Memory), magnetic memory, a magnetic disk, and an optical disk.
[0031] The storage unit (120) can store a library for command conversion, etc. The library can be understood as a lookup table, etc. that stores types that can be converted from a first string into a second string.
[0032] Below, a specific example of a computing device (100) providing a history management guarantee service is described.
[0033] FIG. 2 is a diagram illustrating an example of a method in which a computing device according to some embodiment of the present disclosure performs a formula conversion into a specified format.
[0034] Referring to FIG. 2, the control unit (110) of the computing device (100) can classify the type of the first string from text data included in a code file written according to the first specification (S110). The first specification may represent a specification related to a Hangul document file such as hwp or hwpx. The code file may be understood as a Hangul document file, etc. Text data may represent text written within a Hangul document file. The first string may be understood as a character represented by a formula. The first string may be understood as a character representing text data by a formula. The first string may also be understood as a character representing a function applied to the text data. The first string may also be understood as a character representing a table, etc. applied to the text data. The first string may exist in multiple instances within the text data.
[0035] The type of the first string can be determined as Font_lcmd, Unicodes_lcmd, EMHCaseSensitiveCmd_lcmd, and EMHCaseNotSensitiveCmd_lcmd, etc. Font_lcmd, Unicodes_lcmd, EMHCaseSensitiveCmd_lcmd, and EMHCaseNotSensitiveCmd_lcmd may be types of a method predetermined by the computing device (100) or the user of the computing device (100), etc. The control unit (110) can analyze the first string and determine the type corresponding to the first string.
[0036] The control unit (110) can determine a library for instruction conversion according to the type of the first string (S120). Instruction conversion can be understood as converting the first string through an instruction. The library can be understood as a lookup table, etc., that stores types that can be converted from the first string into a second string. For convenience of explanation, FIGS. 3 to 5 may be referenced.
[0037] FIG. 3 is a diagram illustrating an example of a library related to Font_lcmd type and Unicodes_lcmd according to some embodiments of the present disclosure. FIG. 4 is a diagram illustrating an example of a library related to EMHCaseSensitiveCmd_lcmd according to some embodiments of the present disclosure. FIG. 5 is a diagram illustrating an example of a library related to EMHCaseNotSensitiveCmd_lcmd according to some embodiments of the present disclosure.
[0038] Referring to FIGS. 3 through 5, there may be multiple libraries associated with each of the types Font_lcmd, Unicodes_lcmd, EMHCaseSensitiveCmd_lcmd, and EMHCaseNotSensitiveCmd_lcmd. Each of the multiple libraries may store a second string that returns a first string according to a second specification. For example, a first library associated with Font_lcmd may store a second string that returns a first string associated with 'BOLD'. As another example, a second library associated with Unicodes_lcmd may store a second string that returns a first string associated with '<<<'. As yet another example, a third library associated with EMHCaseSensitiveCmd_lcmd may store a second string that returns a first string associated with 'bold'. As another example, a fourth library associated with EMHCaseNotSensitiveCmd_lcmd may store and exist a second string that returned a first string associated with 'ANGLE'. The control unit (110) can determine such a library according to the type of the first string.
[0039] Referring again to FIG. 2, the control unit (110) can return a second string in which the first string is converted into a second specification defined according to the type of the first string from a determined library (S130).
[0040] The control unit (110) can convert a first string into a second string according to a command conversion from a determined library. The control unit (110) can return the converted second string. Returning the second string can be understood as determining an output value. Returning the second string can be understood as recording the second string in a database. Returning the second string can also be understood as recording the second string in a clipboard. If the second string needs to be output, the control unit (110) can output the returned second string.
[0041] According to one embodiment, the control unit (110) may determine whether there is a command code from the library that supports conversion of a first string to a fourth specification different from a second specification. The fourth specification may be an HTML specification. If there is a command code that supports conversion to the fourth specification, the control unit (110) may return the second string or the fourth string converted from the first string. The command code may be understood as a code for converting the first string into the fourth string according to the fourth specification.
[0042] Specifically, the first string is ' It can be assumed that it represents a table like '. When converting the first string to the second specification, a second string such as '$\begin{array}{| l | l |} \hline 1 & 2 \\ \hline 3 & 4 \\ \hline \end{array}$' may be returned. When converting the first string to the fourth specification, ' 1 2 3 4 A fourth string such as ' can be returned. Both the second string and the fourth string are ' It can be output as a table like '. However, depending on the output environment, the output of either the second string or the fourth string may be relatively correctly represented. For example, in the case of a web environment created using HTML, outputting the fourth string converted to the fourth specification, which is an HTML specification, may be more correctly represented than outputting the second string converted to the second specification, which is a MathJax specification. Therefore, if there is a command code that supports conversion to the fourth specification, the control unit (110) can return the fourth string converted from the second string or the first string.
[0043] If there is a return error regarding the type of the first string from the library, the control unit (110) can convert the first string into a third specification and store it in a code file (S140).
[0044] Specifically, the control unit (110) may determine that a return error exists if the type of the first string is not classified. The meaning that the type is not classified can also be understood as meaning that a string related to the first string has not been built in the library.
[0045] The third specification may be a Unicode specification. Unicode is a standard code for information exchange designed to handle characters. The control unit (110) can convert the first string into the third specification and store it in a code file.
[0046] The control unit (110) can return a third string converted to a third standard (S150). The control unit (110) can output at least one returned string (S160).
[0047] The control unit (110) can output at least one of the second string or the third string. According to an embodiment, if the fourth string is returned, the control unit (110) can output at least one of the second string, the third string, and the fourth string.
[0048] According to the configuration described above, the computing device (100) can convert a first string written in a first specification. If the type of the first string is classified, the computing device (100) can convert a second string into a second specification defined according to the type of the first string from a library. If the type of the first string is not defined, the computing device (100) can convert the first string into a third string of a third specification. Accordingly, the first string can be converted and output in various output environments.
[0049] Meanwhile, according to some embodiments of the present disclosure, the computing device (100) may determine an output environment in which a string is to be output. And, the computing device (100) may output an appropriate string according to the output environment. Hereinafter, an example of a method in which the computing device (100) according to the present disclosure outputs a string according to the output environment is described with reference to FIG. 6.
[0050] FIG. 6 is a flowchart illustrating an example of a method for a computing device according to some embodiments of the present disclosure to output a string according to an output environment.
[0051] Referring to FIG. 6, the control unit (110) of the computing device (100) can determine an output environment in which at least one string is to be output (S161).
[0052] For example, the control unit (110) can determine an output environment in which at least one string is output, such as the web, notepad, Word, or Excel.
[0053] The control unit (110) can determine a string identification code that indicates the specification in which at least one string is written (S162). The string identification code can indicate which specification the string is written in.
[0054] For example, the second string identification code can indicate that the second string is written in the MathJax standard. As another example, the third string identification code can indicate that the third string is written in the Unicode standard. As yet another example, the fourth string identification code can indicate that the fourth string is written in the HTML standard.
[0055] The control unit (110) can output a string according to the output environment based on the determined output environment and string identification code (S163).
[0056] For example, the control unit (110) can output a second string if it is determined that the output environment is a web environment created using Java. As another example, the control unit (110) can output a fourth string if it is determined that the output environment is a web environment created using HTML.
[0057] According to the configuration described above, the computing device (100) can determine the string to be output according to the output environment. Accordingly, the correct string can be output in any output environment.
[0058] Meanwhile, according to some embodiments of the present disclosure, the computing device (100) may return a string corresponding to a pre-specified function when the first string is written by a pre-specified function. Hereinafter, an example of a method for the computing device (100) according to the present disclosure to output a string corresponding to a pre-specified function is described through FIGS. 7 to 12.
[0059] FIG. 7 is a flowchart illustrating an example of a method in which a computing device according to the present disclosure outputs a string corresponding to a pre-specified function.
[0060] Referring to FIG. 7, the control unit (110) of the computing device (100) can convert first target data extracted from a text position determined by the first function into second target data based on a pre-specified format when the type of the first string represents a type created by a pre-specified first function (S210).
[0061] Specifically, the control unit (110) can determine whether the type of the first string represents a type created by a pre-specified first function. The first function may be a function that changes the font color of text data. If the type of the first string represents the first function, the control unit (110) can extract first target data from the first string at a text position determined according to the first function. The control unit (110) can convert the extracted first target data into second target data based on a pre-specified format.
[0062] The control unit (110) can return a fifth string that converts the first string into a fifth specification based on the first function and the second target data (S220). For convenience of explanation, FIG. 8 may be referenced.
[0063] FIG. 8 is a diagram illustrating an example of a method in which a computing device according to the present disclosure outputs a string corresponding to a predetermined function.
[0064] Referring to FIG. 8, the text data may be 'abcd'. The text data may be represented as 'abcd' in red in a Hangul document. The first string may be 'COLOR {255, 127, 64} {abcd}'. The control unit (110) may determine that the type of the first string is a type created by the first function. The control unit (110) may extract the first target data at a text location determined according to the first function. The text location determined according to the first function may be a location where text created after the first function exists. The first target data may be '255, 127, 64'. The control unit (110) may convert the first target data into second target data based on a pre-specified format. For example, the first target data may be data in RGB format. The second target data may be data in HEX format. The control unit (110) can convert the first target data in RGB format into the second target data in HEX format.
[0065] The control unit (110) can return a fifth string by converting the first string into a fifth specification based on the first function and the second target data. The fifth specification may be a specification pre-set by a user of the computing device (100), etc. The fifth specification may be a specification related to the location of the target data included in the first string. Even if the first target data is converted into the second target data, when the first string is output in a web environment, etc., the character spacing or letter spacing may not be reflected as intended by the user. Therefore, the control unit (110) can return a fifth string by converting the first string into a fifth specification based on the first function and the second target data.
[0066] For example, the first string may be 'COLOR {255, 127, 64} {abcd}'. The control unit (110) may convert the first string into a fifth specification and return a fifth string such as '\color{#FF740}{ abcd}'. When comparing the first string and the fifth string, it can be seen that the space between the first function and the curly brace containing the first target data has disappeared. Also, it can be seen that the space between the curly brace containing the first target data and the curly brace containing the text data has disappeared. Also, it can be seen that a space has formed between the text data and the curly brace within the curly brace containing the text data. In other words, it can be seen that the text data within the first string is expressed as '{abcd}', whereas the text data within the second string is expressed as '{ abcd}'.
[0067] FIG. 9 is a flowchart illustrating another example of a method in which a computing device according to the present disclosure outputs a string corresponding to a predetermined function.
[0068] Referring to FIG. 9, the control unit (110) of the computing device (100) can return a 6-1 string using a 2-1 function corresponding to at least a part of the 2-1 function, where the type of the first string represents a type created by a pre-specified 2 function (S310).
[0069] Specifically, the control unit (110) can determine whether the type of the first string represents a type written by a predetermined second function. The second function may be a function that further expresses other text data above and below the text data. The control unit (110) can extract second-1 target data at the first text position determined according to the second function.
[0070] The control unit (110) can return the 2-1 target data as the 6-1 string using a 2-1 function corresponding to at least a part of the 2 function. The 2 function may be a standard not used in languages other than Korean document files. Accordingly, the control unit (110) can return the 2-1 target data as the 6-1 string using a 2-1 function corresponding to at least a part of the 2 function.
[0071] The control unit (110) can return the 2-2 target data extracted from the 1 string at a text position determined according to the 2 function as the 6-2 string using the 2-2 function corresponding to at least a part of the 2 function (S330).
[0072] Specifically, the control unit (110) can extract second-2 target data from the first string at a text position determined according to the second function. The control unit (110) can return the second-2 target data as a sixth-2 string using a second-2 function corresponding to at least a part of the second function.
[0073] The control unit (110) can return a 6th string converted from a 1st string into a 6th specification using 2-3 target data extracted from a text position determined by a 2nd function from a 1st string, a 6-1 string, and a 6-2 string (S320). For convenience of explanation, FIG. 10 may be referenced.
[0074] FIG. 10 is a drawing for explaining another example of a method in which a computing device according to the present disclosure outputs a string corresponding to a predetermined function.
[0075] Referring to Fig. 10, the text data is ' 'It may be. The first string may be 'UNDEROVER{123}_{ab}^{xy}'. The control unit (110) may determine that the type of the first string is a type written with a second function representing UNDEROVER.
[0076] The control unit (110) can extract second-1 target data at a first text position determined according to a second function. The first text position may represent a curly brace located at the second position within the text data. Thus, the second-1 target data may be 'xy'. The control unit (110) can return the second-1 target data as a sixth-1 string using a second-1 function corresponding to at least a part of the second function. The control unit (110) can determine the second-1 function based on the first text position from which the second-1 target data was extracted and the second function. The second-1 function determined based on the first text position and the second function may be overset. The control unit (110) can return the second-1 target data, which appears as 'xy', as a sixth-1 string such as overset{ xy}.
[0077] The control unit (110) can extract second-2 target data at a second text position determined according to a second function. The second text position may represent a curly brace located at the third position within the text data. Thus, the second-2 target data may be 'ab'. The control unit (110) can return the second-2 target data as a sixth-2 string using a second-2 function corresponding to at least a part of the second function. The control unit (110) can determine the second-2 function based on the second text position from which the second-2 target data was extracted and the second function. The second-2 function determined based on the second text position and the second function may be underset. The control unit (110) can return the second-2 target data, which appears as 'ab', as a sixth-2 string such as underset{ ab}.
[0078] The control unit (110) can determine second-third target data extracted from a third text position determined according to a second function from a first string. The third text position may represent a curly brace located at the first position within the text data. Thus, the second-third target data may be '123'.
[0079] The control unit (110) can return a 6th string by converting the 1st string into a 6th specification using the 6-1 string, the 6-2 string, and the 2-3 target data.
[0080] For example, the first string may be 'UNDEROVER{123}_{ab}^{xy}'. The 6-1 string may be overset{ xy} and the 6-2 string may be underset{ ab}. The 2-3 target data may be '123'. The control unit (110) can use the 6-1 string, the 6-2 string, and the 2-3 target data to return the first string, such as 'UNDEROVER{123}_{ab}^{xy}', as the 6th string, such as '\overset{ xy}{ \underset{ ab}{ 123}}'. Additionally, the 6th specification may be a specification defining a space in the target data. When checking the 2-1 target data, the 2-2 target data, and the 2-3 target data, it may be confirmed that a space has been created between the text data and the curly braces within the curly braces.
[0081] FIG. 11 is a drawing for illustrating another example of a method in which a computing device according to the present disclosure outputs a string corresponding to a predetermined function.
[0082] Referring to Fig. 11, ' Text data such as ' may exist. The first string in which the text data appears may be 'LONGDIV {45} {123} {6789}'. The control unit (110) may return '\begin{array}{rl}45 \ \ [-4pt]123 \enclose{longdiv}{ 6789}\kern-.5ex\end{array}' which is the first string converted.
[0083] Referring to Fig. 11, ' Text data such as ' may exist. The first string in which the text data appears may be '2 {under{)180}}#2 {under{)90}}#'. The control unit (110) may return '\displaylines {2 \underline{\smash[] ) 180} \ \ [-3px]2 \underline{\smash[] ) 90} \ \ [-3px]}' which is a converted version of the first string.
[0084] FIG. 12 is a diagram illustrating an example of a method for a computing device according to the present disclosure to output a specific string.
[0085] Referring to Fig. 12, ' Text data such as ' may exist. The first string in which the above text data appears may be 'UNDERBRACE {1234}{abcde}'. The function included in the first string may be convertible to the second specification, the MathJax specification. When the first string is converted according to the second specification, a string such as '\underbrace{ 1234}^{ abcde}' may be returned. However, text data output from a Hangul document file ( Text data output in output environments such as ) and the web ( When comparing, it can be confirmed that a difference exists. In text data output from a Hangul document file, 'abcde' is larger than '1234', whereas in text data output from the web, 'abcde' is smaller than '1234'. In other words, certain functions such as 'UNDERBRACE' may have conversion errors.
[0086] Accordingly, the control unit (110) of the computing device (100) may return a seventh string that converts the first string into a seventh specification if the type of the first string represents a type created by a pre-specified third function. The third function may be 'UNDERBRACE'. For example, the control unit (110) may convert the first string into a seventh string such as '\underbrace{ 1234}_{ abcde}'.
[0087] According to the configuration described above through FIGS. 1 to 12, the computing device (100) can standardize the syntax of a formula included in a code file having an hwp or hwpx extension according to the specifications of a Hangul document file. Based on the standardization, the computing device (100) can determine a code file having an hml extension. The computing device (100) can convert the formula included in the hml code file with standardized syntax into the MathJax specification. Based on the conversion, the computing device (100) can determine a code file having a txt extension. The computing device (100) can convert Unicode characters that can be converted into the MathJax specification within the code file having a txt extension. The computing device (100) can store characters that cannot be changed as they are within the code file. The computing device (100) can store the code file having a txt extension in a database format having an xls or xlsx extension. Accordingly, all strings included in the code file can be converted so that they can be output well in any output environment.
[0088] Description of the presented embodiments is provided so that a person skilled in the art may use or practice the present disclosure. Various modifications to these embodiments will be apparent to a person skilled in the art, and the general principles defined herein may be applied to other embodiments without departing from the scope of the present disclosure. Thus, the present disclosure is not limited to the embodiments presented herein, but should be interpreted in the broadest possible scope consistent with the principles and novel features presented herein.
Claims
Claim 1 A method for performing a formula conversion into a specified format, performed by a computing device comprising at least one processor, comprising: a step of classifying the type of a first string from text data included in a code file written in a first specification; a step of determining a library for instruction conversion according to the type of the first string; a step of returning a second string from the determined library, which is the first string converted into a second specification defined according to the type of the first string; a step of, if there is a return error regarding the type of the first string from the library, a step of converting the first string into a third specification and storing it in the code file; a step of returning a third string converted into the third specification; and a step of outputting at least one returned string, wherein if the type of the first string represents a type written by a pre-specified first function, a step of converting first target data extracted from the first string at a text location determined according to the first function into second target data based on a pre-specified format. A method for performing a formula conversion to a specified format, further comprising the step of returning a fifth string converted from the first string to the fifth specification based on the first function and the second target data. Claim 2 A method for performing a formula conversion to a specified format according to claim 1, wherein the step of returning a second string converted from the first string according to a second specification defined according to the type of the first string from the determined library comprises: a step of determining whether there is a command code from the library that supports conversion of the first string to a fourth specification different from the second specification; and a step of returning the second string or the fourth string converted from the first string if there is a command code that supports conversion to the fourth specification. Claim 3 A method for performing a formula conversion into a specified format according to claim 1, wherein the step of outputting at least one returned string comprises: determining an output environment in which the at least one string is to be output; determining a string identification code representing a specification in which the at least one string is written; and outputting a string according to the output environment based on the determined output environment and the string identification code. Claim 4 delete Claim 5 A method for performing a formula conversion into a specified format, performed by a computing device comprising at least one processor, comprising: a step of classifying the type of a first string from text data included in a code file written in a first specification; a step of determining a library for instruction conversion according to the type of the first string; a step of returning a second string from the determined library, which is the first string converted into a second specification defined according to the type of the first string; a step of, if there is a return error regarding the type of the first string from the library, converting the first string into a third specification and storing it in the code file; and a step of returning a third string converted into the third specification. A method for performing a formula conversion to a specified format, comprising the step of outputting at least one returned string, wherein if the type of the first string represents a type written by a predetermined second function, the step of returning a 6-1 string using a 2-1 function corresponding to at least a part of the second function, wherein the 2-1 target data extracted from the first string according to the second function at a first text position determined by the second function at the first string at the second text position determined by the second function at the first string at the second text position is returned as a 6-2 string using a 2-2 function corresponding to at least a part of the second function at the second text position determined by the second function at the first string at the second text position, the 6-1 string at the first string at the second text position determined by the second function at the first string at the second text position, and the 6-2 string at the second text position, the step of returning a 6 string in which the first string is converted to a 6 specification.