summaryrefslogtreecommitdiffstats
path: root/mdoc_html.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Fully fix the `Rv' and `Ex' handlers for -T[x]html and -Tascii. ThisKristaps Dzonsons2011-04-041-14/+19
| | | | includes an unreported bug where `Ex' wasn't properly adding a newline.
* Make `Rv' do the Right Thing regarding commas and "and" when listing itsKristaps Dzonsons2011-04-041-19/+26
| | | | | output. This also makes it easier to read. While here, remove superfluous assignment to local variables for this and `Mt'.
* Fix possible segfaults in `Lk' -T[x]html handler, which made someKristaps Dzonsons2011-04-041-9/+11
| | | | | assumptions about its children. Also remove superfluous reassignment to local variable.
* Clean-up in -T[x]html: remove some unnecessary assignments to localKristaps Dzonsons2011-04-041-22/+20
| | | | variables.
* Clean up handling of `In' for -T[x]html such that it only links to theKristaps Dzonsons2011-04-041-11/+28
| | | | | first argument. groff of course doesn't do links, but it will uglify subsequent arguments in the list (we warn about >1, anyway).
* Move mandoc_isdelim() back into libmdoc.h. This fixes an unreportedKristaps Dzonsons2011-03-221-4/+21
| | | | | | | | | error where (1) -man pages were punctuating delimiters (e.g., `.B a ;') and where (2) standalone punctuation in -mdoc or -man (e.g., ";" on its own line) would also be punctuated. This introduces a small amount of complexity of mdoc_{html,term}.c must manage their own spacing with running print_word() or print_text(). The check for delimiting now happens in mdoc_macro.c's dword().
* Clean up date handling,Ingo Schwarze2011-03-071-4/+1
| | | | | | | | | | | | as a first step to get rid of the frequent petty warnings in this area: - always store dates as strings, not as seconds since the Epoch - for input, try the three most common formats everywhere - for unrecognized format, just pass the date though verbatim - when there is no date at all, still use the current date Originally triggered by a one-line patch from Tim van der Molen, <tbvdm at xs4all dot nl>, which is included here. Feedback and OK on manual parts from jmc@. "please check this in" kristaps@
* EQN blocks are now printed in all modes. This is simply a printing ofKristaps Dzonsons2011-02-091-1/+7
| | | | the concatenated string (in -T[x]html, it gets a SPAN, too).
* Fix a regression caused by mdoc_term.c 1.214 / mdoc_html.c 1.148:Ingo Schwarze2011-02-061-2/+4
| | | | | Inside .Bk or inside the SYNOPSIS, Unix variant macros cleared the keep flag.
* Add initial libmdoc and libman top-most machinery for accepting TBLKristaps Dzonsons2011-02-061-0/+2
| | | | | directives. For now this will just ignore them (except for -Ttree, which just notes that an EQN's been accepted).
* If `Ns' is specified on its own line, it should be ignored. This isKristaps Dzonsons2011-02-021-1/+2
| | | | | shitty groff behaviour. Do the same, but raise a warning to this effect. This from a TODO noted by schwarze@.
* When in a <PRE>, don't print out the <BR> before lines that have leadingKristaps Dzonsons2011-01-291-2/+16
| | | | whitespace.
* Arguments to `Bsx' and friends are separated by a non-breaking space.Kristaps Dzonsons2011-01-251-1/+7
| | | | This removes a TODO raised by schwarze@.
* Push capitalisation of `Bx' second argument into validator, where it belongs.Kristaps Dzonsons2011-01-251-7/+2
|
* Properly uppercase the first-letter of the `Bx' second argument.Kristaps Dzonsons2011-01-251-3/+8
|
* Have `Bx' accept two arguments, not just one, and join these argumentsKristaps Dzonsons2011-01-251-6/+14
| | | | with "xxBSD-yy"
* Change how -Thtml behaves with tables: use multiple rows, with widthsKristaps Dzonsons2011-01-131-3/+19
| | | | | | | | | set by COL, until an external macro is encountered. At this point in time, close out the table and process the macro. When the first table row is again re-encountered, re-start the table. This requires a bit of tracking added to "struct html", but the change is very small and follows the logic of meta-fonts. This all follows a bug-report by joerg@.
* If the first character of free-form text is whitespace, then a newlineKristaps Dzonsons2011-01-121-0/+2
| | | | shall precede outputted text (surprise!).
* Quiesce lint with some type handling. Does not change anything.Kristaps Dzonsons2011-01-071-3/+4
|
* Add skeleton for -T[x]html tbl stuff. Also start to put in some bits aboutKristaps Dzonsons2011-01-041-1/+4
| | | | the up-coming version, although we're not quite there yet.
* Add table processing structures to -mdoc. This consists of anKristaps Dzonsons2011-01-011-0/+2
| | | | | | external-facing function mdoc_addspan(), then various bits to prohibit printing and scanning (this requires some if's to be converted into switch's).
* Make `Fo' use a B instead of SPAN (left-over).Kristaps Dzonsons2010-12-241-2/+2
|
* Apparently the U tag is deprecated, so use a SPAN instead (blah). BumpKristaps Dzonsons2010-12-241-1/+0
| | | | version date for release.
* As per schwarze@'s suggestions, roll back the refcount structure inKristaps Dzonsons2010-12-241-24/+24
| | | | | | | | favour of a simpler shim for normalised data in the node allocation and free routines. This removes the need to bump and copy references within validator handlers, removes a pointer redirect, and also kills the refcount structure itself. Data is assumed to "live" either in a MDOC_BLOCK or MDOC_ELEM and is copied accordingly.
* Ensure -Thtml has DIV as child of BLOCKQUOTE.Kristaps Dzonsons2010-12-231-5/+5
|
* Implement reference-counted version of original union mdoc_data. ThisKristaps Dzonsons2010-12-221-31/+31
| | | | | | | simplifies clean-up and allows for more types without extra hassle. Also made in-line literal types in -T[x]html use CODE instead of SPAN to match how literal blocks use PRE.
* Fix list-type being clobbered by margins. Last default styles in place.Kristaps Dzonsons2010-12-201-12/+13
| | | | | Added `Sx' to be default-italic (as in OpenBSD's cvsweb). Added `diag' formatting, which had been lost.
* More use default tags, this time I and U. Also fix a stack overflowKristaps Dzonsons2010-12-201-10/+17
| | | | segfault in the last commit.
* Give header and footer table cells default widths (using WIDTH and ALIGNKristaps Dzonsons2010-12-201-20/+52
| | | | | | | | | atttributes) if no style is specified. Give the default-bold elements a B tag instead of a SPAN tag, as this can be overriden in the stylesheet. Prune some unused attributes from html.h.
* Migrate schwarze@'s `Bk' argument patch to -T[x]html.Kristaps Dzonsons2010-12-191-1/+2
|
* Don't use EM for default widths; use BU instead.Kristaps Dzonsons2010-12-171-2/+2
|
* Prevent double-printing of `D1' or `Dl' DIV.Kristaps Dzonsons2010-12-171-4/+3
|
* Add a "list" top-level tag, too.Kristaps Dzonsons2010-12-171-1/+4
|
* Remove useless DIVs in favour of BRs. Fix `Ex' by having it print a priorKristaps Dzonsons2010-12-171-3/+9
| | | | BR. Fix `Rv' by only having it print a BR if there's a prior.
* Make literal `Bd' use a PRE in -Thtml. Make `Bd' output in general useKristaps Dzonsons2010-12-171-29/+21
| | | | only a single DIV or PRE. Tag all displays with display class.
* Have synopsis_pre() in -Thtml emit P or BR, not DIVs.Kristaps Dzonsons2010-12-171-42/+22
| | | | Banish header and footer TABLE styling to example.style.css.
* Make SYNOPSIS `Nm' use a TABLE in -T[x]html mode. Also fix `Nd' usingKristaps Dzonsons2010-12-171-54/+32
| | | | desc-body instead of desc as its CSS key.
* Significantly clean up Sh, Ss, SH, and SS handling in -Thtml. Now aKristaps Dzonsons2010-12-171-69/+22
| | | | | | top-level DIV is used with only an H1 or H2 as the section header. This makes manuals much more readable in lynx, less complicated, and relegates left-margin widths to example.style.css.
* Get widths to be propertly represented in -T[x]html.Kristaps Dzonsons2010-12-161-6/+17
|
* Remove `Pp' and `Lp' checks in front-ends to make sure we're notKristaps Dzonsons2010-12-151-5/+0
| | | | | printing as the first or last child of an `Ss' or `Sh': this is now ensured within the validator.
* Use a single P tag for paragraph breaks (which can be configured forKristaps Dzonsons2010-12-151-29/+33
| | | | | | | paragraph breaking in CSS). Use -man's handling of `sp' and `br', which accomodates for scaling widths (-mdoc wasn't).
* Make sure that new list types don't emit whitespace before or after (weKristaps Dzonsons2010-12-151-20/+15
| | | | have to do this manually).
* Clarify purpose of "lit".Kristaps Dzonsons2010-12-151-6/+10
| | | | Make `Dl' and `D1' both use BLOCKQUOTE instead of DIVs.
* Remove stupid outer DIV tag in favour of regular BODY and HTML that canKristaps Dzonsons2010-12-151-6/+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.
* Added list-type style tips.Kristaps Dzonsons2010-12-151-11/+12
|
* In-progress move from -T[x]html using DIVs for its lists to using DL,Kristaps Dzonsons2010-12-151-238/+150
| | | | | OL, and UL. Issue raised by Will Backman, solution proposed by schwarze@.
* Merge schwarze@'s changes allowing nested displays. Tweak the patch byKristaps Dzonsons2010-12-051-0/+4
| | | | | | | making sure output doesn't add a superfluous newline with the nested displays. Also add a COMPATIBILITY note. Rename a macro (DATESIZ) to be in line with OpenBSD (DATESIZE).
* Move `Mt', `Ar', and `Li' handling from mdoc_action.c into mdoc_validate.c.Kristaps Dzonsons2010-11-291-1/+1
| | | | | | | | Clarify that `Mt' gets a default `~' (as per groff 1.20) and document it in mdoc.7. Made `Lk' be removed in mdoc_macro.c if it has no arguments. This fixes segfaults in mdoc_{term,html}.c that nobody's managed to raise yet.
* let .Bsx print just "BSD/OS" like in modern groffIngo Schwarze2010-10-231-1/+1
| | | | from Ulrich Spoerlein <uqs at spoerlein dot net>
* `Sm' no longer produces a linebreak when used in `Bd'.Kristaps Dzonsons2010-10-101-1/+12
|