Text-Processing
如何使用 Unix tbl 實用程序創建多行單元格?
我正在嘗試與 groff 一起生成一個表格,其中一個單元格跨越多行。
我試過了
.TS BOXED LABEL "Table 1: Use Case 1" allbox, tab(@); l l l ld l ^ . Use Case Identifier@UC1 Flow of events@T{1. System prompts for username and password .br 2. User submits their username and password T} .TE
但我收到下面的警告,並且表格呈現不正確。
warning: file `report.mom', around line 55: table wider than line width
我試圖生成一個如下所示的表格,其中左下角的單元格跨越多行。
我還嘗試了文件中的一個範例,特別是以下範例,我得到了相同
table wider than line width warning
的結果,並且表格無法正確呈現。(下面的範例是我連結頁面上的最後一個範例。).TS box; cb s s s c | c | c s ltiw(1i) | ltw(2i) | lp8 | lw(1.5i)p8. Some Interesting Places _ Name[[circle]]Description[[circle]]Practical Information _ T{ American Museum of Natural History T}[[circle]]T{ The collections fill 11.5 acres (Michelin) or 25 acres (MTA) of exhibition halls on four floors. There is a full-sized replica of a blue whale and the world's largest star sapphire (stolen in 1964). T}[[circle]]Hours[[circle]]10-5, ex. Sun 11-5, Wed. to 9 \^[[circle]]\^[[circle]]Location[[circle]]T{ Central Park West & 79th St. T} \^[[circle]]\^[[circle]]Admission[[circle]]Donation: $1.00 asked \^[[circle]]\^[[circle]]Subway[[circle]]AA to 81st St. \^[[circle]]\^[[circle]]Telephone[[circle]]212-873-4225 _ Bronx Zoo[[circle]]T{ About a mile long and .6 mile wide, this is the largest zoo in America. A lion eats 18 pounds of meat a day while a sea lion eats 15 pounds of fish. T}[[circle]]Hours[[circle]]T{ 10-4:30 winter, to 5:00 summer T} \^[[circle]]\^[[circle]]Location[[circle]]T{ 185th St. & Southern Blvd, the Bronx. T} \^[[circle]]\^[[circle]]Admission[[circle]]$1.00, but Tu,We,Th free \^[[circle]]\^[[circle]]Subway[[circle]]2, 5 to East Tremont Ave. \^[[circle]]\^[[circle]]Telephone[[circle]]212-933-1759 _ Brooklyn Museum[[circle]]T{ Five floors of galleries contain American and ancient art. There are American period rooms and architectural ornaments saved from wreckers, such as a classical figure from Pennsylvania Station. T}[[circle]]Hours[[circle]]Wed-Sat, 10-5, Sun 12-5 \^[[circle]]\^[[circle]]Location[[circle]]T{ Eastern Parkway & Washington Ave., Brooklyn. T} \^[[circle]]\^[[circle]]Admission[[circle]]Free \^[[circle]]\^[[circle]]Subway[[circle]]2,3 to Eastern Parkway. \^[[circle]]\^[[circle]]Telephone[[circle]]718-638-5000 _ T{ New-York Historical Society T}[[circle]]T{ All the original paintings for Audubon's .I Birds of America .R are here, as are exhibits of American decorative arts, New York history, Hudson River school paintings, carriages, and glass paperweights. T}[[circle]]Hours[[circle]]T{ Tues-Fri & Sun, 1-5; Sat 10-5 T} \^[[circle]]\^[[circle]]Location[[circle]]T{ Central Park West & 77th St. T} \^[[circle]]\^[[circle]]Admission[[circle]]Free \^[[circle]]\^[[circle]]Subway[[circle]]AA to 81st St. \^[[circle]]\^[[circle]]Telephone[[circle]]212-873-3400 .TE
根據您所需的輸出,以下將是
tbl
程式碼。請注意,您不需要 box 選項。我假設您需要在第一行第二列中使用粗體UC1,因此在列後綴中使用了 B。
.TS BOXED LABEL "Table 1: Use Case 1" tab(@); l lB, l l, l l, l l, l l lT l, ^, ^, ^, ^. _ Use Case Identifier@UC1 _ Title@Login _ Participating actor(s)@Dental staff member or client _ Precondition(s)@System is ready to receive requests _ Parameters@Username, password _ T{ Flow of events T}@1. System prompts for username and password ^@2. User submits their username and password ^@3. System logs user in ^@4. User is redirected to homepage _ .TE