CN101231633B - Layout method and apparatus containing nest frame object - Google Patents

Layout method and apparatus containing nest frame object Download PDF

Info

Publication number
CN101231633B
CN101231633B CN2007100629564A CN200710062956A CN101231633B CN 101231633 B CN101231633 B CN 101231633B CN 2007100629564 A CN2007100629564 A CN 2007100629564A CN 200710062956 A CN200710062956 A CN 200710062956A CN 101231633 B CN101231633 B CN 101231633B
Authority
CN
China
Prior art keywords
nest frame
current line
height
character
width
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.)
Expired - Fee Related
Application number
CN2007100629564A
Other languages
Chinese (zh)
Other versions
CN101231633A (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.)
Peking University
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University, Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University
Priority to CN2007100629564A priority Critical patent/CN101231633B/en
Publication of CN101231633A publication Critical patent/CN101231633A/en
Application granted granted Critical
Publication of CN101231633B publication Critical patent/CN101231633B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention discloses a typesetting method including nested frame objects and a device thereof to enrich the layout content. The method comprises the following steps that: current characters are obtained; whether the current characters are nested frames is judged, if yes, the current line height and the current line width are obtained according to the attribute of the nested frames, if no, the current line height and the current line width are obtained according to the size of the characters; the attribute of the nested frames comprises the nested frame height and the nested frame width; the typesetting is carried out according to the current line height and the current line width. The device comprises an acquisition unit, a judging unit, a determining unit and a typesetting unit. Any content can be arranged in the nested frames, such as image objects, grid objects and/or numerical formula objects, and the nested frames can be taken as a character to be typeset with words, thereby enriching the word content and further enriching the layout content. Through the editing to the nested frame objects, the layout content can be further enriched.

Description

A kind of composition method and device that comprises the nest frame object
Technical field
The present invention relates to a kind of text composition technology, relate in particular to a kind of composition method and device that comprises the nest frame object.
Background technology
On the space of a whole page, except modal literal object, also have various page objects such as image object, table objects, mathematical formulae object, image object is used for display image, the literal object is used for display text, and table objects is used to show form, and the mathematical formulae object is used to show mathematical formulae.In the same space of a whole page, often need be with the combination of various page objects or various page objects as a character in the literal object, to enrich space of a whole page content.
For convenience, in the present invention, the character that can hold page object is called the nest frame object.Therefore, nest frame can be embedded in the literal object liking a kind of character, and other character of identical text object word is set type together when setting type.
Yet, in the prior art, also do not realize the method for nest frame object, more do not comprise the composition method and the device of nest frame object.
Summary of the invention
The purpose of this invention is to provide a kind of composition method and device that comprises the nest frame object, can enrich space of a whole page content.
The invention provides a kind of composition method that comprises the nest frame object, comprising:
Obtain current character;
Judge whether current character is nest frame, described nest frame is for holding the character of page object, and described page object comprises literal object, image object, table objects, mathematical formulae object; If, then according to current line height before nest frame attribute, the renewal and the current line width before the renewal, current line height that is identified for upgrading and current line width, otherwise, size according to character obtains current line height and current line width, and described nest frame attribute comprises nest frame height and nest frame width;
According to described current line height and current line width current line is set type.
Describedly judge whether current character is that nest frame can be judged according to the nest frame flag.
Describedly obtain the current line height and the current line width specifically comprises according to the nest frame attribute:
Judge that whether current line width and nest frame width sum are greater than the current line preset width, if, then finish, otherwise, obtain nest frame height and nest frame width, utilize nest frame width and current line width sum to upgrade the current line width, when current line height during greater than the one's own profession maximum height, the current line height is set to the nest frame height.
Described method also comprises carries out editing steps with nest frame as object, and described step specifically comprises:
Enter the nest frame object layer;
At the nest frame object layer content of nest frame is edited;
Adjust the height and the width of nest frame according to edited result, and return space of a whole page layer.
Described method also comprises the method that realizes nest frame, and the method for described realization nest frame specifically comprises:
The nest frame flag is set in character code, and the value of the position beyond the nest frame flag is set to object identity.
Described nest frame flag is arranged in the character-coded untapped position.
Described nest frame flag is arranged in the character-coded most significant digit.
The invention also discloses a kind of composing device that comprises the nest frame object, comprising:
Obtain the unit, be used to obtain current character;
Judging unit is used to judge whether current character is nest frame, and described nest frame is for holding the character of page object, and described page object comprises literal object, image object, table objects, mathematical formulae object;
Determining unit, when being used for judged result when judging unit and being current character and being nest frame, the current line height according to the nest frame attribute, before upgrading and upgrade before the current line width, current line height that is identified for upgrading and current line width; When the judged result of judging unit is a current character when being not nest frame, obtain current line height and current line width according to the size of character, described nest frame attribute comprises nest frame height and nest frame width;
The composing unit is used for according to described current line height and current line width current line being set type.
Described composing device also comprises:
Edit cell is used to enter the nest frame object layer, at the nest frame object layer content of nest frame is edited, and adjusts the height and the width of nest frame according to edited result, returns space of a whole page layer.
According to the present invention, owing in the nest frame object any content can be arranged,, and the nest frame object can be used as a character and set type with literal as image object, table objects and/or numerical expression object etc., thereby enriched the content of character, and then enriched space of a whole page content.By editor, more further enriched space of a whole page content to the nest frame object.
Description of drawings
Fig. 1 shows the process flow diagram of the realization nest frame of the embodiment of the invention;
Fig. 2 shows the process flow diagram of the composing that comprises nest frame of the embodiment of the invention;
Fig. 3 shows the acquisition current line width of the embodiment of the invention and the process flow diagram of current line maximum height;
Fig. 4 shows the process flow diagram of editor's nest frame of the embodiment of the invention;
Fig. 5 shows the composing device of the embodiment of the invention.
Embodiment
Understand and realization the present invention the existing embodiments of the invention of describing in conjunction with the accompanying drawings for the ease of persons skilled in the art.
Comprise in description before the composition method of nest frame, at first describe the method that realizes nest frame of the present invention with reference to Fig. 1.
Step 11, the nest frame flag is set in character code;
In the literal object, can comprise multirow, each row can comprise a plurality of characters, each character correspondence character attibute: character code, font, font size, color etc.
For example, character code can be 4 bytes, totally 32.Unicode coding is a kind of character code, and it has defined 32, has only used 21 at present, also has 11 not usefulness, therefore can use arbitrary position in 11 as the nest frame flag, therefore, in the present invention, preferably uses most significant digit as the nest frame flag.When this nest frame flag is effective (when equaling 1 as the nest frame flag), this character code is represented nest frame, and when this nest frame flag is invalid (when equaling 0 as the nest frame flag), this character code is represented common character.
Corresponding with each character character attibute is similar, and each nest frame correspondence the nest frame attribute, and described nest frame attribute comprises height, width, pointer to object etc.Pointer to object is used in reference to the nest frame content, and the nest frame content can comprise literal object, image object, table objects, various objects such as mathematical formulae object.
The value of the position beyond step 12, the nest frame flag is set to object identity.
For nest frame and other object are carried out unified management, can use other position (remove the sign nest frame 31) value as the nest frame object identity.
The principle that is provided with is that the object identity of current nest frame object identity and system's existence is inequality, and the method for setting can be the order increment method, promptly increases by an object in the system, and then object identity increases by one.
Step 13, object identity is associated with pointer to object.
Like this, can obtain the contents such as height, width and pointer to object of nest frame by the nest frame object identity.And then the height by nest frame, width can unify to set type to the character in nest frame and the literal object, obtains the nest frame content by pointer to object, so that the nest frame content is edited and operation such as modification.
The invention discloses a kind of composition method that comprises the nest frame object, describe the composition method that comprises the nest frame object of the present invention below in conjunction with Fig. 2.
Step 21, acquisition current line width and height.The process of calculating the current line width is described below in conjunction with Fig. 3.
Step 301, when beginning the delegation that sets type new, the current line width is set to 0, the current line maximum height is set to 0.
Step 302, get current character.
Step 303, judge whether current character is nest frame, if then execution in step 304: the width that obtains nest frame is as the current character width, otherwise, execution in step 305: will obtain the current character width according to the font size of current character.
Judge whether current character is that nest frame can be judged according to the nest frame flag, that is, when the nest frame flag was effective, then this character was a nest frame, otherwise current character is common character.
Step 306, judge that whether current line width and current character width sum are greater than the current line preset width, if then execution in step 315: finish, otherwise, execution in step 307.
Step 307, judge whether current character is nest frame, if then execution in step 308: the height that obtains nest frame is as the current character height, otherwise, execution in step 309: will obtain the current character height according to the font size of current character.
Step 310, whether judge the current line height greater than the one's own profession maximum height, if then execution in step 311: the current line height is set to the current character height, otherwise execution in step 312: the current line maximum height remains unchanged.
Step 313, upgrade the width of current line, next character as current character, and is returned step 302 by following formula.
Current line width=current line width+current character width.
Step 22, one's own profession is set type according to current line width and current line height.
According to the present invention, when nest frame is edited, may take place in the process of typeset, the method for editor's nest frame is described below in conjunction with Fig. 4.
Step 41, choose nest frame, enter the nest frame object layer.
After choosing nest frame, can obtain pointer to object, obtain the content of nest frame again according to pointer to object according to the object identity of nest frame.
Step 42, the content of nest frame is edited, as: change housing size, profile, insert or the deletion word content.
Step 43, judge whether to return space of a whole page layer,, otherwise return step 42 if then execution in step 44.
Step 44, then return space of a whole page layer, finish editor, and recomputate the height and the width of nest frame, and in the literal object, upgrade the height and the width of nest frame, so that set type according to the height and the width of nest frame at space of a whole page layer according to edited result.
As shown in Figure 5, the invention also discloses a kind of composing device that comprises the nest frame object, comprising: obtain the unit, be used to obtain current character; Judging unit is used to judge whether current character is nest frame; Determining unit is used for determining current line height and current line width according to the result of judging unit; The composing unit is used for according to described current line height and current line width current line being set type; Edit cell is used to enter the nest frame object layer, at the nest frame object layer content of nest frame is edited, and adjusts the height and the width of nest frame according to edited result, returns space of a whole page layer.
Therefore, according to the present invention, owing in the nest frame any content can be arranged, as image object, table objects and/or numerical expression object etc., and the nest frame object can be used as a character and set type, thereby enrich the content of character, and then enrich space of a whole page content with literal.
Though described the present invention by embodiment, those of ordinary skills know, without departing from the spirit and substance in the present invention, just can make the present invention that many distortion and variation are arranged, and scope of the present invention is limited to the appended claims.

Claims (9)

1. a composition method that comprises the nest frame object is characterized in that, comprising:
Obtain current character;
Judge whether current character is nest frame, described nest frame is for holding the character of page object, and described page object comprises literal object, image object, table objects, mathematical formulae object;
If, then according to current line height before nest frame attribute, the renewal and the current line width before the renewal, current line height that is identified for upgrading and current line width, otherwise, size according to character obtains current line height and current line width, and described nest frame attribute comprises nest frame height and nest frame width;
According to described current line height and current line width current line is set type.
2. method according to claim 1 is characterized in that, describedly judges whether current character is that nest frame can be judged according to the nest frame flag.
3. method according to claim 1 and 2 is characterized in that, describedly obtains the current line height and the current line width specifically comprises according to the nest frame attribute:
Judge that whether current line width and nest frame width sum are greater than the current line preset width, if, then finish, otherwise, obtain nest frame height and nest frame width, utilize nest frame width and current line width sum to upgrade the current line width, when current line height during greater than the one's own profession maximum height, the current line height is set to the nest frame height.
4. method according to claim 1 is characterized in that, described method also comprises carries out editing steps with nest frame as object, and described step specifically comprises:
Enter the nest frame object layer;
At the nest frame object layer content of nest frame is edited;
Adjust the height and the width of nest frame according to edited result, and return space of a whole page layer.
5. method according to claim 1 is characterized in that described method also comprises the method that realizes nest frame, and the method for described realization nest frame specifically comprises:
The nest frame flag is set in character code, and the value of the position beyond the nest frame flag is set to object identity.
6. method according to claim 5 is characterized in that, described nest frame flag is arranged in the character-coded untapped position.
7. method according to claim 6 is characterized in that, described nest frame flag is arranged in the character-coded most significant digit.
8. a composing device that comprises the nest frame object is characterized in that, comprising:
Obtain the unit, be used to obtain current character;
Judging unit is used to judge whether current character is nest frame, and described nest frame is for holding the character of page object, and described page object comprises literal object, image object, table objects, mathematical formulae object;
Determining unit, when being used for judged result when judging unit and being current character and being nest frame, the current line height according to the nest frame attribute, before upgrading and upgrade before the current line width, current line height that is identified for upgrading and current line width; When the judged result of judging unit is a current character when being not nest frame, obtain current line height and current line width according to the size of character, described nest frame attribute comprises nest frame height and nest frame width;
The composing unit is used for according to described current line height and current line width current line being set type.
9. composing device according to claim 8 is characterized in that, described composing device also comprises:
Edit cell is used to enter the nest frame object layer, at the nest frame object layer content of nest frame is edited, and adjusts the height and the width of nest frame according to edited result, returns space of a whole page layer.
CN2007100629564A 2007-01-23 2007-01-23 Layout method and apparatus containing nest frame object Expired - Fee Related CN101231633B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007100629564A CN101231633B (en) 2007-01-23 2007-01-23 Layout method and apparatus containing nest frame object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007100629564A CN101231633B (en) 2007-01-23 2007-01-23 Layout method and apparatus containing nest frame object

Publications (2)

Publication Number Publication Date
CN101231633A CN101231633A (en) 2008-07-30
CN101231633B true CN101231633B (en) 2010-08-25

Family

ID=39898118

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007100629564A Expired - Fee Related CN101231633B (en) 2007-01-23 2007-01-23 Layout method and apparatus containing nest frame object

Country Status (1)

Country Link
CN (1) CN101231633B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567291B (en) * 2010-12-31 2014-09-10 北大方正集团有限公司 Method and device for deleting lace characters in format document
CN102929847A (en) * 2012-10-26 2013-02-13 北京乐投科技有限公司 Character wrapping method for manufacturing of digitally published products
CN104063365B (en) * 2013-03-19 2018-08-21 福建福昕软件开发股份有限公司 The method that object is inserted into PDF document
CN108228552B (en) * 2016-12-14 2020-10-16 北大方正集团有限公司 Box typesetting method and device
CN113326031B (en) * 2021-05-28 2023-08-22 网易(杭州)网络有限公司 Attribute acquisition method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1503160A (en) * 2002-11-20 2004-06-09 英业达股份有限公司 Computer executable automatic composing method for electronic book read interface

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1503160A (en) * 2002-11-20 2004-06-09 英业达股份有限公司 Computer executable automatic composing method for electronic book read interface

Also Published As

Publication number Publication date
CN101231633A (en) 2008-07-30

Similar Documents

Publication Publication Date Title
CN101025738B (en) Template-free dynamic website generating method
CN101231633B (en) Layout method and apparatus containing nest frame object
CN107092625B (en) Data configuration method, data processing method and device
CN115098084A (en) Non-coding form design and drawing method
CN104298721B (en) A kind of arbitrarily a object split screen layout edit methods of the online courseware development based on Web
US20040205609A1 (en) System and method for generating and formatting a publication
US10210142B1 (en) Inserting linked text fragments in a document
CN105183475A (en) Method and system for customizing individuality pages of portal website by user himself
CN110705237B (en) Automatic document generation method, data processing device and storage medium
CN103530407B (en) Method and device for generating rich text document
CN104750472B (en) The resource package management method and device of a kind of terminal applies
CN110929495B (en) Method for automatically beautifying typesetting of articles
CN110674619A (en) Online document editing method, device, equipment and computer storage medium
CN106446116A (en) Business rule parameter interaction method and business rule parameter interaction device applied to rule engine
CN108460003B (en) Text data processing method and device
CN110310226B (en) Picture mosaic display method and system
CN102902673A (en) Method and device for dynamically generating web pages
CN106210918A (en) The update method of a kind of user interface and system
CN112329413A (en) Template building method, file generation method, template system, device and computer equipment
CN102254023A (en) Method and device for editing webpage
CN101436309B (en) Method and apparatus for modifying formula operator
EP1744253A1 (en) Document processing device and document processing method
CN103294463A (en) Editing system and method
KR101473530B1 (en) Program creation supporting device and program creation supporting method
CN104536947A (en) Layout document processing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100825

Termination date: 20190123

CF01 Termination of patent right due to non-payment of annual fee