CN106815186A - typesetting processing method and device - Google Patents
typesetting processing method and device Download PDFInfo
- Publication number
- CN106815186A CN106815186A CN201510850260.2A CN201510850260A CN106815186A CN 106815186 A CN106815186 A CN 106815186A CN 201510850260 A CN201510850260 A CN 201510850260A CN 106815186 A CN106815186 A CN 106815186A
- Authority
- CN
- China
- Prior art keywords
- subformula
- data
- formula
- length
- mathematical formulae
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/189—Automatic justification
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Document Processing Apparatus (AREA)
Abstract
The present invention provides a kind of typesetting processing method and device, including:When the length of mathematical formulae is more than the remaining width that it is expert at, the tree structure according to formula splits and obtains n subformula;Store all subformulas to the first data, the preceding n-m length of subformula of record to first memory;If the length of first memory record is more than remaining width, m is added 1 and m values to second memory are recorded, the n-m length of subformula is to first memory before recording currently again, until the length recorded in first memory is not more than remaining width;The m values of second memory record are obtained, according to preceding m subformula in the first data and residue subformula, its layout position is simultaneously set to one's own profession and next line by generation respective formula respectively;According to the layout position of each formula, typesetting treatment is carried out.The scheme provided by the present invention, can accelerate typesetting speed, improve typesetting efficiency, reduce time cost and cost of labor.
Description
Technical field
The present invention relates to typographical printing field, more particularly to a kind of typesetting processing method and device.
Background technology
In current typesetting technique, typesetting engine generally regards mathematical formulae as an entirety, it
Typesetting is carried out as a larger single character of length.But when the length of mathematical formulae is long,
The width of i.e. single formula has exceeded a width for line of text, may result in mathematical formulae beyond text
This frame.
In this regard, a kind of scheme is that mathematical formulae manually is carried out into fractionation line feed at present, but manually
Operation can bring some problems, more public with the presence or absence of mathematics than in the text that typesetting is treated if desired for manual detection
Formula, this process is very time-consuming, and easily causes the omission of mathematical formulae, in addition, user is to public affairs
The level of understanding of formula, it is also possible to cause the metasemy of mathematical formulae, this results in time cost and people
The waste of work cost, and the reasonability of typesetting cannot be ensured.
The content of the invention
The present invention provides a kind of typesetting processing method and device, for solving existing mathematical formulae fractionation side
Case time-consuming the low problem of efficiency.
The first aspect of the invention is to provide a kind of typesetting processing method, including:Obtain mathematical formulae
Remaining width that current length and the mathematical formulae are expert at simultaneously is compared, if the mathematical formulae
Current length is more than the remaining width that the mathematical formulae is expert at, then according to the tree-like of the mathematical formulae
Structure, the original series being made up of n subformula deconsolidation process, acquisition;By the original series
In all subformulas store to the first current data, calculate and record what is stored in current first data
The length of preceding n-m subformula to first memory, wherein, the initial value of m is 1;If described first
The value of m is then added 1 by the length of current record more than the remaining width that the first data are expert in memory
And record to second memory the value of current m, and perform the calculating again and record current first
The step of length to first memory of the preceding n-m subformula stored in data, until described first deposits
The length of current record is not more than the remaining width in reservoir;Obtain and currently remember in the second memory
The value of the m of record, the preceding m subformula in first data generates the first formula, and will
The layout position of first formula is set to first data and is expert at;According in first data
Subformula in addition to preceding m subformula, generates the second formula, and by the typesetting of second formula position
Install and be set to the next line that first data are expert at;According to first formula and second formula
Layout position, carry out typesetting treatment.
Another aspect of the present invention is to provide a kind of typesetting processing unit, including:Acquisition module, is used for
Obtain the current length and the remaining width be expert at of the mathematical formulae of mathematical formulae and be compared;Tear open
Sub-module, if wide more than the residue that the mathematical formulae is expert at for the current length of the mathematical formulae
Degree, then according to the tree structure of the mathematical formulae, by deconsolidation process, obtain by n subformula's structure
Into original series;Processing module, for all subformulas in the original series to be stored to current
The first data, calculate and record the length of the preceding n-m subformula stored in current first data to the
One memory, wherein, the initial value of m is 1;The processing module, if being additionally operable to first storage
The value of m is then added 1 and incited somebody to action by the length of current record more than the remaining width that the first data are expert in device
The value of current m is recorded to second memory, and is calculated again and recorded what is stored in current first data
The length of preceding n-m subformula to first memory, until in the first memory current record length
Degree is not more than the remaining width;Editor module, for obtaining current record in the second memory
The value of m, the preceding m subformula in first data generates the first formula, and will be described
The layout position of the first formula is set to first data and is expert at;According in first data except preceding
Subformula beyond m subformula, generates the second formula, and the layout position of second formula is set
It is set to the next line that first data are expert at;Type-setting module, for according to first formula and institute
The layout position of the second formula is stated, typesetting treatment is carried out.
Typesetting processing method and device that the present invention is provided, when the length for detecting mathematical formulae is more than its institute
During the remaining width being expert at, then according to the tree structure of mathematical formulae, obtained including many by deconsolidation process
The sequence of individual subformula, and compare the length of front portion subformula in the sequence and mathematical formulae is expert at
Remaining width, it is determined that needing line feed to the subformula of next line, the subformula's generation according to each row is corresponding
Formula simultaneously carries out typesetting according to the layout position of each formula, realizes the automatic fractionation and line feed of mathematical formulae,
Reduce artificial fractionation and typesetting so that typesetting is more reasonable, and the meaning of mathematical formulae is more accurate, and accelerates
Typesetting speed, improves typesetting efficiency, reduces time cost and cost of labor.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to reality
The accompanying drawing to be used needed for example or description of the prior art is applied to be briefly described, it should be apparent that, below
Accompanying drawing in description is some embodiments of the present invention, for those of ordinary skill in the art, not
On the premise of paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of typesetting processing method that the embodiment of the present invention one is provided;
Fig. 2 is the schematic flow sheet of another typesetting processing method that the embodiment of the present invention one is provided;
Fig. 3 is the schematic flow sheet of another typesetting processing method that the embodiment of the present invention one is provided;
Fig. 4 is the schematic flow sheet of another typesetting processing method that the embodiment of the present invention one is provided;
Fig. 5 is the schematic flow sheet of another typesetting processing method that the embodiment of the present invention one is provided;
Fig. 6 is a kind of structural representation of typesetting processing unit that the embodiment of the present invention two is provided;
Fig. 7 is the structural representation of another typesetting processing unit that the embodiment of the present invention two is provided;
Fig. 8 is the structural representation of another typesetting processing unit that the embodiment of the present invention two is provided;
Fig. 9 is the structural representation of another typesetting processing unit that the embodiment of the present invention two is provided.
Specific embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with this hair
Accompanying drawing in bright embodiment, is clearly and completely described to the technical scheme in the embodiment of the present invention,
Obviously, described embodiment is a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained under the premise of creative work is not made
The every other embodiment for obtaining, belongs to the scope of protection of the invention.
Fig. 1 is a kind of schematic flow sheet of typesetting processing method that the embodiment of the present invention one is provided, such as Fig. 1
Shown, methods described includes:
101st, the current length and the remaining width be expert at of the mathematical formulae of mathematical formulae are obtained and is carried out
Compare, if the current length of the mathematical formulae is more than the remaining width that the mathematical formulae is expert at,
According to the tree structure of the mathematical formulae, the original being made up of n subformula deconsolidation process, acquisition
Beginning sequence;
102nd, all subformulas in the original series are stored to the first current data, calculates and remember
The length of the preceding n-m subformula stored in current first data is recorded to first memory, wherein, m's
Initial value is 1;
If the 103, the length of current record is wide more than the residue that the first data are expert in the first memory
Degree, then add 1 and record to second memory the value of current m by the value of m, and performs again described
Calculate and record the length of the preceding n-m subformula stored in current first data to the step of first memory
Suddenly, until the length of current record is not more than the remaining width in the first memory;
104th, the value of the m of current record in the second memory is obtained, according to first data
In preceding m subformula, generate the first formula, and the layout position of first formula is set to institute
The first data are stated to be expert at;It is raw according to the subformula in first data in addition to preceding m subformula
Into the second formula, and the layout position of second formula is set under first data are expert at
A line;
105th, according to first formula and the layout position of second formula, typesetting treatment is carried out.
Specifically, the complete structure data of mathematical formulae can be recorded in an object, as it
Occupy-place in word flow.Wherein, the subformula for carrying out splitting acquisition to mathematical formulae is not one only
Vertical, the individuality being not in contact with other subformulas, but there is sequential structure pass between each subformula
System, belongs to a part for mathematical formulae, it is impossible to arbitrarily shift one's position.
For example, when typesetting is carried out to mathematical formulae, the overall width of formula is first calculated
TotalWidth, if overall width is carried out more than the remaining line width LineWidth that mathematical formulae is expert at
Formula splits, in the length of n-m subformula in calculating First ray, can currently in First ray,
Last subformula is removed, length computation is carried out to remaining subformula, the public affairs after being updated
Formula width TotalWidth, it is compared with remaining line width LineWidth, if still more than residue
Line width LineWidth, then continue to remove last subformula in current First ray, carries out remainder
The length computation of subformula, until the TotalWidth for calculating no more than LineWidth.
It is after the fractionation position that can make TotalWidth no more than LineWidth is found, then matching is surplus
The preceding m subformula of remaining line width merges into a formula, and remaining subformula is merged into another formula,
It is individually placed to mathematical formulae to be expert at the next line that sum formula is expert at, so as to realize mathematical formulae
Tear row open.
In practical application, when non-typesetting has any content before certain trade, its remaining line width is the row full line
Line width.
Specifically, the mode split to mathematical formulae has various, as shown in Fig. 2 Fig. 2 is this hair
The schematic flow sheet of another typesetting processing method that bright embodiment one is provided, in Fig. 1 illustrated embodiments
On the basis of, according to the tree structure of the mathematical formulae described in 101, by deconsolidation process, obtain
The original series being made up of n subformula, can specifically include:
201st, the child node under the first node layer in the tree structure of mathematical formulae is labeled as split point;
202nd, the formula data under each described split point is obtained, and it is right according to formula data generation
The subformula answered, the original series that acquisition is made up of n subformula.
If specifically, by the too deep vertex ticks of node layer for split point carries out formula fractionation, due to mistake
Deep node is an entirety for nesting, and carrying out fractionation based on too deep node may destroy mathematical formulae
Mathematical meaning, cause finally tear open row after mathematical formulae it is inaccurate.In present embodiment, by mathematics
Child node in the tree structure of formula under the first node layer is labeled as split point, public mathematics is effectively ensured
On the basis of formula accuracy, the fractionation to mathematical formulae is realized.
Further, in order to ensure the reasonability of typesetting, after the first formula of generation, in addition it is also necessary to determine second
Whether the length of formula can match the width of next line.
Specifically, if it is possible to match the width of next line, accordingly, as shown in figure 3, Fig. 3 is this
The schematic flow sheet of another typesetting processing method that inventive embodiments one are provided, in foregoing any embodiment party
On the basis of formula, according to the subformula in first data in addition to preceding m subformula described in 104,
Before generating the second formula, can also include:
301st, the remaining width of the next line that first data are expert at is obtained;
Accordingly, it is described public according to the son in first data in addition to preceding m subformula in 104
Formula, generates the second formula, can specifically include:
302nd, the length of subformula in the first data in addition to preceding m subformula and described next is compared
Capable remaining width, if the length of the subformula in first data in addition to preceding m subformula is little
In the remaining width of the next line, then according to the son in first data in addition to preceding m subformula
Formula, generates the second formula.
If specifically, the width of next line can not be matched, accordingly, as shown in figure 4, Fig. 4 is
The schematic flow sheet of another typesetting processing method that the embodiment of the present invention one is provided, is implementing shown in Fig. 3
On the basis of mode, after 302, can also include:
If the 401, the length of the subformula in first data in addition to preceding m subformula is more than described
The remaining width of the next line that the first data are expert at, then emptying the first data and the value to m is carried out initially
Change, the sequence that the subformula in first data in addition to preceding m subformula is constituted is stored to first
Data, and perform the calculating again and record the preceding n-m subformula of storage in current first data
The step of length to first memory.
By above-mentioned implementation method, the length of the subformula of typesetting is needed according to next line, it is entered to advance
One step tears row open, so as to improve the reasonability of typesetting.
Additionally, in practical application, during typesetting, it is possible to mathematical formulae can be edited again,
In order to ensure the accuracy of mathematical formulae, it is necessary to re-start the row of tearing open of mathematical formulae, accordingly, such as scheme
Shown in 5, Fig. 5 is the schematic flow sheet of another typesetting processing method that the embodiment of the present invention one is provided,
On the basis of foregoing any embodiment, methods described can also include:
If the 501, detecting the mathematical formulae to occur to edit again, the acquisition mathematical formulae is re-executed
Current length and the mathematical formulae be expert at remaining width the step of.
It should be noted that 501 can perform in any instant during mathematical formulae tears row open, also
To say, if detect it is current carry out tearing capable mathematical formulae open occur to edit again, then that ignores this tears row open
As a result, the mathematical formulae after editor carried out again tearing row open.The simply a kind of implementation of citing be given in figure
Mode, is not limited.
The typesetting processing method that the present embodiment is provided, when the length for detecting mathematical formulae is expert at more than it
Remaining width when, then according to the tree structure of mathematical formulae, by deconsolidation process obtain include many height
The sequence of formula, and compare the length of front portion subformula in the sequence and that mathematical formulae is expert at is surplus
Remaining width, it is determined that line feed to the subformula of next line is needed, the subformula's generation respective formula according to each row
And typesetting is carried out according to the layout position of each formula, and the automatic fractionation and line feed of mathematical formulae are realized, reduce
It is artificial to split and typesetting so that typesetting is more reasonable, and the meaning of mathematical formulae is more accurate, and accelerates typesetting
Speed, improves typesetting efficiency, reduces time cost and cost of labor.
Fig. 6 is a kind of structural representation of typesetting processing unit that the embodiment of the present invention two is provided, such as Fig. 6
Shown, described device includes:
Acquisition module 61, it is surplus that current length and the mathematical formulae for obtaining mathematical formulae are expert at
Remaining width is simultaneously compared;
Module 62 is split, if being expert at more than the mathematical formulae for the current length of the mathematical formulae
Remaining width, then according to the tree structure of the mathematical formulae, by deconsolidation process, obtain by n
The original series that subformula is constituted;
Processing module 63, for all subformulas in the original series to be stored to the first current number
According to, the length of the preceding n-m subformula stored in current first data is calculated and recorded to first memory,
Wherein, the initial value of m is 1;
Processing module 63, if the length for being additionally operable to current record in the first memory is more than the first data
The remaining width being expert at, then add 1 and record to second memory the value of current m by the value of m,
And calculate again and record the length of the preceding n-m subformula stored in current first data and store to first
Device, until the length of current record is not more than the remaining width in the first memory;
Editor module 64, the value of the m for obtaining current record in the second memory, according to institute
State the preceding m subformula in the first data, generate the first formula, and by the typesetting position of first formula
Install and be set to first data and be expert at;According in first data in addition to preceding m subformula
Subformula, generates the second formula, and the layout position of second formula is set into first data
The next line being expert at;
Type-setting module 65, for the layout position according to first formula and second formula, is carried out
Typesetting is processed.
Specifically, split module 62 the complete structure data of mathematical formulae can be recorded in an object
In, the occupy-place as it in word flow.Wherein, split module 62 carries out fractionation acquisition to mathematical formulae
Subformula be not one independent, the individuality being not in contact with other subformulas, but each height is public
There is sequential structure relation between formula, belong to a part for mathematical formulae, it is impossible to arbitrarily shift one's position.
For example, when typesetting is carried out to mathematical formulae, acquisition module 61 first calculates the beam overall of formula
Degree TotalWidth, and the remaining line width that mathematical formulae is expert at is obtained, if overall width is public more than mathematics
The remaining line width LineWidth that formula is expert at, then split module 62 carries out public affairs according to the tree structure of formula
Formula splits, and processing module 63, can be from current in the length of n-m subformula in calculating the first data
In first data, last subformula is removed, length computation is carried out to remaining subformula, obtained
Formula width TotalWidth after to renewal is simultaneously recorded to first memory, by what is currently removed
The number m of subformula is recorded to second memory, and processing module 63 is by current record in first memory
Length be compared with residue line width LineWidth, if still more than remaining line width LineWidth,
Then continue to remove last subformula in current first data, calculate and record remaining subformula
Length, the number m of the subformula that will currently remove is recorded to second memory, until first memory
The length of middle record is not more than LineWidth.
After the length recorded in first memory is not more than LineWidth, editor module 64 is deposited from second
Current m values are obtained in reservoir, according to the preceding m subformula of the remaining line width of matching, generation is corresponding public
Formula, another formula is generated according to remaining subformula, and its layout position is arranged on into mathematical formulae respectively
The next line that be expert at sum formula is expert at, layout position of the type-setting module 65 according to each formula
Rational typesetting treatment is carried out, row is torn open so as to realize mathematical formulae.
In practical application, when non-typesetting has any content before certain trade, its remaining line width is the row full line
Line width.
Specifically, the mode that fractionation module 62 is split to mathematical formulae has various, as shown in fig. 7,
Fig. 7 is the structural representation of another typesetting processing unit that the embodiment of the present invention two is provided, in Fig. 6 institutes
Show on the basis of implementation method, splitting module 62 includes:
Indexing unit 621, for the child node under the first node layer in the tree structure of just mathematical formulae
Labeled as split point;
Processing unit 622, for obtaining the formula data under each described split point, and according to described
Formula data generates corresponding subformula, the original series that acquisition is made up of n subformula.
In present embodiment, indexing unit 621 is by under the first node layer in the tree structure of mathematical formulae
Child node is labeled as split point, on the basis of mathematical formulae accuracy is effectively ensured, realizes public to mathematics
The fractionation of formula.
Further, after in order to ensure that the reasonability of typesetting, editor module 64 generate the first formula, also need
Whether determine the length of the second formula can match the width of next line.
Specifically, if it is possible to match the width of next line, accordingly, the embodiment of the present invention two is also provided
Another typesetting processing unit, on the basis of foregoing any embodiment,
Acquisition module 61, is additionally operable to obtain the remaining width of the next line that first data are expert at;
Editor module 64, specifically for comparing the subformula in the first data in addition to preceding m subformula
The remaining width of length and the next line, if the son in first data in addition to preceding m subformula
The length of formula is not more than the remaining width of the next line, then individual according to preceding m is removed in first data
Subformula beyond subformula, generates the second formula.
If specifically, the length that editor module 64 detects the second formula by comparing can not be matched down
The width of a line, accordingly, as shown in figure 8, another row that Fig. 8 is the embodiment of the present invention two to be provided
The structural representation of version processing unit, on the basis of aforementioned embodiments, described device also includes:
Initialization module 66, if for the subformula in first data in addition to preceding m subformula
Length then empties the first data and to m more than the remaining width of the next line that first data are expert at
Value initialized;
Processing module 63, is additionally operable to the subformula's structure in first data in addition to preceding m subformula
Into sequence store to the first data, and calculate and record the preceding n-m stored in current first data again
The length of individual subformula is to first memory.
By above-mentioned implementation method, the length of the subformula of typesetting is needed according to next line, it is entered to advance
One step tears row open, so as to improve the reasonability of typesetting.
Additionally, in practical application, during typesetting, it is possible to mathematical formulae can be edited again,
In order to ensure the accuracy of mathematical formulae, it is necessary to re-start the row of tearing open of mathematical formulae, accordingly, such as scheme
Shown in 9, Fig. 9 is the structural representation of another typesetting processing unit that the embodiment of the present invention two is provided,
On the basis of foregoing any embodiment, described device also includes:
Detection module 67, if occurring to edit again for detecting the mathematical formulae, it indicates that acquisition module
The remaining width that the current length and the mathematical formulae of 61 reacquisition mathematical formulaes are expert at.
The typesetting processing unit that the present embodiment is provided, when the length for detecting mathematical formulae is expert at more than it
Remaining width when, then according to the tree structure of mathematical formulae, by deconsolidation process obtain include many height
The sequence of formula, and compare the length of front portion subformula in the sequence and that mathematical formulae is expert at is surplus
Remaining width, it is determined that line feed to the subformula of next line is needed, the subformula's generation respective formula according to each row
And typesetting is carried out according to the layout position of each formula, and the automatic fractionation and line feed of mathematical formulae are realized, reduce
It is artificial to split and typesetting so that typesetting is more reasonable, and the meaning of mathematical formulae is more accurate, and accelerates typesetting
Speed, improves typesetting efficiency, reduces time cost and cost of labor.
It is apparent to those skilled in the art that, it is for convenience and simplicity of description, above-mentioned to retouch
The specific work process of the device stated, may be referred to the corresponding process in preceding method embodiment, herein not
Repeat again.In addition it is also necessary to explanation, each functional unit in various embodiments of the present invention can be with integrated
In a processing unit, or unit is individually physically present, it is also possible to two or two with
Upper unit is integrated in a unit.Above-mentioned integrated unit can both be realized in the form of hardware,
Can be realized in the form of hardware adds SFU software functional unit.
One of ordinary skill in the art will appreciate that:Realize all or part of step of above-mentioned each method embodiment
Suddenly can be completed by the related hardware of programmed instruction.Foregoing program can be stored in a computer can
In reading storage medium.The program upon execution, performs the step of including above-mentioned each method embodiment;And
Foregoing storage medium includes:ROM, RAM, magnetic disc or CD etc. are various can be with store program codes
Medium.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than right
Its limitation;Although being described in detail to the present invention with reference to foregoing embodiments, this area it is common
Technical staff should be understood:It can still modify to the technical scheme described in foregoing embodiments,
Or equivalent is carried out to which part or all technical characteristic;And these modifications or replacement, and
The scope of the essence disengaging various embodiments of the present invention technical scheme of appropriate technical solution is not made.
Claims (10)
1. a kind of typesetting processing method, it is characterised in that including:
Obtain the current length and the remaining width be expert at of the mathematical formulae of mathematical formulae and compared
Compared with if the current length of the mathematical formulae is more than the remaining width that the mathematical formulae is expert at, root
According to the tree structure of the mathematical formulae, by deconsolidation process, it is original that acquisition is made up of n subformula
Sequence;
All subformulas in the original series are stored to the first current data, is calculated and is recorded and work as
In preceding first data store preceding n-m subformula length to first memory, wherein, m's is initial
Be worth is 1;
If the length of current record is more than the remaining width that the first data are expert in the first memory,
Then the value of m is added 1 and record to second memory the value of current m, and perform the calculating again
And the step of length to first memory of the preceding n-m subformula for recording storage in current first data,
Until the length of current record is not more than the remaining width in the first memory;
The value of the m of current record in the second memory is obtained, before in first data
M subformula, generates the first formula, and the layout position of first formula is set into described first
Data are expert at;According to the subformula in first data in addition to preceding m subformula, generation second
Formula, and the layout position of second formula is set to the next line that first data are expert at;
According to first formula and the layout position of second formula, typesetting treatment is carried out.
2. method according to claim 1, it is characterised in that described according in first data
Subformula in addition to preceding m subformula, before the second formula of generation, also includes:
Obtain the remaining width of the next line that first data are expert at;
The subformula according in first data in addition to preceding m subformula, generates the second formula,
Including:
Compare subformula in the first data in addition to preceding m subformula length and the next line it is surplus
Remaining width, if the length of the subformula in first data in addition to preceding m subformula be not more than it is described
The remaining width of next line, then according to the subformula in first data in addition to preceding m subformula,
Generate the second formula.
3. method according to claim 2, it is characterised in that described to compare in the first data except preceding
After the remaining width of the length of the subformula beyond m subformula and the next line, also include:
If the length of the subformula in first data in addition to preceding m subformula is more than the described first number
According to the remaining width of the next line being expert at, then empty the first data and the value to m is initialized, will
The sequence that subformula in first data in addition to preceding m subformula is constituted is stored to the first data,
And perform the calculating again and record the length of the preceding n-m subformula stored in current first data extremely
The step of first memory.
4. method according to claim 1, it is characterised in that described according to the mathematical formulae
Tree structure, the original series being made up of n subformula deconsolidation process, acquisition, including:
Child node under first node layer in the tree structure of mathematical formulae is labeled as split point;
The formula data under each described split point is obtained, and is generated according to the formula data corresponding
Subformula, the original series that acquisition is made up of n subformula.
5. the method according to any one of claim 1-4, it is characterised in that methods described is also wrapped
Include:
If detecting the mathematical formulae to occur to edit again, working as the acquisition mathematical formulae is re-executed
The step of remaining width that preceding length and the mathematical formulae are expert at.
6. a kind of typesetting processing unit, it is characterised in that including:
Acquisition module, the residue that current length and the mathematical formulae for obtaining mathematical formulae are expert at
Width is simultaneously compared;
Module is split, if be expert at more than the mathematical formulae for the current length of the mathematical formulae
Remaining width, then according to the tree structure of the mathematical formulae, by deconsolidation process, obtain by n son
The original series that formula is constituted;
Processing module, for all subformulas in the original series to be stored to the first current data,
The length of the preceding n-m subformula stored in current first data is calculated and recorded to first memory, its
In, the initial value of m is 1;
The processing module, if being additionally operable to the length of current record in the first memory more than the first number
According to the remaining width being expert at, then the value of m is added 1 and records to second memory the value of current m,
And calculate again and record the length of the preceding n-m subformula stored in current first data and store to first
Device, until the length of current record is not more than the remaining width in the first memory;
Editor module, the value of the m for obtaining current record in the second memory, according to described
Preceding m subformula in first data, generates the first formula, and by the layout position of first formula
First data are set to be expert at;According to the son in first data in addition to preceding m subformula
Formula, generates the second formula, and the layout position of second formula is set into the first data institute
The next line being expert at;
Type-setting module, for the layout position according to first formula and second formula, is arranged
Version treatment.
7. device according to claim 6, it is characterised in that
The acquisition module, is additionally operable to obtain the remaining width of the next line that first data are expert at;
The editor module, specifically for comparing the subformula in the first data in addition to preceding m subformula
Length and the next line remaining width, if in first data in addition to preceding m subformula
The length of subformula is not more than the remaining width of the next line, then according in first data remove preceding m
Subformula beyond individual subformula, generates the second formula.
8. device according to claim 7, it is characterised in that described device also includes:
Initialization module, if for the length of the subformula in first data in addition to preceding m subformula
Degree then empties the first data and to m's more than the remaining width of the next line that first data are expert at
Value is initialized;
The processing module, is additionally operable to the subformula in first data in addition to preceding m subformula
The sequence of composition is stored to the first data, and before calculating again and recording and store in current first data
The n-m length of subformula is to first memory.
9. device according to claim 6, it is characterised in that the fractionation module includes:
Indexing unit, for the child node mark under the first node layer in the tree structure of just mathematical formulae
It is split point;
Processing unit, for obtaining the formula data under each described split point, and according to the formula
The corresponding subformula of data genaration, the original series that acquisition is made up of n subformula.
10. the device according to any one of claim 6-9, it is characterised in that described device is also
Including:
Detection module, if occurring to edit again for detecting the mathematical formulae, it indicates that the acquisition mould
Block re-executes the remaining width that the current length and the mathematical formulae of the acquisition mathematical formulae are expert at
The step of.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510850260.2A CN106815186A (en) | 2015-11-27 | 2015-11-27 | typesetting processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510850260.2A CN106815186A (en) | 2015-11-27 | 2015-11-27 | typesetting processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106815186A true CN106815186A (en) | 2017-06-09 |
Family
ID=59155381
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510850260.2A Pending CN106815186A (en) | 2015-11-27 | 2015-11-27 | typesetting processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106815186A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113408237A (en) * | 2021-06-24 | 2021-09-17 | 奥士康科技股份有限公司 | Fancy typesetting method for improving cutting utilization rate |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101201817A (en) * | 2006-12-15 | 2008-06-18 | 北京北大方正电子有限公司 | Method for layout of formula |
CN102033863A (en) * | 2009-09-30 | 2011-04-27 | 北大方正集团有限公司 | Formula manipulation method and system |
CN103425634A (en) * | 2012-05-17 | 2013-12-04 | 北大方正集团有限公司 | Method and device for generating streaming documents |
-
2015
- 2015-11-27 CN CN201510850260.2A patent/CN106815186A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101201817A (en) * | 2006-12-15 | 2008-06-18 | 北京北大方正电子有限公司 | Method for layout of formula |
CN102033863A (en) * | 2009-09-30 | 2011-04-27 | 北大方正集团有限公司 | Formula manipulation method and system |
CN103425634A (en) * | 2012-05-17 | 2013-12-04 | 北大方正集团有限公司 | Method and device for generating streaming documents |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113408237A (en) * | 2021-06-24 | 2021-09-17 | 奥士康科技股份有限公司 | Fancy typesetting method for improving cutting utilization rate |
CN113408237B (en) * | 2021-06-24 | 2023-08-18 | 奥士康科技股份有限公司 | Fancy typesetting method for improving utilization rate of cut materials |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116991938A (en) | Systems and methods for extending blockchain utility through use of related sub-blockchains | |
CN107123415A (en) | A kind of automatic music method and system | |
WO2003107180B1 (en) | Providing dynamic model-code associativity | |
CN106657192A (en) | Method used for presenting service calling information and equipment thereof | |
CN106484906A (en) | A kind of distributed objects storage system flash back method and device | |
JP2014106968A (en) | Apparatus, method and computer readable recording medium for automatically arranging a plurality of items in canvas | |
CN106250319A (en) | Static code scanning result treating method and apparatus | |
CN109683881B (en) | Code format adjusting method and device | |
CN106776891A (en) | A kind of method and apparatus of file storage | |
CN108090037A (en) | Automatic composing method and device | |
CN106815186A (en) | typesetting processing method and device | |
CN101866336A (en) | Methods, devices and systems for obtaining evaluation unit and establishing syntactic path dictionary | |
CN108694162A (en) | The treating method and apparatus of file | |
CN109815473A (en) | A kind of documents editing householder method | |
CN104991963B (en) | Document handling method and device | |
CN116009837A (en) | Method for realizing front page by using multi-layer conditional combination | |
CN110704241B (en) | Method, device, equipment and medium for recovering file metadata | |
CN109685453B (en) | Method for intelligently identifying effective paths of workflow | |
JP2008052359A (en) | Test case generation device, test case generation method, and test case generator | |
CN110163498B (en) | Courseware originality scoring method and device, storage medium and processor | |
CN107944227A (en) | A kind of mark bearing calibration of genetic map and device | |
CN111027307A (en) | Method and device for judging content influencing judgment result in judgment document | |
CN110457064A (en) | The generation method and device of network cutover script | |
CN109508185A (en) | A kind of Code Review method and apparatus | |
CN106599267A (en) | Method and device for deleting data |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170609 |