Summary of the invention
At existing defective in the prior art, the purpose of this invention is to provide a kind of composition method of realizing multiple alignment in the literal line, this method can be by inserting finger URL in literal, foundation is related with reference point, thereby can realize the multiple alignment thereof of paragraph Chinese words row flexibly.
In order to realize the foregoing invention purpose, technical scheme of the present invention is: a kind of composition method of realizing multiple alignment in the literal line, and its concrete steps comprise:
(1) select delegation's literal, it is a plurality of literal sections that the input specific character divides the interior literal of interlacing;
(2) aligned position in the literal section of needs alignment inserts finger URL, and described finger URL is a kind ofly to be used for the auxiliary composing that the literal section is set type in the row and to explain, and is inserted between the alphabetic character, and the aligned position of place literal section is alignd with the snap point of align objects;
(3) alignment properties of finger URL is set,, carries out literal section automigration, realize multiple alignment in the row with the snap point of align objects according to the alignment properties of each finger URL.
Further, described finger URL shows as a visual non-occupy-place symbol at editing interface, can move, duplicates, shears and delete;
Further, the alignment properties of described finger URL comprises separating character, align objects, fills character, locating bias, the information of overflowing mode and principal and subordinate's attribute, wherein:
Align objects is meant tab stop on composing block object on the space of a whole page or the scale;
The mode of overflowing is meant that be expert at head or end of line can not arrange down literal or face the processing mode that overlaps between the literal section mutually;
Fill character and be meant the character of the white space filling that between the literal section, forms, be the specified line type or the character of setting type arbitrarily, each finger URL can be provided with a plurality of filling character, and sets corresponding each application conditions of filling character and filling mode, and filling mode comprises that fill on a left side and right the filling;
Locating bias is meant the off-set value of the aligned position of literal section with respect to the line direction coordinate of finger URL, and locating bias is defaulted as 0, and promptly the aligned position of literal section aligns with align objects according to the line direction coordinate of finger URL;
Principal and subordinate's attribute comprises main finger URL and from two kinds of attributes of finger URL, when the literal section needs first section tail of section to insert a pair of finger URL, carries out the setting of its principal and subordinate's attribute, the alignment thereof of main finger URL decision literal section, and locating bias is fixed as 0.
Further, in the step 1), specific character is meant the separating character that is provided with in finger URL, imports this character and is used for literal line is divided into a plurality of literal fragments; Finger URL is only discerned two separating characters that the position is closed on most, and two finger URLs that close on can be set different separating characters separately, and separating character can be visible or sightless composing character.
Further, step 2) in, insert finger URL at the aligned position of the literal section of needs alignment, wherein:
When inserting a finger URL in the literal section, as there being finger URL in the literal section, then insert new finger URL after, the sprocket bit that has existed is deleted automatically; Whether the single finger URL alignment thereof of inserting in the literal section has only a kind of attribute placed in the middle, if the alignment thereof attribute is placed in the middle, then finger URL aligns with the snap point of align objects according to the mid point of place literal fragment;
When the head end of literal section or tail end insert a finger URL and are provided with its principal and subordinate's attribute, then allow to insert a subordinate finger URL at the literal section other end, principal and subordinate's attribute allows to revise, but a pair of finger URL of initial and tail sections can only have a main finger URL and one from finger URL in the literal section, and wherein the alignment thereof attribute of main finger URL comprises align center and justify align.
Further, in the step 3), carry out literal section automigration, wherein:
When there was a finger URL in the literal section, automigration literal section made the anchor point of finger URL align with the snap point of align objects;
When there is a pair of principal and subordinate's finger URL from beginning to end in the literal section, the anchor point of finger URL is alignd with the snap point of align objects, its Chinese Fields is according to the alignment of main finger URL definition alignment thereof attribute, when main finger URL is provided with justify align, calculate the alignment width of literal section with the interval of principal and subordinate's finger URL alignment.
Further, in the step 3), the anchor point of finger URL aligns with the snap point of align objects, wherein:
The anchor point of finger URL is meant the point behind the finger URL locating bias, and the line direction coordinate of the point behind this finger URL locating bias defaults to the line direction coordinate of finger URL;
The line direction coordinate of the snap point of align objects, line direction coordinate corresponding to tab stop, perhaps corresponding to the line direction coordinate of the reference point of composing piece, the composing piece here is meant literal piece, graph block, image block, OLE piece or the combination block on the space of a whole page, lateral coordinates when described line direction coordinate is meant horizontal set type or the along slope coordinate when vertically setting type.
Further again, in the step 3), fill character when the alignment properties of finger URL has been provided with, then finish alignment operation after, carry out character fill according to its set application conditions and filling mode, wherein:
When filling mode is that fill on a left side, what then the white space between the most contiguous finger URL of this finger URL and preceding left end was filled with automatically fills character;
When filling mode is right the filling, what then the white space between the most contiguous finger URL of this finger URL and preceding right-hand member was filled with automatically fills character.
Further, in alignment procedure, can not arrange down literal or face situation about overlapping between the literal section mutually when row head or end of line take place, carry out the alignment of this literal section according to the mode of overflowing of setting, the described mode of overflowing comprises two kinds of attonity and maximum move modes:
Wherein, the attonity mode is meant that when overflowing this article field is not alignd mobile, and this mode is overflowed the default setting of mode;
Maximum move mode is meant when overflow, moves according to the alignment properties of finger URL, move to adjacent literal section adjacency till.
Effect of the present invention is: the present invention is by inserting finger URL in literal, foundation is related with reference point, can realize the multiple alignment thereof of paragraph Chinese words row flexibly.Adopt method of the present invention, the spaces of a whole page such as catalogue, index, tables of data are made in composing that can simple and fast.
Embodiment
The invention will be further described below in conjunction with specification drawings and specific embodiments.
As shown in Figure 1, a kind of composition method of realizing multiple alignment in the literal line may further comprise the steps:
(1) select delegation's literal, it is a plurality of literal section S11 that the input specific character divides the interior literal of interlacing;
In the present embodiment,, now literal section shown in Figure 2 is gone the text alignment of interior multiple mode for clear and show the information of each literal section with having levels.Specify the method flow of realizing the multiple alignment of literal in second every trade in the present embodiment.
The selected second style of writing word information: " meat Ji Rou $15/kg2003000 ".
The input specific character is the separator space, and the second style of writing word information is behind the input separator space:
" meat Ji Rou $15/kg200 3000 ".
In the present embodiment, specific character is meant the separating character (as the space) that is provided with in finger URL, imports this character and is used for literal line is divided into a plurality of literal fragments; Finger URL is only discerned two separating characters that the position is closed on most, and separating character can be visible or invisible composing character.
(2) aligned position in the literal section of needs alignment inserts finger URL S12;
In the present embodiment, described finger URL is a kind of auxiliary composing note that the literal section is set type in the row that is used for, be inserted between the alphabetic character, be used to make the aligned position of place literal section to align with the snap point of align objects, show as a visual non-occupy-place symbol at editing interface, can move, duplicate, shear and delete, its alignment properties comprises separating character, align objects, fills character, locating bias, the information of overflowing mode and principal and subordinate's attribute, wherein:
Align objects is meant tab stop on composing block object on the space of a whole page or the scale;
The mode of overflowing is meant that be expert at head or end of line can not arrange down literal or face the processing mode that overlaps between the literal section mutually;
Fill character and be meant the character of the white space filling that between the literal section, forms, can be the specified line type or the character of setting type arbitrarily, each finger URL can be provided with a plurality of filling character, and set corresponding each application conditions of filling character and filling mode, filling mode comprises that fill on a left side and right the filling;
Locating bias is meant the off-set value of the aligned position of literal section with respect to the line direction coordinate of finger URL, and locating bias is defaulted as 0, and promptly the aligned position of literal section aligns with align objects according to the line direction coordinate of finger URL.
Present embodiment, step 2) in, insert finger URL at the aligned position of the literal section of needs alignment, wherein:
When inserting a finger URL in the literal section, as there being finger URL in the literal section, then insert new finger URL after, the sprocket bit that has existed is deleted automatically; Whether the single finger URL alignment thereof of inserting in the literal section has only a kind of attribute placed in the middle, if the alignment thereof attribute is placed in the middle, then finger URL according to the mid point of place literal fragment with locate reference object and align;
When the head end of literal section or tail end insert a finger URL and are provided with its principal and subordinate's attribute, then allow to insert a subordinate finger URL at the literal section other end, principal and subordinate's attribute allows to revise, but a pair of finger URL of initial and tail sections can only have a main finger URL and one from finger URL in the literal section, and wherein the alignment thereof attribute of main finger URL comprises align center and justify align.。
As shown in Figure 3, respectively at " meat " character left end 31, " $ " character left end 32, literal section " 200 " two ends, left and right sides master's finger URL 33 with from the right-hand member 35 of finger URL 34, literal section " 3000 ", " valency " character left end 36 inserts finger URLs in the present embodiment.
(3) the alignment properties S13 of each finger URL is set;
In the present embodiment, the alignment properties setting of each finger URL mainly comprises align objects is set, locating bias is set and setting is filled character, and specifically is provided with as follows:
Finger URL 31 is set to literal section " meat " left end, and separator is the space, and its corresponding align objects is a tab stop 41, and locating bias is made as 0, and alignment thereof is an align center, and promptly align with tab stop 41 in literal section " meat " centre position, as shown in Figure 4.
Finger URL 32 is set to " " character left end, and separator is the space, and its corresponding align objects is a tab stop 42, and locating bias is made as 0, and alignment thereof is non-align center, fills character to be that ". ", its filling mode are that fill on a left side.
Finger URL 33 and 34 is set to literal section " 200 " two ends, the left and right sides, and separator is the space, and its corresponding align objects is tab stop 43 and tab stop 44, and finger URL 33 is main finger URL, and finger URL 34 is from finger URL, and its alignment thereof is an align center.
Finger URL 35 is set to literal section " 3000 " right-hand member, and separator is the space, and its corresponding align objects is a tab stop 45, and locating bias is made as 0, and alignment thereof is non-align center.
Finger URL 36 is set to " order " character left end, and its corresponding align objects is a space of a whole page picture, and the corresponding reference point is 46, and locating bias is made as 0, and alignment thereof is non-align center.
Alignment properties parameter in the present embodiment is provided with alignment and the literal that can realize literal section special character and moves alignment according to the variation of corresponding picture position.
(4) carry out literal section automigration S14 according to the alignment properties of finger URL;
As shown in Figure 3 and Figure 4, carry out literal section automigration, wherein:
When there was a finger URL in the literal section, automigration literal section made the anchor point of finger URL align with the snap point of align objects;
When there is a pair of principal and subordinate's finger URL from beginning to end in the literal section, the anchor point of finger URL is alignd with the snap point of align objects, its Chinese Fields is according to the alignment of main finger URL definition alignment thereof attribute, when main finger URL is provided with justify align, calculate the alignment width of literal section with the interval of principal and subordinate's finger URL alignment.
Present embodiment, the anchor point of finger URL aligns with the snap point of align objects, wherein:
The anchor point of finger URL is meant the point behind the finger URL locating bias, and the line direction coordinate of the point behind this finger URL locating bias defaults to the line direction coordinate of finger URL;
The line direction coordinate of the snap point of align objects, line direction coordinate corresponding to tab stop, perhaps corresponding to the line direction coordinate of the reference point of composing piece, the composing piece here can be literal piece, graph block, image block, OLE piece or the combination block on the space of a whole page, lateral coordinates when described line direction coordinate is meant horizontal set type or the along slope coordinate when vertically setting type.
In the present embodiment, movetext section " meat ", making the line direction coordinate of literal section mid point be aligned in the corresponding reference point is 41 line direction coordinate.
Movetext section " Ji Rou $15/kg ", making the line direction coordinate of finger URL 32 be aligned in its corresponding reference point is 42 line direction coordinate.
Movetext section " 200 ", making the line direction coordinate of finger URL 33 and finger URL 34 be aligned in its corresponding reference point respectively is 43 and the line direction coordinate of reference point 44, then the literal section is centered at finger URL 33 and finger URL 34.
Movetext section " 3000 ", making the line direction coordinate of finger URL 35 be aligned in its corresponding reference point is 45 line direction coordinate.
Movetext section " catalog of prices ", the reference point that makes the line direction coordinate of finger URL 36 be aligned in its corresponding space of a whole page picture are 46 line direction coordinate.
(5) finish alignment operation after, in the alignment properties of finger URL in the step (3), be provided with and filled character, carry out character fill S15 according to its set application conditions and filling mode.
Wherein: when filling mode is that fill on a left side, what then the white space between the most contiguous finger URL of this finger URL and preceding left end was filled with automatically fills character;
When filling mode is right the filling, what then the white space between the most contiguous finger URL of this finger URL and preceding right-hand member was filled with automatically fills character;
In the present embodiment, literal section " chicken " setting is filled character and is that ". ", its filling mode are that fill on a left side, therefore fill the white space in the middle of literal section " chicken " and the literal section " meat " with ". ".
In the present embodiment alignment procedure, can not arrange down literal or face situation about overlapping between the literal section mutually when row head or end of line take place, carry out the alignment of this literal section according to the mode of setting of overflowing, the mode of overflowing comprises two kinds of attonity and maximum move modes, wherein:
The attonity mode is meant that when overflowing this article field is not alignd mobile, and this mode is overflowed the default setting of mode;
Maximum move mode is meant when overflow, moves according to the alignment properties of finger URL, move to adjacent literal section adjacency till.
In the present embodiment, if the finger URL that inserts is not set align objects, then do not carry out literal section automigration.After inserting finger URL, literal is positioned after separator that symbol sets is divided into a plurality of literal sections in the row, inserts the state that this article field keeps divided literal section for follow-up finger URL.
In the present embodiment,, carry out the skew of literal section, realize the alignment of multiple mode in the literal line according to the text alignment type that each literal section is set.Separator in the present embodiment, finger URL and reference table are under the editing mode and can show, do not show when preview and printing.
The embodiment of multiple alignment is consistent with the said method flow process in other literal line in the present embodiment, and after processing finished, final effect as shown in Figure 4.
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.