summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/eqn_html.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* The header file "html.h" uses enum roff_tok,schwarze2019-03-171-1/+2
| | | | | | so "roff.h" must be included before it. Diff from bcallah@ tweaked by me; he found the bug by compiling with pcc.
* Cleanup, no functional change:schwarze2018-12-131-1/+2
| | | | | | No need to expose the eqn(7) syntax tree data structures everywhere. Move them to their own include file, "eqn.h". While here, delete the unused enum eqn_pilet.
* do not print <math class="eqn"><mrow></mrow></math> for empty .EQ;schwarze2017-07-141-1/+4
| | | | issue reported by bentley@
* 1. Eliminate struct eqn, instead use the existing membersschwarze2017-07-081-3/+3
| | | | | | of struct roff_node which is allocated for each equation anyway. 2. Do not keep a list of equation parsers, one parser is enough. Minus fifty lines of code, no functional change.
* The EQN_LISTONE box type is pointless.schwarze2017-07-051-4/+7
| | | | | | Simplify by just using EQN_LIST with expectargs = 1. Noticed while investigating a bug report from bentley@. No functional change.
* Consistently treat character escape sequences as operators,schwarze2017-06-231-9/+15
| | | | | | | | not as letters, even if their names contain letters. This is certainly not perfect, but code to recognize that \(*a is not an operator but a letter would need a huge table, or Unicode character property support, which won't happen at this time.
* Write text boxes as <mi>, <mn>, or <mo> as appropriate,schwarze2017-06-231-4/+50
| | | | | and write fontstyle or fontweight attributes where required. Missing features reported by bentley@.
* KNF: remove parentheses from switch case labels; no binary changeschwarze2017-06-201-9/+9
|
* Simplify the usage of print_otag() by making it accept a variableschwarze2017-01-171-35/+29
| | | | | | | | | | number of arguments. Delete struct htmlpair and all the PAIR_*() macros. Delete enum htmlattr, handle that in print_otag() instead. Minus 190 lines of code; no functional change except better ordering of attributes (class before style) in three cases.
* Improve error handling in the eqn(7) parser.schwarze2014-10-121-5/+9
| | | | | | | | | | | | | | | | | | | 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.
* Partial eqn(7) rewrite by kristaps@ in order to get operator precedence right.schwarze2014-10-101-145/+114
|
* parse and render "from" and "to" clauses in eqn, and render matrices;schwarze2014-10-091-3/+15
| | | | written by kristaps@ during EuroBSDCon
* initial bits of MathML rendering for eqn(7) -Thtml;schwarze2014-10-091-22/+150
| | | | written by kristaps@ during EuroBSDCon
* KNF: case (FOO): -> case FOO, remove /* LINTED */ and /* ARGSUSED */,schwarze2014-04-201-9/+5
| | | | | remove trailing whitespace and blanks before tabs, improve some indenting; no functional change
* sync to version 1.11.5:schwarze2011-09-181-0/+81
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.