summaryrefslogtreecommitdiffstats
path: root/man_html.c
Commit message (Collapse)AuthorAgeFilesLines
* Always print <table> column widths in -T[x]html;Ingo Schwarze2011-10-091-35/+17
| | | | | if desired, they can be overridden in the CSS file. Suggested by kristaps@, and i always like to simplify code.
* Add the -Ofragment option to -T[]x]html. This accomodates for embeddingKristaps Dzonsons2011-10-051-17/+16
| | | | | manual output in existing HTML or XHTML documents, e.g., when invoking mandoc from an SSI or CGI.
* Align `-offset indent' and `D1' by forcing BLOCKQUOTE to have a 5exKristaps Dzonsons2011-08-181-1/+0
| | | | | | | | | margin. This is dubious: the HTML4 spec specifically says that BLOCKQUOTE shouldn't be abused for indentation, which is exactly what we do. However, `D1' needs indentation and it's the only way to force text browsers to do so. Alternatives? Also remove the unused HALFINDENT defines while here.
* Flip on equation printing for -T[x]html.Kristaps Dzonsons2011-07-231-4/+1
|
* Flip eqn into using parsed nodes. I've temporarily disabled printingKristaps Dzonsons2011-07-211-2/+2
| | | | | | | these in the front-ends except for -Ttree, which will display the parsed tree. While here, fix that quoted strings aren't scanned for replacement parts.
* Considerably fix up -man -T[x]html's handling of verbatim spaces (`nf'),Kristaps Dzonsons2011-07-071-17/+19
| | | | which before were being handled erratically.
* Clean up how -man -T[x]html handles TP, IP, and HP (dd lists andKristaps Dzonsons2011-07-071-78/+14
| | | | | indented paragraph macros, respectively). This cleans up code and also cleans up the output quite a lot.
* Fix a TODO noted by schwarze@, originally by Christian Weisgerber:Kristaps Dzonsons2011-07-031-0/+2
| | | | | literal mode (`nf') is ended by SH (and, it turns out, SS as well). Noted the updated behaviour in man.7 as well.
* First fix how `sp 1' doesn't imply `1v' (it now does) and that 1Kristaps Dzonsons2011-06-291-2/+3
| | | | | | followed by non-digits, e.g. `1g', really means `1'. Next, fix some spacing issues where `sp' was invoked in -man after sections or subsections. Make sure this behaviour is mirrored in -Thtml.
* Make -T[x]html in -man also be aware of the vertical-space issues in theKristaps Dzonsons2011-06-181-4/+28
| | | | last few commits.
* Fix two TODOs with one check-in. Both of these relate to vertical spaceKristaps Dzonsons2011-06-181-1/+0
| | | | before paragraphs and/or within `RS' blocks.
* Cleanups in -T[x]html: make html_idcat() use the buffer and be calledKristaps Dzonsons2011-05-171-5/+5
| | | | | | bufcat_id(), then collapse it into a little function without so much crap. Next, make bufinit() only be called when we really need to do so, and not simply before pre/post calls.
* Clean-ups in -T[x]html: inline print_num(), as it was just a singleKristaps Dzonsons2011-05-171-1/+1
| | | | | | | | | | conditional; same for print_xmltype() and print_doctype(), same reason; make bufncat() be static, as it was only being called from html.c; have bufcat() simply call through to strlcat(). Finally, assert() whenever we truncate. Also rename buffmt() -> bufcat_fmt() to differentiate from buffmt_man et al., which do not concatenate.
* Clean up date handling,Ingo Schwarze2011-03-071-8/+2
| | | | | | | | | | | | 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).
* 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).
* Refrain from throwing fatal errors forIngo Schwarze2011-01-171-2/+2
| | | | | | | * .br .sp .nf .fi .na with arguments - just skip the arguments * .TH lacking arguments - use empty strings instead like groff * .TH with excessive arguments - skip those Reminded by joerg@, ok kristaps@.
* Change how -Thtml behaves with tables: use multiple rows, with widthsKristaps Dzonsons2011-01-131-2/+16
| | | | | | | | | 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@.
* Bring in -Tascii comments for -Thtml MANH_LITERAL line-breaking stuff.Kristaps Dzonsons2011-01-121-5/+15
|
* Make sure that -Thtml doesn't break within literal lines. This is theKristaps Dzonsons2011-01-121-13/+5
| | | | same logic as the -Tascii case. Also remove the TODO.
* If the first character of free-form text is whitespace, then a newlineKristaps Dzonsons2011-01-121-0/+9
| | | | shall precede outputted text (surprise!).
* Quiesce lint with some type handling. Does not change anything.Kristaps Dzonsons2011-01-071-4/+2
|
* Protect tbl nodes from getting a post call.Kristaps Dzonsons2011-01-041-3/+10
|
* Add skeleton for -T[x]html tbl stuff. Also start to put in some bits aboutKristaps Dzonsons2011-01-041-1/+2
| | | | the up-coming version, although we're not quite there yet.
* Multiple man(7) .IP and .TP fixes started during p2k10:Ingo Schwarze2011-01-041-21/+9
| | | | | | | | | | | | | | | | | | | | | Affecting both -Tascii and -Thtml: * The .IP HEAD uses the second argument as the width, not the last one. * Only print the first .IP HEAD argument, not all but the last. Affecting only -Tascii: * The .IP and .TP HEADs must be printed without literal mode, but literal mode must be restored afterwards. * After the .IP and .TP bodies, we only want term_newln(), not term_flushln(), or we would get two blank lines in literal mode. * The .TP HEAD does not use TWOSPACE, just like .IP doesn't either. * In literal mode, clear NOLPAD after each line, or subsequent lines would get no indentation whatsoever. Affecting only -Thtml: * Only print next-line .TP children, instead of all but the first. OK kristaps@ on the -Tascii part; and: "Can you work this into man_html.c, too?"
* Add -man support for tables. Like -mdoc, this consists of anKristaps Dzonsons2011-01-011-12/+5
| | | | | | | external-facing function man_addspan() (this required shuffling around the descope routine) and hooks elsewhere. Also fixed mdoc.c's post-validation of tables.
* Drastically fix -T[x]html's handling of font-escape mode changes (i.e.,Kristaps Dzonsons2010-12-241-28/+23
| | | | | | | | | | | | | | | using \fI or \fP). Now, using these modes will cause a font to be rendered for each word; furthermore, setting mode within a word will do the correct thing. Second, make -man use real font tags (B, I, SMALL) to set its font instead of using font modes and fix up the pre-macro unsetting of the current mode. This fixes how roff.7 wasn't validating (<P> closing out a font mode) and has been checked against gcc.1 (more will come). I considered failure to validate OUR manual to be a show-stopper for the up-coming release.
* Throw out negative margin garbage in -man -T[x]html in favour of usingKristaps Dzonsons2010-12-221-96/+78
| | | | TABLE and P and so on. Now renders in text-based browsers.
* Banished -man -Thtml header and footer to example.style.css as well.Kristaps Dzonsons2010-12-171-31/+18
|
* Significantly clean up Sh, Ss, SH, and SS handling in -Thtml. Now aKristaps Dzonsons2010-12-171-56/+12
| | | | | | 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.
* Use a single P tag for paragraph breaks (which can be configured forKristaps Dzonsons2010-12-151-8/+1
| | | | | | | paragraph breaking in CSS). Use -man's handling of `sp' and `br', which accomodates for scaling widths (-mdoc wasn't).
* Remove `i' and `r' macro handlers. These macros, originally part of theKristaps Dzonsons2010-12-081-2/+0
| | | | | | | | me package, aren't recognised by "groff -mandoc" so we don't need to do so either. Discussed on tech@ with schwarze@. While at it, remove references to `b' in man.7. As far as I know, this was never supported anyway.
* Typo: man_in_pre -> man_ign_pre for `ft'.Kristaps Dzonsons2010-12-061-1/+1
|
* Add support for `ft' macro found in groff(7). Based on a patch byKristaps Dzonsons2010-12-061-0/+1
| | | | | schwarze@, but without the -T[x]html handling, which structurally does not work. Also add man.7 documentation (not in original patch).
* Small merges from schwarze@'s man_html.c edits.Kristaps Dzonsons2010-12-061-6/+2
|
* Let some man_term.c cleanups bleed into man_html.c.Kristaps Dzonsons2010-12-061-6/+2
|
* Header for `PP', `P', and `LP' should never be printed.Kristaps Dzonsons2010-12-061-1/+4
|
* Remove `Sp', `Vb', and `Ve' (as per schwarze@'s changes in OpenBSD),Kristaps Dzonsons2010-12-051-9/+1
| | | | which are now accomodated for the new libroff modifications.
* Enable literal contexts (Vb/nf) in -T[x]html -man. This requires that aKristaps Dzonsons2010-07-231-18/+64
| | | | | | | | new struct pass down in the call-tree (as also in man_term.c). Also add a line-break for `in', which isn't otherwise supported (yet). Now -Thtml -man cvs.1 for GNU's cvs.1 isn't as ugly.
* Fix broken compilation, hopefully before anybody notices.Kristaps Dzonsons2010-07-221-1/+1
|
* Added `in' macro support for -man -Tascii. This is not yet supported inKristaps Dzonsons2010-07-221-0/+1
| | | | -Thtml (I'm surprised to note that neither is LITERAL mode).
* correct lots of copyright notices;Ingo Schwarze2010-07-131-1/+1
| | | | ok kristaps@
* Re-constitution of `ds' symbol processing. First, push theKristaps Dzonsons2010-07-071-1/+0
| | | | | | | | | roff_getstr() family of functions into roff.c with the "first_string" directly in struct roff. Second, pre-process each line for reserved words in libroff, splicing and re-running a line if it has one (this allows defined symbols to be macros). Remove term.c's invocation of the roff_getstrn() function. Removed function documentation in roff.3 and added roff.7 `ds' documentation.
* Following clue-stick applied by schwarze@, back out const-ness of regsetKristaps Dzonsons2010-06-271-0/+1
| | | | | | | | | passed in to libmdoc and libman. Fix mdoc.3 and man.3 EXAMPLE sections to include regset. Add MDOC_SYNPRETTY flag cueing front-end to nicely format certain values as if SEC_SYNOPSIS were the current section.
* Downstream maintainers: this removes UGLY! I don't want divergingKristaps Dzonsons2010-06-271-1/+0
| | | | | | | | | functionality and UGLY works quite well thanks to schwarze@'s careful attention. This also backs out function-prototype changes for struct regset, instead stuffing a pointer to the regset directly into struct mdoc/man/roff.
* Churn-ish check-in getting mdoc_parseln() and man_parseln() to accept aKristaps Dzonsons2010-06-261-0/+1
| | | | const struct regset pointer. No functionality.
* Churn as I finish email address migration kth.se -> bsd.lv.Kristaps Dzonsons2010-06-191-1/+1
|
* Allow bad -man dates to flow verbatim into the front-ends. Noted byKristaps Dzonsons2010-05-261-1/+4
| | | | Ulrich Spoerlein.
* Enable the unified error/warning enumeration in mandoc.h that'sKristaps Dzonsons2010-05-171-0/+1
| | | | | | | | | | | stringified in main.c. Allow `An' to handle an argument and child (with a warning). Allow `Rv' and `Ex' to work without a prior `Nm' as groff does (with a warning). Allow inconsistent column syntax to only raise a warning.
* Add support for .AT. Properly implement .UC. Add regress tests.Joerg Sonnenberger2010-05-171-0/+1
|