summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mandoc.1
AgeCommit message (Collapse)Author
2015-09-26tweak previous;Jason McIntyre
2015-09-26briefly document -T tree outputIngo Schwarze
2015-09-14Remove the warning about children of .Vt blocks because actually,Ingo Schwarze
.Vt type global_variable No = Dv defined_constant ; is the best way to specify in the SYNOPSIS how a global variable is initialized in the rare case where that matters. Issue noticed by jmc@.
2015-04-03No need to hardcode /usr/bin/ as the path to more(1); helps portability.Ingo Schwarze
We don't hardcode the paths to gunzip(1) and cmp(1) either. Discussed with ajacoutot@.
2015-03-29Escape punctuation characters that have a different meaning in -Tpdf.Anthony J. Bentley
~, `, and ' get translated to non-ASCII characters by most troff implementations when generating PostScript/PDF output. When the original ASCII character is meant, it needs to be manually escaped. discussed with jmc@ schwarze@; ok schwarze@
2015-03-27refering -> referring;Jason McIntyre
2015-03-27Modernize documentation by inserting blanks between option lettersIngo Schwarze
and option arguments, except for -m because "-m an" and "-m andoc" look just too weird. Of course, the traditional form without the blank will continue to work.
2015-02-23improve NAME section diagnostics;Ingo Schwarze
confusing messages reported by Jan Stary <hans at stare dot cz>
2015-02-16clean up post_dt() validation function;Ingo Schwarze
improved diagnostics, minus six lines of code
2015-02-16Delete the -V option. It serves no purpose but keeps confusing people.Ingo Schwarze
2015-02-10Explain all WARNING, ERROR, and UNSUPP messages in the DIAGNOSTICS section.Ingo Schwarze
Feedback provided by jmc@ some time ago helped me to get this much more concise than my initial attempt. "i'm fine with it going in" jmc@
2015-01-29Radical cleanup of COMPATIBILITY sections:Ingo Schwarze
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.
2015-01-20tweak previous;Jason McIntyre
2015-01-20Split the -Werror message level into -Werror (broken manual, probablyIngo Schwarze
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
2015-01-15Fatal errors no longer exist.Ingo Schwarze
If a file can be opened, mandoc will produce some output; at worst, the output may be almost empty. Simplifies error handling and frees a message type for future use.
2015-01-14To get rid of SYSERR entries in enum mandocerr, downgrade problems withIngo Schwarze
missing and unreadable files from SYSERR to ERROR. Needed for upcoming work. As a bonus, this minimally simplifies code and documentation.
2014-12-28mdoc(7) already uses the mandoc(1) -Ios argument in the footer lineIngo Schwarze
when .Os has no argument, so do the same for man(7) when .TH has less than four arguments; there is no reason to treat both differently. Issue found following a question from Thomas Klausner <wiz at NetBSD>.
2014-12-15Merge from bsd.lv: text about HTML written by kristaps@.Ingo Schwarze
2014-12-02Switch the default output mode from -Tascii to -Tlocale.Ingo Schwarze
This doesn't change anything unless LC_CTYPE is set, but it helps when running with LC_TYPE=something.UTF-8. OK tedu@ and earlier positive feedback from: bentley@ deraadt@ naddy@ stsp@ uqs@freebsd wiz@netbsd
2014-11-25"Aq foo" is not the same as "<foo>". Don't use it to mark up HTML.Anthony J. Bentley
ok schwarze@
2014-11-11Let -h imply -c (that is, not use the pager).Ingo Schwarze
Usually, -h output is short, so the pager is just a nuisance. Also, traditional man(1) does not use a pager for -h. Triggered by a remark of deraadt@ on ICB.
2014-10-30mandoc.1: fix a macro error in previousJason McIntyre
main.c: add -K to usage() and wrap nicely ok schwarze
2014-10-30support UTF-8 and ISO-8859-1 input by integrating modified partsIngo Schwarze
of kristaps@' version of the preconv(1) utility into mandoc(1); positive feedback from bentley@ and no concern raised when shown on tech@
2014-10-07Switch HTML output to polyglot HTML5; have only one single -Thml mode.Ingo Schwarze
Replace hard-coded widths and alignments with a minimal embedded stylesheet. Do not use <p> because it cannot appear inside block macros. Remove the "summary" attribute because it is not HTML5. Written by kristaps@ some months ago, finished during EuroBSDCon.
2014-09-03Implement the traditional -h option for man(1): show the SYNOPSIS only.Ingo Schwarze
As usual, we get mandoc -h and apropos -h for free. Try stuff like "apropos -h In=dirent" or "apropos -h Fa=timespec". Only useful for terminal output, so -Tps, -Tpdf, -Thtml ignore -h for now.
2014-08-30Introduce a man(1) -l option as an alias for mandoc -a.Ingo Schwarze
Basically, this does the same as man -l in Linux man-db. The point is that now all functionality of the combined tool is reachable from the man(1) command name: apropos = man -k, whatis = man -f, mandoc = man -cl. Originally suggested by Carsten dot Kunze at arcor dot de, current maintainer of the Heirloom Documentation Tools. While here, add various missing information to the usage() and to the manuals.
2014-08-27Add an implementation of man(1) into the /usr/bin/mandoc binary andIngo Schwarze
provide a unified set of command line options for mandoc(1), man(1), apropos(1), and whatis(1), each option doing the same for all four. Not adding any completely new options, only extending exiting ones from one tool to the others. New options are: * apropos & whatis -acfkw (in the past, these were man(1) only) * apropos & whatis -a -IOTW (in the past, mandoc(1) only) * mandoc -ac (in the past, man(1) only) * man -IOTW (in the past, mandoc(1) only) Before we can decide whether or not we want to replace src/usr.bin/man with this implementation, considerable bugfixing, testing, and performance measurements are needed, which i'd rather do in the tree than outside. Note that these bugs only affect the new man(1) mode, existing mandoc(1), apropos(1), and whatis(1) is fine. The new functionality in mandoc(1), apropos(1), and whatis(1) is fully enabled. To play with the new man(1), you can try: # mv /usr/bin/man /usr/bin/oman # ln -s /usr/bin/mandoc /usr/bin/man Positive feedback about the general direction from sthen@ and jmc@, and deraadt@ is not against it.
2014-08-08Remove redundant verbiage in the style of "a file is a file,Ingo Schwarze
a line is a line, a column is a column"; suggested by jmc@
2014-06-23Below DIAGNOSTICS, document the SYSERR message level;Ingo Schwarze
jmc@ wondered what it meant and agrees with this patch.
2014-06-20As suggested by jmc@, only include line and column numbers into messagesIngo Schwarze
when they are meaningful, to avoid confusing stuff like this: $ mandoc /dev/null mandoc: /dev/null:0:1: FATAL: not a manual Instead, just say: mandoc: /dev/null: FATAL: not a manual Another example this applies to is documents having a prologue, but lacking a body. Do not throw a FATAL error for these; instead, issue a warning and show the empty document, in the man(7) case with the same amount of blank lines as groff does. Also downgrade mdoc(7) documents having content before the first .Sh from FATAL to WARNING.
2013-07-13For citing the names and email addresses of authors,Ingo Schwarze
consistently use the style ".An name Aq Mt email". Triggered by a question from Jan Stary <hans at stare dot cz>, ok jmc@.
2013-03-06legancy -> legacy; From: Chris HettrickJason McIntyre
2012-05-24Support -Ios='OpenBSD 5.1' to override uname(3) as the source of theIngo Schwarze
default value for the mdoc(7) .Os macro. Needed for man.cgi on the OpenBSD website. Problem with man.cgi first noticed by deraadt@; beck@ and deraadt@ agree with the way to solve the issue.
2011-12-25State default usage before listing arguments of a utility;Ingo Schwarze
from kristaps@, ok jmc@.
2011-11-13overful -> overfull;Jason McIntyre
2011-11-13Make the default left text margin configurable from the command line,Ingo Schwarze
just like the default right margin already is. This may be useful for people with expensive screen real estate. Besides, it helps automated man(7) to mdoc(7) output comparisons to validate -Tman output. ok kristaps@ on an earlier version
2011-10-09A bit more precision and nicer wording in the descriptionsIngo Schwarze
of -Ofragment and -Tman; using input from jmc@ and kristaps@.
2011-10-09Sync to version 1.12.0; all code by kristaps@:Ingo Schwarze
Implement .Rv in -Tman. Let -man -Tman work a bit like cat(1). Add the -Ofragment option to -T[x]html. Minor fixes in -T[x]html. Lots of apropos(1) and -Tman code cleanup.
2011-09-26retain alphabetical order for the -Toutput list, and use a widthJason McIntyre
specifier that makes it look nicer; ok schwarze kristaps
2011-09-18sync to version 1.11.5:Ingo Schwarze
adding an implementation of the eqn(7) language by kristaps@ So far, only .EQ/.EN blocks are handled, in-line equations are not, and rendering is not yet very pretty, but the parser is fairly complete.
2011-09-17Initial, incomplete support for -TmanIngo Schwarze
to convert mdoc(7) documents to the man(7) language. This is work in progress and will be developed in tree. It does already handle the cat(1) manual, but will hardly handle all your fancy manuals yet. go ahead kristaps@ jmc@ millert@ deraadt@
2011-05-31Minor fixes by kristaps@, based on issues reported by jmc@.Ingo Schwarze
2011-05-29Merge release 1.11.3, almost all code by kristaps@:Ingo Schwarze
* Unicode output support (no Unicode input yet, though). * Refactoring: completely handle predefined strings in roff.c. - New function mandoc_escape() replaces a2roffdeco() and mandoc_special(). - Start using mandoc_getarg() in mdoc_argv.c. - Clean up parsing of delimiters in mdoc(7). * And many minor fixes and lots of cleanup.
2011-01-09Add and install tbl(7);Ingo Schwarze
written by kristaps@, looked over by jmc@.
2010-12-22More small -Thtml improvements by kristaps@,Ingo Schwarze
in particular, use <B>, <I> and <U> where appropriate. Provide relative widths for header and footer lines. Manuals: More concise short descriptions of output modes. Correct a few places still talking about CSS2 to say CSS1. Code examples should use .Dl, not .D1.
2010-12-19Significant improvements to -Thtml by kristaps@:Ingo Schwarze
Use less <DIV>, use more <H1>, <H2>, <P>, <BR>, <PRE>, <UL>, <OL>, <DL> etc. Triggered by input from Will Backman. Remove CSS2 note in mandoc.1, which is no longer true.
2010-09-26new sentence, new line;Jason McIntyre
2010-09-26sync to bsd.lv:Ingo Schwarze
do not talk about \s, it is ignored anyway do not .Xr groff(1) any longer, just talk about GNU troff because in the long run, groff may not even be installed
2010-08-20Implement a simple, consistent user interface for error handling.Ingo Schwarze
We now have sufficient practical experience to know what we want, so this is intended to be final: - provide -Wlevel (warning, error or fatal) to select what you care about - provide -Wstop to stop after parsing a file with warnings you care about - provide consistent exit status codes for those warnings you care about - fully document what warnings, errors and fatal errors mean - remove all other cruft from the user interface, less is more: - remove all -f knobs along with the whole -f option - remove the old -Werror because calling warnings "fatal" is silly - always finish parsing each file, unless fatal errors prevent that This commit also includes a couple of related simplifications behind the scenes regarding error handling. Feedback and OK kristaps@; Joerg Sonnenberger (NetBSD) and Sascha Wildner (DragonFly BSD) agree with the general direction.
2010-08-18Remove mandoc(1) compatibility notes that are no longer relevant;Ingo Schwarze
from kristaps@.