CN111967239A - Method and apparatus for compensating for position loss and weight loss using official document titles - Google Patents

Method and apparatus for compensating for position loss and weight loss using official document titles Download PDF

Info

Publication number
CN111967239A
CN111967239A CN202010833049.0A CN202010833049A CN111967239A CN 111967239 A CN111967239 A CN 111967239A CN 202010833049 A CN202010833049 A CN 202010833049A CN 111967239 A CN111967239 A CN 111967239A
Authority
CN
China
Prior art keywords
line
document
letter
font
title
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.)
Granted
Application number
CN202010833049.0A
Other languages
Chinese (zh)
Other versions
CN111967239B (en
Inventor
刘伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202010833049.0A priority Critical patent/CN111967239B/en
Publication of CN111967239A publication Critical patent/CN111967239A/en
Application granted granted Critical
Publication of CN111967239B publication Critical patent/CN111967239B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/189Automatic justification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

A method of compensating for position loss and point loss using a document title is provided, comprising: determining the number N of lines of a document grid occupied by an expected official document title; determining the alignment mode of a separation line in a document header and a document grid in a page; determining the total loss I of all positions and pound value to be compensated to the header part of the official document according to the alignment mode; according to the formula
Figure DDA0002638680120000011
Calculating a fixed line spacing point P of a document title(N)And setting the constant line spacing point size P for the official document title(N). An apparatus for compensating for position loss and point loss using the official document title is also provided. The device and the method greatly improve the editing efficiency of the standard documents,the workload is reduced.

Description

Method and apparatus for compensating for position loss and weight loss using official document titles
Technical Field
The invention relates to the field of text editing and processing, in particular to a method and a device for compensating position loss and weight loss by utilizing a document title.
Background
In the prior art, in the process of typesetting an official document by using a complete specification of word processing software, in order to meet the specific specification of GB/T9704-2012 ' official document format ' (note: hereinafter, referred to as ' format '), including a national standard general official document format and 3 other specific official document formats ' functions ' and ' commands ' careers ', position loss and pound value loss are inevitably generated when part elements are edited.
Taking Word of Office Word processing software (including WPS Office and Microsoft Office), typesetting the international common official document format as an example, only after the mark arrangement of the issuing institution is finished, the corresponding position loss and pound value loss can be generated.
These position and weight penalties are, in particular, the distance between the auxiliary line (the straight line immediately below the lower edge of the font) of the letter institute mark (xxxxxxxx) shown in fig. 1 and the line below the font (xxxxxxxx) (the first straight line below the auxiliary line). If the compensation is not carried out, other elements cannot be arranged at the right position required by the format. As shown in FIG. 1, the deviation (distance) exists between the lower edge auxiliary line of the letter font of the letter sender and the lower horizontal line of the line where the letter is placed, which results in that the position where the letter is placed when the letter number "XXX [2019] 30" is directly arranged in the "lower empty two lines" is incorrect and does not meet the format requirement.
Therefore, before arranging the letter size, one line of the letter size below the letter-sending organ mark needs to be compensated, for example, the line 2 below the letter-sending organ mark needs to be compensated, for example, the value of the line 2 below the letter-sending organ mark is equal to 10.23mm-I-II, wherein I is the difference between the auxiliary line of the lower edge of the letter font of the letter-sending organ mark and the horizontal line below the line where the letter font is located, and II is the inherent upper margin of the letter font of the letter size of the.
The applicant researches and discovers that after the compensation of position loss and pound value loss is completed on the line 2 below the mark of the issuing organization, the elements such as the number of the issued text, possible issuers, separation lines and titles in the edition header are continuously arranged according to the requirement of format, and the elements still have position loss and pound value loss with the previously-described principle, so that the standard official document editing is difficult to really realize, and the working efficiency is low.
Therefore, how to improve the editing efficiency of the official documents and fulfill the requirement of format, and how to quickly edit the standard official documents is a technical problem which needs to be solved at present.
Disclosure of Invention
In view of one or more of the above problems, according to an aspect of the present invention, there is provided a method for compensating for a position loss and a point loss using a document title, comprising the steps of:
a. determining the number N of lines of a document grid occupied by an expected official document title;
b. determining the alignment mode of a separation line in a document header and a document grid in a page;
c. determining the total loss I of all positions and pound value to be compensated to the header part of the official document according to the alignment mode;
d. according to the formula
Figure RE-GDA0002702505290000021
Calculating a fixed line spacing point P of a document title(N)And setting the constant line spacing point size P for the official document title(N)
H is a standard line spacing fixed value of a national standard document format document grid, C is a conversion constant 0.35277783mm/p of international unit millimeter and American unit pound, L is the actual line number of a document title, and L is less than or equal to N.
According to yet another aspect of the invention, the alignment is a vertical top alignment, a vertical center alignment, or a vertical bottom alignment.
According to yet another aspect of the invention, the method further comprises: and compensating the position loss and the pound value loss of the letter sending organ mark on the 2 nd line below the letter sending organ mark, wherein the compensated numerical value of the 2 nd line below the letter sending organ mark is equal to 10.23mm-I-II, I is the difference between the auxiliary line at the lower edge of the letter font of the letter sending organ mark and the transverse line of the letter font of the letter sending organ mark, and II is the inherent upper edge distance of the letter font of the letter sending organ mark.
According to another aspect of the present invention, when the alignment mode is vertical position top alignment, I ═ a +2B + X; when the alignment mode is vertical position centering alignment, I is A + B + X; when the bottom ends of the vertical positions are aligned, I is A + X; wherein, A is the distance between the lower horizontal line of the line where the letter size is sent and the separation line in the plate head, B is the height of 1/2 of the separation line in the plate head, and X is the difference between the position of the upper horizontal line of the upper edge of the letter title font of the official document and the position of the position marking auxiliary line of the separation line 'two empty lines' in the plate head.
According to yet another aspect of the invention, X is determined by:
determining a vertical absolute position value Y of an edge auxiliary line on a font of a document title;
the upper edge auxiliary line of the mobile official document caption font is overlapped with the upper transverse line of the line where the upper edge of the official document caption font is positioned, and the vertical absolute position value Z of the upper edge auxiliary line of the official document caption font at the moment is determined;
x is determined according to the formula X-Y-Z.
According to another aspect of the present invention, when the alignment mode is vertical position top alignment, I ═ a +2B + X + D; when the alignment mode is vertical position centering alignment, I is A + B + X + D; when the bottom ends of the vertical positions are aligned, I is A + X + D; wherein A is the distance between the lower horizontal line of the line where the letter size is sent and the separation line in the plate head, B is the height of 1/2 of the separation line in the plate head, X is the difference between the position of the upper horizontal line of the upper edge of the letter title font of the official document and the position of the position identification auxiliary line of the separation line 'two empty lines' in the plate head, and D is the inherent upper margin of the font of the next element of the title.
According to another aspect of the present invention, there is provided an apparatus for compensating for a position loss and a point loss using a document title, comprising:
the first module is used for determining that the expected official document title occupies the number N of lines of the document grid;
the second module is used for determining the alignment mode of the separation lines in the document header and the document grids in the page;
a third module, for determining the total loss of all positions and pound value loss I to be compensated to the header part of the document according to the alignment mode;
a fourth module for calculating according to the formula
Figure RE-GDA0002702505290000031
Calculating a fixed line spacing point P of a document title(N)And setting the constant line spacing point size P for the official document title(N)
H is a standard line spacing fixed value of a national standard document format document grid, C is a conversion constant 0.35277783mm/p of international unit millimeter and American unit pound, L is the actual line number of a document title, and L is less than or equal to N.
According to another aspect of the invention, the alignment is vertical position top end alignment, vertical position middle alignment or vertical position bottom end alignment; preferably, the apparatus further comprises: and the eighth module is used for compensating the position loss and the pound value loss of the letter sending organ mark on the 2 nd line below the letter sending organ mark, the compensated numerical value of the 2 nd line below the letter sending organ mark is equal to 10.23mm-I-II, wherein I is the difference between the lower edge auxiliary line of the letter font of the letter sending organ mark and the lower transverse line of the letter font of the letter sending organ mark, and II is the inherent upper margin of the letter font of the letter sending organ mark.
According to another aspect of the present invention, when the alignment mode is vertical position top alignment, I ═ a +2B + X; when the alignment mode is vertical position centering alignment, I is A + B + X; when the bottom ends of the vertical positions are aligned, I is A + X; wherein, A is the distance between the lower horizontal line of the line where the letter size is sent and the separation line in the plate head, B is the height of 1/2 of the separation line in the plate head, and X is the difference between the position of the upper horizontal line of the upper edge of the letter title font of the official document and the position of the position marking auxiliary line of the separation line 'two empty lines' in the plate head.
According to another aspect of the present invention, the apparatus for compensating for position loss and weight loss using a official document title further comprises:
a fifth module, configured to determine a vertical absolute position value Y of an upper edge auxiliary line of a font of a document title;
a sixth module, configured to move the upper edge auxiliary line of the document caption font to coincide with the horizontal line on the line where the upper edge of the document caption font is located, and determine a vertical absolute position value Z of the upper edge auxiliary line of the document caption font at this time;
a seventh module for determining X according to the formula X-Y-Z.
According to another aspect of the present invention, when the alignment mode is vertical position top alignment, I ═ a +2B + X + D; when the alignment mode is vertical position centering alignment, I is A + B + X + D; when the bottom ends of the vertical positions are aligned, I is A + X + D; wherein A is the distance between the lower horizontal line of the line where the letter size is sent and the separation line in the plate head, B is the height of 1/2 of the separation line in the plate head, X is the difference between the position of the upper horizontal line of the upper edge of the letter title font of the official document and the position of the position identification auxiliary line of the separation line 'two empty lines' in the plate head, and D is the inherent upper margin of the font of the next element of the title.
The invention has the beneficial effects that: (1) the official documents meeting the requirements of format can be quickly processed by adjusting the line spacing of the official document titles; (2) the official document title, the main delivery organ and the text can really meet the requirements of format; (3) the editing efficiency of the standard document is greatly improved, and the workload is reduced.
Drawings
FIG. 1 is a schematic diagram of position loss and pound-value loss generated by issuing a token arrangement;
FIG. 2 is a schematic diagram of a method for compensating for position loss and point loss using a document header in accordance with a preferred embodiment of the present invention;
FIG. 3 is a diagram illustrating the effect of compensating the title of a document;
FIG. 4 is a schematic diagram of the calculated difference X of the method of compensating for position loss and point loss using a document heading in accordance with a preferred embodiment of the present invention;
fig. 5 is a diagram illustrating the effect of the compensated document title according to a preferred embodiment of the present invention.
Detailed Description
The best mode for carrying out the present invention will be described in detail with reference to the accompanying drawings, wherein the detailed description is for the purpose of illustrating the invention in detail, and is not to be construed as limiting the invention, as various changes and modifications can be made therein without departing from the spirit and scope thereof, which are intended to be encompassed within the appended claims.
Example 1
The applicant researches and discovers that one-time compensation can be completed on the position loss and the pound loss accumulated by the official document title and the previous elements on the premise of meeting the requirements of the format regulation by adjusting the line spacing of the titles.
In accordance with a preferred embodiment of the present invention, and with reference to FIG. 2, there is provided a method for compensating for position loss and point loss using a document title, comprising the steps of:
a. determining the number N of lines of a document grid occupied by an expected official document title;
b. determining the alignment mode of a separation line 111 in the document header and a document grid in a page;
c. determining the total loss I of all positions and pound value to be compensated to the header part of the official document according to the alignment mode;
d. according to the formula
Figure RE-GDA0002702505290000061
Calculating a fixed line spacing point P of a document title(N)And setting the constant line spacing point size P for the official document title(N)
H is a standard line spacing fixed value of a national standard document format document grid, C is a conversion constant 0.35277783mm/p of international unit millimeter and American unit pound, L is the actual line number of a document title, and L is less than or equal to N.
It is understood that, as shown in FIG. 5, the document grid is composed of a plurality of line dividing lines (also called explicit document grid) set by the system, for example, 1-18 lines are shown in FIG. 5, and the document grid is composed of all the lines shown in the figure.
According to a further preferred embodiment of the invention, the alignment is a vertical top alignment, a vertical center alignment or a vertical bottom alignment. Preferably, the method further comprises: and compensating the position loss and the pound value loss of the letter sending organ mark on the 2 nd line below the letter sending organ mark, wherein the compensated numerical value of the 2 nd line below the letter sending organ mark is equal to 10.23mm-I-II, I is the difference between the auxiliary line at the lower edge of the letter font of the letter sending organ mark and the transverse line of the letter font of the letter sending organ mark, and II is the inherent upper edge distance of the letter font of the letter sending organ mark.
According to another preferred embodiment of the present invention, when the vertical position is aligned at the top end, I ═ a +2B + X; when the alignment mode is vertical position centering alignment, I is A + B + X; when the bottom ends of the vertical positions are aligned, I is A + X; wherein, a is the distance from the lower horizontal line 112 of the line where the letter size is sent to the separation line 111 in the plate head, B is the height 1/2 of the separation line 111 in the plate head, and X is the difference between the position of the upper horizontal line 114 of the upper edge of the letter of the official document title and the position of the position identification auxiliary line 113 of the "two lines below" the separation line 111 in the plate head.
It can be understood that, as shown in fig. 3, when the auxiliary line 113 is above and the upper transversal line 114 is below, the position value of the upper transversal line 114 is greater than that of the auxiliary line 113, and the difference between the two is positive, otherwise, negative.
According to a further preferred embodiment of the invention, X is determined by:
as shown in fig. 3, for the document title before compensation, determining a vertical absolute position value Y of an upper edge auxiliary line 113 (also called a position identification auxiliary line of "two lines below" the separation line 111 in the header) of the font of the document title;
referring to fig. 4, the upper edge auxiliary line 113 of the font of the moving official document caption coincides with the upper horizontal line 114 of the line where the upper edge of the font of the official document caption is located, and the vertical absolute position value Z of the upper edge auxiliary line of the font of the official document caption at this time is determined;
x is determined according to the formula X-Y-Z.
Referring again to fig. 3, which shows an example of the heading before compensation, the position of the font "about xxxxxxxxxxxxxx" with the upper edge away from the "lower two lines" of the separation line 111 in the header identifies an auxiliary line (heading font upper edge auxiliary line) 113, and the lower edge of the heading "about … … notification" occupancy interval (shaded area is the occupancy interval) is away from the last lower horizontal line of the occupancy document grid.
Referring to fig. 5, which shows an example of a compensated heading, the position of the font "about xxxxxxxxxxxxxx" upper edge is flush or very close to the position of the separation line "two empty lines below" in the header identifies that the auxiliary line (heading font upper edge auxiliary line) is already level or very close, and the heading "notify about … …" lower edge of the occupied zone has been coincident or very close to the last horizontal line below the occupied document grid.
According to another preferred embodiment of the present invention, when the vertical positions are aligned in the top direction, I ═ a +2B + X + D; when the alignment mode is vertical position centering alignment, I is A + B + X + D; when the bottom ends of the vertical positions are aligned, I is A + X + D; wherein A is the distance between the lower horizontal line of the line where the letter size is sent and the separation line in the plate head, B is the height of 1/2 of the separation line in the plate head, X is the difference between the position of the upper horizontal line of the upper edge of the letter title font of the official document and the position of the position identification auxiliary line of the separation line 'two empty lines' in the plate head, and D is the inherent upper margin of the font of the next element of the title.
There is also provided in accordance with still another preferred embodiment of the present invention an apparatus for compensating for position loss and point loss using a document title, including:
the first module is used for determining that the expected official document title occupies the number N of lines of the document grid;
the second module is used for determining the alignment mode of the separation lines in the document header and the document grids in the page;
a third module, for determining the total loss of all positions and pound value loss I to be compensated to the header part of the document according to the alignment mode;
a fourth module for calculating according to the formula
Figure RE-GDA0002702505290000081
Calculating a fixed line spacing point P of a document title(N)And setting the constant line spacing point size P for the official document title(N)
H is a standard line spacing fixed value of a national standard document format document grid, C is a conversion constant 0.35277783mm/p of international unit millimeter and American unit pound, L is the actual line number of a document title, and L is less than or equal to N.
According to a further preferred embodiment of the invention, the alignment is a vertical top alignment, a vertical center alignment or a vertical bottom alignment. Preferably, the apparatus further comprises: and the eighth module is used for compensating the position loss and the pound value loss of the letter sending organ mark on the 2 nd line below the letter sending organ mark, the compensated numerical value of the 2 nd line below the letter sending organ mark is equal to 10.23mm-I-II, wherein I is the difference between the lower edge auxiliary line of the letter font of the letter sending organ mark and the lower transverse line of the letter font of the letter sending organ mark, and II is the inherent upper margin of the letter font of the letter sending organ mark.
According to another preferred embodiment of the present invention, when the vertical position is aligned at the top end, I ═ a +2B + X; when the alignment mode is vertical position centering alignment, I is A + B + X; when the bottom ends of the vertical positions are aligned, I is A + X; wherein, A is the distance between the lower horizontal line of the line where the letter size is sent and the separation line in the plate head, B is the height of 1/2 of the separation line in the plate head, and X is the difference between the position of the upper horizontal line of the upper edge of the letter title font of the official document and the position of the position marking auxiliary line of the separation line 'two empty lines' in the plate head.
In accordance with still another preferred embodiment of the present invention the apparatus for compensating for position loss and weight loss using official document titles further comprises:
a fifth module, configured to determine a vertical absolute position value Y of an upper edge auxiliary line of a font of a document title;
a sixth module, configured to move the upper edge auxiliary line of the document caption font to coincide with the horizontal line on the line where the upper edge of the document caption font is located, and determine a vertical absolute position value Z of the upper edge auxiliary line of the document caption font at this time;
a seventh module for determining X according to the formula X-Y-Z.
According to another preferred embodiment of the present invention, when the vertical positions are aligned in the top direction, I ═ a +2B + X + D; when the alignment mode is vertical position centering alignment, I is A + B + X + D; when the bottom ends of the vertical positions are aligned, I is A + X + D; wherein A is the distance between the lower horizontal line of the line where the letter size is sent and the separation line in the plate head, B is the height of 1/2 of the separation line in the plate head, X is the difference between the position of the upper horizontal line of the upper edge of the letter title font of the official document and the position of the position identification auxiliary line of the separation line 'two empty lines' in the plate head, and D is the inherent upper margin of the font of the next element of the title.
The invention has the beneficial effects that: (1) the official documents meeting the requirements of format can be quickly processed by adjusting the line spacing of the official document titles; (2) the official document title, the main delivery organ and the text can really meet the requirements of format; (3) the editing efficiency of the standard document is greatly improved, and the workload is reduced.
Example 2
The preferred embodiment of the invention is further illustrated below on the basis of example 1, the contents of which example 2 can be combined with example 1 to create a new embodiment.
According to another preferred embodiment of the present invention, the goal of the title line spacing adjustment is to make the actual number of lines of the title fully occupy one or several lines of the explicit document grid, thereby achieving a one-time compensation of the position loss and point-size loss accumulated in the title itself and in the preceding elements. In particular, the amount of the solvent to be used,
Figure RE-GDA0002702505290000091
wherein: standard spacing between lines of document grid (with international general official document format, special official document format 'command' and 'era' 10.23mm, special official document format 'letter' 10.65mm)
The conversion constant of C is 0.35277783mm/p
L is the actual number of lines in the title itself
N is the number of lines in the document grid occupied by the expected title (note: N ≧ L)
Sum of all position losses and point losses to the header section that should be compensated
P(N)Fixed line spacing point scale for expected header to account for number of lines in document grid
According to a further preferred embodiment of the invention, the following three parameters are first determined: firstly, determining the number of lines of the document grid occupied by the expected title according to actual conditions, secondly, determining the actual alignment mode of the separation lines in the page header and the document grid, and thirdly, determining the value of a factor I.
According to another preferred embodiment of the present invention, the number of rows of the document grid that the title is expected to occupy is determined, and according to practical situations, the following factors can be generally referred to.
(1) The line spacing and value of the desired document grid cannot generally be smaller than the font size of the headline to ensure that the headline font is fully displayed. When the title uses the type 2 designation from format, the line spacing and value must not be less than at least nx 22 lbs;
(2) the expected occupied document grid generally ensures that the text must be displayed after the title element;
(3) the reference base for line spacing in the national standard official document heading is preferably 36 pounds, using a 2 word high (7.76mm, 22 pounds) plus a 3 word high 7/8 (14 pounds). In other words, the closer the title transition line pitch to the value, the better the title transition line pitch in both the larger and smaller directions.
According to a further preferred embodiment of the invention, the actual alignment of the separation lines in the plate head with the document grid is determined. The separation lines in the format head are used as lines with certain entity height, and the alignment modes of the word processing software default setting and the document grid are different according to different height conditions of the separation lines. Either the vertical position is centered alignment or the vertical position is top aligned or bottom aligned.
In Word, when the value of the separating line pound in the plate head is 1.2 pounds (0.425mm), the alignment mode of the separating line pound and the document grid is vertical position centering alignment. This means that in a Word document grid, a separator line in a header with a height of 1.2 pounds is designated to be located at a position above and below which the height of the separator line in the header of 1/2 is shared. The height of the dividing line in the 1/2 edition head above the position is calculated in the distance from the lower transverse line of the line where the letter is sent to the dividing line in the edition head. But the height of the separation line in the 1/2 edition head allocated below the position is larger than the space for arranging the title by 'two lines below' the separation line in the edition head. Therefore, in the case of the national standard universal document format, it can be determined that the separation line itself height 0.2125mm must be calculated and included in the 1/2 version header when converting the headline spacing.
Further, as shown in the following table, in the case of the vertical position top end alignment and the vertical position bottom end alignment, there is some variation in the calculation formula of the I value.
Figure RE-GDA0002702505290000101
Figure RE-GDA0002702505290000111
According to a further preferred embodiment of the invention, the factor I value is calculated. Taking fig. 2 as an example, all position loss and point loss, i.e., factor I values, that the header section should fully compensate at once, include:
(1) the distance from the lower horizontal line of the line where the letter is sent to the separation line in the plate head is 1.66mm, defined as A,
(2) the separation line 1/2 in the plate head itself has a height of 0.2125mm, defined as B.
(3) The position of the separation line 'two empty lines below' in the plate head marks the auxiliary line (the auxiliary line at the upper edge of the title font), and the difference between the auxiliary line and the horizontal line on the line where the upper edge of the title font is located is converted into the remainder after the standard line, and is defined as X.
According to another preferred embodiment of the present invention, the separation line "two lines empty" between the upper edge of the banner font and the plate head is achieved with a standard line spacing fixed value as long as it is ensured that the upper edge of the banner font can reach the position of the auxiliary line 113. Thus, two different forms of the relative positions of the auxiliary line on the upper edge of the title word and the transverse line on the line where the upper edge of the title word is located are produced.
For example, the auxiliary line 113 of the upper edge of the caption font is located above the horizontal line 114 of the line where the upper edge of the caption font is located as shown in fig. 3, and the difference between the two lines needs to be increased when the line spacing is converted, so as to absolutely ensure that the upper edge of the caption font can reach the position of the auxiliary line 113, and at this time, the value X is counted as a positive value. Otherwise, the difference value between the two values needs to be subtracted, and the phenomenon that the calculated conversion line spacing value is too large to cause that the heading line spacing approaches to a single-line spacing state to occupy a large number of first page spreads on the premise of ensuring that the upper edge of the heading font can reach the position of the auxiliary line is avoided, and at the moment, the value X is counted as a negative value.
The sum of the three is the total value of all position loss and pound value loss required for one-time full compensation in line spacing conversion.
From the above analysis, to simplify the formula, X can be directly defined as the difference between the position of the horizontal line 114 on the line where the upper edge of the font of the official document caption is located and the position of the position identification auxiliary line 113 of the separation line 111 "two lines empty below" in the plate head.
According to a further preferred embodiment of the invention, an X value is calculated and determined. First, the vertical absolute position value of the margin auxiliary line on the title font relative to the "margin" of the reference object is checked. For example, the title font "notify about … …" in fig. 3 is selected first as the upper edge auxiliary line (position identification auxiliary line) 113. Then, enter the "position" tab of the Word "layout" dialog box, and see its vertical absolute position value of 152.38mm relative to the "margin" of the reference.
Next, the upper edge auxiliary line of the mobile title font coincides with the upper horizontal line of the line where the upper edge of the title font is located, and the vertical absolute position value of the reference object "margin" at this time is checked. Through a Word 'document grid' dialog box, the document grid alignment mode is set as 'object and grid alignment'. Then, in the state of the document grid in the international official document format, the upper edge auxiliary line of the title font is selected, and the upper edge auxiliary line 113 of the title font is enabled to coincide with the upper transverse line 114 of the row where the upper edge of the title font is located through the movement of the upper (↓) or lower (↓) direction keys of the keyboard.
The "position" tab of the "layout" dialog box is entered again to see the top edge auxiliary line 113 of the title word coinciding with the top line of the line on which the top edge of the title word lies, at this point in time the value of the vertical absolute position of the "margin" with respect to the reference, for example 153.19mm in this case (see fig. 4).
This then gives:
X=153.19mm-152.38mm=0.81mm。
thus obtaining the product I ═ A + B + X ═ 1.66mm +0.2125mm +0.81mm ═ 2.6825 mm.
The header conversion line spacing value is calculated. Assuming that the title with three lines in this example is expected to occupy 3 lines of the document grid, substituting the value of I into the title line space conversion formula, there are:
Figure RE-GDA0002702505290000121
in the "retract and space" tab of the Word "paragraph" dialog box, the fixed line space value of the title is set accordingly, and the set (compensated) document effect is shown in fig. 5. Preferably, according to the actual situation, the position identification auxiliary line (the title font upper edge auxiliary line) of the font "about xxxxxxxxxxxx" upper edge is flush with or extremely close to the separating line "lower empty two lines" in the edition head, and the lower edge of the occupied section of the title "about … … notice" is coincident with or extremely close to the last lower horizontal line of the occupied document grid through the functions of Word character position, line spacing setting and the like.
According to another preferred embodiment of the present invention, the next element is arranged with the standard line spacing constant value of "next line" and the calculation process is simplified. When typesetting, if we need to take into account the standard line spacing fixed value "next empty line" to lay out the possible element main sending organ or the element text of "necessary item", the factor I value must increase the inherent upper margin of the font of the next element (note: whether the main sending organ or the text is text), and it is defined as D. For example, the national standard universal document format, the specific document format "command (order)" and "era" are regarded as the font proper upper edge distance of the mean of 2.345mm, and the specific document format "function" is regarded as the font proper upper edge distance of the mean of 2.556 mm.
In this case, when the alignment mode is vertical position top alignment, I ═ a +2B + X + D; when the alignment mode is vertical position centering alignment, I is A + B + X + D; when the alignment mode is vertical position bottom alignment, I is A + X + D; wherein A is the distance between the lower horizontal line of the line where the letter size is sent and the separation line in the plate head, B is the height of 1/2 of the separation line in the plate head, X is the difference between the position of the upper horizontal line of the upper edge of the letter title font of the official document and the position of the position identification auxiliary line of the separation line 'two empty lines' in the plate head, and D is the inherent upper margin of the font of the next element of the title.
According to a further preferred embodiment of the present invention, the distance between the auxiliary line of the lower edge of the font of the engine logo (XXXXXX) (the straight line next to the lower edge of the font) and the horizontal line under the row (the first straight line under the auxiliary line) where the font (XXXXXX) is located, shown in fig. 1, is compensated before the method of compensating for the position loss and the point size loss using the official document title. Specifically, the value compensated by the 2 nd line below the sending organ mark is equal to 10.23mm-I-II, wherein I is the difference between the auxiliary line at the lower edge of the font of the sending organ mark and the horizontal line below the font, and II is the inherent upper margin of the font of the sending organ mark, and the inherent upper margin is 2.345 mm.
When the lower edge auxiliary line of the letter engine mark font is positioned above the lower horizontal line of the line where the lower edge of the letter engine mark font is positioned, the difference value I of the two is a positive value, and the line spacing of the 2 nd line below the letter engine mark is considered to be reduced. Conversely, a negative value for I is considered to increase the spacing between lines in line 2 below the letter engine flag.
For example, the vertical absolute position value of the lower edge auxiliary line of the letter font of the letter office sign before and after movement can be determined by the mode that the lower edge auxiliary line of the letter font of the letter office sign is moved to be overlapped with the lower horizontal line where the lower edge of the letter font of the letter office sign is positioned, and then the value I can be determined. For example, in this example, the vertical absolute position value of the auxiliary line of the lower edge of the font of the letter of.
Thus, if i is positive and equal to 0.26mm, the line spacing to be adjusted for line 2 below the letter of the letter 10.23 mm-0.26 mm-2.345 mm is 7.63 mm. And the line spacing of the 2 nd line below the engine logo is adjusted, so that the compensation of the position loss and the pound value loss of the engine logo is completed.
The invention has the beneficial effects that: (1) the official documents meeting the requirements of format can be quickly processed by adjusting the line spacing of the official document titles; (2) the letter number, the official document title, the main and delivery organs and the text of the issued text can really meet the requirements of format; (3) the editing efficiency of the standard document is greatly improved, and the workload is reduced.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A method for compensating for position loss and point loss using a document title, comprising the steps of:
a. determining the number N of lines of a document grid occupied by an expected official document title;
b. determining the alignment mode of a separation line in a document header and a document grid in a page;
c. determining the total loss I of all positions and pound value to be compensated to the header part of the official document according to the alignment mode;
d. according to the formula
Figure FDA0002638680090000011
Calculating a fixed line spacing point P of a document title(N)And setting the constant line spacing point size P for the official document title(N)
H is a standard line spacing fixed value of a national standard document format document grid, C is a conversion constant 0.35277783mm/p of international unit millimeter and American unit pound, L is the actual line number of a document title, and L is less than or equal to N.
2. The method of claim 1, wherein said alignment is top vertical alignment, center vertical alignment, or bottom vertical alignment; preferably, the method further comprises: and compensating the position loss and the pound value loss of the letter sending organ mark on the 2 nd line below the letter sending organ mark, wherein the compensated numerical value of the 2 nd line below the letter sending organ mark is equal to 10.23mm-I-II, I is the difference between the auxiliary line at the lower edge of the letter font of the letter sending organ mark and the transverse line of the letter font of the letter sending organ mark, and II is the inherent upper edge distance of the letter font of the letter sending organ mark.
3. The method of claim 2, wherein the method further comprises the step of: when the top ends of the vertical positions are aligned, I is A +2B + X; when the alignment mode is vertical position centering alignment, I is A + B + X; when the bottom ends of the vertical positions are aligned, I is A + X; wherein, A is the distance between the lower horizontal line of the line where the letter size is sent and the separation line in the plate head, B is the height of 1/2 of the separation line in the plate head, and X is the difference between the position of the upper horizontal line of the upper edge of the letter title font of the official document and the position of the position marking auxiliary line of the separation line 'two empty lines' in the plate head.
4. The method of compensating for position and point losses using official document titles as claimed in claim 3 wherein X is determined by:
determining a vertical absolute position value Y of an edge auxiliary line on a font of a document title;
the upper edge auxiliary line of the mobile official document caption font is overlapped with the upper transverse line of the line where the upper edge of the official document caption font is positioned, and the vertical absolute position value Z of the upper edge auxiliary line of the official document caption font at the moment is determined;
x is determined according to the formula X-Y-Z.
5. The method of claim 2, wherein the method further comprises the step of: when the top ends of the vertical positions are aligned, I is A +2B + X + D; when the alignment mode is vertical position centering alignment, I is A + B + X + D; when the bottom ends of the vertical positions are aligned, I is A + X + D; wherein A is the distance between the lower horizontal line of the line where the letter size is sent and the separation line in the plate head, B is the height of 1/2 of the separation line in the plate head, X is the difference between the position of the upper horizontal line of the upper edge of the letter title font of the official document and the position of the position identification auxiliary line of the separation line 'two empty lines' in the plate head, and D is the inherent upper margin of the font of the next element of the title.
6. An apparatus for compensating for position loss and point loss using a document title, comprising:
the first module is used for determining that the expected official document title occupies the number N of lines of the document grid;
the second module is used for determining the alignment mode of the separation lines in the document header and the document grids in the page;
a third module, for determining the total loss of all positions and pound value loss I to be compensated to the header part of the document according to the alignment mode;
a fourth module for calculating according to the formula
Figure FDA0002638680090000021
Calculating a fixed line spacing point P of a document title(N)And setting the constant line spacing point size P for the official document title(N)
H is a standard line spacing fixed value of a national standard document format document grid, C is a conversion constant 0.35277783mm/p of international unit millimeter and American unit pound, L is the actual line number of a document title, and L is less than or equal to N.
7. The apparatus of claim 6, wherein said alignment is top vertical, center vertical, or bottom vertical; preferably, the apparatus further comprises: and the eighth module is used for compensating the position loss and the pound value loss of the letter sending organ mark on the 2 nd line below the letter sending organ mark, the compensated numerical value of the 2 nd line below the letter sending organ mark is equal to 10.23mm-I-II, wherein I is the difference between the lower edge auxiliary line of the letter font of the letter sending organ mark and the lower transverse line of the letter font of the letter sending organ mark, and II is the inherent upper margin of the letter font of the letter sending organ mark.
8. The apparatus of claim 7, wherein the apparatus for compensating for position loss and weight loss using official document titles comprises: when the top ends of the vertical positions are aligned, I is A +2B + X; when the alignment mode is vertical position centering alignment, I is A + B + X; when the bottom ends of the vertical positions are aligned, I is A + X; wherein, A is the distance between the lower horizontal line of the line where the letter size is sent and the separation line in the plate head, B is the height of 1/2 of the separation line in the plate head, and X is the difference between the position of the upper horizontal line of the upper edge of the letter title font of the official document and the position of the position marking auxiliary line of the separation line 'two empty lines' in the plate head.
9. The apparatus for compensating for position and weight loss using official document titles as claimed in claim 8 further comprising:
a fifth module, configured to determine a vertical absolute position value Y of an upper edge auxiliary line of a font of a document title;
a sixth module, configured to move the upper edge auxiliary line of the document caption font to coincide with the horizontal line on the line where the upper edge of the document caption font is located, and determine a vertical absolute position value Z of the upper edge auxiliary line of the document caption font at this time;
a seventh module for determining X according to the formula X-Y-Z.
10. The apparatus of claim 7, wherein the apparatus for compensating for position loss and weight loss using official document titles comprises: when the top ends of the vertical positions are aligned, I is A +2B + X + D; when the alignment mode is vertical position centering alignment, I is A + B + X + D; when the bottom ends of the vertical positions are aligned, I is A + X + D; wherein A is the distance between the lower horizontal line of the line where the letter size is sent and the separation line in the plate head, B is the height of 1/2 of the separation line in the plate head, X is the difference between the position of the upper horizontal line of the upper edge of the letter title font of the official document and the position of the position identification auxiliary line of the separation line 'two empty lines' in the plate head, and D is the inherent upper margin of the font of the next element of the title.
CN202010833049.0A 2020-08-18 2020-08-18 Method and apparatus for compensating for position loss and weight loss using a portfolio title Active CN111967239B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010833049.0A CN111967239B (en) 2020-08-18 2020-08-18 Method and apparatus for compensating for position loss and weight loss using a portfolio title

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010833049.0A CN111967239B (en) 2020-08-18 2020-08-18 Method and apparatus for compensating for position loss and weight loss using a portfolio title

Publications (2)

Publication Number Publication Date
CN111967239A true CN111967239A (en) 2020-11-20
CN111967239B CN111967239B (en) 2024-01-23

Family

ID=73388423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010833049.0A Active CN111967239B (en) 2020-08-18 2020-08-18 Method and apparatus for compensating for position loss and weight loss using a portfolio title

Country Status (1)

Country Link
CN (1) CN111967239B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05305749A (en) * 1992-04-30 1993-11-19 Brother Ind Ltd Tape printer
CN101470698A (en) * 2007-12-26 2009-07-01 北京大学 Layout method and corresponding system for symbol of sending organizations
CN103678268A (en) * 2012-09-19 2014-03-26 北京大学 Automatic typesetting method and device for official documents
CN105260350A (en) * 2014-07-14 2016-01-20 方正国际软件(北京)有限公司 Document composition method and device
CN111401026A (en) * 2018-12-29 2020-07-10 方正国际软件(北京)有限公司 Title generation method, electronic device, and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05305749A (en) * 1992-04-30 1993-11-19 Brother Ind Ltd Tape printer
CN101470698A (en) * 2007-12-26 2009-07-01 北京大学 Layout method and corresponding system for symbol of sending organizations
CN103678268A (en) * 2012-09-19 2014-03-26 北京大学 Automatic typesetting method and device for official documents
CN105260350A (en) * 2014-07-14 2016-01-20 方正国际软件(北京)有限公司 Document composition method and device
CN111401026A (en) * 2018-12-29 2020-07-10 方正国际软件(北京)有限公司 Title generation method, electronic device, and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
曹丽娟: "正确、规范、简明地使用公文标题", 新闻与写作, no. 04, pages 111 - 112 *
王雷 等: "办公自动化基础", 杭州大学出版社, pages: 20 - 21 *

Also Published As

Publication number Publication date
CN111967239B (en) 2024-01-23

Similar Documents

Publication Publication Date Title
CN105589841B (en) A kind of method of PDF document Table recognition
US5231579A (en) Method and system for displaying and processing image of form document
CN107133621B (en) Method for classifying and extracting information of formatted fax based on OCR
JP3940491B2 (en) Document processing apparatus and document processing method
US8824798B2 (en) Information processing device, computer readable medium storing information processing program, and information processing method
CN100565601C (en) A kind of bill processing apparatus and method
US9251123B2 (en) Systems and methods for converting a PDF file
JP2007042126A (en) Method and apparatus for producing hybrid data structure for displaying raster image
CN101872340A (en) Typesetting method and device based on format layout template
JPH06203138A (en) Image editing system
CN101354727B (en) Method and apparatus for establishing links between digital document catalog and text
CN108038495B (en) Incomplete Chinese character recognition method
CN102194117B (en) Method and device for detecting page direction of document
CN111967239A (en) Method and apparatus for compensating for position loss and weight loss using official document titles
CN113962201A (en) Document structuralization and extraction method for documents
CN109726369A (en) A kind of intelligent template questions record Implementation Technology based on normative document
JP2006221569A (en) Document processing system, document processing method, program, and storage medium
CN101673406B (en) Method and device for setting font
WO2001059604A1 (en) Method for determining line leading in accordance with traditional japanese practices
CN102033855A (en) Method and system for typesetting characters of various fonts and same code value
US7296227B2 (en) Determining line leading in accordance with traditional Japanese practices
JPH11232439A (en) Document picture structure analysis method
US20120254741A1 (en) Proofreading apparatus, proofreading method, and recording medium
JP2016045896A (en) Display control device, display device, program, and recording medium
CN102262614A (en) Longitudinal proofreading method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant