summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mandoc.1
AgeCommit message (Collapse)Author
2021-04-04fix spacing issue in macro;Jason McIntyre
2020-09-01Ignore unreasonably large spacing modifiers in tbl layouts.Ingo Schwarze
Jan Schreiber <jes at posteo dot de> ran afl on mandoc and it turned out mandoc tried to use spacing modifiers so large that they would trigger assertion failures in term_ascii.c, function locale_advance().
2020-08-27Remove a lie reported by Jamie Landeg-Jones <jamie at catflap dot org>:Ingo Schwarze
The times when -T man may have expanded .so requests are long gone, nor would such a feature be useful. Use soelim(1) if you need that.
2020-08-27Make it more explicit that the statement "-O tag does not work with less(1)"Ingo Schwarze
only applies to -T html output mode, and why. Of course, -O tag works just fine with less(1) in the -T ascii and -T utf8 output modes. Potential for confusion pointed out by Ian Ropers.
2020-07-20as jmc@ points out, i missed a few instances of .Xr more 1Ingo Schwarze
2020-07-20Switch the default pager from "more -s" to "less".Ingo Schwarze
POSIX explicitly allows using a different default pager if that is documented. The pager provided in the OpenBSD base system is less(1). It can merely be called as more(1) for compatibility. Our man(1) implementation uses less(1) features that traditional more(1) did not provide, in particular tagging. Besides, as noted by deraadt@, the user interface of less(1) is slightly more refined and preferable over the user inferface of more(1). This switch was originally suggested by Ian Ropers. As explained by jmc@ and deraadt@, the -s flag was added a very long time ago when an antique version of groff(1) had an annoying bug in terminal output that would randomly display blank lines in the middle of pages. Clearly, -s has no longer been needed for many years, so drop it from the default pager invocation. OK deraadt@ jmc@ martijn@ job@
2020-06-15document -T html -O tag as implemented in main.c rev. 1.253Ingo Schwarze
2020-04-24provide a STYLE message when mandoc knows the file name and the extensionIngo Schwarze
disagrees with the section number given in the .Dt or .TH macro; feature suggested and patch tested by jmc@
2020-02-15mention that -T man does not support eqn(7) and tbl(7);Ingo Schwarze
triggered by a question from Stephen Gregoratto <dev at sgregoratto dot me>
2020-01-19Align to the new, sane behaviour of the groff_mdoc(7) .Dd macro:Ingo Schwarze
without an argument, use the empty string, and always concatenate all arguments, no matter their number. This allows reducing the number of arguments of mandoc_normdate() and some other simplifications, at the same time polishing some error messages by adding the name of the macro in question.
2019-07-10Some time ago, i simplified mandoc_msg() such that it can be usedIngo Schwarze
everywhere and not only in the parsers. For more uniform messages, use it at more places instead of err(3), in particular in the main program. While here, integrate a few trivial functions called at exactly one place into the main option parser, and let a few more functions use the normal convention of returning 0 for success and -1 for error.
2019-05-26use proper crossreferencesChristian Weisgerber
2019-04-30improve the description of the message "blank line in fill mode";Ingo Schwarze
triggered by a misunderstanding by sashan@
2019-02-23Explain the ASCII rendering of single quotes because that repeatedlyIngo Schwarze
caused confusion in the past. People plainly do not expect that there are limits to the compatibility between Unicode and ASCII, but there are. The information belongs here and not into mandoc_char(7) because it explains how the specific output device (-T ascii) works and because it has nothing to do with the question of how characters are represented on the input side.
2019-01-01Support taking the -O tag value from apropos(1) key=value search terms;Ingo Schwarze
feature improvement suggested by kn@. While here, also make "-O value" work from standard input. OK kn@
2018-12-27add some notes about using col and ul to process the ascii markupTed Unangst
since these may not be commonly known utilities. with schwarze
2018-12-24mandoc.css lives in /usr/share/misc now; use full paths to indicate this.Ted Unangst
ok schwarze
2018-12-20Explain what the fields in mandoc messages mean,Ingo Schwarze
rather than merely specifying the message syntax. Gap in documentation found while looking at a bug report from Raf Czlonka <rczlonka at gmail dot com>.
2018-12-15Several improvements to escape sequence handling.Ingo Schwarze
* Add the missing special character \_ (underscore). * Partial implementations of \a (leader character) and \E (uninterpreted escape character). * Parse and ignore \r (reverse line feed). * Add a WARNING message about undefined escape sequences. * Add an UNSUPP message about unsupported escape sequences. * Mark \! and \? (transparent throughput) and \O (suppress output) as unsupported. * Treat the various variants of zero-width spaces as one-byte escape sequences rather than as special characters, to avoid defining bogus forms with square brackets. * For special characters with one-byte names, do not define bogus forms with square brackets, except for \[-], which is valid. * In the form with square brackets, undefined special characters do not fall back to printing the name verbatim, not even for one-byte names. * Starting a special character name with a blank is an error. * Undefined escape sequences never abort formatting of the input string, not even in HTML output mode. * Document the newly handled escapes, and a few that were missing. * Regression tests for most of the above.
2018-11-22In -T locale (the default), -T ascii, and -T utf8 mode, provide a newIngo Schwarze
output option -O tag[=term] to move right to the definition of "term" when opening the manual page in a pager, effectively porting the -T html fragment name feature - https://man.openbsd.org/ksh#ulimit - to the terminal. Try: $ man -O tag uvm_sysctl $ man -O tag=ulimit ksh $ man -O tag 3 compress Feature development triggered by a question from kn@. Klemens also tested, provided feedback that resulted in improvements, and provided an OK.
2018-10-02Add an option -T html -O toc to add a brief table of contents nearIngo Schwarze
the top of HTML pages containing at least two non-standard sections. Suggested by Adam Kalisz and discussed with kristaps@ during EuroBSDCon 2018.
2018-10-02Support a second argument to -O man,Ingo Schwarze
selecting the format according to local existence of the file. Suggested by kristaps@ during EuroBSDCon 2018. Written on the train Frankfurt-Karlsruhe returning from EuroBSDCon.
2018-08-25Rudimentary implementation of the roff(7) .char (output glyphIngo Schwarze
definition) request, used for example by groff_hdtbl(7). This simplistic implementation may interact incorrectly with the .tr (input character translation) request. But come on, you are not only using .char *and* .tr, but you do so with respect to the same character in the same manual page?
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