Summary of the invention
At problems of the prior art, the template device of style set and the implementation method that the purpose of this invention is to provide a kind of quick formatting layout, by these apparatus and method, style set is set on the space of a whole page template of an appointment, space of a whole page template is responsible for the format of the typesetting data in its zone.In other words, adopt method of the present invention, the style set that affacts on the typesetting data can be set on the tangible space of a whole page template piece, this template is mated automatically according to the name map of explaining with pattern, finish the process of the automatically formatting of the typesetting data in its one layout region, and as the style set visible carrier, make style set the operation of setting type such as can duplicate, copy, paste, move easily, improved the reusability of style set and the efficient of typesetting data automatically formatting.
The object of the present invention is achieved like this:
A kind of template device of style set of quick formatting layout, it is characterized in that this device is space of a whole page applied environment, pattern and composing note (Tag) mapping management device, this device is used to offer type-setting equipment to be explained the pattern of using and formats the interior typesetting data in its zone, and this device comprises following ingredient:
(1) is used to manage the style set management devices of style set;
(2) be used to manage space of a whole page composing and explain the mapping relations of (Tag) and pattern and offer the name map device that the concrete pattern of use is explained in space of a whole page composing, described name map device links to each other with the style set management devices;
(3) be used to connect the application interface of template device of style set and type-setting equipment, type-setting equipment provides space of a whole page typesetting data to explain (Tag) information and gives application interface, and application interface returns this notes to the pattern in requisition for application.
Further, also be provided with the application rule management devices in the described template device of style set, the application rule management devices is connected with the name map device, by the application rule that the application rule management devices provides, the name map device is selected automatically to set type and is explained the automatic selection that is suitable for pattern with pattern under one-to-many mapping situation.
Further, also be provided with the environmental management device that the name map device connects in the described template device of style set, the name map device obtains the space of a whole page environmental information of typesetting data from the environmental management device, the Rule of judgment of the application rule of being managed as the application rule management devices, be responsible for carrying out alternately by the name map device with the application rule management devices, the environmental management device obtains the environmental information that interface obtains typesetting data by the environment of type-setting equipment, and these environmental informations are offered the judgement parameter of name map device as application rule.
A kind of implementation method of quick formatting layout may further comprise the steps:
1) create the style set template, a promptly newly-built space of a whole page piece that is used to format one layout region is set the pattern set that acts on this space of a whole page piece;
2) mapping relations between (Tag) are explained in setting pattern and composing, can set the mapping relations between different patterns and the composing note (Tag) according to typesetting data environment and application rule for complicated applications;
3) formatting layout: promptly format the interior typesetting data in its zone by template device of style set.
Further, in the step 1), create the form that adopts structural data in the style set template procedure and import, derive and preserve, the style set cooperation of being created is preserved for the type-setting document content or is preserved as independent file;
Described pattern set is made up of form, pattern, and wherein said form is meant a composing attribute that can affact on the typesetting data; Described pattern is meant one group of composing attribute that can affact on the typesetting data, and described composing attribute is meant and comprises color, font, paragraph properties, automatic sequence number, frame in interior composing effect.
Further, step 2) in, it be one to one or the relation of one-to-many that mapping relations between (Tag) and the pattern are explained in the composing of setting, shines upon under the setting situation at one-to-many, must set the condition that mapping comes into force, promptly define a kind of application transformation rule of mapping of the corresponding different patterns of note of setting type.
Further, step 2) in, name map relation by pattern and note, explain by explaining coupling composing automatically, under the identical situation of the note of setting type, further according to explaining level of nesting structure, explaining the ID that marks, note title and other attributes that are attached on the note carry out corresponding name map.
Further, in the step 3), unless specify the pattern that some typesetting data does not use the style set template, the typesetting data in the style set template zone, the Style Attributes of default use style set template definition.
Further, in the step 3), when two style set template occurrence positions are overlapping on the space of a whole page, set type and explain preferentially match patterns from the high style set template piece of priority level, wherein priority level is by the number of plies, the pressure relating attribute decision of style set template apart from the composing piece, force the relating attribute override, next is the layer attribute below the composing piece, apart near more preferential more of composing piece, wherein force relating attribute to be meant that the user sets specific typesetting data and uses the style set template of create name as the format template.
Further again, in the step 3), described typesetting data is to explain the form tissue of (Tag).
Effect of the present invention is: the template device of style set and the implementation method that adopt a kind of quick formatting layout of the present invention, can pass through template device of style set, set up the contact tie of pattern set with space of a whole page pattern applied environment, by composing note and the relation of setting of the name map between the pattern, and act on application rule on the mapping relations according to space of a whole page environmental change, finish the format of typesetting data in the plate device zone automatically and handle.Specifically, method of the present invention has following remarkable results:
1. pass through template device of style set of the present invention, can be by modes such as simple space of a whole page drag and drop, copy, stickup, the typesetting data of quick formatting style set template region.
2. style set template of the present invention can save as file separately or with page preservation, improve the rate of reusing and the composing efficient of space of a whole page pattern greatly.
3. adopt method of the present invention, publish collaborative aspect, make and parallel processing composing work on network can realize the unification of space of a whole page pattern fast and effectively.
Why the present invention has above-mentioned remarkable result, its reason is: template device of style set of the present invention, as space of a whole page environment on the space of a whole page, typesetting data is explained the visual carrier in related centre of (Tag) and pattern, the attribute that makes pattern not be re-used as typesetting data uses, style set conduct and the operating characteristic that possesses the general figures piece, with separating of concrete typesetting data, format manipulation for space of a whole page typesetting data is simple, fast, and be convenient to reusing of style set, this technology makes that also in the collaborative parallel space of a whole page processing procedure of based on network large-scale publication, pattern is convenient, unified efficiently with synchronously.
Embodiment
The invention will be further described below in conjunction with specification drawings and specific embodiments.
A kind of template device of style set of quick formatting layout, described template device of style set is that (Tag) mapping management device is explained in space of a whole page applied environment, pattern and composing, on the space of a whole page, show as the one style collection visual composing auxiliary block related with layout area, this device is responsible for offering type-setting equipment and is explained the pattern of using, format the typesetting data in its zone, typesetting data comprises literal, figure, image etc., and this template device of style set 10 constitutes synoptic diagram as shown in Figure 1:
(1) be used to manage the style set management devices 11 of style set, this device is preserved the set of the pattern definition that need affact the space of a whole page.
(2) be used to manage the name map device 12 that the mapping relations of (Tag) and pattern are explained in space of a whole page composing, this device is responsible for offering space of a whole page composing and is explained the concrete pattern of use;
(3) application interface 15 of connection template device of style set and type-setting equipment, type-setting equipment provides space of a whole page typesetting data to explain (Tag) information and gives application interface, interface returns this note to the pattern in requisition for application, being application programming interfaces 15 is connected with name map device 12 in the template device of style set 10, provides and sets type and explain the pattern of coupling to type-setting equipment 16;
In the present embodiment, also be provided with application rule management devices 13 and environmental management device 14 in the template device of style set 10, application rule management devices 13 is connected with name map device 12, by the application rule that application rule management devices 13 provides, name map device 12 selects composing to explain the automatic selection that is suitable for pattern with pattern under one-to-many mapping situation automatically; Also be provided with the environmental management device 14 that is connected with name map device 12 in the template device of style set 10, name map device 12 obtains the space of a whole page environmental information of typesetting data to environmental management device 14, as the Rule of judgment of the application rule of application rule management devices 13 management, be responsible for carrying out alternately with application rule management devices 13 by name map device 12.
Environmental management device 14 obtains interface by the environment of type-setting equipment, obtains the environmental information of typesetting data, and these environmental informations are offered the judgement parameter of name map device 12 as application rule.
A kind of implementation method of quick formatting layout, by on the space of a whole page, creating a kind of new style set template, gather with pattern, form that visual graph block form record acts in this template zone, this device has following feature as a kind of special composing piece:
1) performance aspect: the style set template possesses the feature of general figures piece, show as closed curve and formed an area of space, visual border is arranged, size, position, line style, color etc. are all identical with the general figures piece, as a kind of special composing piece, can set its layer attribute, hide attribute etc., the style set template record itself does not support to enter literal, figure or image at the formatted message of the typesetting data in its layout area;
2) function aspects: the style set template is supported the general operation as graph block, as linear, Fill Color is set, carries out figure deformation, splicing, operation such as rotates, cut out, the border that this piece can be set is this piece of irregular shape, support such as duplicates, moves, resets or hide at operation, but this piece does not participate in the space of a whole page to be sent a manuscript to the compositor, promptly do not participate in printout, only occur at the layout interface;
The making of style set template is as shown in Figure 2: the style set template that the space of a whole page uses, can be by instrument newly-built or import to the space of a whole page from preserving the style set template file, shown in 21, style set template to the space of a whole page, set sets 22 to pattern if desired, then can directly make amendment, delete to the pattern that may use 23 of style set template setting or to the pattern that the style set template comprises.
Next step style set template to the space of a whole page is explained with the pattern name map and is set 24, be pattern and mapping relations with the note of formatted typesetting data, comprise that pattern affacts the priority ranking on the note, can be as pattern according to explaining level of nesting structure, explaining the ID that marks, other attribute priority ranking of explaining title and being attached on the note mate, and do not have a note of coupling, the pattern of default use acquiescence.
If note is the mapping relations of one-to-many with pattern, then force to carry out application rule and set 26, what non-one-to-many shone upon also can set the application rule that acts on these mapping relations; In the operation of application rule setting 26, the environmental parameter of setting type is if desired then carried out environmental parameter and is set 28 as 27 of the rule judgment condition;
The style set template shows similar to the general figures piece on the space of a whole page, the space of a whole page performance characteristic that possesses graph block, the style set template is carried out Shape Modification 29 if desired, then can make amendment 30 to its shape by the graphics edition instrument, to adapt to the shape of irregular or special one layout region, here the shape editor that can carry out the style set template mainly comprises operations such as splicing, cutting, increase summit, bending with consistent for the operation of general figures piece.
Above-mentioned modification to the style set template: the modification that the setting of style set, pattern are explained association, Shape Modification etc. does not exist and handles successively interdependent order relation.
After the style set template sets, for ease of setting reusing of pattern, preserve 31 if desired, then the style set template can save as independently file separately, perhaps a collection of style set template of appointment is output as a file and preserves 32, perhaps the data of these record style set templates are carried out communication by network, and it is collaborative to be convenient to the form that the space of a whole page is made on the network.
Very simple and convenient of style set template applications, use the style set template to handle the formatting layout treatment scheme as shown in Figure 3:
After typesetting data enters the space of a whole page 41, typesetting data generates the composing piece on the space of a whole page, the composing piece is according to layout position, find following style set template 42, if there is no the style set template is not then carried out any processing, if there is a plurality of style set templates 43 in the corresponding region, then find the style set template of use, do not have other setting then to use the composing piece below style set template of one deck recently under the default situation according to rule:
1. when composing piece zone when being included in, and the style set template is when being in below the composing piece in style set template the zone in, the pattern that directly uses the style set template to provide;
2. when composing piece zone exceeded in style set template zone, the pattern that the style set template of aliging according to upper left some alignment of composing piece or upper right point provides was used;
3. a composing piece region memory is in a plurality of overlapping style set templates, set type and explain preferentially match patterns from the high style set template piece of priority level, wherein priority level is by the number of plies, the pressure relating attribute decision of style set template apart from the composing piece, force the relating attribute override, next is the layer attribute below the composing piece, apart near more preferential more of composing piece, wherein force relating attribute to be meant that the user sets specific typesetting data and uses the style set template of create name as the format template;
4. one style collection template can comprise a plurality of composing pieces simultaneously, promptly provides style set to a plurality of composing pieces;
The composing piece finds after the style set template of below, position interlock attribute according to the style set template is provided with situation, judge whether to carry out position synchronous, shown in 45, if interlock attribute in the position of style set template is set to vacation, the then rotation of style set template, operation such as move and do not influence composing piece in the zone wherein, attribute is set to very if link in the position of style set template, the then rotation of style set template, operation such as move and to be synchronized to the wherein interior composing piece in zone, shown in 46.
The composing piece finds after the corresponding style set template, and the style set that provides according to the style set template and the mapping settings of pattern and note are finished automatically and explained and the coupling of pattern, finish the formatting procedure of typesetting data, shown in 47;
In said process, if there is specific note, shown in 48, these specific notes refer to 1) set the note of form or pattern, and the pattern of having set has precedence over the pattern that the style set template provides; 2) require calculation after, just the dynamic pattern matching of any pattern is selected in decision for use; If exist so specific note to handle,, the composing piece formatd processing, shown in 49 then according to the special style processing rule.
Fig. 4 illustrates the actual effect of above-mentioned style set template applications with a simple application example: have three composing pieces on the supposition space of a whole page, wherein only comprise word content: 51 are heading-text block (it is explained and to be<Title 〉), 52 is paragraph literal piece (it is explained and to be<Content desc=' main ' 〉), 53 is note literal piece (it is explained and to be<Content desc=' appr ' 〉), 52 with 53 two pieces to have a different note attribute of identical note different with the source that identifies these two blocks of data, a figure left side has shown the space of a whole page performance before Apply Styles collection template piece;
On the space of a whole page, make one style collection template piece 54, comprise three simple patterns: pattern A, font is used " Song in the Chinese ", and font size is 18pt; Pattern B, font is used " regular script ", and font size is 12pt; Pattern C, font is used " black matrix ", and font size is 10pt; And carry out following simple note and pattern mapping definition:
1.Title corresponding pattern A;
2.Content corresponding pattern B; Pattern C, corresponding pattern B when this note desc attribute is ' main ', corresponding pattern C under other situations;
Finish after these settings, drag time 54 to 51,52,53 zones, have type-setting equipment 16 to be set to corresponding pattern 51,52,53, promptly 51 use pattern A, 52 use pattern B, and 53 use pattern C, as shown in Fig. 4 centre position.
Change the position or change size in the style set template and do not comprise these composing pieces, perhaps the upper left point of these composing pieces not in style set template piece zone in, the composing piece loses the space of a whole page pattern of application, recover default setting, as the right-hand signal of Fig. 4, when style set template 54 zones did not comprise 53,53 recovered the state of Fig. 4 left signal;
The present invention is a kind of template device of style set and method of quick formatting layout, design and according to the method according to device of the present invention, at pattern, one layout region, explain and set up the tie that connects between the three, use and the related style set template of space of a whole page environment foundation by this concrete pattern of setting up, make the style set template explain (Tag) related visible carrier with typesetting data as pattern, make space of a whole page typesetting data format manipulation simple, fast, improve the reusability of space of a whole page pattern, unified remarkable to relevant space of a whole page pattern in handling with the synchronous effect effect at based on network information publication.
Method of the present invention is not limited to the embodiment described in the embodiment, and those skilled in the art's technical scheme according to the present invention draws other embodiment, belongs to technological innovation scope of the present invention equally.