一案双查是什么意思| 肚脐左侧是什么器官| 烫伤用什么药好| 柠檬和什么一起泡减肥| 胃炎吃什么药效果最好| 风湿关节炎用什么药| 标准差是什么意思| 戾气重是什么意思| 吃什么能拉肚子| 猎德有什么好玩的| 曦字五行属什么| 桃酥为什么叫桃酥| 天蝎座什么象星座| 胎神是什么意思| 怀孕肚子会有什么反应| 偏头疼挂什么科室| 铅中毒用什么解毒| 鼻咽炎吃什么药| 50年是什么婚| 狗狗肠胃不好吃什么药最好| 没有润滑剂可以用什么代替| 氨水对人体有什么危害| 血压低吃什么补血| 梦见大胖小子是什么意思| sin是什么边比什么边| 心机是什么意思啊| 人怕冷是什么原因引起的| 不成敬意什么意思| 吃茄子有什么好处和坏处| 哥们是什么意思| 心脏主要由什么组织构成| 梦见自己给别人钱是什么意思| 什么是躯体化| 梦见拖地是什么意思| 甘心的近义词是什么| 一什么野菜| qy是什么意思| 工匠精神的核心是什么| 坦诚相待下一句是什么| 以身相许什么意思| 梦见女鬼是什么意思| 海绵体供血不足吃什么药| 女性膀胱炎吃什么药| tomboy是什么意思| 小酌怡情什么意思| 半夜饿了吃什么不长胖| 打破伤风不能吃什么| 618是什么节日| 翳是什么意思| 中国梦是什么梦| 新生儿五行缺什么查询| 颅内出血有什么症状| 肛门疼痛用什么药| 为什么会长粉刺| ugg是什么品牌| 生理反应是什么意思| 鳕鱼不能和什么一起吃| 甲钴胺有什么作用| 从容不迫是什么意思| 血压低压低是什么原因| 皮肤痒吃什么药| 卧推80公斤什么水平| 过敏性结膜炎用什么眼药水最好| 小麦淀粉是什么| 早上尿黄是什么原因| 头皮长疙瘩是什么原因| 肠胃不好吃什么调理| 月经老是推后是什么原因| 欺骗餐是什么意思| 耳朵背后有痣代表什么| 气性坏疽是什么病| 超细旦是什么面料| 蜜蜡脱毛有什么危害吗| 孩子经常流鼻血是什么原因| 坑坑洼洼是什么意思| 圣旨是什么意思| 舌苔白厚腻吃什么药见效快| 为什么头发突然秃了一块| 肿瘤最怕什么| 病态是什么意思| 惊厥是什么病| 世界上最大的昆虫是什么| 为什么胸闷一吃丹参滴丸就好| 乙脑是什么病| 为什么贫血| 女性肾虚吃什么补最好最快| 肝郁化火吃什么中成药| 四级什么时候报名| 家里起火代表什么预兆| 梦见长豆角是什么意思| 打胎后要注意什么| 微白蛋白高是什么情况| pettm和pe有什么区别| 杨八妹属什么生肖| 1990属什么生肖| 什么麻料最好| 钙片什么时候吃效果最好| 肚子疼拉肚子挂什么科| 牛奶什么时间喝最好| 窦性心律过缓什么意思| 包公代表什么生肖| 苹果补充什么维生素| 肠胃炎吃什么药好| 什么的溪流| 尿蛋白质弱阳性是什么意思| 青春痘长什么样| 轻浮是什么意思| 洗衣机不排水是什么原因| 迂回战术什么意思| 四象是什么| 71年属什么生肖| 孩子咳嗽有痰吃什么药| 火奥念什么| decaf是什么意思| 李姓男孩起什么名字好| 长痘痘涂什么药膏| 布拉吉是什么| 顺子是什么意思| 有什么中药可以壮阳| 两个马念什么| 电子烟是什么| 褪黑素有什么用| 什么人不能吃蚕豆| 宁字五行属什么| 挚友是指什么的朋友| 骆驼奶有什么功效| 黑五是什么| 追逐是什么意思| ferragamo是什么牌子| 肿瘤介入治疗是什么意思| 使节是什么意思| 没有润滑剂可以用什么代替| 如如不动是什么意思| 肾功能不好吃什么药调理| 西安香烟有什么牌子| 死忠粉是什么意思| 尿道炎是什么症状| 软骨炎是什么病| 紫苏有什么功效与作用| 夷是什么意思| 手脚麻是什么原因| 褥疮用什么药最好| 张家界莓茶有什么功效| 开心水是什么| 前门大街有什么好玩的| 月经期间同房有什么危害| 后背疼去医院挂什么科| 真菌孢子是什么意思| 桃花灼灼什么意思| 幽门螺旋杆菌吃什么药最好| 农历7月是什么月| 吉祥是什么意思| 小肚子一直疼是什么原因| pp材质和ppsu材质有什么区别| 来月经腰疼的厉害是什么原因| 虚火是什么意思| 什么的技术| 怕热爱出汗是什么原因| 圣水是什么| 什么是国企| 胃糜烂吃什么药最好| 肾衰竭是什么意思| 肠炎什么症状| 什么老什么老| 水逆退散什么意思| 吃什么去湿气最好最快| 什么食物可以降血糖| 阑尾在什么位置| 突然流鼻血是什么原因| hedgren是什么品牌| 核桃和什么一起打豆浆| 慢性肠炎吃什么药调理| 射精出血是什么原因引起的| 黑豆有什么功效| 89年五行属什么| 私房照是什么| 气血不足吃什么| 心率低有什么危害| 免疫力低吃什么药| 独行侠是什么意思| 孕酮低对胎儿有什么影响| 春梦是什么意思啊| 嗓子痒吃什么药| 排尿困难吃什么药好| ap医学上是什么意思| dg是什么| 嘴里发甜是什么原因| 卯戌相合发生什么| 吃什么对血液好| 外阴裂口用什么药| 桂花什么时候开花| 早搏有什么症状| 头骨凹陷是什么原因| 功夫是什么意思| 吃华法林不能吃什么| 性激素六项什么时候查最准确| 补气血吃什么药| 生日吃什么| 朗格手表什么档次| 药物流产后需要注意什么| 肾阴虚吃什么食物| 为什么会流鼻血什么原因引起的| 混合型高脂血症是什么意思| 老鸨是什么| 玉是什么生肖| 炙热是什么意思| 梦遗太频繁是什么原因造成的| 加拿大货币叫什么| ubc是什么意思| 多囊卵巢是什么原因造成的| 傻子是什么意思| 马属相和什么属相最配| 双侧腋下见淋巴结什么意思| 壬水命是什么意思| 火龙果有什么功效| dsd是什么意思| 高什么阔什么| 筒骨炖什么好吃| 梦龙什么口味好吃| 手指脱皮是什么原因| 梦见香蕉是什么意思| 脉搏低是什么原因| 扪及是什么意思| 冰糖和白砂糖有什么区别| 什么是墨菲定律| 岭南是什么地方| 见利忘义是什么生肖| 拉肚子应该挂什么科| 为什么喝酒后会头疼| 胃寒吃什么食物好| 临床医学学什么| 甘油三酯高用什么药好| 生完孩子吃什么补身体| 怀孕前三个月不能吃什么| 什么牌子的电动车好| 三个七念什么| 健康状况填什么| 大宗物品是什么意思| 县人武部政委什么级别| 吃什么可以降低血糖| 噫是什么意思| 阴唇长什么样| 梦见摘瓜是什么意思啊| 杯弓蛇影是什么物理现象| 探囊取物是什么意思| 溏是什么意思| 什么是间质瘤| 怀孕脉象是什么样子| 皮肤一碰就破是什么病| 拉肚子可以吃什么菜| 北京大学校长是什么级别| 阴囊湿疹用什么药效果最好| 低压低有什么危害| 嘴巴里长泡是什么原因| 牙龈萎缩吃什么维生素| 手指甲发紫是什么原因| hfp是什么意思| 水痘有什么症状| 神经官能症挂什么科| 妯娌是什么意思| paris什么牌子| 省人大代表是什么级别| 什么是浸润性乳腺癌| 胭脂是什么东西| 百度Jump to content

徐汇区打造基层治理创新“经典案例”公开课

From Wikipedia, the free encyclopedia
(Redirected from Tbl)
troff
Original author(s)Joe Ossanna
Developer(s)AT&T Bell Laboratories
Written inC
Operating systemUnix, Unix-like, Plan 9
PlatformCross-platform
TypeCommand
LicensePlan 9: MIT License
Websitetroff.org Edit this on Wikidata
百度 完善气象部门党建和党风廉政建设工作组织体系,选优配强党务干部,尤其要加强基层党组织建设,突出政治功能,把基层党组织建设成为宣传党的主张、贯彻党的决定、领导基层治理、团结动员群众、推动改革发展的坚强战斗堡垒。

troff (/?ti?r?f/), short for "typesetter roff", is the major component of a document processing system developed by Bell Labs for the Unix operating system. troff and the related nroff were both developed from the original roff.

While nroff was intended to produce output on terminals and line printers, troff was intended to produce output on typesetting systems, specifically the Graphic Systems CAT, which had been introduced in 1972. Both used the same underlying markup language, and a single source file could normally be used by nroff or troff without change.

troff features commands to designate fonts, spacing, paragraphs, margins, footnotes and more. Unlike many other text formatters, troff can position characters arbitrarily on a page, even overlapping them, and has a fully programmable input language. Separate preprocessors are used for more convenient production of tables, diagrams, and mathematics. Inputs to troff are plain text files and can be created by any text editor.

Extensive macro packages have been created for various document styles. A typical distribution of troff includes the me macros for formatting research papers, man and mdoc macros for creating Unix man pages, mv macros for creating mountable transparencies, and the ms and mm macros for letters, books, technical memoranda, and reports.

History

[edit]

troff's origins can be traced to a text-formatting program called RUNOFF, which was written by Jerome H. Saltzer for MIT's CTSS operating system in the mid-1960s. (The name allegedly came from the phrase I'll run off a document.)

Bob Morris ported it to the GE 635 architecture and called the program roff (an abbreviation of runoff).[citation needed] It was rewritten as rf for the PDP-7, and at the same time (1969), Doug McIlroy rewrote an extended and simplified version of roff in the BCPL programming language.

The first version of Unix was developed on a PDP-7 which was sitting around Bell Labs. In 1971 the developers wanted to get a PDP-11 for further work on the operating system. In order to justify the cost for this system, they proposed that they would implement a document-formatting system for the Bell Labs patents department.[1] This first formatting program was a reimplementation of McIllroy's roff, written by Joe F. Ossanna.

When they needed a more flexible language, a new version of roff called nroff (newer "roff") was written, which provided the basis for all future versions. When they got a Graphic Systems CAT phototypesetter, Ossanna modified nroff to support multiple fonts and proportional spacing. Dubbed troff, for typesetter roff, its sophisticated output amazed the typesetter manufacturer and confused peer reviewers, who thought that manuscripts using troff had been published before.[2][3] As such, the name troff is pronounced /?ti?r?f/ rather than */?tr?f/.

With troff came nroff (they were actually almost the same program), which was for producing output for line printers and character terminals. It understood everything troff did, and ignored the commands which were not applicable, e.g., font changes.

Ossanna's troff was written in PDP-11 assembly language and produced output specifically for the CAT phototypesetter. He rewrote it in C, although it was now 7000 lines of uncommented code and still dependent on the CAT. As the CAT became less common, and was no longer supported by the manufacturer, the need to make it support other devices became a priority. Ossanna died before this task was completed, so Brian Kernighan took on the task of rewriting troff. The newly rewritten version produced a device-independent code which was very easy for post-processors to read and translate to the appropriate printer codes. Also, this new version of troff (often called ditroff for device independent troff) had several extensions, which included drawing functions.[4] The program's documentation defines the output format of ditroff, which is used by many modern troff clones like GNU groff.

In 1983, troff was one of several UNIX tools available for Charles River Data Systems' UNOS operating system under Bell Laboratories license.[5]

The troff collection of tools (including pre- and post-processors) was eventually called Documenter's WorkBench (DWB), and was under continuous development in Bell Labs and later at the spin-off Unix System Laboratories (USL) through 1994. At that time, SoftQuad took over the maintenance, although Brian Kernighan continued to improve troff on his own. Thus, there are at least the following variants of the original Bell Labs troff in use:

  • the SoftQuad DWB, based on USL DWB 2.0 from 1994;
  • the DWB 3.4 from Lucent Software Solutions (formerly USL);
  • troff, Plan 9 edition.

While troff has been supplanted by other programs such as Interleaf, FrameMaker, and LaTeX, it is still being used quite extensively. It remains the default formatter for the UNIX documentation.

The software was reimplemented as groff for the GNU system beginning in 1990. In addition, due to the open sourcing of Ancient UNIX systems, as well as modern successors such as the ditroff-based open-sourced versions found on OpenSolaris and Plan 9 from Bell Labs, there are several versions of AT&T troff (CAT and ditroff-based[6]) available under various open-source licenses.

Macros

[edit]

In general, one was not encouraged to use troff directly, but rather go through some easier-to-use interface.[7][8] Troff includes macros that are run before starting to process the document. These macros include setting up page headers and footers, defining new commands, and influencing how the output will be formatted. The command-line argument for including a macro set is -mname, which has led to many macro sets being known as the base filename with a leading m.[9]

The standard macro sets, with leading m are:

  • man for creating manual pages[10][11]
  • mdoc for semantically annotated manual pages, which are better adapted to mandoc conversion to other formats.[12][13] mandoc is a fusion that supports both sets of manual commands.[14]
  • me for creating research papers[15]
  • mm for creating memorandums[16]
  • ms for creating books, reports, and technical documentation[17]

The ms macros were the first of these, developed at AT&T, before they were supplanted by the mm macros.[18] One goal of the mm macros was that they be usable by the typing pool at Bell Labs and, over time, this happened and the mm macros became a standard at Bell Labs.[19] AT&T made the mm macros commercially available for System V Unix.[18] In contrast, the me macros were developed at Berkeley.[18]

An example of a simple business letter prepared with the mm macros would be:

.TL
.ND "January 10, 1993"
.AU "Ms. Jane Smith"
.AT "Upcoming appointment"
.MT 5
Reference #A12345
.sp 4
Mr. Samuel Jones
.sp 0
Field director, Bureau of Inspections
.sp 0
1010 Government Plaza
.sp 0
Capitoltown, ST
.sp 3
Dear Mr. Jones,
.sp 2
.P
Making reference to the noted obligation to submit for state inspection our newly created production process, we request that you consider the possible inappropriateness of subjecting the  innovative technologies of tomorrow to the largely antiquated requirements of yesterday.  If our great state is to prosper in the twenty-first century, we must take steps 
.B now ,
in 
.I this 
year of 
.I this 
decade, to prepare our industrial base for the interstate and international competition that is sure to appear.  Our new process does precisely that.  Please do not let it be undone by a regulatory environment that is no longer apt.
.P
Thank you for your consideration of our position.
.FC Sincerely
.SG

A comprehensive list of macros available is usually listed in a tmac(5) manual page.[14]

Preprocessors

[edit]

As troff evolved, since there are several things which cannot be done easily in troff, several preprocessors were developed. These programs transform certain parts of a document into troff input, fitting naturally into the use of "pipelines" in Unix — sending the output of one program as the input to another (see pipes and filters). Typically, each preprocessor translates only sections of the input file that are specially marked, passing the rest of the file through unchanged. The embedded preprocessing instructions are written in a simple application-specific programming language, which provides a high degree of power and flexibility.

  • eqn preprocessor allows mathematical formulae to be specified in simple and intuitive manner.[20]
  • tbl is a preprocessor for formatting tables.
  • refer (and the similar program bib) processes citations in a document according to a bibliographic database.

Three preprocessors provide troff with drawing capabilities by defining a domain-specific language for describing the picture.

In addition, there is a command soelim that removes .so inclusion directives from the input text.[24]

A typical structure of the pipeline might be:

soelim file | refer | ideal | pic | tbl | eqn | troff

Yet more preprocessors allow the drawing of more complex pictures by generating output for pic.

Other front-ends

[edit]

Several other front-ends have been developed that are intended to be friendlier interfaces to troff.

One of them is Sanscribe, originally developed at Berkeley and then enhanced during the 1980s by several users including Intel and InterACT. Used for writing memos, reports, documents, Sanscribe is built upon basic troff commands as well as the me macros and various pre- and post-processors such as soelim, eqn, tbl, grap, and pic. However it is a main program binary, not a preprocessor. The conditional inclusion capability renders it especially useful for maintaining multi-platform reference manuals. However, Sanscribe is fragile and prone to giving cryptic errors or producing weirdly formatted results.[28]

A special-purpose front-end is vgrind, which generates nicely formatted source program listings, with such features as putting comments in italics, keywords in bold, and function names highlighted in margins. It can run either as a filter or as a main program with its output being passed to troff. It has support for the languages in use at Bell Labs facilities, including not just Fortran, C, and C++ but also domain-specific tools such as Bourne shell and yacc as well as those further afield such as Emacs Lisp and Icon.[24]

A different approach is employed by the CADiZ suite of tools for the Z notation. Rather than the cadiz program being a preprocessor in the front of the pipeline, it interacts multiple times with troff as both input and output, using saved files rather than a pipe. CADiZ also contains its own set of macros, called .ZA to .ZZ.[29]

See also

[edit]

References

[edit]
  1. ^ Kernighan, B. W. (October 2019). Unix: A History and a Memoir. Kindle Direct Publishing. p. 42. ISBN 9781695978553.
  2. ^ J. F. Ossanna. Nroff/Troff User's Manual. CSTR #54, Bell Labs, 1976. Revised by B. W. Kernighan, 1992.
  3. ^ McIlroy, M. D. (1987). A Research Unix reader: annotated excerpts from the Programmer's Manual, 1971–1986 (PDF) (Technical report). CSTR. Bell Labs. 139.
  4. ^ B. W. Kernighan. A Typesetter-Independent TROFF. CSTR #97, Bell Labs, 1981, revised March 1982.
  5. ^ The Insider's Guide To The Universe (PDF). Charles River Data Systems, Inc. 1983. p. 13.
  6. ^ See the man page of the ditroff -> postscript converter on OpenSolaris: dpost(1) – illumos and OpenSolaris User Commands Reference Manual from latest Sun based OpenSolaris
  7. ^ Emerson, Sandra L.; Paulsell, Karen (1987). Troff Typesetting for UNIX Systems ·. Englewood Cliffs, New Jersey: Prentice-Hall. p. 9.
  8. ^ Gehani, Narain (1992). Document Formatting and Typesetting on the UNIX System (Second ed.). Summit, New Jersey: Silicon Press. pp. 11–12. ISBN 978-0-9615336-2-5.
  9. ^ Lindholm, Stephen. "groff/troff macros: ms, mm, me or mom". ... Retrieved June 3, 2024.
  10. ^ "Writing and Formmating UNIX Manual Pages with -man macros". home.fnal.gov. Retrieved 7 May 2019.
  11. ^ man(7) – Linux Miscellanea Manual
  12. ^ mdoc(7) – FreeBSD Miscellaneous Information Manual
  13. ^ "Index - Mandoc extended documentation". Mandoc. Retrieved 7 May 2019.
  14. ^ a b groff_tmac(5) – Linux File Formats Manual
  15. ^ groff_me(7) – Linux Miscellanea Manual
  16. ^ groff_mm(7) – Linux Miscellanea Manual
  17. ^ groff_ms(7) – Linux Miscellanea Manual
  18. ^ a b c Srinivasan, B. (1993). UNIX Document Processing and Typesetting. Singapore: World Scientific. pp. 11–12. ISBN 978-981-02-0605-5.
  19. ^ Mashey, John (July 18, 2018). Dag Spicer (ed.). "Oral History of John Mashey" (PDF) (Interview). Interviewed by John Markoff. Mountain View, California: Computer History Museum. pp. 27–29, 37. Retrieved May 26, 2024.
  20. ^ B. W. Kernighan and Lorinda L. Cherry. A System for Typesetting Mathematics. CSTR #17, Bell Labs, May 1974.
  21. ^ B. W. Kernighan. PIC — A Graphics Language for Typesetting (Revised User Manual). CSTR #116, Bell Labs, December 1984.
  22. ^ C. J. Van Wyk. IDEAL User's Manual. CSTR #103, Bell Labs, December 1981.
  23. ^ grn — groff preprocessor for gremlin files [1].
  24. ^ a b Robbins, Arnold (1999). UNIX in a Nutshell: A Desktop Quick Reference for System V Release 4 and Solaris 7 (Third ed.). Sebastopol, California: O'Reilly Media. pp. 151, 187–189. ISBN 978-1-56592-427-7.
  25. ^ J. L. Bentley and B. W. Kernighan. GRAP — A Language for Typesetting Graphs (Tutorial and User Manual). CSTR #114, Bell Labs, August 1984.
  26. ^ J. L. Bentley, L. W. Jelinski, and B. W. Kernighan. CHEM — A Program for Typesetting Chemical Structure Diagrams. CSTR #122, Computers and Chemistry, Bell Labs, April 1986.
  27. ^ J. L. Bentley. DFORMAT — A Program for Typesetting Data Formats. CSTR #142, Bell Labs, April 1988.
  28. ^ Sanscribe: User's Guide and Reference (Revision 3.0 ed.). ... January 13, 1989. pp. 1–1, 2–1, 3–2, 6–1.
  29. ^ Jordan, David; McDermid, John A.; Toyn, Ian (1991). Nicholls, J. E. (ed.). CADi – Computer Aided Design in Z. Z User Workshop, Oxford 1990: Proceedings of the Fifth Annual Z User Meeting, Oxford: 17–18 December 1990. Berlin, Heidelberg: Springer-Verlag. pp. 93–104.
[edit]
做什么检查需要空腹 嗜酸性粒细胞偏高是什么意思 梦见老鼠是什么预兆 清肺吃什么好 胆红素高吃什么药
耵聍栓塞是什么意思 养猫需要准备什么东西 解酒喝什么最好 祸水什么意思 俄狄浦斯情结是什么意思
中期唐氏筛查查什么 雪茄为什么不过肺 血小板压积偏高是什么意思 景色奇异的异是什么意思 肠手术后吃什么恢复快
狗狗打疫苗前后要注意什么 突然心慌是什么原因 什么是正装 不痛经说明什么 女人更年期吃什么药调理最好
deep是什么意思xscnpatent.com 葡萄的茎属于什么茎hcv9jop1ns9r.cn 什么是区块链技术hcv8jop8ns2r.cn 造口是什么hcv8jop8ns2r.cn 美国为什么不敢动朝鲜zsyouku.com
经期不能吃什么水果hcv7jop9ns8r.cn 纯阴八字为什么要保密hcv9jop1ns9r.cn 夏天用什么护肤品比较好hcv8jop5ns8r.cn 乳晕是什么hcv9jop0ns1r.cn 子宫内膜病变有什么症状hcv8jop2ns3r.cn
大包子什么馅好吃hcv9jop1ns4r.cn 指甲缝疼是什么原因hcv8jop1ns1r.cn 梦见背死人是什么意思hcv7jop6ns5r.cn 什么是极光hcv8jop0ns9r.cn 一个口一个且念什么字hcv8jop3ns3r.cn
水煮肉片放什么配菜hcv8jop9ns5r.cn 安乐死是什么hcv8jop8ns9r.cn 鲤鱼喜欢吃什么食物hcv7jop6ns3r.cn spf是什么意思hcv7jop5ns2r.cn 火烈鸟为什么是红色的hcv8jop9ns6r.cn
百度