CN103136185A - Method and device for block type setting - Google Patents

Method and device for block type setting Download PDF

Info

Publication number
CN103136185A
CN103136185A CN2011104012822A CN201110401282A CN103136185A CN 103136185 A CN103136185 A CN 103136185A CN 2011104012822 A CN2011104012822 A CN 2011104012822A CN 201110401282 A CN201110401282 A CN 201110401282A CN 103136185 A CN103136185 A CN 103136185A
Authority
CN
China
Prior art keywords
typesetting
placeholder
content
character
module
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
CN2011104012822A
Other languages
Chinese (zh)
Other versions
CN103136185B (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 Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Original Assignee
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 Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN201110401282.2A priority Critical patent/CN103136185B/en
Publication of CN103136185A publication Critical patent/CN103136185A/en
Application granted granted Critical
Publication of CN103136185B publication Critical patent/CN103136185B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention provides a method and a device for block type setting. The method for the block type setting comprises the following steps of transverse of contents of streaming type setting; type setting of the transversed character contents in layout of the block type setting through character blocks, and type setting of placeholder instead of transversed non-character contents; and display of the non-character content at the position of the placeholder. With the above steps, the type setting of the content of the streaming type setting in the layout of the block layout is realized, alignment of contents in display layout according to a base line and a simulated base line is realized, the layout is tidy, type setting time is short, and type setting efficiency is high.

Description

The method and apparatus of piece formula typesetting
Technical field
The present invention relates to typesetting system field, in particular to the method and apparatus of a kind of formula typesetting.
Background technology
In the content of streaming typesetting, the incidence relation of location alignment between dissimilar typesetting element; In the content of piece formula typesetting, the incidence relation of location alignment not between dissimilar typesetting element.
When carrying out typesetting by the content of piece formula typesetting convection type typesetting, the incidence relation of the aligned in position in the content of streaming typesetting between dissimilar typesetting element is eliminated, and the position of these dissimilar typesetting elements on the space of a whole page of piece formula typesetting is offset.Neat for the space of a whole page, adjust manually the position of these dissimilar typesetting elements in prior art, this has extended the typesetting time, has reduced typesetting efficient.
Summary of the invention
The present invention aims to provide the method and apparatus of a kind of formula typesetting, to solve typesetting time length, the inefficient problem of manual adjustment position.
In an embodiment of the present invention, provide the method for a kind of formula typesetting, having comprised: the content of traversal streaming typesetting; With character content typesetting in the character block of the space of a whole page of piece formula typesetting of traversal, adopt placeholder to replace non-character content typesetting in the character block of the described space of a whole page of traversal; With the position display of described non-character content at described placeholder.
In an embodiment of the present invention, the device of a kind of formula typesetting comprises: spider module, for the content of traversal streaming typesetting; Type-setting module be used for to adopt character block with the character block typesetting at the space of a whole page of piece formula typesetting of the character content of traversal; Adopt placeholder to replace non-character content typesetting in the character block of the described space of a whole page of traversal; Display module is used for the position display of described non-character content at described placeholder.
By above-mentioned steps, content typesetting in the space of a whole page of piece formula typesetting of streaming typesetting can be shown the content of the space of a whole page according to baseline, simulated baseline alignment, the space of a whole page is neat, and the typesetting time is short, efficient is high.
Description of drawings
Accompanying drawing described herein is used to provide a further understanding of the present invention, consists of the application's a part, and illustrative examples of the present invention and explanation thereof are used for explaining the present invention, do not consist of improper restriction of the present invention.In the accompanying drawings:
Fig. 1 shows the process flow diagram of embodiment;
Fig. 2 shows the screenshot capture of the content that adopts the streaming typesetting;
Fig. 3 shows the screenshot capture that enters placeholder, character block in the piece formula typesetting space of a whole page;
Fig. 4 shows the space of a whole page screenshot capture after the adjustment placeholder;
Fig. 5 shows the screenshot capture that the formula before Base alignment: See Alignment shows on placeholder;
Fig. 6 shows the screenshot capture that the formula after Base alignment: See Alignment shows on placeholder;
Fig. 7 shows the screenshot capture of the intersegmental distance of adjusting placeholder;
Fig. 8 shows the screenshot capture of the content after typesetting;
Fig. 9 shows the structured flowchart of device.
Embodiment
Below with reference to the accompanying drawings and in conjunction with the embodiments, describe the present invention in detail.
Referring to Fig. 1, comprise the following steps:
Step S11: the content of traversal streaming typesetting;
Step S12: with character content typesetting in the character block of the space of a whole page of piece formula typesetting of traversal, adopt placeholder to replace non-character content typesetting in the character block of the described space of a whole page of traversal;
Step S13: with the position display of described non-character content at described placeholder.
Above-mentioned steps can realize by computer programming, content typesetting in the space of a whole page of piece formula typesetting of streaming typesetting can be shown the content of the space of a whole page according to baseline, simulated baseline alignment, and the space of a whole page is neat, and the typesetting time is short, efficient is high.
Preferably, the content of the streaming typesetting in Fig. 2 is as example, and the process of described typesetting comprises:
In the process of the content of described traversal streaming typesetting, adopt array record each described character content and described non-character content and between position relationship, displaying ratio;
According to described position relationship, the size of described character content according to the form of setting stored in the character block of the described space of a whole page, and the character in described character block is according to Base alignment: See Alignment;
Determine the display size of described non-character content according to the size of described setting, described displaying ratio;
According to described display size, the described position relationship described placeholder of typesetting on the described space of a whole page, and the Base alignment: See Alignment of described placeholder and described character.
As shown in Figure 3, in character block, with each character content of mode typesetting of Base alignment: See Alignment, for non-character content, with the mode typesetting of the Base alignment: See Alignment of the baseline of placeholder and character content.
Due to the size of non-character content and varying in size of character content, need to determine according to the size of described setting, described displaying ratio the display size of described non-character content.For example: during the streaming typesetting, the displaying ratio of character content and non-character content is 1: 3.When the typesetting of piece formula, font is the size of No. 4 fonts, and non-character content is amplified 3 times with respect to the size of No. 4 fonts and shown afterwards.
Placeholder after adjustment and the ratio of character content have kept original proportionate relationship, and be basic identical when display effect and streaming typesetting.
Referring to Fig. 4, adjust the size of placeholder according to the size of display size.The baseline of the placeholder after adjustment and the Base alignment: See Alignment of character content.
Referring to Fig. 5, when showing non-character content on placeholder, if non-character content is directly shown on placeholder, although the placeholder that the size of non-character content can be filled after adjustment just is blank, the effect that shows is not attractive in appearance.Therefore, need to be with the simulated baseline that arranges on non-character content and the Base alignment: See Alignment of described placeholder or described character.
Because the form of non-character content typesetting changes, there is not baseline in the non-character content of streaming typesetting on the space of a whole page of piece formula typesetting during typesetting.In when traversal, record the position of the baseline that non-character content arranges when the streaming typesetting, the position of baseline is a content ratio position in height of typesetting, as 1/2, the position that represents baseline is in half position of the height of content.According to the position of baseline of record, the simulated baseline of the non-character content of piece formula process of typeset is set, when the position display of placeholder with the Base alignment: See Alignment of simulated baseline and placeholder or character content.
In an embodiment, the formula baseline in the baseline chart 5 of the non-character content of record as the simulated baseline on the space of a whole page of piece formula typesetting, and shows this baseline with the mode of the Base alignment: See Alignment of placeholder or character content.Shown the effect that shows after the Base alignment: See Alignment of the simulated baseline of the non-character content that will arrange and placeholder as Fig. 6.
By the baseline of placeholder perhaps in the simulated baseline alignment characters that arranges, effectively adjusted the position of non-character content in character, the non-character content after adjustment more meets visual effect in the demonstration of the space of a whole page.
In the non-character content that placeholder shows, can be picture, form, formula etc., after typesetting, the content appearance that non-character content and up-downgoing might occur intersects.
Preferably, the process of described typesetting also comprises:
Determine that the nearest distance of bottom of the top of described placeholder and lastrow content is less than first threshold;
Referring to Fig. 7, second row at described placeholder place is split into independent section;
A section front distance of adjusting section and described lastrow place section after described fractionation is not less than described first threshold.
Preferably, the process of described typesetting also comprises:
The minimum distance of the top of determining current line to the lastrow bottom of containing described placeholder of adopting paragraph format is less than Second Threshold;
Referring to Fig. 7, adjust after the section of section and described current line place section after described fractionation apart from being not less than described Second Threshold.
Shown in Figure 8 is by the content of streaming typesetting by the result after the typesetting of piece formula.Through above-mentioned steps, form the effect of formula and character mixing, and the adjustment by intersegmental distance, the capable formula in centre does not cover the content of up-downgoing, and display effect is more attractive in appearance.
By basic identical by the effect after the streaming typesetting in the effect after the typesetting of piece formula and Fig. 2.Can realize the such business demand of conversion from book version document to the powerpoint document.
Referring to Fig. 9, the present invention also provides the device of a kind of formula typesetting, comprising:
Spider module 21 is for the content of traversal streaming typesetting;
Type-setting module 22 is for the character block typesetting of the character content that spider module 21 is traveled through at the space of a whole page of piece formula typesetting; Adopt placeholder to replace non-character content typesetting in the character block of the described space of a whole page of spider module 21 traversals;
Display module 23 is used for the position display of described non-character content at the placeholder of described type-setting module 22 typesettings.
Above-mentioned steps can realize by computer programming, content typesetting in the space of a whole page of piece formula typesetting of streaming typesetting can be shown the content of the space of a whole page according to baseline, simulated baseline alignment, and the space of a whole page is neat, and the typesetting time is short, efficient is high.
Preferably, described type-setting module 22 comprises:
Logging modle 221 is used for the process in the content of described spider module 21 traversal streaming typesettings, adopt array record each described character content and described non-character content and between position relationship, displaying ratio;
The first type-setting module 222 is used for the position relationship according to described logging modle 221 records, described character content is stored in the character block of the described space of a whole page according to the size of setting, and each described character block is according to Base alignment: See Alignment;
Show computing module 223, be used for determining according to the size of described setting, described displaying ratio the display size of described non-character content;
The second type-setting module 224 is used for the display size of determining according to described simulated baseline module 223, position relationship described placeholder of typesetting on the described space of a whole page of described logging modle 221 records, and the Base alignment: See Alignment of described placeholder and described character block.
Preferably, described display module 23 comprises:
Show adjusting module 231, be used for obtaining the display size that described simulated baseline module 223 is determined;
Geometric ratio display module 232, be used for will described non-character content according to the display size of the described demonstration adjusting module 231 acquisitions position display at described placeholder, and the Base alignment: See Alignment of the simulated baseline that arranges on described non-character content and described placeholder or described character block.
Preferably, described type-setting module 22 also comprises:
The first comparison module 225 be used for to determine that the nearest distance of bottom of the top of placeholder of described the second type-setting module 224 typesettings and lastrow content is less than first threshold;
Split module 226, being used for the placeholder that described the first comparison module 225 is determined is expert at splits into independent section;
Adjusting module 227 before section, a section front distance that is used for adjusting section and described lastrow place section after described fractionation module 226 splits is not less than described first threshold.
Preferably, described type-setting module 22 also comprises:
The second comparison module 228, the minimum distance of top that be used for to determine current line to the lastrow bottom of containing described placeholder that splits employing paragraph format that module 226 splits is less than Second Threshold;
Adjusting module 229 after section is used for adjusting after the section of section and described current line place section after described fractionation module 226 splits apart from being not less than described Second Threshold.
obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on single calculation element, perhaps be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in memory storage and be carried out by calculation element, perhaps they are made into respectively each integrated circuit modules, perhaps a plurality of modules in them or step being made into the single integrated circuit module realizes.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is only the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. the method for piece formula typesetting, is characterized in that, comprising:
The content of traversal streaming typesetting;
With character content typesetting in the character block of the space of a whole page of piece formula typesetting of traversal, adopt placeholder to replace non-character content typesetting in described character block of traversal;
With the position display of described non-character content at described placeholder.
2. method according to claim 1, is characterized in that, the process of described typesetting comprises:
In the process of the content of described traversal streaming typesetting, adopt array record each described character content and described non-character content and between position relationship, displaying ratio;
According to described position relationship, described character content is stored in the character block of the described space of a whole page according to the size of setting;
Determine the display size of described non-character content according to the size of described setting, described displaying ratio;
According to described display size, the described position relationship described placeholder of typesetting on the described space of a whole page, and the Base alignment: See Alignment of described placeholder and described character block.
3. method according to claim 2, it is characterized in that, with described non-character content according to the position display of described display size at described placeholder, and the Base alignment: See Alignment of the simulated baseline that arranges on described non-character content and described placeholder or described character block.
4. method according to claim 3, is characterized in that, the process of described typesetting also comprises:
Determine that the nearest distance of bottom of the top of described placeholder and lastrow content is less than first threshold;
Described placeholder is expert at splits into independent section;
A section front distance of adjusting section and described lastrow place section after described fractionation is not less than described first threshold.
5. method according to claim 4, is characterized in that, the process of described typesetting also comprises:
The minimum distance of the top of determining current line to the lastrow bottom of containing described placeholder of adopting paragraph format is less than Second Threshold;
Adjust after the section of section and described current line place section after described fractionation apart from being not less than described Second Threshold.
6. the device of piece formula typesetting, is characterized in that, comprising:
Spider module is for the content of traversal streaming typesetting;
Type-setting module is for the character block typesetting of the character content that will travel through at the space of a whole page of piece formula typesetting; Adopt placeholder to replace non-character content typesetting in the character block of the described space of a whole page of traversal;
Display module is used for the position display of described non-character content at described placeholder.
7. device according to claim 6, is characterized in that, described type-setting module comprises:
Logging modle is used for the process in the content of described traversal streaming typesetting, adopts
With array record each described character content and described non-character content and between position relationship, displaying ratio;
The first type-setting module is used for according to described position relationship, and described character content is stored in the character block of the described space of a whole page according to the size of setting;
Show computing module, be used for determining according to the size of described setting, described displaying ratio the display size of described non-character content;
The second type-setting module is used for according to described display size, the described position relationship described placeholder of typesetting on the described space of a whole page, and the Base alignment: See Alignment of described placeholder and described character block.
8. device according to claim 7, is characterized in that, described display module comprises:
Show adjusting module, be used for obtaining described display size;
The geometric ratio display module is used for described non-character content according to the position display of described display size at described placeholder, and the Base alignment: See Alignment of the simulated baseline that arranges on described non-character content and described placeholder or described character block.
9. device according to claim 8, is characterized in that, described type-setting module also comprises:
The first comparison module be used for to determine that the nearest distance of bottom of the top of described placeholder and lastrow content is less than first threshold;
Split module, being used for described placeholder is expert at splits into independent section;
Adjusting module before section, a section front distance that is used for adjusting section and described lastrow place section after described fractionation is not less than described first threshold.
10. device according to claim 9, is characterized in that, described type-setting module also comprises:
The second comparison module, the minimum distance of top that be used for to determine current line to the lastrow bottom of containing described placeholder of adopting paragraph format is less than Second Threshold;
Adjusting module after section is used for adjusting after the section of section and described current line place section after described fractionation apart from being not less than described Second Threshold.
CN201110401282.2A 2011-12-05 2011-12-05 The method and apparatus of block formula typesetting Expired - Fee Related CN103136185B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110401282.2A CN103136185B (en) 2011-12-05 2011-12-05 The method and apparatus of block formula typesetting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110401282.2A CN103136185B (en) 2011-12-05 2011-12-05 The method and apparatus of block formula typesetting

Publications (2)

Publication Number Publication Date
CN103136185A true CN103136185A (en) 2013-06-05
CN103136185B CN103136185B (en) 2016-03-16

Family

ID=48496026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110401282.2A Expired - Fee Related CN103136185B (en) 2011-12-05 2011-12-05 The method and apparatus of block formula typesetting

Country Status (1)

Country Link
CN (1) CN103136185B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105260353A (en) * 2015-10-23 2016-01-20 北大方正集团有限公司 Typesetting method and device for mobile terminal
CN105354174A (en) * 2014-08-22 2016-02-24 北大方正集团有限公司 Typesetting method and apparatus for outputting epub file
CN105373545A (en) * 2014-08-25 2016-03-02 阿里巴巴集团控股有限公司 Picture display method and device
CN111079396A (en) * 2019-12-20 2020-04-28 方正国际软件(北京)有限公司 Typesetting method and device for characters in irregular unit grid

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101169777A (en) * 2007-11-13 2008-04-30 无锡永中科技有限公司 Method for implementing word processing software layout compatibility
US7934154B2 (en) * 2004-01-30 2011-04-26 Canon Kabushiki Kaisha Document processing apparatus, document processing method, and document processing program
CN102103574A (en) * 2009-12-17 2011-06-22 北大方正集团有限公司 Book sample file content formatting output method and system
CN102110085A (en) * 2009-12-29 2011-06-29 北京大学 Automatic typesetting method and system based on dependency relationship of typesetting objects

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7934154B2 (en) * 2004-01-30 2011-04-26 Canon Kabushiki Kaisha Document processing apparatus, document processing method, and document processing program
CN101169777A (en) * 2007-11-13 2008-04-30 无锡永中科技有限公司 Method for implementing word processing software layout compatibility
CN102103574A (en) * 2009-12-17 2011-06-22 北大方正集团有限公司 Book sample file content formatting output method and system
CN102110085A (en) * 2009-12-29 2011-06-29 北京大学 Automatic typesetting method and system based on dependency relationship of typesetting objects

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘子群: "书籍版式设计中字体排版的应用研究", 《中国优秀硕士学位论文全文数据库 哲学与人文科学辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354174A (en) * 2014-08-22 2016-02-24 北大方正集团有限公司 Typesetting method and apparatus for outputting epub file
CN105354174B (en) * 2014-08-22 2018-04-10 北大方正集团有限公司 For exporting the composition method and device of epub formatted files
CN105373545A (en) * 2014-08-25 2016-03-02 阿里巴巴集团控股有限公司 Picture display method and device
CN105260353A (en) * 2015-10-23 2016-01-20 北大方正集团有限公司 Typesetting method and device for mobile terminal
CN111079396A (en) * 2019-12-20 2020-04-28 方正国际软件(北京)有限公司 Typesetting method and device for characters in irregular unit grid
CN111079396B (en) * 2019-12-20 2023-06-16 方正国际软件(北京)有限公司 Chinese typesetting method and typesetting device for irregular unit cell

Also Published As

Publication number Publication date
CN103136185B (en) 2016-03-16

Similar Documents

Publication Publication Date Title
US9015578B2 (en) Dynamic optimization of available display space
US10380227B2 (en) Generating layout for content presentation structures
US20160232134A1 (en) Template-based page layout for hosted social magazines
US20120042240A1 (en) System and method for automatic page layout
US8996981B2 (en) Managing forms in electronic documents
CN104252444B (en) A kind of composition method, module and the system of magazine application
US8751924B2 (en) Rule-based grid independent of content
CN103092954A (en) Low-resolution placeholder content for file navigation
CN103136185B (en) The method and apparatus of block formula typesetting
CN104537002A (en) CSS compatibility optimizing method and system
CN105635670A (en) Video pre-monitoring method and system
CN104572084B (en) User interface generation and data distributing method, device in card business
US20230245361A1 (en) Technology for managing graphic design using metadata relationships
DE102016015381A1 (en) Using Bloom filters to simplify the expansion and subdivision of a dynamic font
CN102419742A (en) Subtitle processing method and device applied to electronic equipment
CN104424174B (en) Document processing system and document processing method
CN110673903A (en) Display method and device for bookshelf page of reading software
CN109343772A (en) A kind of poster generation method, system, device and storage medium based on the H5 page
CN109409985A (en) A kind of information displaying method, device, equipment and storage medium
US11929049B2 (en) Output content generation apparatus, output content generation method and program
CN105512095A (en) Generation method for EPUB e-book
JP6924544B2 (en) Cartoon data display system, method and program
CN103136186A (en) Method and device of pinyin type setting
US20170323351A1 (en) Systems and methods for view-based advertisement selection
WO2019019534A1 (en) Formula display method and apparatus, terminal, and computer-readable storage medium

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: 20160316

Termination date: 20191205

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