Experimenting with making pretty man pages on paper.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

685 lines
13 KiB

3 years ago
  1. '\" t
  2. .TH TROFF 1 "21 March 2020" "groff 1.22.4"
  3. .SH NAME
  4. troff \- the troff processor of the groff text formatting system
  5. .
  6. .\" troff.man -> troff.1
  7. .
  8. .
  9. .\" ====================================================================
  10. .\" Legal Terms
  11. .\" ====================================================================
  12. .\"
  13. .\" Copyright (C) 1989-2018 Free Software Foundation, Inc.
  14. .\"
  15. .\" This file is part of groff, the GNU roff type-setting system.
  16. .\"
  17. .\" Permission is granted to copy, distribute and/or modify this
  18. .\" document under the terms of the GNU Free Documentation License,
  19. .\" Version 1.3 or any later version published by the Free Software
  20. .\" Foundation; with no Invariant Sections, with no Front-Cover Texts,
  21. .\" and with no Back-Cover Texts.
  22. .\"
  23. .\" A copy of the Free Documentation License is included as a file
  24. .\" called FDL in the main directory of the groff source package.
  25. .\"
  26. .\" A copy of the GNU Free Documentation License is also available in this
  27. .\" Debian package as /usr/share/doc/groff-base/copyright.
  28. .
  29. .
  30. .\" ====================================================================
  31. .SH SYNOPSIS
  32. .\" ====================================================================
  33. .
  34. .SY troff
  35. .OP \-abcivzCERU
  36. .OP \-d cs
  37. .OP \-f fam
  38. .OP \-F dir
  39. .OP \-I dir
  40. .OP \-m name
  41. .OP \-M dir
  42. .OP \-n num
  43. .OP \-o list
  44. .OP \-r cn
  45. .OP \-T name
  46. .OP \-w name
  47. .OP \-W name
  48. .RI [ file
  49. \&.\|.\|.\&]
  50. .YS
  51. .
  52. .
  53. .\" ====================================================================
  54. .SH DESCRIPTION
  55. .\" ====================================================================
  56. .
  57. This manual page describes the GNU version of
  58. .BR troff .
  59. .
  60. It is part of the groff document formatting system.
  61. .
  62. It is functionally compatible with Unix troff, but has many
  63. extensions, see
  64. .BR \%groff_diff (7).
  65. .
  66. Usually it should be invoked using the
  67. .BR groff (1)
  68. command which will also run preprocessors and postprocessors in the
  69. appropriate order and with the appropriate options.
  70. .
  71. .
  72. .\" ====================================================================
  73. .SH OPTIONS
  74. .\" ====================================================================
  75. .
  76. Whitespace is permitted between a command-line option and its argument.
  77. .
  78. .
  79. .TP
  80. .B \-a
  81. Generate an ASCII approximation of the typeset output.
  82. .
  83. .TP
  84. .B \-b
  85. Print a backtrace with each warning or error message.
  86. .
  87. This backtrace should help track down the cause of the error.
  88. .
  89. The line numbers given in the backtrace may not always be correct, for
  90. .BR troff 's
  91. idea of line numbers gets confused by
  92. .B as
  93. or
  94. .B am
  95. requests.
  96. .
  97. .TP
  98. .B \-c
  99. Disable color output (always disabled in compatibility mode).
  100. .
  101. .TP
  102. .B \-C
  103. Enable compatibility mode.
  104. .
  105. .TP
  106. .BI \-d cs
  107. .TQ
  108. .BI \-d name = s
  109. Define
  110. .I c
  111. or
  112. .I name
  113. to be a string
  114. .IR s ;
  115. .I c
  116. must be a one letter name.
  117. .
  118. .TP
  119. .B \-E
  120. Inhibit all error messages of
  121. .BR troff .
  122. .
  123. Note that this doesn't affect messages output to standard error by
  124. macro packages using the
  125. .B tm
  126. or
  127. .B tm1
  128. requests.
  129. .
  130. .TP
  131. .BI \-f fam
  132. Use
  133. .I fam
  134. as the default font family.
  135. .
  136. .TP
  137. .BI \-F dir
  138. Search in directory (or directory path)
  139. .I dir
  140. for subdirectories
  141. .IR dev name
  142. .RI ( name
  143. is the name of the device) and there for the
  144. .I DESC
  145. file and font files.
  146. .
  147. .I dir
  148. is scanned before all other font directories.
  149. .
  150. .TP
  151. .B \-i
  152. Read the standard input after all the named input files have been
  153. processed.
  154. .
  155. .TP
  156. .BI \-I dir
  157. This option may be used to add a directory to the search path for
  158. files (both those on the command line and those named in
  159. .B \&.psbb
  160. requests).
  161. .
  162. The search path is initialized with the current directory.
  163. .
  164. This option may be specified more than once; the directories are then
  165. searched in the order specified (but before the current directory).
  166. .
  167. If you want to make the current directory be read before other
  168. directories, add
  169. .B \-I.\&
  170. at the appropriate place.
  171. .
  172. .IP
  173. No directory search is performed for files with an absolute file name.
  174. .
  175. .TP
  176. .BI \-m name
  177. Read in the file
  178. .RI name .tmac .
  179. .
  180. If it isn't found, try
  181. .IR tmac. name
  182. instead.
  183. .
  184. It will be first searched for in directories given with the
  185. .B \-M
  186. command-line option, then in directories given in the
  187. .I GROFF_TMAC_PATH
  188. environment variable, then in the current directory (only if in unsafe
  189. mode), the home directory,
  190. .IR /usr/\:lib/\:groff/\:site\-tmac ,
  191. .IR /usr/\:share/\:groff/\:site\-tmac ,
  192. and
  193. .IR /usr/\:share/\:groff/\:1.22.4/\:tmac .
  194. .
  195. .TP
  196. .BI \-M dir
  197. Search directory (or directory path)
  198. .I dir
  199. for macro files.
  200. .
  201. This is scanned before all other macro directories.
  202. .
  203. .TP
  204. .BI \-n num
  205. Number the first page
  206. .IR num .
  207. .
  208. .TP
  209. .BI \-o list
  210. Output only pages in
  211. .IR list ,
  212. which is a comma-separated list of page ranges;
  213. .I n
  214. means print page
  215. .IR n ,
  216. .IB m \- n
  217. means print every page between
  218. .I m
  219. and
  220. .IR n ,
  221. .BI \- n
  222. means print every page up to
  223. .IR n ,
  224. .IB n \-
  225. means print every page from
  226. .IR n .
  227. .
  228. .B troff
  229. will exit after printing the last page in the list.
  230. .
  231. .TP
  232. .BI \-r cn
  233. .TQ
  234. .BI \-r name = n
  235. Set number register
  236. .I c
  237. or
  238. .I name
  239. to
  240. .IR n ;
  241. .I c
  242. must be a one character name;
  243. .I n
  244. can be any troff numeric expression.
  245. .
  246. .TP
  247. .B \-R
  248. Don't load
  249. .I troffrc
  250. and
  251. .IR troffrc\-end .
  252. .
  253. .TP
  254. .BI \-T name
  255. Prepare output for device
  256. .IR name ,
  257. rather than the default
  258. .BR ps ;
  259. see
  260. .BR groff (1)
  261. for a more detailed description.
  262. .
  263. .TP
  264. .B \-U
  265. Unsafe mode.
  266. .
  267. This will enable the following requests:
  268. .BR open ,
  269. .BR opena ,
  270. .BR pso ,
  271. .BR sy ,
  272. and
  273. .BR pi .
  274. For security reasons, these potentially dangerous requests are
  275. disabled otherwise.
  276. .
  277. It will also add the current directory to the macro search path.
  278. .
  279. .TP
  280. .B \-v
  281. Print the version number.
  282. .
  283. .TP
  284. .BI \-w name
  285. Enable warning
  286. .IR name .
  287. .
  288. Available warnings are described in section \(lqWarnings\(rq below.
  289. .
  290. To enable most useful warnings use
  291. .B \-w
  292. .BR all .
  293. To enable absolutely all warnings use
  294. .B \-w w
  295. instead.
  296. Multiple
  297. .B \-w
  298. options are allowed.
  299. .
  300. .TP
  301. .BI \-W name
  302. Inhibit warning
  303. .IR name .
  304. .
  305. Multiple
  306. .B \-W
  307. options are allowed.
  308. .
  309. .TP
  310. .B \-z
  311. Suppress formatted output.
  312. .
  313. .
  314. .\" ====================================================================
  315. .SH WARNINGS
  316. .\" ====================================================================
  317. .
  318. The warnings that can be given by
  319. .B troff
  320. are divided into the following categories.
  321. .
  322. The name associated with each warning is used by the
  323. .B \-w
  324. and
  325. .B \-W
  326. options; the number is used by the
  327. .B warn
  328. request, and by the
  329. .B .warn
  330. register; it is always a power of 2 to allow bitwise composition.
  331. .
  332. .P
  333. .TS
  334. tab(@), center, box;
  335. c c c | c c c
  336. r rI lB | r rI lB.
  337. Bit@Code@Warning@Bit@Code@Warning
  338. _
  339. 0@1@char@10@1024@reg
  340. 1@2@number@11@2048@tab
  341. 2@4@break@12@4096@right-brace
  342. 3@8@delim@13@8192@missing
  343. 4@16@el@14@16384@input
  344. 5@32@scale@15@32768@escape
  345. 6@64@range@16@65536@space
  346. 7@128@syntax@17@131072@font
  347. 8@256@di@18@262144@ig
  348. 9@512@mac@19@524288@color
  349. @@@20@1048576@file
  350. .TE
  351. .
  352. .P
  353. .nr x \w'\fBright-brace'+1n+\w'00000'u
  354. .ta \nxuR
  355. .
  356. .TP \nxu+3n
  357. .BR break "\t4"
  358. In fill mode, lines which could not be broken so that their length was
  359. less than the line length.
  360. .
  361. This is enabled by default.
  362. .
  363. .TP
  364. .BR char "\t1"
  365. Non-existent characters.
  366. .
  367. This is enabled by default.
  368. .
  369. .TP
  370. .BR color "\t524288"
  371. Color-related warnings.
  372. .
  373. .TP
  374. .BR delim "\t8"
  375. Missing or mismatched closing delimiters.
  376. .
  377. .TP
  378. .BR di "\t256"
  379. Use of
  380. .B di
  381. or
  382. .B da
  383. without an argument when there is no current diversion.
  384. .
  385. .TP
  386. .BR el "\t16"
  387. Use of the
  388. .B el
  389. request with no matching
  390. .B ie
  391. request.
  392. .
  393. .TP
  394. .BR escape "\t32768"
  395. Unrecognized escape sequences.
  396. .
  397. When an unrecognized escape sequence is encountered, the escape
  398. character is ignored.
  399. .
  400. .TP
  401. .BR file "\t1048576"
  402. Indicates a missing file for the
  403. .B mso
  404. request.
  405. .
  406. Enabled by default.
  407. .
  408. .TP
  409. .BR font "\t131072"
  410. Non-existent fonts.
  411. .
  412. This is enabled by default.
  413. .
  414. .TP
  415. .BR ig "\t262144"
  416. Invalid escapes in text ignored with the
  417. .B ig
  418. request.
  419. .
  420. These are conditions that are errors when they do not occur in ignored
  421. text.
  422. .
  423. .TP
  424. .BR input "\t16384"
  425. Invalid input characters.
  426. .
  427. .TP
  428. .BR mac "\t512"
  429. Use of undefined strings, macros and diversions.
  430. .
  431. When an undefined string, macro or diversion is used, that string is
  432. automatically defined as empty.
  433. .
  434. So, in most cases, at most one warning will be given for each name.
  435. .
  436. .TP
  437. .BR missing "\t8192"
  438. Requests that are missing non-optional arguments.
  439. .
  440. .TP
  441. .BR number "\t2"
  442. Invalid numeric expressions.
  443. .
  444. This is enabled by default.
  445. .
  446. .TP
  447. .BR range "\t64"
  448. Out of range arguments.
  449. .
  450. .TP
  451. .BR reg "\t1024"
  452. Use of undefined number registers.
  453. .
  454. When an undefined number register is used, that register is
  455. automatically defined to have a value of\~0.
  456. .
  457. So, in most cases, at most one warning will be given for use of a
  458. particular name.
  459. .
  460. .TP
  461. .BR right-brace "\t4096"
  462. Use of
  463. .B \(rs}
  464. where a number was expected.
  465. .
  466. .TP
  467. .BR scale "\t32"
  468. Meaningless scaling indicators.
  469. .
  470. .TP
  471. .BR space "\t65536"
  472. Missing space between a request or macro and its argument.
  473. .
  474. This warning will be given when an undefined name longer than two
  475. characters is encountered, and the first two characters of the name
  476. make a defined name.
  477. .
  478. The request or macro will not be invoked.
  479. .
  480. When this warning is given, no macro is automatically defined.
  481. .
  482. This is enabled by default.
  483. .
  484. This warning will never occur in compatibility mode.
  485. .
  486. .TP
  487. .BR syntax "\t128"
  488. Dubious syntax in numeric expressions.
  489. .
  490. .TP
  491. .BR tab "\t2048"
  492. Inappropriate use of a tab character.
  493. .
  494. Either use of a tab character where a number was expected, or use of tab
  495. character in an unquoted macro argument.
  496. .
  497. .P
  498. There are also names that can be used to refer to groups of warnings:
  499. .
  500. .TP
  501. .B all
  502. All warnings except
  503. .BR di ,
  504. .BR mac ,
  505. and
  506. .BR reg .
  507. .
  508. It is intended that this covers all warnings that are useful with
  509. traditional macro packages.
  510. .
  511. .TP
  512. .B w
  513. All warnings.
  514. .
  515. .
  516. .\" ====================================================================
  517. .SH ENVIRONMENT
  518. .\" ====================================================================
  519. .
  520. .TP
  521. .I GROFF_TMAC_PATH
  522. A colon separated list of directories in which to search for
  523. macro files.
  524. .
  525. .B troff
  526. will scan directories given in the
  527. .B \-M
  528. option before these, and in standard directories (current directory if
  529. in unsafe mode, home directory,
  530. .IR /usr/\:lib/\:groff/\:site\-tmac ,
  531. .IR /usr/\:share/\:groff/\:site\-tmac ,
  532. .IR /usr/\:share/\:groff/\:1.22.4/\:tmac )
  533. after these.
  534. .
  535. .TP
  536. .I GROFF_TYPESETTER
  537. Default device.
  538. .
  539. .TP
  540. .I GROFF_FONT_PATH
  541. A colon separated list of directories in which to search for the
  542. .IR dev name
  543. directory.
  544. .
  545. .B troff
  546. will scan directories given in the
  547. .B \-F
  548. option before these, and in standard directories
  549. .RI ( /usr/\:share/\:groff/\:site\-font ,
  550. .IR /usr/\:share/\:groff/\:1.22.4/\:font ,
  551. .IR /usr/\:lib/\:font )
  552. after these.
  553. .
  554. .
  555. .\" ====================================================================
  556. .SH FILES
  557. .\" ====================================================================
  558. .
  559. .TP
  560. .I /usr/\:share/\:groff/\:1.22.4/\:tmac/troffrc
  561. Initialization file (called before any other macro package).
  562. .
  563. .TP
  564. .I /usr/\:share/\:groff/\:1.22.4/\:tmac/troffrc\-end
  565. Initialization file (called after any other macro package).
  566. .
  567. .TP
  568. .IR /usr/\:share/\:groff/\:1.22.4/\:tmac/ name .tmac
  569. .TQ
  570. .IR /usr/\:share/\:groff/\:1.22.4/\:tmac/tmac. name
  571. Macro files
  572. .
  573. .TP
  574. .IR /usr/\:share/\:groff/\:1.22.4/\:font/dev name /DESC
  575. Device description file for device
  576. .IR name .
  577. .
  578. .TP
  579. .IR /usr/\:share/\:groff/\:1.22.4/\:font/dev name / F
  580. Font file for font
  581. .I F
  582. of device
  583. .IR name .
  584. .
  585. .
  586. .P
  587. Note that
  588. .I troffrc
  589. and
  590. .I troffrc\-end
  591. are searched for neither in the current nor the home directory by
  592. default for security reasons (even if the
  593. .B \-U
  594. option is given).
  595. .
  596. Use the
  597. .B \-M
  598. command-line option or the
  599. .I GROFF_TMAC_PATH
  600. environment variable to add these directories to the search path if
  601. necessary.
  602. .
  603. .
  604. .\" ====================================================================
  605. .SH AUTHORS
  606. .\" ====================================================================
  607. .
  608. The GNU version of
  609. .I troff
  610. was originally written by James Clark;
  611. he also wrote the original version of this document,
  612. which was modified by
  613. .MT wl@\:gnu.org
  614. Werner Lemberg
  615. .ME
  616. and
  617. .MT groff\-bernd.warken\-72@\:web.de
  618. Bernd Warken
  619. .ME .
  620. .
  621. .
  622. .\" ====================================================================
  623. .SH "SEE ALSO"
  624. .\" ====================================================================
  625. .
  626. .TP
  627. .BR groff (1)
  628. The main program of the
  629. .I groff
  630. system, a wrapper around
  631. .IR troff .
  632. .
  633. .TP
  634. .BR groff (7)
  635. A description of the
  636. .I groff
  637. language, including a short but complete reference of all predefined
  638. requests, registers, and escapes of plain
  639. .IR groff .
  640. .
  641. From the command line, this is called by
  642. .RS
  643. .IP
  644. .B man 7 groff
  645. .RE
  646. .
  647. .TP
  648. .BR \%groff_diff (7)
  649. The differences of the
  650. .I groff
  651. language and the
  652. .I classical troff
  653. language.
  654. .
  655. Currently, this is the most actual document of the
  656. .I groff
  657. system.
  658. .
  659. .TP
  660. .BR roff (7)
  661. An overview over
  662. .I groff
  663. and other
  664. .I roff
  665. systems, including pointers to further related documentation.
  666. .
  667. .
  668. .P
  669. .IR "Groff: The GNU Implementation of troff" ,
  670. by Trent A.\& Fisher and Werner Lemberg,
  671. is the primary
  672. .I groff
  673. manual.
  674. .
  675. You can browse it interactively with \(lqinfo groff\(rq.
  676. .
  677. .
  678. .\" ====================================================================
  679. .\" Emacs variables
  680. .\" ====================================================================
  681. .
  682. .\" Local Variables:
  683. .\" mode: nroff
  684. .\" End:
  685. .\" vim: set filetype=groff: