summaryrefslogtreecommitdiffstats
path: root/mandoc.1
Commit message (Collapse)AuthorAgeFilesLines
* fix a macro error in previous; from jmc@Ingo Schwarze2014-10-301-1/+1
|
* Report arguments to .EQ as an error, and simplify the code:Ingo Schwarze2014-10-251-0/+2
| | | | | | | * drop trivial wrapper function roff_openeqn() * drop unused first arg of function eqn_alloc() * drop usused member "name" of struct eqn_node While here, sync to OpenBSD by killing some trailing blanks.
* integrate preconv(1) into mandoc(1);Ingo Schwarze2014-10-251-0/+26
| | | | enhances functionality and reduces code and docs by more than 300 lines
* Improve error handling in the eqn(7) parser.Ingo Schwarze2014-10-121-9/+26
| | | | | | | | | | | | | | | | | | | Get rid of the first fatal error, MANDOCERR_EQNSYNT. In eqn(7), there is no need to be bug-compatible with groff, so there is no need to abondon the whole equation in case of a syntax error. In particular: * Skip "back", "delim", "down", "fwd", "gfont", "gsize", "left", "right", "size", and "up" without arguments. * Skip "gsize" and "size" with a non-numeric argument. * Skip closing delimiters that are not open. * Skip "above" outside piles. * For diacritic marks and binary operators without a left operand, default to an empty box. * Let piles and matrices take one argument rather than insisting on a braced list. Let HTML output handle that, too. * When rewinding, if the root box is guaranteed to match the termination condition, no error handling is needed.
* warn about parentheses in function names after .Fn and .Fo;Ingo Schwarze2014-10-111-0/+8
| | | | | particularly useful when converting from other languages to mdoc(7); feature suggested by bentley@
* Re-write of eqn(7) parser and MathML output.Kristaps Dzonsons2014-10-101-1/+5
| | | | | | | | | | This adds parser-level support for the grammar described by the eqn second-edition technical paper, "Typesetting Mathematics — User's Guide" (Kernighan, Cherry). The reason for this re-write is the grouping rules, which were not possible given the existing implementation. The re-write has also considerably simplified the HTML (and, if it ever is completed, terminal) front-end.
* If a tbl(7) layout contains unknown font modifiers, fall back to theIngo Schwarze2014-10-071-2/+7
| | | | | | default font rather than failing the whole table. Needed by some pages in books/man-pages-posix. Written on the plane back from EuroBSDCon in Sofia.
* Don't pretend we have a separate XHTML and HTML mode any more.Kristaps Dzonsons2014-09-271-16/+7
|
* warn about commas in function arguments; inspired by mdoclint(1)Ingo Schwarze2014-09-121-0/+7
|
* document new SEE ALSO .Xr warningsIngo Schwarze2014-09-121-0/+16
|
* warn about AUTHORS sections without .An macros, inspired by mdoclint(1)Ingo Schwarze2014-09-071-0/+6
|
* Implement the traditional -h option for man(1): show the SYNOPSIS only.Ingo Schwarze2014-09-031-1/+5
| | | | | | | 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.
* Introduce a man(1) -l option as an alias for mandoc -a.Ingo Schwarze2014-08-301-2/+38
| | | | | | | | | | | | | 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.
* implement MANPAGER and PAGERIngo Schwarze2014-08-221-0/+15
|
* mandoc -a, man, apropos -a, whatis -a now paginate by defaultIngo Schwarze2014-08-221-1/+16
| | | | | but provide an option -c to not paginate; taking inspiration from manpage.c, hence adding (c) 2012 kristaps@
* document warning and error messages, using quite some feedback from jmc@;Ingo Schwarze2014-08-081-26/+841
| | | | more cleanup is likely to happen when it's in
* Below DIAGNOSTICS, document the SYSERR message level;Ingo Schwarze2014-06-231-3/+5
| | | | jmc@ wondered what it meant and agrees with this patch.
* As suggested by jmc@, only include line and column numbers into messagesIngo Schwarze2014-06-201-4/+8
| | | | | | | | | | | | | | 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.
* For citing the names and email addresses of authors,Ingo Schwarze2013-07-131-2/+1
| | | | | | | consistently use the style ".An name Aq Mt email". Triggered by a question from Jan Stary <hans at stare dot cz>, ok jmc@.
* legancy -> legacy; reported by Chris HettrickIngo Schwarze2013-03-061-1/+1
|
* Support -Ios='OpenBSD 5.1' to override uname(3) as the source of theIngo Schwarze2012-05-271-0/+13
| | | | | | | | | | 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. "Please check them in and I'll look into them later!" kristaps@
* State default usage before listing arguments of a utility. Inspired by aKristaps Dzonsons2011-12-251-12/+13
| | | | patch to mandocdb.8 by schwarze@ some time ago. Ok jmc@.
* typo: overful -> overfull; thanks to jmc@Ingo Schwarze2011-11-131-1/+1
|
* Make the default left text margin configurable from the command line,Ingo Schwarze2011-11-131-0/+9
| | | | | | | 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
* A bit more precision and nicer wording in the descriptionsIngo Schwarze2011-10-091-7/+20
| | | | of -Ofragment and -Tman; using input from jmc@ and kristaps@.
* Nix end-of-line whitespace.Kristaps Dzonsons2011-10-061-1/+1
|
* If -Tman is specified and input is -man, echo the preprocessed (`so'Kristaps Dzonsons2011-10-061-4/+24
| | | | | | | | | | | | | | replaced by file) input. This replaces earlier behaviour of doing nothing, which I found unexpected (mandoc should always output). This requires a buffer in read.c that saves the input lines before being parsed, with a special hook if `so' is invoked. This buffer is just flushed to output if -mman is the input. While mucking around doing this, I also alpha-ordered the mandoc.h functions. Ok schwarze@, with no screaming when the polished patch was published.
* Add the -Ofragment option to -T[]x]html. This accomodates for embeddingKristaps Dzonsons2011-10-051-0/+6
| | | | | manual output in existing HTML or XHTML documents, e.g., when invoking mandoc from an SSI or CGI.
* restore alphabetical order for the -Toutput list, and use a widthIngo Schwarze2011-09-261-33/+33
| | | | | specifier that makes it look nicer; from jmc@, ok kristaps@
* forgotten Copyright bumps; no code changeIngo Schwarze2011-09-181-1/+1
| | | | found while syncing to OpenBSD
* Initial, incomplete support for -TmanIngo Schwarze2011-09-171-0/+16
| | | | | | | | 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@
* Replace the old `An'/`Aq' AUTHORS note with `An'/`Mt'.Kristaps Dzonsons2011-08-181-1/+2
|
* Fix some bad bits in the mandoc manual: `Xr' instead of `Sx', unescapedKristaps Dzonsons2011-05-301-8/+7
| | | | | stuff that should be escaped, and a style matter or two. Pointed out by Jason McIntyre, thanks!
* Turn on -Tutf8 in the frontend. Here we go!Kristaps Dzonsons2011-05-201-3/+13
|
* Locale support. I'm checking this in to clean up fall-out in-tree, butKristaps Dzonsons2011-05-171-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | it looks pretty good. Basically, the -Tlocale option propogates into term_ascii.c, where we set locale-specific console call-backs IFF (1) setlocale() works; (2) locale support is compiled in (see Makefile for -DUSE_WCHAR); (3) the internal structure of wchar_t maps directly to Unicode codepoints as defined by __STDC_ISO_10646__; and (4) the console supports multi-byte characters. To date, this configuration only supports GNU/Linux. OpenBSD doesn't export __STDC_ISO_10646__ although I'm told by stsp@openbsd.org that it should (it has the correct map). Apparently FreeBSD is the same way. NetBSD? Don't know. Apple also supports this, but doesn't define the macro. Special-casing! Benchmark: -Tlocale incurs less than 0.2 factor overhead when run through several thousand manuals when UTF8 output is enabled. Native mode (whether directly -Tascii or through no locale or whatever) is UNCHANGED: the function callbacks are the same as before. Note. If the underlying system does NOT support STDC_ISO_10646, there is a "slow" version possible with iconv or other means of flipping from a Unicode codepoint to a wchar_t.
* Documentation: note COMPATIBILITY of -Tascii `?' printing in mandoc.1Kristaps Dzonsons2011-05-171-3/+8
| | | | | and remove some long-fixed notes in sthe same section. Also, add an `Lb' for the mandoc library to mandoc.3 (noted by Sascha Wildner).
* Add stub for eqn.7 manual and flip it on. Also note COMPATIBILITY issueKristaps Dzonsons2011-02-091-0/+1
| | | | of how we considered .TS (etc.) macros and how the preprocessors do.
* Moved table stuff from roff.7 into the new tbl.7 (suggested by Jason McIntyre).Kristaps Dzonsons2011-01-041-1/+3
| | | | Added cross-links to tbl.7 from other manuals.
* Clarify style inclusions and update release information.Kristaps Dzonsons2010-12-201-8/+6
|
* Correctly mark the examples as `Dl', not `D1'.Kristaps Dzonsons2010-12-171-4/+4
|
* Note that we use CSS1, not CSS2.Kristaps Dzonsons2010-12-161-6/+5
| | | | Remove superfluous language in output-mode short description.
* Remove stray note on `i', which we no longer support.Kristaps Dzonsons2010-12-161-6/+0
|
* Remove stupid outer DIV tag in favour of regular BODY and HTML that canKristaps Dzonsons2010-12-151-9/+0
| | | | | | | | be handled in CSS. Clarified "lit" tag (will be the subject of future clarification). Removed CSS2 note in mandoc.1, which is no longer the case.
* sync to OpenBSD:Ingo Schwarze2010-09-261-2/+2
| | | | | new sentence, new line; from jmc@
* Implement a simple, consistent user interface for error handling.Ingo Schwarze2010-08-201-58/+142
| | | | | | | | | | | | | | | | | 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.
* Migrate `Xr groff 1' -> GNU troff. I no longer assume that groff isKristaps Dzonsons2010-08-181-5/+2
| | | | installed on the host system.
* Remove references to \s in mandoc.1: we no longer document these and justKristaps Dzonsons2010-08-181-11/+0
| | | | flat-out ignore them.
* Remove mandoc.1 compatibility notes that are no longer relevant.Kristaps Dzonsons2010-08-071-10/+0
|
* Initial PDF shim over PS. This produces working PDF output with -Tpdf.Kristaps Dzonsons2010-07-251-0/+12
| | | | | | | | | | It's currently missing the xref table, so you'll get a warning in most PDF viewers). It also produces lots of redundant output, which will go away once I get a better handle on the PDF spec. The code doesn't really touch any existing functionality; it's a bunch of conditionals atop the -Tps (term_ps.c) implementation. I'm checking it in now to have it exist and be auditable. It needs clean-up, polish, and general care (and xref!).
* correct lots of copyright notices;Ingo Schwarze2010-07-131-1/+1
| | | | ok kristaps@