CN107122345B - Data typesetting method and device - Google Patents

Data typesetting method and device Download PDF

Info

Publication number
CN107122345B
CN107122345B CN201710254411.7A CN201710254411A CN107122345B CN 107122345 B CN107122345 B CN 107122345B CN 201710254411 A CN201710254411 A CN 201710254411A CN 107122345 B CN107122345 B CN 107122345B
Authority
CN
China
Prior art keywords
typesetting
data
control
typeset
rule
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710254411.7A
Other languages
Chinese (zh)
Other versions
CN107122345A (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.)
Qingdao Weidong Cloud Education Group Co ltd
Original Assignee
Qingdao Weidong Cloud Education Group 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 Qingdao Weidong Cloud Education Group Co ltd filed Critical Qingdao Weidong Cloud Education Group Co ltd
Priority to CN201710254411.7A priority Critical patent/CN107122345B/en
Publication of CN107122345A publication Critical patent/CN107122345A/en
Application granted granted Critical
Publication of CN107122345B publication Critical patent/CN107122345B/en
Active 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/189Automatic justification

Abstract

The invention provides a data typesetting method and a data typesetting device, wherein the method comprises the following steps: when a first instruction for typesetting data to be typeset in a document is detected, typesetting the data to be typeset based on a first typesetting rule carried in the first instruction; when the line number occupied by the data to be typeset is less than a preset line number threshold value, generating a first control corresponding to the data to be typeset, and storing the first typesetting rule in the first control; and displaying the data to be typeset based on the first typesetting rule stored in the first control. By applying the embodiment of the invention, the editor has flexibility in data editing, and the readability of the displayed data in the editing interface is improved.

Description

Data typesetting method and device
Technical Field
The invention relates to the field of education, in particular to a data typesetting method and device.
Background
Currently, a user can edit education-type learning data such as audio, video, animation, pictures, characters, and the like through an editor.
In the prior art, because the typesetting direction of the text contents in the languages of Uygur and Kazakh is from right to left, when typesetting the text contents in the languages of Uygur and Kazakh, if the typesetting direction of the text contents in the languages of Uygur and Kazakh is mixed with the data from left to right, the typesetting direction of the mixed mathematical formula is from right to left, which is not favorable for the reading of the user.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for typesetting data, so as to solve the problems that an editor has low flexibility for editing data and readability of data displayed in an editing interface of the editor is low.
In order to achieve the purpose, the invention provides the following technical scheme:
according to a first aspect of the present invention, a method for typesetting data is provided, the method comprising:
when a first instruction for typesetting data to be typeset in a document is detected, typesetting the data to be typeset based on a first typesetting rule carried in the first instruction;
when the line number occupied by the data to be typeset is less than a preset line number threshold value, generating a first control corresponding to the data to be typeset, and storing the first typesetting rule in the first control;
and displaying the data to be typeset based on the first typesetting rule stored in the first control.
According to a second aspect of the present invention, there is provided an apparatus for layout of data, comprising:
the first typesetting module is used for typesetting the data to be typeset based on a first typesetting rule carried in a first instruction when the first instruction for typesetting the data to be typeset in the document is detected;
the first control generating module is used for generating a first control corresponding to the data to be typeset when the line number occupied by the data to be typeset is less than a preset line number threshold value, and storing the first typesetting rule in the first typesetting module in the first control;
and the first data display module is used for displaying the data to be typeset based on the first typesetting rule, and the first typesetting rule is stored in the first control generated in the first control generation module.
According to the technical scheme, the terminal device typesets the data to be typeset according to the first typesetting rule based on the first instruction, determines and generates the first control corresponding to the data to be typeset according to the line number occupied by the data to be typeset and the preset line number threshold value, and stores the first typesetting rule in the first control, so that the terminal device can display the data to be typeset based on the first typesetting rule stored in the first control, the flexibility of an editor in editing the data is ensured, and the readability of the displayed data in an editing interface is improved.
Drawings
FIG. 1A is a flowchart of an embodiment of a method for typesetting data provided by the present invention;
FIG. 1B is a schematic diagram of an editing interface of an editor in the embodiment shown in FIG. 1A;
FIG. 1C is a schematic diagram of an editing interface of an editor for displaying the data to be typeset based on FIG. 1B;
FIG. 2A is a flowchart of another embodiment of a method for typesetting data provided by the present invention;
FIG. 2B is a schematic diagram of an editing interface of the editor in the embodiment shown in FIG. 2A;
FIG. 2C is a schematic diagram of an editing interface of the editor in the case that the number of lines occupied by the data to be typeset is greater than the preset number-of-lines threshold value on the basis of FIG. 2B;
FIG. 3A is a flowchart of an embodiment of a method for typesetting further data provided by the invention;
FIG. 3B is a schematic diagram illustrating the positions of the containers and controls in the embodiment of FIG. 3A;
FIG. 3C is a schematic diagram of a position change of the first control based on FIG. 3B;
FIG. 4A is a flowchart of an embodiment of a method for typesetting data according to the invention;
FIG. 4B is a schematic diagram illustrating the positions of the containers and controls in the embodiment of FIG. 4A;
FIG. 4C is a schematic view of the corresponding location of at least one third control element on the basis of FIG. 4B;
fig. 5 is a hardware configuration diagram of a terminal device provided by the present invention;
FIG. 6 is a block diagram of an embodiment of a data layout apparatus provided in the present invention;
FIG. 7 is a block diagram of another data layout apparatus according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Fig. 1A is a flowchart of an embodiment of a data typesetting method provided by the present invention, where the data typesetting method can be applied to a terminal device, such as a mobile phone and a tablet computer. In one embodiment, the terminal equipment is provided with an editor, and the data interaction between the terminal equipment and the editor can be realized; FIG. 1B is a schematic diagram of an editing interface of an editor in the embodiment shown in FIG. 1A; fig. 1C is a schematic diagram of an editing interface of an editor that displays data to be typeset based on fig. 1B, and an exemplary description is given to an embodiment of the present invention with reference to fig. 1B and 1C, where as shown in fig. 1A, the method includes the following steps:
step 101: when a first instruction for typesetting the data to be typeset in the document is detected, typesetting the data to be typeset based on a first typesetting rule carried in the first instruction.
Step 102: and when the line number occupied by the data to be typeset is less than the preset line number threshold, generating a first control corresponding to the data to be typeset, and storing the first typesetting rule in the first control.
Step 103: and displaying the data to be typeset based on the first typesetting rule stored in the first control.
In step 101, in one embodiment, a user edits data in a document currently open in an editor. The data to be typeset is the data which needs to be subjected to the 'position adjustment in the document' and 'writing direction adjustment' by the user, and the technical personnel in the field can understand that the selection process of the data to be typeset can be obtained by long-pressing a left mouse button and dragging the left mouse button to select the data to be typeset through the editing interface of an editor; or after the user inputs and pastes all the data, the terminal device automatically identifies the data needing position adjustment and writing direction adjustment, and the selection process of the data to be typeset is not limited. The first instruction comprises the selected data to be typeset and a first typesetting rule, wherein the typesetting rule comprises right-to-left typesetting, left-to-right typesetting, bottom-to-top typesetting, top-to-bottom typesetting and the like. And the terminal equipment typesets the data to be typeset based on the first typesetting rule carried in the first instruction. Referring to fig. 1B, in an embodiment, an editing interface of an editor to which the data composition method provided by the present invention is applied is 11, where the editing interface 11 includes an operation bar 12 (the operation content included in the operation bar 12 is prior art and is not described in detail here), a container 13, a container 14, data to be composed 15, an operation bar 16, and an operation item 17. The specific formation process of the containers 13 and 14 can be described with reference to step 201 in fig. 2A, which will not be described in detail herein. The operation bar 16 includes: all-select, copy, paste, left-to-right, right-to-left, etc. The typesetting rule of the Chinese content recorded in the container 13 is typesetting from left to right, the typesetting rule of the Uygur content recorded in the container 14 is typesetting from right to left, and the '7-8-15' in the container 14 is in a state of being typeset from right to left due to the typesetting rule of the Uygur content from right to left, and does not accord with the left-to-right reading habit of a user on a mathematical formula. Taking "7-8-15" in the container 14 as the data 15 to be typeset, the first typesetting rule is typeset from left to right as an example: the user selects "7-8-15" as the data 15 to be typeset, the operation bar 16 is obtained after right-click by the mouse, the user selects the first typesetting rule of "typesetting from left to right" corresponding to the operation item 17 from the operation bar 16, then the first instruction carrying the data "7-8-15" to be typeset and the first typesetting rule "typesetting from left to right" is generated, and when the terminal device detects the first instruction of "typesetting from left to right" for "7-8-15", the terminal device executes the typesetting of "typesetting from left to right" for the data "7-8-15" to be typeset.
In step 102, in an embodiment, a preset line number threshold is used to divide whether the data to be typeset corresponds to a control or a container, and it will be understood by those skilled in the art that the container may contain at least one control, where the control is the minimum unit corresponding to the data to be typeset. And when the line number occupied by the data to be typeset is less than the preset line number threshold value, the terminal equipment generates a first control corresponding to the data to be typeset and stores the first typesetting rule in the first control. With reference to step 101, taking the preset line number threshold as 2 as an example, the line number occupied by the data to be typeset "7-8-15" is 1, the terminal device generates a first control corresponding to the data to be typeset "7-8-15", and stores the first typesetting rule "typeset from left to right" in the first control.
In step 103, in an embodiment, the data to be typeset is displayed based on the first typesetting rule stored in the first control. In combination with step 102, the terminal device makes the data to be typeset "7-8-15" present the typesetting manner of "15-8-7" based on the first typesetting rule "typesetting from left to right" stored in the first control, and displays the data through the editing interface 11, where fig. 1C is the editing interface 11 when the terminal device displays the data to be typeset based on the first typesetting rule stored in the first control, and in combination with fig. 1C, the data "15-8-7" displayed in the dashed box 18 conforms to the reading habit of the user on the mathematical formula from left to right.
In the embodiment of the invention, the terminal equipment typesets the data to be typeset according to the first typesetting rule based on the first instruction, determines and generates the first control corresponding to the data to be typeset according to the line number occupied by the data to be typeset and the preset line number threshold value, and stores the first typesetting rule in the first control, so that the terminal equipment can display the data to be typeset based on the first typesetting rule stored in the first control, the editor is ensured to have flexibility when editing the data, and the readability of the displayed data in the editing interface is improved.
Fig. 2A is a flowchart of another embodiment of a data layout method provided by the present invention, fig. 2B is a schematic diagram of an editing interface of an editor in the embodiment shown in fig. 2A, and fig. 2C is a schematic diagram of an editing interface of an editor in a case where a number of lines occupied by data to be laid out is greater than a preset number of lines threshold on the basis of fig. 2B, and the embodiment of the present invention is exemplarily described, with reference to fig. 1A, fig. 1B, fig. 2B, and fig. 2C, on the basis of steps 101 to 103, a case where a number of lines occupied by data to be laid out is greater than or equal to a preset number of lines threshold, as shown in fig. 2A, including the following steps:
step 201: and when the line number occupied by the data to be typeset is greater than or equal to the preset line number threshold, generating a first container corresponding to the data to be typeset, and storing the first typesetting rule in the first container.
Step 202: and displaying the data to be typeset based on the first typesetting rule stored in the first container.
In step 201, when the number of lines occupied by the data to be typeset is greater than or equal to the preset number of lines threshold, the terminal device generates a first container corresponding to the data to be typeset, and stores the first typesetting rule in the first container. As can be understood by those skilled in the art, when a user creates a new document, the terminal device generates a container at the same time, with reference to fig. 2B, when the user inputs or pastes the content in the dashed box 21 into the editing interface 11, the content in the dashed box 21 corresponds to the container, and the container stores the composition rule of "composition from left to right" of the content in the dashed box 21, it should be noted that, when the user inputs or pastes the content in the dashed box 21 into the editing interface 11, the terminal device generates corresponding controls or containers for different types of data according to different data types and the number of lines occupied by the same type of data, where the data types include: audio, video, animation, pictures, text, etc. Referring to fig. 2C, the contents in the dashed-line box 22 are all chinese, and the terminal device generates a container for the chinese contents corresponding to the dashed-line box 22; similarly, the content in the dashed box 23 is Uygur, and the terminal device generates a container for the Uygur content corresponding to the dashed box 23. Since the rule of the "layout from left to right" of the text contents of the uygur in the dashed box 23 does not conform to the reading habit of the "layout from right to left" of the user, the user needs to rearrange the contents in the dashed box 23 as shown in fig. 2C. With reference to fig. 2C, taking the content in the dashed box 23 as the data 23 to be typeset as an example, the user obtains the operation bar 24 after right-clicking the mouse, the user selects the first typesetting rule of "right-to-left typesetting" corresponding to the operation item 25 from the operation bar 24, then generates the first instruction of "right-to-left typesetting" carrying the data 23 to be typeset and the first typesetting rule, and when the terminal device detects the first instruction of "right-to-left typesetting" for the data 23 to be typeset, the terminal device performs typesetting of "right-to-left typesetting" on the data 23 to be typeset. Taking the preset line number threshold as 2 as an example, because the line number 5 occupied by the data 23 to be typeset is greater than the preset line number threshold 2, the terminal device segments the first container from the container corresponding to the dashed line frame 21 in fig. 2B, and with reference to fig. 1B, the container 13 in fig. 1B is the container corresponding to the content in the dashed line frame 22 in fig. 2C, the container 14 is the container corresponding to the data 23 to be typeset after the "typesetting from right to left", that is, the first container, and the terminal device stores the first typesetting rule "typesetting from right to left" in the container 14.
In step 202, the terminal device displays the data to be typeset based on the first typesetting rule stored in the first container. In combination with step 201, the terminal device displays the data to be typeset 23 based on the first typesetting rule "typeset from right to left" stored in the container 14, see fig. 1B.
In the embodiment of the invention, the terminal equipment generates the first container corresponding to the data to be typeset aiming at the data to be typeset with the occupied line number greater than or equal to the preset line number threshold value, and stores the first typesetting rule in the first container, and the terminal equipment displays the data to be typeset based on the first typesetting rule stored in the first container, so that the control can be continuously divided in the data to be typeset, and the flexibility of the editor for editing the data is enhanced.
Fig. 3A is a flowchart of an embodiment of a method for typesetting still another data provided by the present invention, fig. 3B is a schematic diagram of positions of a container and a control in the embodiment shown in fig. 3A, and fig. 3C is a schematic diagram of a change in a position of a first control on the basis of fig. 3B, where, in the embodiment of the present invention, in combination with fig. 1A, fig. 3B, and fig. 3C, on the basis of steps 101 to 103, an exemplary explanation is performed on a typesetting process of the first control, as shown in fig. 3A, including the following steps:
step 301: and when a second instruction for typesetting the first control is detected, typesetting the first control based on a second typesetting rule carried in the second instruction.
Step 302: and updating the position sequence number corresponding to the first control and the position sequence number corresponding to each second control in the at least one second control based on a third typesetting rule recorded in a second container to obtain an updated result, wherein the second container is used for storing the typesetted first controls, and the second container also stores at least one second control except the first controls.
Step 303: and displaying the data to be typeset corresponding to the first control and the third data corresponding to each second control in the at least one second control based on the updating result and the third typesetting rule.
In step 301, the terminal device may type different positions between the controls, where the second instruction is an instruction for type setting for the first control, the second type setting rule is that when the user selects the first control, the position of the first control is changed by dragging the mouse, and the change result is the second type setting rule. With reference to fig. 3B and 3C, fig. 3B and 3C both include a container 31, a container 32, a control a, a control B, a control C, a control D, and a control E. Taking the first control as the control B as an example, after the user selects the control B, the user drags the control B to the position shown in fig. 3C by dragging the mouse.
In step 302, the second container is used to store the first controls after layout, and the third layout rule is a layout rule of each control in the second container. With reference to step 301, taking the second container as the container 32, the typesetting rule corresponding to the container 31 is "typesetting from left to right", and the third typesetting rule corresponding to the container 32 is "typesetting from right to left", where the position sequence numbers corresponding to the control a, the control B, and the control C in fig. 3B are 1, 2, and 3, respectively; the position serial numbers corresponding to the control D and the control E are respectively 2 and 1; the position sequence numbers corresponding to the control a and the control C in fig. 3C are updated to 1 and 2, respectively; and the position sequence numbers corresponding to the control D, the control B and the control E are respectively updated to be 3, 2 and 1.
In step 303, the data to be typeset corresponding to the first control and the third data corresponding to each of the at least one second control are displayed based on the update result and the third typesetting rule. The first control is a control B, and the data to be typeset corresponding to the control B is ABC; the second control is a control D and a control E; for example, the control D and the control E correspond to the third data "BDE" and the third data "DEF", respectively, and with reference to fig. 3C, the terminal device displays the data corresponding to the control D, the control B, and the control E in the container 32 as "BDE abcdef" based on the update result and the third typesetting rule.
In the embodiment of the invention, the terminal equipment can flexibly adjust the position of the first control, and when different controls contain different data types, the editor can integrate different types of data such as audio, video, animation, pictures, characters and the like, so that the content in the document is richer, and the reading interest of a user is improved.
Fig. 4A is a flowchart of an embodiment of a method for typesetting still another data provided by the present invention, fig. 4B is a schematic diagram of positions of a container and a control in the embodiment shown in fig. 4A, and fig. 4C is a schematic diagram of a position corresponding to at least one third control element on the basis of fig. 4B, where, in the embodiment of the present invention, in combination with fig. 1A, fig. 4B, and fig. 4C, on the basis of steps 101-103, an exemplary description is performed on a position corresponding to at least one third control element, as shown in fig. 4A, including the following steps:
step 401: and in a third container for storing the first control, generating at least one third control based on data which is adjacent to the first control in front and back.
In step 401, the container storing the first control is a third container, and with reference to fig. 4B, taking the third container as the container 41 in fig. 4B and taking the data corresponding to the control F as "123456789" as an example, the user selects "456" in the data "123456789" as data to be typeset, and typesets the data "456" to be typeset by taking the first typesetting rule as "typeset from right to left", so as to obtain the first control corresponding to "654". In connection with FIG. 4C, after "123456789" is changed to "123654789", control F corresponding to "123456789" is divided into control G, control H, and control I. The control G, the control H and the control I correspond to '123', '654' and '789', wherein the control H is a first control, and the control G and the control I are third controls corresponding to data adjacent to the first control in front and back.
In the embodiment of the invention, at least one third control is generated according to the data adjacent to the first control in the front and back directions, so that the data in the third control can be flexibly edited, the flexibility of the editor for editing the data is improved, and the readability of the data displayed in the editing interface of the editor is improved.
It should be noted that, based on the foregoing fig. 1A-4A, the terminal device generates an xml-format document according to all the controls, all the containers, the layout rules corresponding to all the controls, the layout rules corresponding to all the containers, and the information such as the size and the bytes of the data in the controls existing in the document, so that the edited document can be applied to other devices and software.
Corresponding to the data typesetting method, the invention also provides a hardware structure diagram of the terminal device shown in fig. 5. Referring to fig. 5, at the hardware level, the terminal device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required by other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the typesetting device of the data on the logic level. Of course, besides the software implementation, the present invention does not exclude other implementations, such as logic devices or combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
FIG. 6 is a block diagram of an embodiment of a data layout apparatus provided in the present invention, and as shown in FIG. 6, the data layout apparatus may include: a first layout module 61, a first control generation module 62, and a first data presentation module 63, wherein:
the first typesetting module 61 is used for typesetting the data to be typeset based on a first typesetting rule carried in a first instruction when the first instruction for typesetting the data to be typeset in the document is detected;
the first control generating module 62 is configured to generate a first control corresponding to the data to be typeset when the line number occupied by the data to be typeset is less than the preset line number threshold, and store the first typesetting rule in the first typesetting module 61 in the first control;
the first data display module 63 is configured to display the data to be typeset based on a first typesetting rule, where the first typesetting rule is stored in the first control generated in the first control generation module 62.
Fig. 7 is a block diagram of another embodiment of a data layout apparatus provided by the present invention, and as shown in fig. 7, on the basis of the embodiment shown in fig. 6, the data layout apparatus further includes:
the container generating module 64 is configured to generate a first container corresponding to the data to be typeset when the number of lines occupied by the data to be typeset is greater than or equal to the preset number of lines threshold, and store the first typesetting rule in the first container;
the second data displaying module 65 is configured to display the data to be typeset based on the first typesetting rule stored in the first container generated in the container generating module 64.
In one embodiment, the data typesetting device further includes:
a second typesetting module 66, configured to, when a second instruction for typesetting the first control generated in the first control generating module 62 is detected, typeset the first control based on a second typesetting rule carried in the second instruction;
a position sequence number updating module 67, configured to update a position sequence number corresponding to the first control and update a position sequence number corresponding to each second control in the at least one second control based on a third typesetting rule recorded in a second container, so as to obtain an update result, where the second container is used to store the typesetted first control in the second typesetting module 66, and the second container also stores at least one second control other than the first control;
and a third data displaying module 68, configured to display the data to be typeset corresponding to the first control and the third data corresponding to each of the at least one second control based on the update result in the position sequence number updating module 67 and the third typesetting rule.
In one embodiment, the data typesetting device further includes:
and a second control generating module 69, configured to generate, in a third container storing the first control, at least one third control based on data adjacent to the first control in front of and behind the first control.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
As can be seen from the above embodiment, the terminal device typesets the data to be typeset according to the first typesetting rule based on the first instruction, determines to generate the first control corresponding to the data to be typeset according to the number of lines occupied by the data to be typeset and the preset number of line threshold, and stores the first typesetting rule in the first control, so that the terminal device can display the data to be typeset based on the first typesetting rule stored in the first control, thereby ensuring that an editor has flexibility in editing the data, and improving readability of the displayed data in an editing interface.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
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, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (4)

1. A method for typesetting data, the method comprising:
when a first instruction for typesetting data to be typeset in a document is detected, typesetting the data to be typeset based on a first typesetting rule carried in the first instruction; the document comprises other data except the data to be typeset, and the typesetting rule of the other data is different from the first typesetting rule; the first instruction comprises selected data to be typeset and a first typesetting rule, wherein the first typesetting rule comprises right-to-left typesetting, left-to-right typesetting, bottom-up typesetting and top-down typesetting;
when the line number occupied by the data to be typeset is less than a preset line number threshold value, generating a first control corresponding to the data to be typeset, and storing the first typesetting rule in the first control;
displaying the data to be typeset based on the first typesetting rule stored in the first control;
the method further comprises the following steps:
when the line number occupied by the data to be typeset is greater than or equal to the preset line number threshold, generating a first container corresponding to the data to be typeset, and storing the first typesetting rule in the first container;
and displaying the data to be typeset based on the first typesetting rule stored in the first container.
2. The method of claim 1, further comprising:
when a second instruction for typesetting aiming at the first control is detected, typesetting the first control based on a second typesetting rule carried in the second instruction; the second instruction is an instruction for typesetting aiming at the first control, the second typesetting rule is that when the user selects the first control, the position of the first control is changed by dragging the mouse, and the change result is a second typesetting rule;
updating the position sequence number corresponding to the first control and the position sequence number corresponding to each second control in at least one second control based on a third typesetting rule recorded in a second container to obtain an updated result, wherein the second container is used for storing the typesetted first controls, and the second container also stores the at least one second control except the first controls; the third typesetting rule is a typesetting rule of each control in the second container;
displaying the data to be typeset corresponding to the first control and third data corresponding to each second control in the at least one second control based on the updating result and a third typesetting rule;
the method further comprises the following steps:
and in a third container for storing the first control, generating at least one third control based on data which is adjacent to the first control in front and back.
3. An apparatus for composing data, the apparatus comprising:
the first typesetting module is used for typesetting the data to be typeset based on a first typesetting rule carried in a first instruction when the first instruction for typesetting the data to be typeset in the document is detected; the document comprises other data except the data to be typeset, and the typesetting rule of the other data is different from the first typesetting rule; the first instruction comprises selected data to be typeset and a first typesetting rule, wherein the first typesetting rule comprises right-to-left typesetting, left-to-right typesetting, bottom-up typesetting and top-down typesetting;
the first control generating module is used for generating a first control corresponding to the data to be typeset when the line number occupied by the data to be typeset is less than a preset line number threshold value, and storing the first typesetting rule in the first typesetting module in the first control;
the first data display module is used for displaying the data to be typeset based on the first typesetting rule, and the first typesetting rule is stored in the first control generated in the first control generation module;
the device further comprises:
the container generation module is used for generating a first container corresponding to the data to be typeset when the line number occupied by the data to be typeset is greater than or equal to the preset line number threshold, and storing the first typesetting rule in the first container;
and the second data display module is used for displaying the data to be typeset based on the first typesetting rule stored in the first container generated in the container generation module.
4. The apparatus of claim 3, further comprising:
the second typesetting module is used for typesetting the first control based on a second typesetting rule carried in the second instruction when the second instruction for typesetting the first control generated in the first control generating module is detected; the second instruction is an instruction for typesetting aiming at the first control, the second typesetting rule is that when the user selects the first control, the position of the first control is changed by dragging the mouse, and the change result is a second typesetting rule;
a position sequence number updating module, configured to update a position sequence number corresponding to the first control and update a position sequence number corresponding to each second control in at least one second control based on a third typesetting rule recorded in a second container, to obtain an updated result, where the second container is used to store the first control typeset in the second typesetting module, and the second container also stores the at least one second control except the first control; the third typesetting rule is a typesetting rule of each control in the second container;
a third data display module, configured to display, based on the update result in the position sequence number update module and a third typesetting rule, the data to be typeset corresponding to the first control and third data corresponding to each of the at least one second control;
the device further comprises:
and the second control generation module is used for generating at least one third control based on data which are adjacent to the first control in front and back in a third container for storing the first control.
CN201710254411.7A 2017-04-18 2017-04-18 Data typesetting method and device Active CN107122345B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710254411.7A CN107122345B (en) 2017-04-18 2017-04-18 Data typesetting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710254411.7A CN107122345B (en) 2017-04-18 2017-04-18 Data typesetting method and device

Publications (2)

Publication Number Publication Date
CN107122345A CN107122345A (en) 2017-09-01
CN107122345B true CN107122345B (en) 2021-02-09

Family

ID=59725366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710254411.7A Active CN107122345B (en) 2017-04-18 2017-04-18 Data typesetting method and device

Country Status (1)

Country Link
CN (1) CN107122345B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7913166B2 (en) * 2006-05-09 2011-03-22 International Business Machines Corporation Method and apparatus for implied editing action through directional and ordered data selection
CN103914443B (en) * 2013-01-09 2018-06-12 北大方正集团有限公司 A kind of mixing method and device of multilingual words
US10296572B2 (en) * 2014-05-16 2019-05-21 Brother Kogyo Kabushiki Kaisha Editing apparatus

Also Published As

Publication number Publication date
CN107122345A (en) 2017-09-01

Similar Documents

Publication Publication Date Title
US9785623B2 (en) Identifying a set of related visible content elements in a markup language document
CN100429646C (en) Method and apparatus for displaying electronic document including handwritten data
CN107704576B (en) Data display optimization method and device, terminal equipment and storage medium
US7522176B2 (en) Dynamically generating mini-graphs to represent style and template icons
US20140208203A1 (en) Key-Frame based Authoring and Generation of Highly Resizable Document Layout
US9817794B2 (en) Responsive rendering of data sets
US20150012818A1 (en) System and method for semantics-concise interactive visual website design
CN109145272B (en) Text rendering and layout method, device, equipment and storage medium
CN102612692A (en) Display processing device, display processing device control method, control program, and computer-readable recording medium storing the control program
US11893338B2 (en) Merging selected digital point text objects
KR20160113135A (en) Providing print view of document for editing in web-based application
JP2011086050A (en) Information processing terminal and computer program
CN107122345B (en) Data typesetting method and device
CN111062194A (en) Document processing method and device, computer equipment and readable storage medium
CN108279962B (en) Method and device for creating visual data display interface
CN114063854A (en) File editing processing method and device and electronic equipment
CN114118029A (en) Image processing method, device, equipment and storage medium
WO2021082652A1 (en) Information display method and apparatus, and computer-readable storage medium
CN110020289A (en) Text display method, device and equipment in a kind of browser
US10592087B1 (en) System and method for creating fluid design keyframes on graphical user interface
CN107656908B (en) Method and system for implementing placeholder
CN113191126A (en) Form display method, device, system and medium based on Qt development framework
CN100349203C (en) Co-screen displaying device supporting scale chracter shape and method thereof
CN112711388A (en) Label template generation method and device, electronic equipment and readable storage medium
CN106095734B (en) Text display method and device

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