CN103136183A - Method and device for typesetting - Google Patents

Method and device for typesetting Download PDF

Info

Publication number
CN103136183A
CN103136183A CN2011104000473A CN201110400047A CN103136183A CN 103136183 A CN103136183 A CN 103136183A CN 2011104000473 A CN2011104000473 A CN 2011104000473A CN 201110400047 A CN201110400047 A CN 201110400047A CN 103136183 A CN103136183 A CN 103136183A
Authority
CN
China
Prior art keywords
row
content
typesetting
value
coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011104000473A
Other languages
Chinese (zh)
Inventor
缪萍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University Founder Group Co Ltd
Beijing Founder Electronics 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 Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN2011104000473A priority Critical patent/CN103136183A/en
Publication of CN103136183A publication Critical patent/CN103136183A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to the technical field of computer typesetting, in particular to a method and a device for typesetting. In the prior art, when multi-line or multi-segment to-be-typeset characters are overall centering typeset, processing period is long, efficiency is low, and errors exist. The method and the device for typesetting are used for solving the above problems. The method for typesetting comprises the steps of confirming configuration typesetting width value of each line in to-be-typeset contents according to actual typesetting width value of each line in the to-be-typeset contents, wherein the to-be-typeset contents comprise at least two lines of contents, and the width value of each configuration typesetting width value is the same, aiming at one line, confirming modification value of the line according to the configuration typesetting width value of the line and the typesetting zone width value of the line, and modifying current coordinate value of the contents of the line according to the modification value of the line. By means of the method and the device for typesetting, when the to-be-typeset contents are overall centering typeset, not only is period of typesetting process shortened, but also efficiency and accuracy of typesetting are improved.

Description

The method and apparatus that a kind of typesetting is processed
Technical field
The present invention relates to the computer composition technical field, particularly a kind of method and apparatus of typesetting processing.
Background technology
Typesetting refers to the visual information elements such as the word in the space of a whole page, form, formula, picture, figure are carried out the adjustment of desired position, size etc. on this layout, makes this layout methodization, reaches visual effect attractive in appearance, for follow-up printing; Typesetting is mainly used in books and periodicals magazine, books of all sorts, e-book, e-magazine, electronic journal etc., they all need (to comprise word, picture, form etc.) and carry out typesetting by software for composing before publication, content typesetting to be published is become the form of appointment.
typesetting placed in the middle is a kind of common typesetting processing mode, at present, when software for composing commonly used carries out typesetting placed in the middle and processes contents such as the multirow in the space of a whole page or multistage word, formula, pictures, the general employing carried out respectively typesetting processing placed in the middle to the every row in this multirow or multistage content, but namely determine the modified value of every row according to the typesetting width value of the typesetting width value of every row and the current space of a whole page, according to the modified value of every row, the coordinate figure of every row is revised, its typesetting effect as shown in Figure 1, this typesetting placed in the middle is processed and can be satisfied general typesetting requirement, but some typesetting placed in the middle has special requirement, as for poem, the typesetting of ancient books book etc., General Requirements is done the as a whole whole typesetting processing placed in the middle (such as the coordinate figure of the reference position that requires the every row after typesetting placed in the middle is processed or end position is mutually equal) of carrying out with the multirow in the space of a whole page or multistage content, process for this class typesetting, existing disposal route can only be by the every row of manual adjustment layout position to reach whole typesetting effect placed in the middle, thereby the cycle that causes typesetting to be processed is long, efficient is low, and there is error.
In sum, when multirow in the space of a whole page or multistage word being carried out integral body typesetting processing placed in the middle due to existing typesetting in processing, can only be by every row manually being adjusted their layout position, thus the cycle that causes typesetting to be processed is long, efficient is low, and have error.
Summary of the invention
The embodiment of the present invention provides a kind of typesetting processing method and equipment, be used for to solve that prior art exists multirow in the space of a whole page or multistage word are carried out integral body typesetting processing placed in the middle the time, can only be by every row manually being adjusted their layout position, thereby caused typesetting long processing period, efficient low, and had the problem of error.
A kind of method that the embodiment of the present invention provides typesetting to process, the method comprises:
According to the actual typesetting width value for the treatment of every row in typesetting content, determine the described configuration typesetting width value for the treatment of every row in typesetting content; Wherein, describedly treat that typesetting content comprises at least two row contents, and the configuration typesetting width value of every row is identical;
For delegation, according to the configuration typesetting width value of this row and the one layout region width value of this row, determine the modified value of this row, and according to the modified value of this row, the current coordinate figure of the content of this row is carried out correcting process.
Preferably, determine describedly to treat that the configuration typesetting width value of every row in typesetting content comprises:
With the maximal value of the described actual typesetting width value for the treatment of each row in typesetting content as the described configuration typesetting width value for the treatment of every row in typesetting content.
Preferably, after every row is carried out correcting process, also comprise:
When described delegation or multiple line content need to enter a new line the time in typesetting content, for a row that need to enter a new line, the content that this row need to be entered a new line enters a new line to process and obtains new line increment corresponding to this row, and according to the modified value of this row, the coordinate figure of new line increment corresponding to this row is carried out correcting process.
Preferably, determine the modified value of every row, comprising:
For delegation, with 1/2nd modified values as this row of the difference between the one layout region width value of the configuration typesetting width value of this row and this row.
For delegation, according to the modified value of this row, the current coordinate figure of the content of this row is carried out correcting process, comprising:
Determine the adjusted value of the content of this row according to the coordinate figure of the current coordinate figure of the content of this row and this row place one layout region frame;
According to the adjusted value of the content of this row and the modified value of this row, the content of this row is carried out correcting process.
Preferably, determine that the difference of coordinate figure of left frame of the current coordinate figure of content of this row and this row place one layout region is as the adjusted value of the content of this row; Determine that coordinate figure that the modified value addition of the adjusted value of content of this row and this row obtains carries out coordinate figure after correcting process as the content of this row; Or
Determine the current coordinate figure of content of this row and this row place one layout region left frame coordinate figure and as the adjusted value of the content of this row; The modified value of determining the adjusted value of content of this row and this row is subtracted each other the coordinate figure that obtains and is carried out coordinate figure after correcting process as the content of this row.
Preferably, before every row is carried out correcting process, also comprise:
To the described row alignment processing of often advancing for the treatment of in typesetting content;
Every row is carried out correcting process to be comprised:
For delegation, be left-justify when processing in described registration process, the modified value sum of the current coordinate figure of the content of this row and this row is carried out coordinate figure after correcting process as the content of this row;
For delegation, be Right Aligns when processing in described registration process, the difference between the modified value of the current coordinate figure of the content of this row and this row is carried out coordinate figure after correcting process as the content of this row.
The equipment that the embodiment of the present invention provides a kind of typesetting to process, this equipment comprises:
Configuration typesetting width value determination module is used for determining the described configuration typesetting width value for the treatment of every row in typesetting content according to the actual typesetting width value for the treatment of the every row of typesetting content; Wherein, describedly treat that typesetting content comprises at least two row contents, and the configuration typesetting width value of every row is identical;
The correcting process module is used for according to the configuration typesetting width value of this row and the one layout region width value of this row, determining the modified value of this row for delegation, and according to the modified value of this row, the current coordinate figure of the content of this row is carried out correcting process.
Preferably, described configuration typesetting width value determination module specifically is used for:
With the maximal value of the described actual typesetting width value for the treatment of each row in typesetting content as the described configuration typesetting width value for the treatment of every row in typesetting content.
Preferably, described equipment also comprises:
The line feed processing module, described delegation until typesetting content or multiple line content be used for when need to enter a new line, for a row that need to enter a new line, the content that this row need to be entered a new line enters a new line to process and obtains new line increment corresponding to this row, and according to the modified value of this row, the coordinate figure of new line increment corresponding to this row is carried out correcting process.
Preferably, described correcting process module specifically is used for:
For delegation, with 1/2nd modified values as this row of the difference between the one layout region width value of the configuration typesetting width value of this row and this row.
Preferably, described correcting process module also is used for:
For delegation, determine the adjusted value of the content of this row according to the coordinate figure of the current coordinate figure of the content of this row and this row place one layout region frame; According to the adjusted value of the content of this row and the modified value of this row, the content of this row is carried out correcting process.
Preferably, determine that the difference of coordinate figure of left frame of the current coordinate figure of content of this row and this row place one layout region is as the adjusted value of the content of this row; Determine that coordinate figure that the modified value addition of the adjusted value of content of this row and this row obtains carries out coordinate figure after correcting process as the content of this row; Or
Determine the current coordinate figure of content of this row and this row place one layout region left frame coordinate figure and as the adjusted value of the content of this row; The modified value of determining the adjusted value of content of this row and this row is subtracted each other the coordinate figure that obtains and is carried out coordinate figure after correcting process as the content of this row.
Preferably, described equipment also comprises:
The registration process module is used for the row alignment processing of often advancing for the treatment of typesetting content to described; Wherein,
If the registration process in described registration process module is left-justify when processing, described correcting process module specifically is used for for delegation, and the modified value sum of the current coordinate figure of the content of this row and this row is carried out coordinate figure after correcting process as the content of this row;
When if the registration process in described registration process module is the Right Aligns processing, described correcting process module specifically is used for for delegation, and the difference between the modified value of the current coordinate figure of the content of this row and this row is carried out coordinate figure after correcting process as the content of this row.
The embodiment of the present invention is set to identical value by the configuration typesetting width value for the treatment of every row in typesetting content, make when the typesetting for the treatment of typesetting content and carry out whole placed in the middle or integral translation is processed, can automatically carry out correcting process according to the modified value of setting, thereby shortened the cycle that typesetting is processed, improved efficient and accuracy that typesetting is processed.
Description of drawings
Fig. 1 carries out effect schematic diagram after typesetting placed in the middle is processed to the multline text content in the space of a whole page in prior art;
Fig. 2 is the process flow diagram of the method processed of the first typesetting of the embodiment of the present invention;
Fig. 3 is the process flow diagram of the method processed of the second typesetting of the embodiment of the present invention;
Fig. 4 A is the design sketch that in the embodiment of the present invention, the whole typesetting placed in the middle of the first is processed;
Fig. 4 B is the design sketch that in the embodiment of the present invention, the whole typesetting placed in the middle of the second is processed;
Fig. 5 A is the structural representation of the equipment processed of the first typesetting of the embodiment of the present invention;
Fig. 5 B is the structural representation of the equipment processed of the second typesetting of the embodiment of the present invention;
Fig. 5 C is the structural representation of the equipment processed of the third typesetting of the embodiment of the present invention.
Embodiment
The embodiment of the present invention is set to identical value by the configuration typesetting width value for the treatment of every row in typesetting content, when having solved exist in the prior art multirow in the space of a whole page or multistage word are carried out integral body typesetting placed in the middle and process, can only be by every row manually being adjusted their layout position, thereby caused that the typesetting treatment effeciency is low, the cycle is long, and had the problem of error.
Treat in the embodiment of the present invention that typesetting content can be word content, can be also the contents such as picture, formula, form, image, below describe all describing as an example of word content example, the typesetting processing of other guide form and the typesetting of word content are processed similar, repeat no more herein.
When treating typesetting content and carrying out typesetting and process, every row can be treated that the object equivalence such as each word, formula, form in typesetting content is that a box is processed, each box has its typesetting width and height value, treats that the position coordinate value of object in typesetting content can be with the position coordinates value representation in the upper left corner of the typesetting outsourcing frame of box corresponding to this object; For example, if treat that typesetting content is the content of text formatting, in concrete processing procedure, can be that a box is processed with each character equivalence; If treat that typesetting content is formula, each complete formula equivalence is that a box is processed with this.
Need to prove, treat that the object in typesetting content also can adopt the coordinate figure of other positions of its corresponding box to represent its position coordinates, but the description of the position coordinate value of each Object Selection must be identical when typesetting is processed, for example, if its position coordinates of position coordinates value representation in the upper left corner of the typesetting outsourcing frame of its corresponding box of first Object Selection, other objects also need be selected their position coordinates of position coordinates value representation in the upper left corner of typesetting outsourcing frame of the box of their correspondences.
Below in conjunction with accompanying drawing, the embodiment of the present invention is described in detail.
A kind of method that the embodiment of the present invention provides typesetting to process, as shown in Figure 2, the method comprises the following steps:
S201, basis are treated the actual typesetting width value of every row in typesetting content, determine to treat the configuration typesetting width value of every row in typesetting content; Wherein, treat that typesetting content comprises at least two row contents, and the configuration typesetting width value of every row is identical;
S202, for delegation, according to the configuration typesetting width value of this row and the one layout region width value of this row, determine the modified value of this row, and according to the modified value of this row, the current coordinate figure of the content of this row carried out correcting process.
Also comprising before S201: select in one layout region and treat typesetting content, wherein, this treats to comprise at least in typesetting content two row contents;
Determine to treat the actual typesetting width value of every row in typesetting content;
The method of the actual typesetting width value of concrete definite every row is as follows:
The first row of typesetting content is treated in taking-up, the actual typesetting width value of determining this row is the difference between the typesetting x coordinate figure of the typesetting x coordinate figure of last character of this row (or box) and first bebinning character of this row (or box), adds the typesetting width value of last box;
Every style of writing word content for the treatment of typesetting content is taken out in circulation, determines the actual typesetting width for the treatment of every style of writing word content in typesetting content.
Determine to treat the configuration typesetting width value of every row in typesetting content in S201, can as required the actual typesetting width value for the treatment of arbitrary row in typesetting content be treated the configuration typesetting width value of every row in typesetting content as this, so that this configuration typesetting width value for the treatment of every row in typesetting content is identical value.
Preferably, carry out producing after correcting process for fear for the treatment of every row in typesetting content the content long (namely the modified value sum of the actual typesetting width value of this row and this row is greater than the one layout region width value of this row) for the treatment of certain row in typesetting content or some row, thereby the one layout region that exceeds this row causes the processing that need to enter a new line; Or exceed the one layout region of this page and the situation of the processing of need to skipping, the maximal value for the treatment of the actual typesetting width value of each row in typesetting content can be treated the configuration typesetting width value of every row in typesetting content as this in S201.
In S202, for delegation, the one layout region width value of this row can be determined in accordance with the following methods:
If the content of this row is to carry out typesetting in the type page one layout region, the one layout region width value of this row is defined as the type page width value, and namely the one layout region width value of this row is the pagewidth of this row and the left side apart from the difference of, rightmargin;
If the content of this row is to carry out typesetting in the one layout region of appointment, the one layout region width value of this row is defined as specifying the one layout region width value;
If require the left side of this row and/or right side need leave reserved area for other typesettings processing, the one layout region width value of the content of this row is defined as this row and can arranges peak width value and left side and/or right side reserved area width value difference;
And determine to treat the one layout region width value of the every row in typesetting content by same procedure.
Because the requirement of the one layout region of every row might be different, so treat that the one layout region width value of every row in typesetting content may be entirely identical, also possible part is identical, may be entirely not identical yet, and need are determined the one layout region width value of every row for the requirement of the one layout region of every row.
Because the one layout region width value for the treatment of every row in typesetting content may be entirely identical, also the possibility part is identical, may be entirely not identical yet, so the modified value of every row of determining in corresponding S202 may be entirely identical, also the possibility part is identical, also may be entirely not identical.
in S202, the modified value of every row can require to set according to actual typesetting, concrete, if requiring to treat typesetting content carries out whole typesetting placed in the middle and processes that (processing placed in the middle of the said integral body of the embodiment of the present invention comprises that at least the x coordinate figure of the reference position of every row in content after processing placed in the middle is identical, and in the content after placed in the middle the processing, the x coordinate figure of the end position of every row is identical), for delegation, modified value that can this row be set between the one layout region width value of the configuration typesetting width value of this row and this row difference 1/2nd, to reach whole typesetting effect placed in the middle, also can be according to actual typesetting requirement, for delegation, the modified value of this row is set to 1/3rd (or other values) of the difference between the one layout region width value of the configuration typesetting width value of this row and this row, makes and treats that typesetting content reaches desired typesetting effect, and determine to treat the modified value of the every row in typesetting content by same procedure.
treat after every row in typesetting content carries out correcting process, might occur treating that the actual typesetting width value of certain row in typesetting content or some row and modified value sum are greater than the one layout region width value of this row, and do not exceed the page area for the treatment of the typesetting content place, at this moment, the partial content processing that just need to enter a new line in this page area in this row, for a row that need to enter a new line, the content that needs in this row to enter a new line is entered a new line to process obtain new line increment corresponding to this row, line feed is processed and can be processed by the acquiescence mode, the reference position of the new line increment that namely this row is corresponding is identical with the reference position of the one layout region of this row,
Preferably, according to the modified value of this row, the coordinate figure of new line increment corresponding to this row is carried out correcting process;
Treat by the same way the processing that enters a new line of each row that need to enter a new line in typesetting content.
For delegation, according to the modified value of this row, the current coordinate figure of the content of this row is carried out correcting process and comprise following two kinds of methods, but be not limited to two kinds of following methods in S202.
First method: the adjusted value of determining the content of this row according to the coordinate figure of the current coordinate figure of the content of this row and this row place one layout region frame;
According to the adjusted value of the content of this row and the modified value of this row, the content of this row is carried out correcting process.
Concrete, if require the x coordinate figure of the reference position of every row in content after typesetting placed in the middle is processed identical, according to the typesetting processing instruction of receiving, determine that the one layout region frame is left frame; Accordingly, determine that the difference of coordinate figure of left frame of the current coordinate figure of content of this row and this row place one layout region is as the adjusted value of the content of this row; And the coordinate figure of the coordinate figure that obtains of the modified value addition of determining the adjusted value of content of this row and this row after as the correcting process of the content of this row;
If require the x coordinate figure of the end position of every row in the content after typesetting placed in the middle is processed identical, according to the typesetting processing instruction of receiving, determine that the one layout region frame is left frame; Accordingly, determine the current coordinate figure of content of this row and this row place one layout region left frame coordinate figure and as the adjusted value of the content of this row; And the modified value of determining the adjusted value of content of this row and this row is subtracted each other the coordinate figure that the obtains coordinate figure after as the correcting process of the content of this row.
Second method: before every row was carried out correcting process, the row alignment of often advancing for the treatment of in typesetting content was processed;
Concrete, if require the x coordinate figure of the reference position of every row in content after typesetting placed in the middle is processed identical, according to the typesetting processing instruction of receiving, determine to treat every row in typesetting content and carry out left-justify and process;
Accordingly, every row being carried out correcting process comprises:
For delegation, the coordinate figure of the modified value sum of determining the current coordinate figure of content of this row and this row after as the correcting process of the content of this row, and every row for the treatment of in typesetting content by same procedure carries out correcting process.
If require the x coordinate figure of the end position of every row in the content after typesetting is processed identical, according to the typesetting processing instruction of receiving, every row of determining to treat in typesetting content carries out the Right Aligns processing;
Accordingly, every row being carried out correcting process comprises:
For delegation, determine the coordinate figure after difference between the modified value of the current coordinate figure of content of this row and this row is as the correcting process of the content of this row, and every row for the treatment of in typesetting content by same procedure carries out correcting process.
The below processes (require in the present embodiment the coordinate figure of initial word of the every style of writing word after typesetting identical) as example take the typesetting whole placed in the middle for the treatment of typesetting content and realizing, the embodiment of the present invention is described in detail, the typesetting of other effects is processed with whole typesetting processing placed in the middle similar, repeats no more herein; As shown in Figure 3, the method for the typesetting processing whole placed in the middle of the embodiment of the present invention comprises the following steps:
S301, treat that to selected every style of writing word content in typesetting content carries out left-justify according to text left-justify mode respectively and process, and determine the actual typesetting width value of every style of writing word content;
Concrete, the actual typesetting width value of determining every style of writing word comprises: for delegation, the actual typesetting width value of this style of writing word content equals the difference between the initial x coordinate figure of the end x coordinate figure of last character of this row (or box) and this row first character or box typesetting, adds the width value of last box;
Adopt same procedure, determine the actual typesetting width for the treatment of every style of writing word content in typesetting content;
S302, get typesetting width value in the multline text content for the treatment of typesetting content maximal value as the configuration typesetting width value of this every style of writing word content;
S303, for delegation, obtain the one layout region width value of this row, and according to the one layout region width value of the content of the configuration typesetting width value of this row and this row, determine the modified value of this style of writing word content whole typesetting placed in the middle; Wherein, the modified value of this style of writing word content whole typesetting placed in the middle equal between this row one layout region width value and this row configuration typesetting width value difference 1/2nd;
In the present embodiment, the one layout region width value of the every row of hypothesis is identical, and the modified value by the definite every row of S303 is also identical value;
S304, the modified value determined according to S303 are successively carried out correcting process to the coordinate figure of each character in every row; That is: for delegation, the current coordinate figure of each character of this row and the modified value sum of determining are carried out coordinate figure after correcting process as this line character;
Repeat the correcting process of S304, realize treating that in typesetting content, the whole typesetting placed in the middle of multline text is processed.
By the method for S301~S304 in the embodiment of the present invention, realized the whole typesetting effect placed in the middle of multline text, the effect after its whole typesetting placed in the middle is processed is as shown in Fig. 4 A.
Need to prove, S301 can also be after S302 except can carrying out before S302, or carries out after S303, and its effect that reaches is equal to.
If require the coordinate figure of end word of the every style of writing word after typesetting all identical, only need the left-justify in S301 is processed and change the Right Aligns processing into, corresponding, when in S304, the coordinate figure of each character in every row being carried out correcting process, difference between the current coordinate figure of each character of this row and the modified value determined is carried out coordinate figure after correcting process as this line character, other steps are identical with method shown in Figure 3, and the effect after its whole placed in the middle processing as shown in Figure 4 B.
Based on same inventive concept, the equipment that also provides a kind of typesetting to process in the embodiment of the present invention, because the principle that this equipment is dealt with problems is similar to the method for above-mentioned typesetting processing, so the enforcement of this equipment can referring to the enforcement of method, repeat part and repeat no more.
The equipment that the embodiment of the present invention provides a kind of typesetting to process, as shown in Fig. 5 A, this equipment comprises:
Configuration typesetting width value determination module 50 is used for determining to treat the configuration typesetting width value of every row in typesetting content according to the actual typesetting width value for the treatment of the every row of typesetting content; Wherein, treat that typesetting content comprises at least two row contents, and the configuration typesetting width value of every row is identical;
Correcting process module 51 is used for according to the configuration typesetting width value of this row and the one layout region width value of this row, determining the modified value of this row for delegation, and according to the modified value of this row, the current coordinate figure of the content of this row is carried out correcting process.
Preferably, configuration typesetting width value determination module 50 specifically is used for:
To treat that the maximal value of actual typesetting width value of each row in typesetting content is as the configuration typesetting width value for the treatment of every row in typesetting content.
Preferably, as shown in Fig. 5 B, this equipment also comprises:
Line feed processing module 52, be used for when when the delegation of typesetting content or multiple line content need to enter a new line, for a row that need to enter a new line, the content that this row need to be entered a new line enters a new line to process and obtains new line increment corresponding to this row, and according to the modified value of this row, the coordinate figure of new line increment corresponding to this row is carried out correcting process.
Preferably, correcting process module 51 specifically is used for:
For delegation, with 1/2nd modified values as this row of the difference between the one layout region width value of the configuration typesetting width value of this row and this row.
Preferably, correcting process module 51 also is used for:
For delegation, determine the adjusted value of the content of this row according to the coordinate figure of the current coordinate figure of the content of this row and this row place one layout region frame; According to the adjusted value of the content of this row and the modified value of this row, the content of this row is carried out correcting process.
Preferably, the one layout region frame is left frame, determines that the difference of coordinate figure of left frame of the current coordinate figure of content of this row and this row place one layout region is as the adjusted value of the content of this row; Determine the coordinate figure after coordinate figure that the modified value addition of the adjusted value of content of this row and this row obtains is as the correcting process of the content of this row; Or
The one layout region frame is left frame, determine the current coordinate figure of content of this row and this row place one layout region left frame coordinate figure and as the adjusted value of the content of this row; The modified value of determining the adjusted value of content of this row and this row is subtracted each other the coordinate figure that the obtains coordinate figure after as the correcting process of the content of this row.
Preferably, as shown in Fig. 5 C, this equipment also comprises:
Registration process module 53 is used for treating the row alignment processing of often advancing of typesetting content; Wherein,
If the registration process in registration process module 53 is left-justify when processing, correcting process module 51 is concrete to be used for for delegation, and the modified value sum of the current coordinate figure of the content of this row and this row is carried out coordinate figure after correcting process as the content of this row;
When if the registration process in registration process module 53 is the Right Aligns processing, correcting process module 51 is concrete to be used for for delegation, and the difference between the modified value of the current coordinate figure of the content of this row and this row is carried out coordinate figure after correcting process as the content of this row.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt complete hardware implementation example, implement software example or in conjunction with the form of the embodiment of software and hardware aspect fully.And the present invention can adopt the form that wherein includes the upper computer program of implementing of computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) of computer usable program code one or more.
The present invention is that reference is described according to process flow diagram and/or the block scheme of method, equipment (system) and the computer program of the embodiment of the present invention.Should understand can be by the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or the combination of square frame.Can provide these computer program instructions to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, make the instruction of carrying out by the processor of computing machine or other programmable data processing device produce to be used for the device of realizing in the function of flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame appointments.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, make the instruction that is stored in this computer-readable memory produce the manufacture that comprises command device, this command device is realized the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
These computer program instructions also can be loaded on computing machine or other programmable data processing device, make on computing machine or other programmable devices and to carry out the sequence of operations step producing computer implemented processing, thereby be provided for realizing the step of the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame in the instruction of carrying out on computing machine or other programmable devices.
Although described the preferred embodiments of the present invention, in a single day those skilled in the art get the basic creative concept of cicada, can make other change and modification to these embodiment.So claims are intended to all changes and the modification that are interpreted as comprising preferred embodiment and fall into the scope of the invention.
The embodiment of the present invention is set to identical value by the configuration typesetting width value for the treatment of every row in typesetting content, make when the typesetting for the treatment of typesetting content and carry out whole placed in the middle or integral translation is processed, can automatically carry out correcting process according to the modified value of setting, thereby shortened the cycle that typesetting is processed, improved efficient and accuracy that typesetting is processed.
Obviously, those skilled in the art can carry out various changes and modification and not break away from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of claim of the present invention and equivalent technologies thereof, the present invention also is intended to comprise these changes and modification interior.

Claims (14)

1. the method that typesetting is processed, is characterized in that, the method comprises:
According to the actual typesetting width value for the treatment of every row in typesetting content, determine the described configuration typesetting width value for the treatment of every row in typesetting content; Wherein, describedly treat that typesetting content comprises at least two row contents, and the configuration typesetting width value of every row is identical;
For delegation, according to the configuration typesetting width value of this row and the one layout region width value of this row, determine the modified value of this row, and according to the modified value of this row, the current coordinate figure of the content of this row is carried out correcting process.
2. the method for claim 1, is characterized in that, determines describedly to treat that the configuration typesetting width value of every row in typesetting content comprises:
With the maximal value of the described actual typesetting width value for the treatment of each row in typesetting content as the described configuration typesetting width value for the treatment of every row in typesetting content.
3. the method for claim 1, is characterized in that, after every row is carried out correcting process, also comprises:
When described delegation or multiple line content need to enter a new line the time in typesetting content, for a row that need to enter a new line, the content that this row need to be entered a new line enters a new line to process and obtains new line increment corresponding to this row, and according to the modified value of this row, the coordinate figure of new line increment corresponding to this row is carried out correcting process.
4. the method for claim 1, is characterized in that, determines the modified value of every row, comprising:
For delegation, with 1/2nd modified values as this row of the difference between the one layout region width value of the configuration typesetting width value of this row and this row.
5. described method as arbitrary in claim 1~4, is characterized in that, for delegation, according to the modified value of this row, the current coordinate figure of the content of this row carried out correcting process, comprising:
Determine the adjusted value of the content of this row according to the coordinate figure of the current coordinate figure of the content of this row and this row place one layout region frame;
According to the adjusted value of the content of this row and the modified value of this row, the content of this row is carried out correcting process.
6. method as claimed in claim 5, is characterized in that, for delegation, according to the modified value of this row, the current coordinate figure of the content of this row carried out correcting process, comprising:
Determine that the difference of coordinate figure of left frame of the current coordinate figure of content of this row and this row place one layout region is as the adjusted value of the content of this row; Determine that coordinate figure that the modified value addition of the adjusted value of content of this row and this row obtains carries out coordinate figure after correcting process as the content of this row; Or
Determine the current coordinate figure of content of this row and this row place one layout region left frame coordinate figure and as the adjusted value of the content of this row; The modified value of determining the adjusted value of content of this row and this row is subtracted each other the coordinate figure that obtains and is carried out coordinate figure after correcting process as the content of this row.
7. described method as arbitrary in claim 1~4, is characterized in that, before every row is carried out correcting process, also comprises:
To the described row alignment processing of often advancing for the treatment of in typesetting content;
Every row is carried out correcting process to be comprised:
For delegation, be left-justify when processing in described registration process, the modified value sum of the current coordinate figure of the content of this row and this row is carried out coordinate figure after correcting process as the content of this row;
For delegation, be Right Aligns when processing in described registration process, the difference between the modified value of the current coordinate figure of the content of this row and this row is carried out coordinate figure after correcting process as the content of this row.
8. the equipment that typesetting is processed, is characterized in that, this equipment comprises:
Configuration typesetting width value determination module is used for determining the described configuration typesetting width value for the treatment of every row in typesetting content according to the actual typesetting width value for the treatment of the every row of typesetting content; Wherein, describedly treat that typesetting content comprises at least two row contents, and the configuration typesetting width value of every row is identical;
The correcting process module is used for according to the configuration typesetting width value of this row and the one layout region width value of this row, determining the modified value of this row for delegation, and according to the modified value of this row, the current coordinate figure of the content of this row is carried out correcting process.
9. equipment as claimed in claim 8, is characterized in that, described configuration typesetting width value determination module specifically is used for:
With the maximal value of the described actual typesetting width value for the treatment of each row in typesetting content as the described configuration typesetting width value for the treatment of every row in typesetting content.
10. equipment as claimed in claim 8, is characterized in that, described equipment also comprises:
The line feed processing module, described delegation until typesetting content or multiple line content be used for when need to enter a new line, for a row that need to enter a new line, the content that this row need to be entered a new line enters a new line to process and obtains new line increment corresponding to this row, and according to the modified value of this row, the coordinate figure of new line increment corresponding to this row is carried out correcting process.
11. equipment as claimed in claim 8 is characterized in that, described correcting process module specifically is used for:
For delegation, with 1/2nd modified values as this row of the difference between the one layout region width value of the configuration typesetting width value of this row and this row.
12. described equipment as arbitrary in claim 8~11 is characterized in that, described correcting process module also is used for:
For delegation, determine the adjusted value of the content of this row according to the coordinate figure of the current coordinate figure of the content of this row and this row place one layout region frame; According to the adjusted value of the content of this row and the modified value of this row, the content of this row is carried out correcting process.
13. equipment as claimed in claim 11 is characterized in that, described correcting process module specifically is used for:
For delegation, determine that the difference of coordinate figure of left frame of the current coordinate figure of content of this row and this row place one layout region is as the adjusted value of the content of this row; Determine that coordinate figure that the modified value addition of the adjusted value of content of this row and this row obtains carries out coordinate figure after correcting process as the content of this row; Or
For delegation, determine the current coordinate figure of content of this row and this row place one layout region left frame coordinate figure and as the adjusted value of the content of this row; The modified value of determining the adjusted value of content of this row and this row is subtracted each other the coordinate figure that obtains and is carried out coordinate figure after correcting process as the content of this row.
14. described equipment as arbitrary in claim 8~11 is characterized in that, described equipment also comprises:
The registration process module is used for the row alignment processing of often advancing for the treatment of typesetting content to described; Wherein,
If the registration process in described registration process module is left-justify when processing, described correcting process module specifically is used for for delegation, and the modified value sum of the current coordinate figure of the content of this row and this row is carried out coordinate figure after correcting process as the content of this row;
When if the registration process in described registration process module is the Right Aligns processing, described correcting process module specifically is used for for delegation, and the difference between the modified value of the current coordinate figure of the content of this row and this row is carried out coordinate figure after correcting process as the content of this row.
CN2011104000473A 2011-12-05 2011-12-05 Method and device for typesetting Pending CN103136183A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011104000473A CN103136183A (en) 2011-12-05 2011-12-05 Method and device for typesetting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011104000473A CN103136183A (en) 2011-12-05 2011-12-05 Method and device for typesetting

Publications (1)

Publication Number Publication Date
CN103136183A true CN103136183A (en) 2013-06-05

Family

ID=48496024

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011104000473A Pending CN103136183A (en) 2011-12-05 2011-12-05 Method and device for typesetting

Country Status (1)

Country Link
CN (1) CN103136183A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710911A (en) * 2018-12-28 2019-05-03 天津字节跳动科技有限公司 Content typesetting method, apparatus, electronic equipment and the storage medium of cell

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN85104390A (en) * 1984-10-29 1986-04-10 株式会社写研 Editing device
US5479596A (en) * 1993-05-27 1995-12-26 Apple Computer, Inc. Method and apparatus for formatting paragraphs
CN1953497A (en) * 2005-10-21 2007-04-25 佳能株式会社 Placement and justification of copy and forgery inhibition patterns on output images
CN101196875A (en) * 2007-12-29 2008-06-11 北京方正国际软件系统有限公司 Typesetting method for implementing multiple alignment in word rows

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN85104390A (en) * 1984-10-29 1986-04-10 株式会社写研 Editing device
US5479596A (en) * 1993-05-27 1995-12-26 Apple Computer, Inc. Method and apparatus for formatting paragraphs
CN1953497A (en) * 2005-10-21 2007-04-25 佳能株式会社 Placement and justification of copy and forgery inhibition patterns on output images
CN101196875A (en) * 2007-12-29 2008-06-11 北京方正国际软件系统有限公司 Typesetting method for implementing multiple alignment in word rows

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHU HUIYING等。: "A Cross-Connected Components-Based Layout Analysis Algorithm for Chinese Business Card", 《IEEE CONFERENCE ON INDUSTRIAL ELECTRONICS AND APPLICATION,2008》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710911A (en) * 2018-12-28 2019-05-03 天津字节跳动科技有限公司 Content typesetting method, apparatus, electronic equipment and the storage medium of cell
CN109710911B (en) * 2018-12-28 2023-12-22 天津字节跳动科技有限公司 Content typesetting method and device for cells, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103150302A (en) Type setting method and device
CN103019666A (en) Source code comparison device, source code comparison method and source code comparison program
CN106991010A (en) A kind of internal memory for streaming media server concentrates dynamic allocation method
CN109739784A (en) A kind of data processing method, device, system and FPGA accelerator card
CN109670128A (en) A kind of web application implementation method and device based on WebAssembly
CN103336672A (en) Data reading method, device and computer equipment
CN104462036B (en) A kind of method and system of the format information of synchro edit document
CN103136183A (en) Method and device for typesetting
WO2005008414A3 (en) Method and apparatus for parallel action processing
CN102855234A (en) Makeup method and makeup device used for variable data
CN104090865B (en) Text similarity computing method and device
DE102015208143A1 (en) Synchronize multi-part work orders through automation workflow
CN111198535A (en) Method and device for determining curved surface machining path
CN105653549A (en) Method and device for extracting document information
Roubini Where Will All the Workers Go?
CN113327144A (en) Method and system for concurrently generating electronic invoice OFD format file
CN107368276B (en) Display control method and device
CN101963892B (en) Method and device for printing table data
CN102467745A (en) Method and device for typesetting
CN107025106B (en) Graph drawing method and device
CN106325217B (en) Servo-control system with study memory handoff functionality
CN113435172B (en) Processing method, device, equipment and storage medium for chart positioning
CN100356373C (en) Object position treating method for file editing
CN109816153B (en) Method, device, control equipment and medium for generating process flow of split mother board
CN104978345A (en) Data processing method based on MapReduce and data processing device based on MapReduce

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130605