summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mandoc.1
AgeCommit message (Collapse)Author
2018-08-23Implement the roff(7) .shift and .return requests,Ingo Schwarze
for example used by groff_hdtbl(7) and groff_mom(7). Also correctly interpolate arguments during nested macro execution even after .shift and .return, implemented using a stack of argument arrays. Note that only read.c, but not roff.c can detect the end of a macro execution, and the existence of .shift implies that arguments cannot be interpolated up front, so unfortunately, this includes a partial revert of roff.c rev. 1.209, moving argument interpolation back into the function roff_res().
2018-07-28Issue a STYLE message when normalizing the date format in .Dd/.TH.Ingo Schwarze
Leah Neukirchen pointed out that mdoclint(1) used to warn about a leading zero before the day number, so we know that both NetBSD and Void Linux want the message. It does no harm on OpenBSD because Mdocdate always does the right thing anyway. jmc@ agrees that it makes sense in contexts not using Mdocdate.
2018-05-03Minor correction: we render HTML character references hexadecimal,Ingo Schwarze
not decimal; bentley@ changed that in html.c on July 14, 2017.
2018-04-29Simpler description of output formats, shortening the manual page by 15 lines.Ingo Schwarze
Avoid the double redirection from -Tutf8 via -Tlocale to -Tascii. Add LC_CTYPE to the ENVIRONMENT section. While here, also correct a few inaccuracies and tweak some wordings. Triggered by a question from Laura Morales <lauretas at mail dot com>.
2018-04-13Use TIOCGWINSZ to reduce the default -Owidth during interactive useIngo Schwarze
on terminals narrower than 79 columns and the default -Oindent on terminals narrower than 66 columns. Requested by and feedback from pirofti@; mpi@ and juanfra@ also like the general direction.
2018-03-16Style message about bad input encoding of em-dashes as -- instead of \(em.Ingo Schwarze
Suggested by Thomas Klausner <wiz at NetBSD>; discussed with jmc@.
2017-11-28duplicate word, found by igor(1)Ingo Schwarze
2017-11-10Be less assertive when warning about a possible typo.Jeremie Courreges-Anglas
ok schwarze@ "good compromise" jmc@
2017-09-07typo: convertion -> conventionDavid Coppa
OK schwarze@
2017-08-19document -O mdoc; triggered by a question from jmc@ and OK jmc@Ingo Schwarze
2017-07-20For -Tlint, put parser messages on stdout instead of stderr.Ingo Schwarze
Originally, naddy@ requested this in 2011 (or maybe even earlier). It was discussed with joerg@, kristaps@, naddy@, and espie@ in 2011, and everybody agreed in principle, but it was postponed because kristaps@ wanted to do some cleanup of the message system first. Meanwhile, message infrastructure was improved about a dozen times... This makes long, tedious commands like "mandoc -Tlint *.1 2>&1 | less" unnecessary and allows simple ones like "man -l -Tlint *.1".
2017-07-07Radically simplify the definitions what the message levels ERRORIngo Schwarze
and WARNING mean: minus 20 lines of mdoc source. OK jmc@.
2017-07-06Now that we have the -Wstyle message level, downgrade six warningsIngo Schwarze
that are not syntax mistakes and that do not cause wrong formatting or content to style suggestions. Also upgrade two warnings that may cause information loss to errors.
2017-07-04Printing "BASE:" in messages about violations of base system conventionsIngo Schwarze
is confusing, simply print "STYLE:", which is intuitive and does not sound excessively alarming; suggested by jmc@, OK tedu@ jmc@.
2017-07-03report trailing delimiters after macros where they are usually a mistake;Ingo Schwarze
the idea came up in a discussion with Thomas Klausner <wiz at NetBSD>
2017-07-03warn about time machines; suggested by Thomas Klausner <wiz @ NetBSD>Ingo Schwarze
2017-07-02add warning "cross reference to self"; inspired by mdoclintIngo Schwarze
2017-07-01Basic reporting of .Xrs to manual pages that don't existIngo Schwarze
in the base system, inspired by mdoclint(1). We are able to do this because (1) the -mdoc parser, the -Tlint validator, and the man(1) manual page lookup code are all in the same program and (2) the mandoc.db(5) database format allows fast lookup. Feedback from, previous versions tested by, and OK jmc@. A few features will be added to this in the tree, step by step.
2017-06-29warn about some non-portable idioms in .Bl -column;Ingo Schwarze
triggered by a question from Yuri Pankov (illumos)
2017-06-27warn about .Ns macros that have no effect because they are followedIngo Schwarze
by an isolated closing delimiter; inspired by mdoclint
2017-06-25Catch typos in .Sh names; suggested by jmc@.Ingo Schwarze
I'm using a very simple, linear time / zero space fuzzy string matching heuristic rather than a full Levenshtein metric, to keep the code both simple and fast.
2017-06-25Add support for the MT and ME mailto macros, used for example in wg(8).Anthony J. Bentley
feedback and ok schwarze@
2017-06-24delete useless .Ns macro that jmc@ found with mdoclint(1)Ingo Schwarze
2017-06-24document message "unknown architecture"Ingo Schwarze
2017-06-24in the base system, suggest leaving .Os blank; inspired by mdoclintIngo Schwarze
2017-06-24Split -Wstyle into -Wstyle and the even lower -Wbase, and addIngo Schwarze
-Wopenbsd and -Wnetbsd to check conventions for the base system of a specific operating system. Mark operating system specific messages with "(OpenBSD)" at the end. Please use just "-Tlint" to check base system manuals (defaulting to -Wall, which is now -Wbase), but prefer "-Tlint -Wstyle" for the manuals of portable software projects you maintain that are not part of OpenBSD base, to avoid bogus recommendations about base system conventions that do not apply. Issue originally reported by semarie@, solution using an idea from tedu@, discussed with jmc@ and jca@.
2017-06-17style message about duplicate RCS ids; inspired by mdoclintIngo Schwarze
2017-06-17style message about missing RCS ids; inspired by mdoclintIngo Schwarze
2017-06-13Delete the arbitrary range restriction for -Owidth.Ingo Schwarze
We provide users with tools. We don't attempt to prevent them from using them in stupid ways: depending on the context, not every stupid-looking use is necessarily actually stupid, and not every stupidity can be automatically detected anyway, so don't even try.
2017-06-11style message about missing .Fn markup; inspired by mdoclintIngo Schwarze
2017-06-10style message about missing blank before trailing delimiter;Ingo Schwarze
inspired by mdoclint(1), and jmc@ considers it useful
2017-06-08Portable mandoc just got a warning about unknown .Lb namesIngo Schwarze
which we don't want in OpenBSD, but let's keep the message table and the manual page in sync.
2017-06-07style checks related to .Er; inspired by mdoclint(1)Ingo Schwarze
2017-06-06Minimal implementation of the roff(7) .ce request (center a numberIngo Schwarze
of input lines without filling). Contrary to groff, high-level macros abort .ce mode for now.
2017-06-03enable -Wstyle by default in -Tlint; OK jmc@Ingo Schwarze
2017-06-01STYLE message about full stop at the end of .Nd; inspired by mdoclint(1)Ingo Schwarze
2017-05-31STYLE message about missing use of Ox/Nx/Fx/Dx; OK jmc@ wiz@Ingo Schwarze
2017-05-30tweak previous;Jason McIntyre
2017-05-30STYLE message about useless macros we don't want (Bt Tn Ud);Ingo Schwarze
not a WARNING because they don't endanger portability
2017-05-17Delete the -T xhtml command line option.Ingo Schwarze
It has been obsolete for more than two years. Use -T html.
2017-05-17Modernize an example showing antiquated syntax,Ingo Schwarze
and delete an example showing the arcane -W stop option.
2017-05-16missing space between macro arg and punctuation;Jason McIntyre
2017-05-16Introduce a new mandoc(1) message level, -W style, below -W warning.Ingo Schwarze
Switch -W all from meaning -W warning to meaning -W style. The meaning of -T lint does *not* change, it still implies -W warning. No messages on the new level yet, but they will come. Usually, i do not lightly make the user interface larger. But this has been planned for years, and EXIT STATUS 1 was reserved for it all the time. The message system is now stable enough to finally implement it. jmc@ regarding the concept: "really good idea"
2017-03-27simplify the SYNOPSIS as well, just like the option lists;Ingo Schwarze
suggested by and OK jmc@
2017-03-27For some options that are rarely needed in mandoc(1),Ingo Schwarze
delete the descriptions and point to man(1) instead. Inspired by apropos.1 rev. 1.35.
2017-03-27Simplify: mention at one place that -fkl override each other,Ingo Schwarze
rather than stating it separately for each option. Suggested, OKed, and tweaked by jmc@.
2017-03-21simplify .Nd; to display manuals, use man(1) instead;Ingo Schwarze
OK jmc@
2017-03-20Silently ignore invalid -m input formats rather than erroring out.Ingo Schwarze
As observed by Jan Stary <hans at stare dot cz>, this is useful such that after 'alias man="man -m $HOME/man"', 'man -l foo.1' still works. Simplify and shorten the description of -m, and use .Ic for macros.
2017-03-18Correct description of MANPATH, and a few more improvementsIngo Schwarze
to the ENVIRONMENT section; OK jmc@
2017-03-08Document that -T markdown produces ASCII output, and the impliedIngo Schwarze
limitations. Of course, we could write UTF-8 output instead, but even the CommonMark specification doesn't require parsers to support that, so portability would be doubtful. While here, provide a link to the CommonMark specification.