| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
suggested by bentley@ long ago, but needed lots of cleanup first
|
| |
|
|
|
|
|
|
|
|
| |
The <col> element can only appear inside <colgroup>, so use <colgroup>.
The <tbody> element is optional and useless, so don't use it.
Even if we would ever need <thead> or <tfoot>, <tbody> would still be
optional and useless; besides, we will likely never need <thead> or <tfoot>,
simply because our languages don't support such functionality.
|
|
|
|
| |
no functional change
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with "literal", by the way, it means "no fill"):
* Use <pre> such that whitespace is preserved.
* Preserve lines breaks.
* For font alternating macros, avoid node recursion which required
scary juggling with the fill state. Instead, simply print the text
children directly.
Missing feature first noticed by kristaps@ in 2011,
the again reported by afresh1@ in 2016,
and finally reported here: https://github.com/Debian/debiman/issues/21 ,
which i only found because of Shane Kerr's comment here:
https://plus.google.com/110314300533310775053/posts/H1eaw9Yskoc
|
|
|
|
| |
in particular, stop abuse of <blockquote>
|
|
|
|
|
|
|
|
|
| |
in filled text. This does not affect HTML semantics, but makes the
HTML code even more humanly readable.
While here,
- collapse multiple consecutive space characters in filled text
- and insert a blank between style entries.
|
|
|
|
|
| |
around tags and by introducing some simple indentation.
No change of HTML semantics intended.
|
|
|
|
|
|
|
|
|
| |
interfaces. Such a static buffer was a bad idea in the first place,
causing unfixable truncation that was only prevented by triggering
an assertion failure. Instead, let the small number of remaining
users allocate and free their own, temporary dynamic buffers,
or for the case of .Xr and .In, pass the original data to be
assembled in print_otag().
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Triggered by a smaller patch from Christos Zoulas.
While here, unify style, move several config tests to config.h,
and delete the useless MANDOC_CONFIG_H.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because these work slightly differently on different systems,
they are becoming a maintenance burden in the portable version,
so delete them.
Besides, one of the chief design goals of the mandoc toolbox is to
make sure that nothing related to documentation requires C++.
Consequently, linking mandoc against any kind of C++ program would
defeat the purpose and is not supported.
I don't understand why kristaps@ added them in the first place.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Use ohash(3) rather than a hand-rolled hash table.
* Make the character table static in the chars.c module:
There is no need to pass a pointer around, we most certainly
never want to use two different character tables concurrently.
* No need to keep the characters in a separate file chars.in;
that merely encourages downstream porters to mess with them.
* Sort the characters to agree with the mandoc_chars(7) manual page.
* Specify Unicode codepoints in hex, not decimal (that's the detail
that originally triggered this patch).
No functional change, minus 100 LOC, and i don't see a performance change.
|
|
|
|
|
| |
In particular, make it work in no-fill mode, too.
Reminded by Carsten dot Kunze at arcor dot de (Heirloom roff).
|
|
|
|
|
|
| |
* add missing forward declarations
* remove needless header inclusions
* some style unification
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This uses a <style /> block right before the <link /> for the stylesheet.
Use this to kick out hardcoded header and footer table widths.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
| |
remove trailing whitespace and blanks before tabs, improve some indenting;
no functional change
|
|
|
|
|
| |
Fix one case where a non-literal is used as format string.
Fix another case where a variable is formatted using the wrong type.
|
|
|
|
|
| |
This improves the formatting of about 40 base manuals
and reduces groff-mandoc formatting differences in base by about 5%.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
| |
manual output in existing HTML or XHTML documents, e.g., when invoking
mandoc from an SSI or CGI.
|
|
|
|
| |
found while syncing to OpenBSD
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
widths (e.g., `Bl -tag -width "\s[blahblah]bar"). This has long since
been done for -Tascii but escaped noticed with -T[x]html.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
whitespace.
|
|
|
|
|
|
|
|
|
| |
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@.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
the up-coming version, although we're not quite there yet.
|
|
|
|
| |
version date for release.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|