Document typesetting processing method and device
A processing method and document technology, applied in word processing, electronic digital data processing, special data processing applications, etc., can solve the problem of low typesetting efficiency and achieve the effect of improving typesetting efficiency
Active Publication Date: 2018-12-11
PEKING UNIV FOUNDER GRP CO LTD +1
11 Cites 0 Cited by
AI-Extracted Technical Summary
Problems solved by technology
[0004] Embodiments of the present invention provide a typesetting processing method and device for documents, so as to perform typesetting pr...
Method used
The typesetting processing method of the document provided by the present embodiment, by according to the entrance rule of target container and typesetting unit under target container and its corresponding descriptive information, in target container, the XML data to be typeset is filled and processed, and in On the pre-configured template, the typesetting process is performed on the document according to the filled target container, and multiple typesetting units can be managed in blocks, which facilitates the generation of rich typesetting layouts and improves typesetting efficiency.
[0092] Accordi...
Abstract
The embodiment of the invention provides a document typesetting processing method and device. The method comprises the following steps: receiving a typesetting request; According to the typesetting request, obtaining a target container corresponding to the label on the pre-configured template for each label; according to the entry rule corresponding to the target container corresponding to the label and the description information corresponding to at least one typesetting unit and the typesetting unit under the target container, filling the XML data to be typeset corresponding to the label inthe target container to obtain the filled target container; typesetting a document on a pre-configured template according to at least one filled target container. Multiple typesetting units can be managed in blocks to facilitate the generation of a rich layout, the efficiency of typesetting is improved, and the needs of users can be better met.
Application Domain
Text processingSpecial data processing applications
Technology Topic
Information retrievalXml data +1
Image
Examples
- Experimental program(3)
Example Embodiment
[0044] Embodiment one
[0045] This embodiment provides a method for typesetting a document, which is used for typesetting a document. The execution subject of this embodiment is a typesetting processing device for documents, and the device can be set in typesetting software.
[0046] like figure 1 As shown, it is a schematic flow chart of the document typesetting processing method provided by the embodiment, and the method includes:
[0047] Step 101, receiving a typesetting request, the typesetting request includes a document to be typesetting, and the document to be typesetting includes at least one tag and XML data to be typesetting corresponding to the tag.
[0048]Specifically, typesetting refers to the process of filling the data in the document to be typeset into the corresponding position in the pre-configured template to generate the layout required by the user. Typesetting processing. The typesetting request includes a document to be typesetting by the user, and the document to be typesetting includes at least one tag and XML data to be typesetting corresponding to the tag. It can be understood that the document to be typeset may include multiple tags and XML data to be typed corresponding to each tag.
[0049] Step 102, according to the typesetting request, for each label, obtain a target container corresponding to the label on the pre-configured template; wherein, the target container includes: at least one typesetting unit and description information corresponding to the typesetting unit.
[0050] When the typesetting processing device of the document receives the typesetting request, according to the typesetting request, for each label, on the pre-configured template, obtain the target container corresponding to the label to determine the target container corresponding to each label; wherein, the target container It includes at least one typesetting unit and description information corresponding to the typesetting unit.
[0051] Wherein, the description information is used to describe the XML tags, content objects, filling content rules, supplementary filter conditions, child typesetting units, content arrangement options, prefix items, suffix items, pre-addition items, post-addition items, and connection elements of the typesetting unit. Layout and other properties. A pre-configured template is a template that users pre-configure through typesetting software according to their own needs. The pre-configured template can include one or more containers set by the user. Each container is set in a different position of the template according to the user's needs. It is used to display different Content or layout, the template layout is managed in blocks, and the container plays a certain role in isolation. The content in the container will not be displayed outside the range set by the container, which avoids the content when the typesetting display process is completed after filling disorder, and can easily manage the typesetting layout. Each container can include one or more typesetting units, which are used to fill specific XML data content, such as the title of a paper "Clinical Application of Radical Esophagectomy", and each typesetting unit has corresponding description information , used to describe various attributes of the layout unit, such as the content object of the layout unit.
[0052] The XML tag of the typesetting unit is to set an identification information for the typesetting unit, and the identification information is a tag format in the XML language, and is used to find the content that should be filled in the typesetting unit in the document to be typeset according to the tag. The content object of a typesetting unit refers to the attribute of the specific content that needs to be filled in the typesetting unit. The filling content rule of a typesetting unit refers to the filling rule of a sub-level typesetting unit in a typesetting unit. Supplementary filter conditions of typesetting unit means that when two identical tags appear in the XML tag of the typesetting unit in the document to be typeset, it is necessary to select which tag corresponding to the typesetting unit needs to be filled with XML data according to these supplementary filtering conditions , the supplementary filter condition can be the XML tag of the child typesetting unit under the XML tag of the typesetting unit, or other filtering conditions can be set. The sub-level typesetting unit of the typesetting unit is the typesetting unit nested under the typesetting unit, such as the thesis metadata " "It is the XML tag of the typesetting unit, and it also includes multiple sub-level typesetting unit title groups" ", author group "contrib-group", keyword group "kwd-group", etc. It should be noted that each sub-level typesetting unit itself is also a typesetting unit, and it can also have its own sub-level typesetting units, but relative to other The upper typesetting unit is called sub-level typesetting unit. The content arrangement option of the typesetting unit refers to the arrangement of the sub-level typesetting units in the typesetting unit on the layout, including sequence arrangement, selection arrangement and automatic arrangement. Among them, sequence arrangement It means that in the target container in the pre-configured template, according to the XML tags and supplementary filter conditions of the sub-level typesetting unit of the typesetting unit, search for the content corresponding to the sub-level typesetting unit in the XML data to be typeset to fill the sub-level Typesetting unit; selection arrangement refers to the XML data to be typeset as the main, if only one sub-level typesetting unit is set in the typesetting unit, but according to the XML tag of the sub-level typesetting unit, the corresponding The XML element also includes a plurality of XML sub-elements, and the above-mentioned multiple XML sub-elements are acquired together with the XML element and filled into the sub-level typesetting unit, and the typesetting style of the sub-level typesetting unit is applied when forming a typesetting object. The prefix and suffix items of a typesetting unit refer to the content and style of the prefix and suffix specified in the typesetting unit, for example, "[Abstract]" in boldface with the prefix item in the abstract part of the paper and the space behind it. The pre-additional items and post-additional items of a typesetting unit refer to the additional content and style that are designated to be modified outside the typesetting unit. The typesetting method of the typesetting unit specifies the typesetting method of the typesetting unit before and after, including: continuous row, new start Line, start a new paragraph, start a new column, start a new block, start a new page (single page), start a new page (double page), etc.
[0053] Step 103, for each tag, according to the entry rule corresponding to the target container corresponding to the tag, and at least one typesetting unit under the target container and the description information corresponding to the typesetting unit, in the target container, the XML data to be typeset corresponding to the tag is processed Fill processing to get the filled target container.
[0054] Specifically, according to a tag, the target container corresponding to the tag can be determined. It is understandable that if the document to be typeset includes multiple tags and the XML data to be typeset corresponding to the tag, there may be several tags corresponding to a target container at the same time. , according to the entry rule corresponding to the target container, and at least one typesetting unit under the target container and the description information corresponding to the typesetting unit, in the target container, fill the XML data to be typeset corresponding to one or several tags, to get the populated target container.
[0055] Wherein, the entry rules corresponding to the target container may include XML tags of the container, element entry rules, variable entry rules, location methods, supplementary filter conditions, and the like. Among them, the XML tag of the container is the identification information of the container, and it can be determined whether the tag in the document corresponds to the target container according to the XML tag of the container; the element entry rule refers to a way to fill the content of the target container; the variable entry rule Refers to another way of filling the content of the target container. Each container has a filling method, which is the element entry rule or variable entry rule; the position method refers to the position of the target container on the layout, including the background position and normal position. There are three position methods: background position and automatic position. The background position refers to placing the typesetting objects formed by the container on the physical home page. The normal position refers to placing the typesetting objects formed by the container on the physical page. The automatic position refers to the typesetting objects formed by the container according to The position of the container in the pre-configured template is used to determine the placement position; the supplementary filter condition means that the XML tag of the container may appear multiple times in the document, in order to determine which tag in the document corresponds to the XML data that should correspond to the container, then It needs to be further judged based on supplementary screening conditions.
[0056] It should be noted that the user can also set basic attributes such as the up, down, left, and right positions of the container relative to the core in the pre-configured template, and the size of the container. During the typesetting process, the up, down, left, and right positions and sizes of the container can be adjusted at any time.
[0057] Step 104 , on the pre-configured template, typesetting the document according to at least one filled target container.
[0058] When one or more target containers on the pre-configured template are filled, it means that the filling of the container in the pre-configured template is completed, and then the document is typesetting according to the filled target container, including application container and typesetting The typesetting style of the unit, etc., to generate a typesetting layout that meets the user's requirements.
[0059] The document typesetting processing method provided in this embodiment is to fill the XML data to be typeset in the target container according to the entry rules of the target container and the typesetting units under the target container and its corresponding description information, and to pre-configure the template Above all, according to the typesetting processing of the filled target container, multiple typesetting units can be managed in blocks, which facilitates the generation of typesetting layouts with rich layouts and improves typesetting efficiency.
Example Embodiment
[0060] Embodiment two
[0061] This embodiment provides a further supplementary description of the document typesetting processing method provided in the first embodiment.
[0062] like figure 2 As shown, it is a schematic flow chart of the document typesetting processing method provided by the embodiment, and the method includes:
[0063] Step 201, receiving a typesetting request, the typesetting request includes a document to be typesetting, and the document to be typesetting includes at least one tag and XML data to be typesetting corresponding to the tag.
[0064] The specific operation of this step is consistent with that of step 101, and will not be repeated here.
[0065] Step 202, according to the typesetting request, for each label, obtain a target container corresponding to the label on the pre-configured template; wherein, the target container includes: at least one typesetting unit and description information corresponding to the typesetting unit.
[0066] The specific operation of this step is consistent with that of step 102, and will not be repeated here.
[0067] Step 203, for each tag, judge whether the entry rule corresponding to the target container corresponding to the tag includes an element entry rule or a variable entry rule, if it includes an element entry rule, then execute step 204, if it includes a variable entry rule, then execute step 205 .
[0068] Step 204, if the entry rules of the target container corresponding to the tag include element entry rules, then for each typesetting unit under the target container, from the XML data to be typeset corresponding to the tag, obtain the corresponding description information corresponding to the typesetting unit XML element, and fill the XML element into the typesetting unit to obtain the filled target container. Go to step 206.
[0069] If the entry rules corresponding to the target container include element entry rules, then for each layout unit under the target container, according to the description information corresponding to the layout unit, obtain the description information corresponding to the layout unit from the XML data to be typeset corresponding to the tag corresponding XML elements, and fill the obtained XML elements into the typesetting unit, so as to obtain the filled target container.
[0070] Step 205, if the entry rules of the target container corresponding to the tag include variable entry rules, then generate the target XML data structure corresponding to the target container; for each typesetting unit under the target container, in the target XML data structure, obtain the The subtag of the specified XML element corresponding to the descriptive information of ; use the XPath query method to obtain the specified XML element corresponding to the subtag from the XML data to be typeset corresponding to the label, and fill the specified XML element into the typesetting unit. to get the populated target container. Go to step 206.
[0071] If the entry rules corresponding to the target container include variable entry rules, generate the target XML data structure corresponding to the target container according to the target container, and for each typesetting unit under the target container, obtain the description corresponding to the typesetting unit in the target XML data structure The subtag of the XML element corresponding to the information uses the XPath query method to obtain the specified XML element corresponding to the subtag from the XML data to be typeset, and fill the specified XML element into the typesetting unit to obtain the filled target container.
[0072] Step 206 , on the pre-configured template, typesetting the document according to at least one filled target container.
[0073] The specific operation of this step is the same as that of step 104, and will not be repeated here.
[0074] Further, for each tag, if the entry rule of the target container corresponding to the tag also includes a location method, on the pre-configured template, according to at least one filled target container, typesetting the document, including:
[0075] For each filled target container, a corresponding typesetting object is formed according to the filled target container, and the typesetting object is placed on the layout position corresponding to the above position manner on the preconfigured template.
[0076] Exemplarily, a thesis usually consists of three parts: the front, the body, and the back. The preface mainly describes the metadata information of the paper, which is divided into two parts: journal metadata and paper metadata. The journal metadata includes the title, publishing institution, issue number, publication date and other information related to the publication, and the paper metadata includes the title, author, abstract information, keywords, DOI and other information related to the paper. The body part is the main content of the paper, which is composed of multi-level headings and paragraphs. The postscript is used to describe additional information of the paper, such as references, acknowledgments, etc. In the pre-configured template, it is necessary to design different containers and typesetting units for the XML data to be typeset. Table 1 shows the description of the physical home page of the paper’s preconfigured template, and its schematic diagram is as follows image 3 As shown, four containers are included.
[0077] Table 1
[0078]
[0079] As shown in Table 2, it is a description of some typesetting units in the preface of the paper in the pre-configured template, and its schematic diagram is as follows Figure 4 shown.
[0080] Table 2
[0081]
[0082] like Figure 5 Shown is a schematic diagram of the typesetting layout effect of the paper homepage after the typesetting process is performed on the document according to the typesetting processing method of the above document. According to the container in the pre-configured template, the XML data to be typeset in the document to be typeset is filled in the corresponding position in the container, for example, the journal metadata information related to the publication in the paper is obtained from the XML data to be typeset Come out, fill it into the corresponding container, and form the typesetting object to be placed in the book header position of the entity home page. The title, author, abstract, keywords, text, references and other information in the paper are selected from the XML data to be typeset, and placed in the main text flow block of the text page (that is, in container 3 in Table 1) .
[0083] like Image 6 Shown is a schematic diagram of the typesetting layout effect of the preface of the thesis after the document is typeset according to the typesetting processing method of the above document. According to the typesetting unit in the corresponding container (i.e., container 1 in Table 1) in the pre-configured template, the XML data to be typeset is filled into the corresponding typesetting unit, and the typesetting style of the typesetting unit is applied. For example, for the filling of the metadata of the paper, because the filling content rule in the corresponding typesetting unit is "sequence", the sub-level typesetting units such as the title, author, abstract, and keywords under it are all obtained from the XML data to be typeset The corresponding content is filled into the corresponding typesetting unit.
[0084] For the typesetting unit "summary", because the filling content rule in the corresponding typesetting unit is "selection", although only one sublevel typesetting unit "summary entry" is set in this typesetting unit, in the XML data to be typeset, "summary Entry" also includes multiple XML sub-elements such as "Summary Entry Title" and "Summary Entry Content", then under the sub-level typesetting unit "Summary Entry", "Summary Entry Title" and "Summary Entry Content" will also be filled to the sub-level typesetting unit "Summary Entry", and the typesetting style of the sub-level typesetting unit "Summary Entry" will be applied, such as Figure 7 The abstract entry title "Objective" followed by the abstract entry text "Discussing the chest and abdominal cavity..." and the abstract entry title "Results" followed by the abstract entry text "Compared with the open group..." are shown in .
[0085] If the corresponding typesetting unit contains descriptive information such as prefix and suffix items, front and rear additional items, and typesetting methods, these descriptive information of the typesetting unit will be applied when forming the typesetting object, which can also be called the typesetting style of the typesetting unit. Generate typesetting layout.
[0086] The document typesetting processing method provided in this embodiment obtains the filled target container by using different methods according to different entry rules of the target container. When the entry rules include variable entry rules, the XPath query method can be used to quickly and accurately obtain the target container. The XML element corresponding to the description information corresponding to the typesetting unit under the container further improves typesetting efficiency.
Example Embodiment
[0087] Embodiment Three
[0088] This embodiment provides an apparatus for typesetting a document, which is used to execute the method for typesetting a document in the above embodiments.
[0089] like Figure 7 As shown in , it is a schematic structural diagram of a document typesetting processing device provided in this embodiment. The document typesetting processing device 30 of this embodiment includes a receiving module 31 , an acquiring module 32 , a filling module 33 and a processing module 34 .
[0090] Wherein, the receiving module 31 is used to receive a typesetting request, and the typesetting request includes a document to be typesetting, and the document to be typesetting includes at least one label and XML data to be typesetting corresponding to the label; For the typesetting request, for each of the tags, on the pre-configured template, obtain the target container corresponding to the tag; wherein, the target container includes: at least one typesetting unit and description information corresponding to the typesetting unit; filling Module 33 is configured to, for each of the tags, according to the entry rule corresponding to the target container corresponding to the tag, and the at least one typesetting unit under the target container and the description information corresponding to the typesetting unit, in the target In the container, filling processing is performed on the XML data to be typeset corresponding to the label to obtain a filled target container; the processing module 34 is configured to, on the pre-configured template, according to at least one of the filled target containers, Perform typesetting processing on the document.
[0091] Regarding the apparatus in this embodiment, the specific manner in which each module executes operations has been described in detail in the embodiment of the method, and will not be described in detail here.
[0092] According to the document typesetting processing device 30 of this embodiment, according to the entry rules of the target container and the typesetting units under the target container and its corresponding description information, the XML data to be typeset is filled in the target container, and pre-configured On the template, the document is typeset according to the filled target container, and multiple typesetting units can be managed in blocks, which facilitates the generation of rich typesetting layouts and improves typesetting efficiency.
PUM


Description & Claims & Application Information
We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
Similar technology patents
Typesetting method and system
Owner:BEIJING FOUNDER ELECTRONICS CO LTD +2
Content typesetting method and device, computer equipment and storage medium
Owner:BEIJING BYTEDANCE NETWORK TECH CO LTD
Classification and recommendation of technical efficacy words
- Improve typesetting efficiency
Typesetting method and system
Owner:BEIJING FOUNDER ELECTRONICS CO LTD +2
Content typesetting method and device, computer equipment and storage medium
Owner:BEIJING BYTEDANCE NETWORK TECH CO LTD