summaryrefslogtreecommitdiffstats
path: root/html.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix the implementation and documentation of \c (continue text input line).Ingo Schwarze2014-12-021-0/+1
| | | | | In particular, make it work in no-fill mode, too. Reminded by Carsten dot Kunze at arcor dot de (Heirloom roff).
* header cleanup:Ingo Schwarze2014-12-011-2/+5
| | | | | | * add missing forward declarations * remove needless header inclusions * some style unification
* remove unneccessary inclusion protection; patch from deraadt@Ingo Schwarze2014-12-011-4/+0
|
* Make the character table available to libroff so it can check theIngo Schwarze2014-10-281-1/+1
| | | | | | | | validity of character escape names and warn about unknown ones. This requires mchars_spec2cp() to report unknown names again. Fortunately, that doesn't require changing the calling code because according to groff, invalid character escapes should not produce output anyway, and now that we warn about them, that's fine.
* sync Copyright years after merge to OpenBSD; no code changeIngo Schwarze2014-10-101-1/+1
|
* Re-write of eqn(7) parser and MathML output.Kristaps Dzonsons2014-10-101-0/+1
| | | | | | | | | | 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.
* Change "to" and "from" commands to use munder, mover, and munderover.Kristaps Dzonsons2014-09-281-0/+3
|
* Add support for some MathML elements and attributes in our HTML5.Kristaps Dzonsons2014-09-281-0/+15
|
* Don't pretend we have a separate XHTML and HTML mode any more.Kristaps Dzonsons2014-09-271-6/+0
|
* Remove <p> in favour of <div class="spacer">.Kristaps Dzonsons2014-09-271-1/+1
| | | | | | | This is good because <p> is brittle: it can't appear within other block macros. This fixes a regression of the original HTML5 patch as noted by schwarze@ on the tech@ list, 14/8/2014.
* Remove last hard-coded width attribute.Kristaps Dzonsons2014-09-271-1/+0
|
* HTML5-isation: remove more alignments.Kristaps Dzonsons2014-09-271-1/+0
|
* Kick out "summary" attribute, which isn't HTML5.Kristaps Dzonsons2014-09-271-2/+0
|
* Kick out two attibutes we don't use any more in HTML5.Kristaps Dzonsons2014-09-271-2/+0
|
* First, add space for default styling for HTML5 (non-fragment) output.Kristaps Dzonsons2014-09-271-0/+1
| | | | | This uses a <style /> block right before the <link /> for the stylesheet. Use this to kick out hardcoded header and footer table widths.
* First steps in HTML5: use UTF8 meta-charset and HTML5 doctype identifier.Kristaps Dzonsons2014-09-271-0/+1
|
* implement .An -[no]split for -ThtmlIngo Schwarze2014-09-171-0/+2
|
* Revert previous, as requested by kristaps@.Ingo Schwarze2014-08-141-1/+0
| | | | | | | | | | | | | The .Bf block can contain subblocks, so it has to render as an element that can contain flow content. But <em> cannot contain flow content, only phrasing content. Rendering .Em and .Bf differently would by unfortunate, and closing out .Bf before subblocks and re-opening it afterwards would merely complicate both the C code of the program and the generated HTML code. Besides, converting .Em to semantic HTML markup would require some content to be put into <em> and some into <i>, but we cannot automatically distinguish which is which, so strictly speaking, we can't use semantic HTML here but have to fall back to physical markup. Wonders of HTML...
* Use <em> for .Em and .Bf -emphasis.Ingo Schwarze2014-08-131-0/+1
| | | | | | | | | | | | | | | | | The vast majority of .Em in real-world manuals is stress emphasis, for which <em> is the correct markup. Admittedly, there are some instances of .Em usage for alternate quality, for which <i> would be a better match. Most of these are technical terms that neither allow semantic markup nor are keywords - for the latter, .Sy would be preferable. A typical example is that the shell breaks input into .Em words . Alternate voice or mood, which would also require <i>, is almost absent from manuals. We cannot satisfy both stress emphasis and alternate quality, so pick the one that fits more often and looks less wrong when off. Patch from Guy Harris <guy at alum dot mit dot edu>. ok joerg@ bentley@
* KNF: case (FOO): -> case FOO:, remove /* LINTED */ and /* ARGSUSED */,Ingo Schwarze2014-04-201-6/+6
| | | | | remove trailing whitespace and blanks before tabs, improve some indenting; no functional change
* Tag functions with format strings as arguments as printf-like.Joerg Sonnenberger2014-01-051-0/+3
| | | | | Fix one case where a non-literal is used as format string. Fix another case where a variable is formatted using the wrong type.
* Implement the roff(7) font-escape sequence \f(BI "bold+italic".Ingo Schwarze2013-08-081-0/+1
| | | | | This improves the formatting of about 40 base manuals and reduces groff-mandoc formatting differences in base by about 5%.
* Implement the roff \z escape sequence, intended to output the nextIngo Schwarze2012-05-311-0/+1
| | | | | | | | | | | | | | | | | | character without advancing the cursor position; implement it to simply skip the next character, as it will usually be overwritten. With this change, the pod2man(1) preamble user-defined string \*:, intended to render as a diaeresis or umlaut diacritic above the preceding character, is rendered in a slightly less ugly way, though still not correctly. It was rendered as "z.." and is now rendered as ".". Given that the definition of \*: uses elaborate manual \h positioning, there is little chance for mandoc(1) to ever render it correctly, but at least we can refrain from printing out a spurious "z", and we can make the \z do something semi-reasonable for easier cases. "just commit" kristaps@
* Add the -Ofragment option to -T[]x]html. This accomodates for embeddingKristaps Dzonsons2011-10-051-3/+5
| | | | | manual output in existing HTML or XHTML documents, e.g., when invoking mandoc from an SSI or CGI.
* forgotten Copyright bumps; no code changeIngo Schwarze2011-09-181-1/+1
| | | | found while syncing to OpenBSD
* Flip on equation printing for -T[x]html.Kristaps Dzonsons2011-07-231-0/+1
|
* Cleanups in -T[x]html: make html_idcat() use the buffer and be calledKristaps Dzonsons2011-05-171-6/+6
| | | | | | 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-2/+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.
* Give -Thtml and -Txhtml the gift of recognising escapes when calculatingKristaps Dzonsons2011-05-141-0/+1
| | | | | widths (e.g., `Bl -tag -width "\s[blahblah]bar"). This has long since been done for -Tascii but escaped noticed with -T[x]html.
* Move "chars" interface out of out.h and into mandoc.h. This doesn'tKristaps Dzonsons2011-04-291-1/+1
| | | | | | | | | | change any code but for renaming functions and types to be consistent with other mandoc.h stuff. The reason for moving into libmandoc is that the rendering of special characters is part of mandoc itself---not an external part. From mandoc(1)'s perspective, this changes nothing, but for other utilities, it's important to have these part of libmandoc. Note this isn't documented [yet] in mandoc.3 because there are some parts I'd like to change around beforehand.
* When in a <PRE>, don't print out the <BR> before lines that have leadingKristaps Dzonsons2011-01-291-2/+3
| | | | whitespace.
* Change how -Thtml behaves with tables: use multiple rows, with widthsKristaps Dzonsons2011-01-131-0/+3
| | | | | | | | | 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@.
* Make -T[x]html for tables structure cells with a width. I don'tKristaps Dzonsons2011-01-061-9/+7
| | | | | | | anticipate doing much more than this for the coming release. Also, remove "base" part of struct html (not used anywhere) and put some comments in struct html.h.
* Add skeleton for -T[x]html tbl stuff. Also start to put in some bits aboutKristaps Dzonsons2011-01-041-0/+1
| | | | the up-coming version, although we're not quite there yet.
* Apparently the U tag is deprecated, so use a SPAN instead (blah). BumpKristaps Dzonsons2010-12-241-1/+0
| | | | version date for release.
* Drastically fix -T[x]html's handling of font-escape mode changes (i.e.,Kristaps Dzonsons2010-12-241-4/+4
| | | | | | | | | | | | | | | 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.
* Implement reference-counted version of original union mdoc_data. ThisKristaps Dzonsons2010-12-221-0/+1
| | | | | | | 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.
* More use default tags, this time I and U. Also fix a stack overflowKristaps Dzonsons2010-12-201-0/+2
| | | | segfault in the last commit.
* Give header and footer table cells default widths (using WIDTH and ALIGNKristaps Dzonsons2010-12-201-2/+2
| | | | | | | | | 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.
* Make literal `Bd' use a PRE in -Thtml. Make `Bd' output in general useKristaps Dzonsons2010-12-171-0/+1
| | | | only a single DIV or PRE. Tag all displays with display class.
* Use a single P tag for paragraph breaks (which can be configured forKristaps Dzonsons2010-12-151-0/+1
| | | | | | | paragraph breaking in CSS). Use -man's handling of `sp' and `br', which accomodates for scaling widths (-mdoc wasn't).
* Remove stupid outer DIV tag in favour of regular BODY and HTML that canKristaps Dzonsons2010-12-151-0/+1
| | | | | | | | 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.
* In-progress move from -T[x]html using DIVs for its lists to using DL,Kristaps Dzonsons2010-12-151-10/+4
| | | | | OL, and UL. Issue raised by Will Backman, solution proposed by schwarze@.
* Add support for `Sm' in -T[x]html -mdoc.Kristaps Dzonsons2010-07-231-0/+1
|
* correct lots of copyright notices;Ingo Schwarze2010-07-131-1/+1
| | | | ok kristaps@
* Give -T[x]html `Bk -words' capability.Kristaps Dzonsons2010-07-061-1/+3
|
* Churn as I finish email address migration kth.se -> bsd.lv.Kristaps Dzonsons2010-06-191-1/+1
|
* Fix in `Mt' mailto from a patch by Tim van der Molen.Kristaps Dzonsons2010-04-051-12/+11
| | | | | Fixed PAIR_xxx_INIT macros -- this are to be unified. Have `Vt', `Fn', `Ft', and `Fo' print whitespace afterward, instead of before.
* Fixed Makefile for `make lint' dep. on config.hKristaps Dzonsons2010-01-291-3/+7
| | | | Added -Txhtml for XHTML output (minimal increase to programme logic). Because groff has it and it bothers me that we don't.
* Abstraction of -Thtml -man font setting (still experimental).Kristaps Dzonsons2009-11-161-0/+10
|