summaryrefslogtreecommitdiffstats
path: root/roff.7
Commit message (Collapse)AuthorAgeFilesLines
* Two new low-level roff(7) features:Ingo Schwarze2018-04-101-3/+17
| | | | | | * .nr optional third argument (auto-increment step size) * \n+ and \n- numerical register auto-increment and -decrement bentley@ reported on Dec 9, 2013 that lang/sbcl(1) uses these.
* typo; from Alexander Kuleshov <kuleshovmail at gmail dot com>Ingo Schwarze2017-12-151-1/+1
|
* nits about trailing punctuation found with mandoc -TlintIngo Schwarze2017-07-051-14/+14
|
* implement so-called absolute horizontal motion: \h'|...',Ingo Schwarze2017-06-141-2/+5
| | | | used for example by zoem(1)
* Naive implementation of the roff(7) .po (page offset) request.Ingo Schwarze2017-06-141-2/+9
| | | | | | This clearly works when .po is called on the top level, but might not be sophisticated enough if people call .po inside indentation-changing contexts, but i haven't seen that in manual pages (yet :).
* simple implementation of the roff(7) .als (macro alias) request,Ingo Schwarze2017-06-141-1/+0
| | | | sufficient for pages using po4a(1)
* implement the roff(7) d (macro or string defined) conditionalIngo Schwarze2017-06-141-2/+9
|
* implement roff(7) .rj (right justify) requestIngo Schwarze2017-06-141-1/+3
|
* implement the roff(7) \p (break output line) escape sequenceIngo Schwarze2017-06-141-0/+2
|
* minor markup simplificationsIngo Schwarze2017-06-101-1/+1
|
* Implement the roff(7) .rn (rename macro or string) request.Ingo Schwarze2017-06-071-2/+11
| | | | | | | | | | Renaming a user-defined macro is very simple: just copy the definition to the new name and delete the old name. Renaming high-level macros is a bit tricky: use a dedicated key-value-table, with non-standard names as keys and standard names as values. When a macro is found that is not user-defined, look it up in the "renamed" table and translate it back to the standard name before passing it on to the high-level parsers.
* document the new .ce implementationIngo Schwarze2017-06-061-1/+4
|
* Implement the roff(7) .mc (right margin character) request.Ingo Schwarze2017-06-041-1/+3
| | | | | | The Tcl/Tk manual pages use this extensively. Delete the TERM_MAXMARGIN hack, it breaks .mc inside .nf; instead, implement a proper TERMP_BRNEVER flag.
* Pure preprocessor implementation of the roff(7) .ec and .eo requestsIngo Schwarze2017-06-041-3/+5
| | | | | | | | | | | | | | | | | (escape character control), touching nothing after the preprocessing stage and keeping even the state variable local to the preprocessor. Since the escape character is also used for line continuation, this requires pulling the implementation of line continuation from the input reader to the preprocessor, which also considerably shortens the code required for that. When the escape character is changed, simply let the preprocessor replace bare by escaped backslashes and instances of the non-standard escape character with bare backslashes - that's all we need. Oh, and if anybody dares to use these requests in OpenBSD manuals, sending a medium-sized pack of axe-murderers after them might be a worthwhile part of the punishment, but probably insuffient on its own.
* Partial implementation of \h (horizontal line drawing function).Ingo Schwarze2017-06-021-3/+5
| | | | | | | | | | | A full implementation would require access to output device properties and state variables (both only available after the main parser has finalized the parse tree) before numerical expansions in the roff preprocessor (i.e., before the main parser is even started). Not trying to pull that stunt right now because the static-width implementation committed here is sufficient for tcl-style manual pages and already more complicated than i would have suspected.
* Minimal implementation of the \h (horizontal motion) escape sequence.Ingo Schwarze2017-06-011-3/+4
| | | | Good enough to cope with the average DocBook insanity.
* Basic implementation of the roff(7) .ti (temporary indent) request.Ingo Schwarze2017-05-081-4/+10
| | | | Needed by about four dozen ports (thanks to naddy@ for the research).
* Convert REQUEST REFERENCE from using .Ss to .Bl -tag, allowing toIngo Schwarze2017-05-081-428/+413
| | | | | specify request arguments and supporting tag searching in less(1). Improve some entries and document .ta.
* Shorten the description of .sp and move it to roff(7).Ingo Schwarze2017-05-051-0/+10
| | | | | If is not a macro but a low-level roff request and not recommended for use in manual pages.
* Clean up docs after today's .br and .ft code cleanup; simpler.Ingo Schwarze2017-05-051-8/+2
|
* fix spelling error;Ingo Schwarze2017-02-211-1/+1
| | | | found by Michael <Stapelberg at debian dot org> with Lintian
* typos; found and fixed by sobrado@Ingo Schwarze2015-09-241-5/+5
|
* Parse and ignore the escape sequences \, and \/ (italic corrections).Ingo Schwarze2015-08-291-1/+7
| | | | | | | | Actually using these is very stupid because they are groff extensions and other roff(7) implementations typically print unintended characters at the places where they are used. Nevertheless, some manuals contain them, for example ocserv(8). Problem reported by Kurt Jaeger <pi at FreeBSD>.
* Implement the escape sequence \\$*, expanding to all argumentsIngo Schwarze2015-08-291-0/+2
| | | | | | of the current user-defined macro. This is another missing feature required for ocserv(8). Problem reported by Kurt Jaeger <pi at FreeBSD>.
* Implement the roff(7) `r' (register exists) conditional.Ingo Schwarze2015-05-311-2/+5
| | | | | Missing feature found by Markus <Waldeck at gmx dot de> in Debian's bash(1) manual page.
* Replace the kludge for the \z escape sequence by an actualIngo Schwarze2015-04-291-4/+1
| | | | | | | | implementation. As a side effect, minus ten lines of code. As another side effect, this also fixes the assertion failure that used to be triggered by "\z\o'ab'c" at the beginning of an output line, found by jsg@ with afl (test case 022/Apr27).
* Let .it accept numerical expressions, not just numerical constants.Ingo Schwarze2015-02-171-4/+9
| | | | | | | For .it, ignore scaling units in roff_getnum(). Inside parentheses, skip whitespace after a sign in roff_getnum(). Parse and ignore unary plus in roff_getnum(). As a bonus, get rid of the only call to mandoc_strntoi() in roff.c.
* Radical cleanup of COMPATIBILITY sections:Ingo Schwarze2015-01-291-30/+46
| | | | | | | | Remove lots of lies, dozens of irrelevant implementation details, and all references to groff versions older than 1.17. Move relevant information to the pages where it belongs, and out of mandoc(1) in particular. Add some missing general remarks to roff(7), where it fits the character and purpose of the page much better.
* While ignoring the .ta (set tab stops) and .ti (temp indent) requestsIngo Schwarze2015-01-231-4/+4
| | | | | | is sometimes harmless, it often causes seriously ugly output, so flag these requests as unsupported rather than ignoring them. Discussed with naddy@.
* Wonders of roff(7): Integer numbers in numerical expressions can carryIngo Schwarze2015-01-231-0/+8
| | | | | scaling units, and some manuals (e.g. in devel/grcs) actually use that, so let's support it. Missing feature reported by naddy@.
* improve wording; patch from jmc@Ingo Schwarze2015-01-221-1/+1
|
* Rudimentary implementation of the roff(7) \o escape sequence (overstrike).Ingo Schwarze2015-01-211-4/+5
| | | | | | This is of some relevance because the pod2man(1) preamble abuses it for the icelandic letter Thorn, instead of simply using \(TP and \(Tp. Missing feature found by sthen@ in DateTime::Locale::is_IS(3p).
* typo fixes from jmc@Ingo Schwarze2015-01-201-3/+3
|
* Split the -Werror message level into -Werror (broken manual, probablyIngo Schwarze2015-01-201-53/+723
| | | | | | | | | | | | | using mandoc is better than using groff) and -Wunsupp (manual using unsupported low-level roff(7) feature, probably using groff is better than using mandoc). Once this feature is complete, it is intended to help porting, making the decision whether to USE_GROFF easier. As a first step, distinguish four classes of roff(7) requests: 1. Supported (currently 24 requests) 2. Currently ignored because unimportant (120) -> no message 3. Ignored for good because insecure (14) -> -Werror 4. Currently unsupported (68) -> these trigger the new -Wunsupp messages
* change spelling of centre to center: consistent with other man pagesIngo Schwarze2015-01-201-1/+1
| | | | and the name of the syntax elements being described; from tedu@
* Reduce memory and time consumption on certain malformed input filesIngo Schwarze2014-12-251-2/+4
| | | | | | by limiting the length of expanded input lines during the (usually recursive) expansion of user defined strings. Resource hogging found by jsg@ with afl.
* Fix the implementation and documentation of \c (continue text input line).Ingo Schwarze2014-12-021-2/+4
| | | | | In particular, make it work in no-fill mode, too. Reminded by Carsten dot Kunze at arcor dot de (Heirloom roff).
* Support the ".if v" conditional operator (vroff mode, always false)Ingo Schwarze2014-11-191-1/+3
| | | | | | | for groff compatibility because pod2man(1) uses it that way. Weirdly, groff documents it as "for compatibility with other troff versions" but neither Heirloom nor Plan 9 have it. Issue reported by giovanni@ via sthen@.
* Parse and ignore the .pl (page length) request;Ingo Schwarze2014-09-071-0/+5
| | | | Daniel Levai reports that Slackware Linux uses this.
* remove double word; from jmc@Ingo Schwarze2014-08-141-1/+1
|
* Begin cleaning up scaling units.Kristaps Dzonsons2014-08-131-3/+9
| | | | | | | | | Start with the horizontal terminal specifiers, making sure that they match up with troff. Then move on to PS, PDF, and HTML, noting that we stick to the terminal default width for "u". Lastly, fix some completely-wrong documentation and note that we diverge from troff w/r/t "u".
* implement .dei and .amiIngo Schwarze2014-07-071-12/+13
|
* Fully implement the \B (validate numerical expression) andIngo Schwarze2014-04-081-6/+15
| | | | | | | | | | | partially implement the \w (measure text width) escape sequence in a way that makes them usable in numerical expressions and in conditional requests, similar to how \n (interpolate number register) and \* (expand user-defined string) are implemented. This lets mandoc(1) handle the baroque low-level roff code found at the beginning of the ggrep(1) manual. Thanks to pascal@ for the report.
* Almost complete implementation of roff(7) numerical expressions.Ingo Schwarze2014-04-071-16/+79
| | | | | | | Support all binary operators except ';' (scale conversion). Fully support chained operations and nested parentheses. Use this for the .nr, .if, and .ie requests. While here, fix parsing of integer numbers in roff_getnum().
* Implement the roff(7) .rr (remove register) request.Ingo Schwarze2014-04-051-6/+10
| | | | | As reported by sthen@, the perl-5.18 pod2man(1) preamble thinks cool kids use that in manuals. I hope *you* know better.
* Support relative arguments to .ll (increase or decrease line length).Ingo Schwarze2014-03-301-1/+3
|
* Implement the roff(7) .ll (line length) request.Ingo Schwarze2014-03-301-0/+15
| | | | | Found by naddy@ in the textproc/enchant(1) port. Of course, do not use this in new manuals.
* sync to OpenBSD: .ft is a roff(7) request, not a man(7) macro,Ingo Schwarze2014-03-171-0/+28
| | | | and it is not even used frequently in man(7)
* Improve .if/.ie condition handling.Ingo Schwarze2014-03-081-39/+70
| | | | | | | | | | | | | | * Support string comparisons. * Support negation not only for numerical, but for all conditions. * Switch the `o' condition from false to true. * Handle the `c', `d', and `r' conditions as false for now. * Use int for boolean data instead of rolling our own "enum roffrule"; needed such that we can use the standard ! and == operators. Havard Eidnes reported via the NetBSD bug tracking system that some Tcl*(3) manuals need this, and Thomas Klausner <wiz at NetBSD> forwarded the report to me. This doesn't make the crazy Tcl*(3) macrology maze happy yet, but brings us a bit closer.
* document .as and .ceIngo Schwarze2014-02-141-1/+13
|