TWI745888B - Recursive typesetting system and recursive typesetting method - Google Patents

Recursive typesetting system and recursive typesetting method Download PDF

Info

Publication number
TWI745888B
TWI745888B TW109108360A TW109108360A TWI745888B TW I745888 B TWI745888 B TW I745888B TW 109108360 A TW109108360 A TW 109108360A TW 109108360 A TW109108360 A TW 109108360A TW I745888 B TWI745888 B TW I745888B
Authority
TW
Taiwan
Prior art keywords
typesetting
space
elements
goals
recursive
Prior art date
Application number
TW109108360A
Other languages
Chinese (zh)
Other versions
TW202134932A (en
Inventor
陳振興
林俊鴻
尹燕越
Original Assignee
英業達股份有限公司
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 英業達股份有限公司 filed Critical 英業達股份有限公司
Priority to TW109108360A priority Critical patent/TWI745888B/en
Publication of TW202134932A publication Critical patent/TW202134932A/en
Application granted granted Critical
Publication of TWI745888B publication Critical patent/TWI745888B/en

Links

Images

Abstract

The invention provides a recursive typesetting system and typesetting method so that a user may implement a relationship between each element and space via inputting a layout goal thereof; meanwhile, the recursive typesetting system and typesetting method may implement the layout by considering a subspace as an element in the space. Therefore, the user may quickly generate the required finished product by re-putting the parameters and executing the process of the present invention.

Description

遞迴式排版系統與排版方法 Recursive Typesetting System and Typesetting Method

本發明係指一種排版系統與排版方法,尤指一種遞迴式排版系統與排版方法。 The present invention refers to a typesetting system and method, especially a recursive typesetting system and method.

在習知技術中,為了商品上認證位置安排、產線上標籤作業、甚或是日常生活中印刷品、網頁、廣告文案的編排等,相關人員皆需留意其版面安排,以吸引閱讀者的注意或增加閱讀上的舒適度。然而,在處理排版作業時,往往只能依靠設計者對排版軟體的熟練程度與過去經驗來進行作業,除了排版的作業時間需費過鉅外,易使最終成果的品質不穩定。此外,由於處理流程中須以人工加以介入,亦造成出錯率的增加。 In the conventional technology, for the arrangement of the certification position on the product, the labeling operation on the production line, or even the layout of the printed matter, webpage, and advertisement copy in daily life, relevant personnel need to pay attention to the layout of the layout to attract readers’ attention or increase Reading comfort. However, when dealing with typesetting tasks, it is often only possible to rely on the designer’s proficiency in typesetting software and past experience. In addition to the huge amount of time required for typesetting, it is easy to make the quality of the final result unstable. In addition, due to manual intervention in the processing flow, the error rate also increases.

另一方面,於生產過程,隨著機種開發的時間推進,一遇認證標誌的時而增減時,說明書或是商品印刷即需再重新排版,如此除排版的作業時間外,更需投入許多人力追蹤上述之突發狀況,使作業效率降低。 On the other hand, in the production process, as the time of model development progresses, when the certification mark increases or decreases from time to time, the manual or product printing needs to be re-typed. In addition to the work time of typesetting, a lot of investment is required. Manpower tracking the above-mentioned emergencies reduces the efficiency of operations.

因此,習知技術實有改善之必要。 Therefore, it is necessary to improve the conventional technology.

因此,本發明之主要目的即在於提供一種遞迴式的排版系統與排版方法,以改善習知技術的缺點。 Therefore, the main purpose of the present invention is to provide a recursive typesetting system and method to improve the shortcomings of the conventional technology.

本發明實施例揭露一種排版方法,用於一空間,該排版方法包括對該空間中複數個元素設定複數個排版目標;其中該複數個元素為文字、圖形或空白;以及根據該複數個排版目標,計算該複數個元素於該空間中的位置;其中該複數個排版目標包括該複數個元素的相對位置;以及一優先順序,用來處理各排版目標相衝突時,以優先順序高者為主;其中該排版方式以一描述語言對該空間中該複數個元素設定該複數個排版目標,其中該描述語言以一使用者介面加以轉出或由使用者直接以文字方式完成。 The embodiment of the present invention discloses a typesetting method for a space. The typesetting method includes setting a plurality of typesetting goals for a plurality of elements in the space; wherein the plurality of elements are text, graphics or blanks; and according to the plurality of typesetting goals , Calculate the position of the plurality of elements in the space; where the plurality of typesetting targets include the relative positions of the plurality of elements; and a priority order, used to deal with conflicts between the typesetting goals, the higher priority ; Wherein the typesetting method uses a description language to set the plurality of typesetting targets for the plurality of elements in the space, wherein the description language is transferred out by a user interface or directly completed by the user in text mode.

本發明實施例另揭露一種排版系統,用於一空間,該排版系統包括一使用者介面,用來對該空間中複數個元素設定複數個排版目標;其中該使用者介面以一描述語言對該空間中該複數個元素設定該複數個排版目標,其中該描述語言以一使用者介面加以轉出或由使用者直接以文字方式完成;該複數個元素為文字、圖形或空白;該複數個排版目標包括該複數個元素的相對位置;以及一優先順序,用來處理各排版目標相衝突時,以優先順序高者為主;以及一處理單元,用來根據該複數個排版目標,計算該複數個元素於該空間中的位置。 An embodiment of the present invention further discloses a typesetting system used in a space. The typesetting system includes a user interface for setting a plurality of typesetting targets for a plurality of elements in the space; wherein the user interface uses a description language for the The plurality of elements in the space set the plurality of typesetting goals, wherein the description language is exported through a user interface or directly completed by the user in text; the plurality of elements are text, graphics or blanks; the plurality of typesettings The target includes the relative positions of the plurality of elements; and a priority order, which is used to deal with the conflicts between the typesetting goals, which is the highest priority; and a processing unit, which is used to calculate the plural number according to the plurality of typesetting goals The position of each element in the space.

10:空間 10: Space

100、102、104:元素 100, 102, 104: element

12:空間 12: space

120:子空間 120: subspace

122、124:元素 122, 124: Elements

140、142、144、146:元素 140, 142, 144, 146: elements

20:空間 20: space

200~202:元素 200~202: Element

21:空間 21: Space

210~212:元素 210~212: Element

22:空間 22: Space

220~222:元素 220~222: Element

30:空間 30: space

31:子空間 31: Subspace

310~312:元素 310~312: Element

32:元素 32: Element

33:子空間 33: Subspace

330、331:元素 330, 331: Elements

40:空間 40: space

42、44、48:元素 42, 44, 48: Elements

46:子空間 46: Subspace

460、462、464、466、468:元素 460, 462, 464, 466, 468: elements

500~514:步驟 500~514: steps

600~614:步驟 600~614: steps

70:遞迴式排版系統 70: Recursive Typesetting System

700:處理單元 700: processing unit

702:儲存單元 702: storage unit

第1A、1B圖為空間與元素之示意圖。 Figures 1A and 1B are schematic diagrams of space and elements.

第2A、2B、2C圖為本發明實施例排版目標之示意圖。 Figures 2A, 2B, and 2C are schematic diagrams of typesetting targets according to embodiments of the present invention.

第3圖為本發明實施例一階層式排版目標之示意圖。 FIG. 3 is a schematic diagram of a hierarchical typesetting target according to an embodiment of the present invention.

第4圖為本發明實施例一排版結果之示意圖。 Figure 4 is a schematic diagram of the typesetting result according to the first embodiment of the present invention.

第5圖為本發明實施例一排版方法流程之示意圖。 Figure 5 is a schematic diagram of the flow of a typesetting method according to an embodiment of the present invention.

第6圖為本發明實施例一排版方法流程之示意圖。 Figure 6 is a schematic diagram of the flow of a typesetting method according to an embodiment of the present invention.

第7圖為本發明實施例一排版系統之示意圖。 Figure 7 is a schematic diagram of a typesetting system according to an embodiment of the present invention.

在說明書及申請專利範圍當中所提及之「包含」及「包括」為一開 放式用語,故應解釋成「包含但不限定於」。「空間」一詞係指設定排版目標的範圍,而「元素」一詞係指空間中內所有被排版目標規範的物件,其可以是文字、圖形及空白。需注意的是,一元素亦可為另一包含其他子元素的子空間。 於空間中,以排版目標規範該子空間的位置,而該子空間內的排版目標規範該子空間內的各元素。 The "include" and "include" mentioned in the specification and the scope of the patent application are one-off It should be interpreted as "including but not limited to". The term "space" refers to the scope of setting typesetting goals, and the term "element" refers to all objects in the space that are regulated by typesetting goals, which can be text, graphics, and blank spaces. It should be noted that an element can also be another subspace containing other subelements. In the space, the position of the subspace is regulated by the typesetting target, and the typesetting target in the subspace regulates the elements in the subspace.

請參考第1A、1B圖,第1A、1B圖為空間與元素之示意圖。如第1A圖所示,一空間10中包含有100、102及104三個元素;而在第1B圖中,一空間12包含有120、122及124三個元素,其中元素120為另一包含140、142、144及146四個元素的空間。簡言之,在整個階層結構中的任何親子關係,都可以視為空間與元素的關係。 Please refer to Figures 1A and 1B. Figures 1A and 1B are schematic diagrams of space and elements. As shown in Figure 1A, a space 10 contains three elements 100, 102, and 104; and in Figure 1B, a space 12 contains three elements 120, 122, and 124, where element 120 is the other containing The space of four elements 140, 142, 144 and 146. In short, any parent-child relationship in the entire hierarchy can be regarded as the relationship between space and elements.

此外,「排版目標」是指在空間內安排元素的方法,例如可根據水平或垂直方向指定將元素靠左、靠右、置中、靠上、靠下對齊一錨點,也可以是對該空間進行最小化空間利用或最大化空間利用。其中,若該空間有「最大化空間利用」之排版目標時,空間中的元素將以演算法計算出最適合的編排方式, 使元素均勻散佈於空間中。相對來說,若該空間有「最小化空間利用」之排版目標時,空間內的元素將以演算法計算出最緊密的編排方式。此時,空間內的元素全部放置完成後可能會有大量未被使用的空白,故需縮小該空間的範圍到可包覆所有元素之最小形狀。 In addition, "typesetting goal" refers to the method of arranging elements in a space. For example, you can align the elements to the left, right, center, top, and bottom to an anchor point according to the horizontal or vertical direction. Minimize space utilization or maximize space utilization. Among them, if the space has the typesetting goal of "maximizing space utilization", the elements in the space will be calculated using algorithms to calculate the most suitable layout. Distribute the elements evenly in the space. Relatively speaking, if the space has a typesetting goal of "minimizing space utilization", the elements in the space will use an algorithm to calculate the closest arrangement. At this time, after all the elements in the space are placed, there may be a lot of unused blank space, so it is necessary to reduce the scope of the space to the smallest shape that can cover all the elements.

舉例來說,第2A、2B、2C圖為本發明中排版目標之不同實施例之示意圖。於第2A圖中,一空間20內的三元素200、201及202以水平方向靠左,垂直方向置中方式排列。於第2B圖中,一空間21內的三元素210、211及212以最大化空間利用方式,均勻散佈於空間21中。於第2C圖中,一空間22內的三元素220、221及222則以最小化空間利用進行排版。需注意的是,由於空間22中以最小化空間利用為排版目標,此時,空間內的元素220、221及222全部放置完成後仍有未被使用的空白(如第2C圖中虛線處),故需縮小空間22的範圍到可包覆所有元素之最小形狀。從而,若元素200、201、202、210、211、212、220、221、222面積相同時,空間22的面積會小於空間20或空間21的面積。 For example, Figures 2A, 2B, and 2C are schematic diagrams of different embodiments of typesetting targets in the present invention. In Figure 2A, the three elements 200, 201, and 202 in a space 20 are arranged horizontally to the left and vertical to the center. In Figure 2B, the three elements 210, 211, and 212 in a space 21 are evenly distributed in the space 21 in a way of maximizing space utilization. In Figure 2C, the three elements 220, 221, and 222 in a space 22 are typeset to minimize space utilization. It should be noted that, as the layout goal is to minimize the use of space in the space 22, at this time, there are still unused blanks after all the elements 220, 221, and 222 in the space are placed (such as the dotted line in Figure 2C) Therefore, it is necessary to reduce the range of the space 22 to the smallest shape that can cover all the elements. Therefore, if the areas of the elements 200, 201, 202, 210, 211, 212, 220, 221, and 222 are the same, the area of the space 22 will be smaller than the area of the space 20 or the space 21.

此外,排版目標亦包括各元素間相對位置的排列,舉例來說,於第2A圖中,元素200被要求放置於201的左方;而於第2C圖中,元素220則被要求放置於221的上方。藉由各元素對齊錨點的方式進行空間中絕對位置的定位及各元素間相對位置的排列,以實現使用者的排版目標。 In addition, the typesetting goal also includes the arrangement of the relative positions of the elements. For example, in Figure 2A, element 200 is required to be placed on the left of 201; and in Figure 2C, element 220 is required to be placed on 221 Above. The positioning of the absolute position in the space and the arrangement of the relative positions between the elements are performed by aligning the anchor points of each element to achieve the user's typesetting goal.

為了完成各種複雜的排版需求,使用者可為各個元素設定複數個帶有優先順序的排版目標,若排版目標間相互矛盾,則本發明之排版方法以優先順序高者為主。第3圖為本發明實施例一階層式排版目標之示意圖。於第3圖中,一空間30分為子空間31、元素32、子空間33。子空間31包含三元素310、311及 312,而子空間33包含二元素330及331,其中各元素的排版目標如第3圖所示。 於子空間31中,使用者設定元素311與元素312的排版目標均對齊同一個錨點且均為置中對齊,故元素311與元素312中位置相互矛盾,此時本發明之排版方法可透過使用者設定的優先順序適當安排元素311與元素312於子空間31的位置。 In order to fulfill various complex typesetting requirements, the user can set a plurality of typesetting goals with priority order for each element. If the typesetting goals contradict each other, the typesetting method of the present invention is mainly based on the higher priority order. FIG. 3 is a schematic diagram of a hierarchical typesetting target according to an embodiment of the present invention. In Figure 3, a space 30 is divided into subspace 31, element 32, and subspace 33. Subspace 31 contains three elements 310, 311 and 312, and the subspace 33 contains two elements 330 and 331, and the typesetting target of each element is shown in Figure 3. In the subspace 31, the typesetting targets of the element 311 and the element 312 set by the user are aligned with the same anchor point and both are center-aligned. Therefore, the positions of the element 311 and the element 312 are contradictory. In this case, the typesetting method of the present invention can be achieved through The position of the element 311 and the element 312 in the subspace 31 is appropriately arranged in the priority order set by the user.

於實際應用時,元素的排版目標除了使用直角座標系以水平或垂直方向指定靠左、靠右、置中、靠上、靠下對齊一錨點外,亦可使用極座標系,以一角度、一半徑及以一錨點為中心加以旋轉。需注意的是,本領域具通常知識者可依不同的使用場景混合使用直角座標系與極座標系。舉例來說,第4圖為本發明實施例一排版結果之示意圖。於第4圖中,一空間40內以直角座標方式排列42、44、46、48四個元素,其中元素46亦為一空間,其包括以極座標方式排列的460、462、464、466、468五個元素。 In practical applications, the element’s typesetting goal can be used to align an anchor point in a horizontal or vertical direction with a rectangular coordinate system to the left, right, center, top, or bottom. It can also use a polar coordinate system to align an anchor point at an angle, A radius and an anchor point as the center to rotate. It should be noted that a person with ordinary knowledge in the field can mix the Cartesian coordinate system and the polar coordinate system according to different usage scenarios. For example, FIG. 4 is a schematic diagram of the typesetting result according to the first embodiment of the present invention. In Figure 4, four elements 42, 44, 46, and 48 are arranged in a space 40 in a rectangular coordinate manner. The element 46 is also a space, which includes 460, 462, 464, 466, and 468 arranged in polar coordinates. Five elements.

進一步而言,請繼續參考第3圖。由於空間中各元素亦得為空間(舉例來說,子空間31為空間30的元素,但本身包含310、311及312三個元素;子空間33為空間30的元素,但本身包含330及331二個元素)。本發明之排版方法為有系統地進行排版,於一實施例中,由下而上(bottom to up)完成排版作業,如前所述,元素可以是文字、圖型,也可以是一已完成排版目標的空間。 Further, please continue to refer to Figure 3. Since each element in the space must also be a space (for example, subspace 31 is an element of space 30, but contains three elements 310, 311, and 312; subspace 33 is an element of space 30, but contains 330 and 331 Two elements). The typesetting method of the present invention is to perform typesetting systematically. In one embodiment, the typesetting operation is completed from bottom to up. As mentioned above, the elements can be text, graphics, or a completed type. Space for typesetting goals.

詳細來說,本發明之排版方法尋找屬於階層架構中最底層且尚未完成排版的空間為子空間31後,依照子空間31所設定的排版目標執行元素310、311及312的排版作業。此時,由於子空間31已經完成排版,屬於階層架構中最底層且尚未完成排版的空間為子空間33,因此本發明之排版方法繼續依照子空間33所設定的排版目標執行元素330及331的排版作業。最後,當子空間31及33已排 版完成後,屬於階層架構中最底層且尚未完成排版的空間即為空間30。此外,於空間30中,子空間31及33被視為空間30裡的元素,從而本發明之排版方法可根據使用者於空間30所設定的排版目標執行子空間31、33及元素32的排版作業。 In detail, the typesetting method of the present invention searches for the subspace 31 that belongs to the lowest level in the hierarchy and has not yet completed typesetting, and then executes the typesetting operation of the elements 310, 311, and 312 according to the typesetting target set by the subspace 31. At this time, since the subspace 31 has been typeset, the space that belongs to the bottom of the hierarchy and has not yet been typeset is the subspace 33. Therefore, the typesetting method of the present invention continues to execute the elements 330 and 331 according to the typesetting goals set by the subspace 33. Typesetting assignments. Finally, when subspaces 31 and 33 have been arranged After the version is completed, the space that belongs to the bottom of the hierarchy and has not yet completed the layout is space 30. In addition, in the space 30, the subspaces 31 and 33 are regarded as elements in the space 30, so the typesetting method of the present invention can execute the typesetting of the subspaces 31, 33 and the element 32 according to the typesetting goals set by the user in the space 30 Operation.

據此,縱為不同使用者之情況下,透過操作本發明之排版方法與系統,於輸入相同排版目標的情況時,不同使用者仍可自動、快速地得到符合使用者排版目標且相同排版結果,如此可增進排版及生產的效率,並確保排版品質的穩定性。 Accordingly, even in the case of different users, by operating the typesetting method and system of the present invention, when inputting the same typesetting goal, different users can still automatically and quickly obtain the same typesetting result that meets the user's typesetting goal. , This can improve the efficiency of typesetting and production, and ensure the stability of typesetting quality.

關於本發明遞迴式排版方法之運作,可歸納為一遞迴式排版流程50。包含第5圖所示之以下步驟: The operation of the recursive typesetting method of the present invention can be summarized as a recursive typesetting process 50. Contains the following steps shown in Figure 5:

步驟500:開始。 Step 500: Start.

步驟502:依排版需求將空間劃分為複數個子空間及複數個元素,並針對每個元素設定排版目標。 Step 502: Divide the space into a plurality of subspaces and a plurality of elements according to the layout requirements, and set a layout goal for each element.

步驟504:尋找複數個階層架構中最底層中且尚未完成排版的空間中優先權最高者。 Step 504: Find the one with the highest priority among the spaces at the bottom of the plurality of hierarchical structures that have not yet been typeset.

步驟506:根據位於步驟506所找到空間的排版目標,對所屬元素進行排版。 Step 506: According to the typesetting target located in the space found in step 506, typeset the element to which it belongs.

步驟508:判斷是否需調整空間邊界。若是,則執行步驟510;若否,則執行步驟512。 Step 508: Determine whether the space boundary needs to be adjusted. If yes, go to step 510; if not, go to step 512.

步驟510:調整空間邊界。 Step 510: Adjust the space boundary.

步驟512:判斷是否仍有未排版的空間。若是,則執行步驟504;若否,則執行步驟514。 Step 512: Determine whether there is still space for typesetting. If yes, go to step 504; if not, go to step 514.

步驟514:結束。 Step 514: End.

於步驟504中,遞迴式排版流程50係由下而上方式加以遞迴,透過先完成底部的排版,並將已完成排版的空間視為一元素,對於上層的空間再進行排版。若位於同階層架構中有複數個空間均未完成排版,則遞迴式排版流程50可結合前述優先權之概念,由同階層空間內優先權較高的元素進行排版作業。 In step 504, the recursive typesetting process 50 is recursed in a bottom-up manner, by completing the bottom typesetting first, and treating the completed typesetting space as an element, and then typesetting the upper space. If there are multiple spaces in the same hierarchical structure that have not been typeset, the recursive typesetting process 50 can combine the aforementioned concept of priority to perform typesetting operations by elements with higher priority in the same hierarchical space.

相對來說,若該複數個空間未完成排版空間中優先權均相同或無優先權的設定,則遞迴式排版流程50從該複數個空間未完成排版空間之中任意挑選一個空間進行排版作業即可。 Relatively speaking, if the plurality of spaces have not completed the setting of the same priority in the typesetting space or no priority setting, the recursive typesetting process 50 randomly selects a space from the plurality of uncompleted typesetting spaces to perform the typesetting operation. That's it.

於步驟508與步驟510中,如前所述,若該空間有「最小化空間利用」之排版目標時,空間內的元素將以最緊密的編排方式而使空間內產生未被使用的空白,故需縮小該空間範圍到可包覆所有元素之最小形狀。反面來說,若空間中未有「最小化空間利用」之排版目標時,可略過步驟508與步驟510,以增加執行遞迴式排版流程50的效率。 In step 508 and step 510, as mentioned above, if the space has the typesetting goal of "minimize space utilization", the elements in the space will be arranged in the most compact manner to produce unused white space in the space. Therefore, the space must be reduced to the smallest shape that can cover all elements. On the other hand, if there is no typesetting goal of "minimize space utilization" in the space, step 508 and step 510 can be skipped to increase the efficiency of executing the recursive typesetting process 50.

至於遞迴式排版流程50之其他步驟可參考前述說明,於此不再贅述。 As for the other steps of the recursive typesetting process 50, please refer to the foregoing description, and will not be repeated here.

另一方面,除由下而上方式加以遞迴外,於一實施例中,本發明之排版方法亦可適用由上而下(top to down)方式加以遞迴。如第6圖所示,第6圖為本發明實施例一遞迴式排版流程60之示意圖。遞迴式排版流程60包含以下步驟: On the other hand, in addition to the bottom-up recursive method, in one embodiment, the typesetting method of the present invention can also be adapted to the top-to-down recursive method. As shown in FIG. 6, FIG. 6 is a schematic diagram of a recursive typesetting process 60 according to an embodiment of the present invention. The recursive typesetting process 60 includes the following steps:

步驟600:開始。 Step 600: Start.

步驟602:依排版需求將空間劃分為複數個子空間及複數個元素,並針對每個元素設定排版目標。 Step 602: Divide the space into a plurality of subspaces and a plurality of elements according to the typesetting requirements, and set a typesetting goal for each element.

步驟604:尋找複數個階層架構中最頂層中且尚未完成排版的空間中優先權最高者。 Step 604: Find the one with the highest priority among the spaces at the top of the plurality of hierarchical structures that have not yet been typeset.

步驟606:根據位於步驟606所找到空間的排版目標,對所屬元素進行排版。 Step 606: According to the typesetting target located in the space found in step 606, typeset the element to which it belongs.

步驟608:判斷是否需調整空間邊界。若是,則執行步驟610;若否,則執行步驟612。 Step 608: Determine whether the space boundary needs to be adjusted. If yes, go to step 610; if not, go to step 612.

步驟610:調整空間邊界,並將包含該子空間之空間設為未完成排版。 Step 610: Adjust the space boundary, and set the space containing the subspace as uncompleted typesetting.

步驟612:判斷是否仍有未排版的空間。若是,則執行步驟604;若否,則執行步驟614。 Step 612: Determine whether there is still space for typesetting. If yes, go to step 604; if not, go to step 614.

步驟614:結束。 Step 614: End.

比較第6圖及第5圖可知,遞迴式排版流程60與遞迴式排版流程50相比之下,僅有步驟604中將步驟504修改為尋找階層架構中最頂層且尚未完成排版的空間。惟需特別注意的是若複數個排版目標中若有「最小化空間利用」之排版目標時,可能會因空間縮小,而遞迴式排版流程60須重新回到較上層階層的空間往下繼續排版(如步驟610)。至於遞迴式排版流程60的其餘步驟則與遞迴式排版流程50相同,於此不再贅述。 Comparing Figure 6 and Figure 5, we can see that the recursive typesetting process 60 is compared with the recursive typesetting process 50. Only step 504 is modified in step 604 to find the top-level space in the hierarchy that has not yet been typeset. . Only need to pay special attention is that if there is a typesetting goal of "minimize space utilization" among multiple typesetting goals, the space may be reduced, and the recursive typesetting process 60 must return to the upper level of the space and continue down. Typesetting (as in step 610). As for the remaining steps of the recursive typesetting process 60 are the same as the recursive typesetting process 50, they will not be repeated here.

第7圖為本發明實施例一遞迴式排版系統70之示意圖。如第7圖所示,遞迴式排版系統70包含一處理單元700及一儲存單元702。於一實施例中,遞迴式排版系統70之各單元可利用特殊應用積體電路(Application-specific integrated circuit,ASIC)來實現。於一實施例中,處理單元700可為應用處理器(Application Processor)、數位信號處理器(Digital Signal Processor,DSP)、中央處理單元(Central Processing Unit,CPU)、圖形處理單元(Graphics Processing Unit,GPU)甚至張量處理單元(Tensor Processing Unit,TPU),實現上開之排版的功能即可,而不在此限。儲存單元702可用來儲存一程式碼,該程式碼用來指示處理單元700執行關於前述排版方法(如遞迴式排版流程50、60)的運算。 儲存單元702可為一唯讀記憶體(Read-only Memory,ROM)、隨機存取記憶體(Random-access Memory,RAM)、唯獨記憶光碟(CD-ROM)、磁帶(Magnet Tape)、軟性磁碟(Floppy Disk)、光學數據儲存裝置(Optical Data Storage Device)、非揮發性記憶體(Non-volatile Memory)例如電子抹除式可複寫唯讀記憶體(Electrically Erasable Programmable Read-only Memory,EEPRM)或快閃記憶體(Flash Memory)等,且不限於此。 FIG. 7 is a schematic diagram of a recursive typesetting system 70 according to an embodiment of the present invention. As shown in FIG. 7, the recursive typesetting system 70 includes a processing unit 700 and a storage unit 702. In one embodiment, each unit of the recursive typesetting system 70 can be implemented by an application-specific integrated circuit (ASIC). In one embodiment, the processing unit 700 may be an application processor (Application Processor), a digital signal processor (DSP), a central processing unit (CPU), or a graphics processing unit (Graphics Processing Unit). Unit (GPU) or even Tensor Processing Unit (TPU) can realize the function of typesetting on the open, but not limited to this. The storage unit 702 can be used to store a program code for instructing the processing unit 700 to perform operations related to the aforementioned typesetting method (such as the recursive typesetting process 50, 60). The storage unit 702 can be a read-only memory (Read-only Memory, ROM), random-access memory (Random-access Memory, RAM), CD-ROM, magnetic tape (Magnet Tape), flexible Floppy Disk, Optical Data Storage Device, Non-volatile Memory, such as Electronically Erasable Programmable Read-only Memory (EEPRM) ) Or Flash Memory, etc., but not limited to this.

於一實施例中,遞迴式排版系統70可另包含一使用者介面,供使用者透過該使用者介面對複數層空間中複數個元素分別設定複數個排版目標。於一實施例中,遞迴式排版系統70可接收使用者輸入的描述語言完成排版。或者,綜合前述二者的優點,於一實施例中,使用者可透過文字編輯器編輯描述語言或透過使用者介面轉出描述語言,再透過遞迴式排版系統70加以執行。此種文本編譯方法為本領域具通常知識者常見技藝,於此不再贅述。 In one embodiment, the recursive typesetting system 70 may further include a user interface for the user to set a plurality of typesetting targets for a plurality of elements in a plurality of layers of space through the user interface. In one embodiment, the recursive typesetting system 70 can receive the description language input by the user to complete the typesetting. Or, combining the advantages of the foregoing two, in one embodiment, the user can edit the description language through a text editor or export the description language through the user interface, and then execute it through the recursive typesetting system 70. This type of text compilation method is a common skill for people with ordinary knowledge in the field, and will not be repeated here.

需注意的是,本發明排版方法不僅適用於紙張,亦可包含模具、車床等製作。於一實施例中,廣告業者可使用本發明之排版方法進行廣告與宣傳單的排版;或者,電視遙控器製造工廠可使用本發明之排版方法就電視遙控器的版型進行製作。另一方面,本發明中之元素不僅止於文字、圖形及標籤,亦可包含雕刻用鏤空,舉例來說,於筆記型電腦製造工廠可使用本發明於機殼上對於認證標籤、品牌標識而為排版外,亦可預先留下散熱用鏤空,再於後續雕刻加工。 It should be noted that the typesetting method of the present invention is not only suitable for paper, but also includes molds, lathes, and the like. In one embodiment, the advertising industry can use the layout method of the present invention to layout advertisements and leaflets; or, the TV remote control manufacturer can use the layout method of the present invention to produce the layout of the TV remote control. On the other hand, the elements of the present invention are not only limited to text, graphics, and labels, but can also include hollows for engraving. For example, the present invention can be used on the chassis for authentication labels and brand logos in notebook computer manufacturing plants. In addition to typesetting, you can also leave a hollow for heat dissipation in advance, and then engrave it later.

前述實施例用以說明本發明之概念,本領域具通常知識者當可據以做不同的修飾,而不限於此。因此,只要一種排版系統與排版方式,可透過使用者輸入排版目標後,可遞迴式完成使用者的排版目標,即滿足本發明的要求,而屬於本發明之範疇。 The foregoing embodiments are used to illustrate the concept of the present invention, and those skilled in the art can make various modifications accordingly, and are not limited thereto. Therefore, as long as there is a typesetting system and typesetting method, the typesetting goal of the user can be completed recursively after the user enters the typesetting goal, which meets the requirements of the present invention and belongs to the scope of the present invention.

綜上所述,本發明提供一種遞迴式的排版系統與排版方法,使用者藉此對空間中各個元素輸入排版目標後,可實現元素位於空間對應關係;同時,透過將空間中的元素視為另一個子空間設定子空間中元素的排版目標,即可以遞迴方法階層化完成排版。因此,透過本發明,使用者得以藉由重新輸入參數,執行流程,即可快速產生所需成品。 In summary, the present invention provides a recursive typesetting system and typesetting method by which the user can realize the corresponding relationship between the elements in the space after inputting the typesetting goals for each element in the space; at the same time, by viewing the elements in the space Set the typesetting target of the elements in the subspace for another subspace, that is, the typesetting can be completed hierarchically by recursive methods. Therefore, through the present invention, the user can quickly generate the desired finished product by re-inputting the parameters and executing the process.

以上所述僅為本發明之較佳實施例,凡依本發明申請專利範圍所做之均等變化與修飾,皆應屬本發明之涵蓋範圍。 The foregoing descriptions are only preferred embodiments of the present invention, and all equivalent changes and modifications made in accordance with the scope of the patent application of the present invention shall fall within the scope of the present invention.

500~514:步驟 500~514: steps

Claims (6)

一種排版方法,用於一空間,該排版方法包括:對該空間中複數個元素設定複數個排版目標;其中該複數個元素為文字、圖形或空白;以及將該空間分割為複數個子空間,其中該複數個子空間與該空間之關係對應於該複數個元素與該空間之關係;根據該複數個排版目標,計算該複數個元素於該空間中的位置;其中該複數個排版目標包括:該複數個元素的相對位置;以及一優先順序,用來處理各排版目標相衝突時,以優先順序高者為主;其中該排版方法以一描述語言對該空間中該複數個元素設定該複數個排版目標,其中該描述語言以一使用者介面加以轉出或由使用者直接以文字方式完成;其中該排版方法以由下而上或由上而下方式透過遞迴方式完成。 A typesetting method for a space. The typesetting method includes: setting a plurality of typesetting targets for a plurality of elements in the space; wherein the plurality of elements are text, graphics or blanks; and dividing the space into a plurality of subspaces, wherein The relationship between the plurality of subspaces and the space corresponds to the relationship between the plurality of elements and the space; calculate the positions of the plurality of elements in the space according to the plurality of typesetting targets; wherein the plurality of typesetting targets include: the plural The relative position of the elements; and a priority order, which is used to deal with the conflicts of the typesetting goals, whichever is higher; wherein the typesetting method uses a description language to set the plural types of the plural elements in the space Objectives, where the description language is exported through a user interface or directly completed by the user in text mode; where the typesetting method is completed in a bottom-up or top-down manner through a recursive manner. 如請求項1所述的排版方法,其中該複數個排版目標包括該元素水平或垂直方向指定靠左、靠右、置中、靠上、靠下對齊一錨點;或以一角度、一半徑及以一錨點為中心加以旋轉。 The typesetting method according to claim 1, wherein the plurality of typesetting targets include the horizontal or vertical direction of the element designating to the left, right, center, top, and bottom to align an anchor point; or at an angle and a radius And rotate it with an anchor point as the center. 如請求項1所述的排版方法,其中該複數個排版目標另包括該空間中最小化空間利用或最大化空間利用;其中該最小化空間利用方式係該複數個元素以最緊密方式放置,並縮小該空間範圍直到可包覆所有該複數個元素之一最小形狀;以及該最大化空間利用方式係將該複數個元素以均勻方式放置,並填滿該空間 範圍。 The typesetting method according to claim 1, wherein the plurality of typesetting goals further include minimizing space utilization or maximizing space utilization in the space; wherein the method of minimizing space utilization is that the plurality of elements are placed in the most compact manner, and Reduce the scope of the space until it can cover all the smallest shapes of the plurality of elements; and the method of maximizing space utilization is to place the plurality of elements in a uniform manner and fill the space Scope. 一種排版系統,用於一空間,該排版系統包括:一使用者介面,用來對該空間中複數個元素設定複數個排版目標;其中該使用者介面以一描述語言對該空間中該複數個元素設定該複數個排版目標,其中該描述語言以該使用者介面加以轉出或由使用者直接以文字方式完成;該複數個元素為文字、圖形或空白;該複數個排版目標包括:該複數個元素的相對位置;以及一優先順序,用來處理各排版目標相衝突時,以優先順序高者為主;以及一處理單元,用來根據該複數個排版目標,計算該複數個元素於該空間中的位置;以及用來將該空間分割為複數個子空間,其中該複數個子空間與該空間之關係對應於該複數個元素與該空間之關係;其中該處理單元以由下而上或由上而下方式透過遞迴方式完成一排版方法。 A typesetting system for a space. The typesetting system includes: a user interface for setting a plurality of typesetting goals for a plurality of elements in the space; wherein the user interface uses a description language for the plurality of elements in the space. The elements set the plurality of typesetting goals, where the description language is transferred from the user interface or directly completed in text by the user; the plurality of elements are text, graphics or blanks; the plurality of typesetting goals include: the plural The relative position of the elements; and a priority order, which is used to deal with the conflicts of the typesetting goals, whichever is higher; and a processing unit, which is used to calculate the plurality of elements in the plurality of typesetting goals according to the Position in the space; and used to divide the space into a plurality of subspaces, wherein the relationship between the plurality of subspaces and the space corresponds to the relationship between the plurality of elements and the space; wherein the processing unit is from bottom to top or from The top-down method uses a recursive method to complete a typesetting method. 如請求項4所述的排版系統,其中該複數個排版目標包括該元素水平或垂直方向指定靠左、靠右、置中、靠上、靠下對齊一錨點;或以一角度、一半徑及以一錨點為中心加以旋轉。 The typesetting system according to claim 4, wherein the plurality of typesetting targets include the horizontal or vertical direction of the element designating to the left, right, center, top, and bottom to align an anchor point; or at an angle and a radius And rotate it with an anchor point as the center. 如請求項4所述的排版系統,其中該複數個排版目標另包括該空間中最小化空間利用或最大化空間利用,其中該最小化空間利用方式係該複數個元素以最緊密方式放置,並縮小該空間 範圍直到可包覆所有該複數個元素之一最小形狀;以及該最大化空間利用方式係將該複數個元素以均勻方式放置,並填滿該空間範圍。 The typesetting system according to claim 4, wherein the plurality of typesetting goals further include minimizing space utilization or maximizing space utilization in the space, wherein the minimizing space utilization mode is that the plurality of elements are placed in the most compact manner, and Shrink the space The range reaches to the smallest shape that can cover all of the plurality of elements; and the method of maximizing space utilization is to place the plurality of elements in a uniform manner and fill the space range.
TW109108360A 2020-03-13 2020-03-13 Recursive typesetting system and recursive typesetting method TWI745888B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109108360A TWI745888B (en) 2020-03-13 2020-03-13 Recursive typesetting system and recursive typesetting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109108360A TWI745888B (en) 2020-03-13 2020-03-13 Recursive typesetting system and recursive typesetting method

Publications (2)

Publication Number Publication Date
TW202134932A TW202134932A (en) 2021-09-16
TWI745888B true TWI745888B (en) 2021-11-11

Family

ID=78777350

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109108360A TWI745888B (en) 2020-03-13 2020-03-13 Recursive typesetting system and recursive typesetting method

Country Status (1)

Country Link
TW (1) TWI745888B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040194028A1 (en) * 2002-11-18 2004-09-30 O'brien Stephen Method of formatting documents
US20050138572A1 (en) * 2003-12-19 2005-06-23 Palo Alto Research Center, Incorported Methods and systems for enhancing recognizability of objects in a workspace
US7028255B1 (en) * 2000-08-14 2006-04-11 Adobe Systems Incorporated Self-sizing object placement
US20130191734A1 (en) * 2000-08-09 2013-07-25 Adobe Systems Incorporated Text reflow in a structured document

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130191734A1 (en) * 2000-08-09 2013-07-25 Adobe Systems Incorporated Text reflow in a structured document
US7028255B1 (en) * 2000-08-14 2006-04-11 Adobe Systems Incorporated Self-sizing object placement
US20040194028A1 (en) * 2002-11-18 2004-09-30 O'brien Stephen Method of formatting documents
US20050138572A1 (en) * 2003-12-19 2005-06-23 Palo Alto Research Center, Incorported Methods and systems for enhancing recognizability of objects in a workspace

Also Published As

Publication number Publication date
TW202134932A (en) 2021-09-16

Similar Documents

Publication Publication Date Title
US11231696B2 (en) System and method for generating a quote for fabrication of a part to be fabricated
CN101971204B (en) Arranging graphic objects on a page with relative position based control
RU2536390C2 (en) Automated report generation method
CN110969004B (en) Automatic typesetting method and system for graphics context, server and medium
CN108090037A (en) Automatic composing method and device
CN112053431A (en) Gum deformation obtaining method and system and electronic equipment
JP5506176B2 (en) Information processing apparatus and information processing method
US6920620B2 (en) Method and system for creating test component layouts
TWI745888B (en) Recursive typesetting system and recursive typesetting method
US20030045335A1 (en) Creating a cutting template for a virtual jigsaw puzzle using guide points and a spline-fitting algorithm
US11016651B1 (en) System and method for minimizing text collisions in project timelines
US10402530B1 (en) Method, system, and computer program product for implementing placement using row templates for an electronic design
CN116204184A (en) UI editing method, system and storage medium for improving page style adaptation
CN113362423B (en) Typesetting method and typesetting system
US20230222716A1 (en) Method and apparatus for automatically generating banner image, and computer-readable storage medium
CN116737301A (en) Alignment method and device for layer elements
CN115145565A (en) Rule engine-based data visualization large-screen layout method and device
JP2008059135A (en) Apparatus, method and program for automatically creating software
CN110471251A (en) A kind of OPC modification method based on model
WO2017114015A1 (en) Method and apparatus for recognizing slide
JPH10207702A (en) Device for preparing software program
CN114417617A (en) Nested word model generation method and device, electronic equipment and readable storage medium
CN116680928A (en) WIT3D intelligent discharging method and system
JPH0525141B2 (en)
CN109858166A (en) A kind of dynamic complex figure