diff options
author | wl <wl> | 2004-12-16 13:09:54 +0000 |
---|---|---|
committer | wl <wl> | 2004-12-16 13:09:54 +0000 |
commit | d01ce338f599c0e87ef496690524a4e2e01ac0e5 (patch) | |
tree | b10f1d868e879cee475869c009d4d6e11504eddb /tmac/devtag.tmac | |
parent | 578ccc0822767b6f6d9dea80aaf7aa8bcb899f9b (diff) | |
download | groff-d01ce338f599c0e87ef496690524a4e2e01ac0e5.tar.gz |
Make `test-groff' work again -- previously, wrong paths have been
used. Additionally, it can now be called from anywhere.
* test-groff.in: Don't test for groff binary. This is no longer
necessary since the proper paths are determined by `configure'.
(EXEEXT): Removed. No longer used.
(srcdir, builddir): Use values provided by the configure script.
(XENVIRONMENT): Updated.
* INSTALL: Updated.
Make .tag and .taga work for all devices (but only grohtml actually
handles them).
* src/devices/grohtml/post-html.cpp: s/html-tag/devtag/.
(text_glob::is_br, page::add_tag, html_printer::troff_tag,
html_printer::handle_assertion): Don't use hard-coded string
lengths.
(html_printer::lookahead_for_table): Reset `tbl' properly if
necessary.
(html_printer::devtag): New function, handling `devtag'.
(html_printer::special): Don't handle `html-tag'.
* src/include/printer.h, src/libs/libdriver/printer.cpp
(printer::devtag): New virtual function.
* src/libs/libdriver/input.cpp (parse_x_command) <'X'>: Handle
`devtag'.
* src/roff/troff/env.cpp, src/roff/troff/mtsm.cpp,
src/roff/troff/node.cpp: s/html-tag/devtag/.
* src/roff/troff/input.cpp (tag, taga): Always call
curenv->add_node.
* tmac/an-old.tmac, tmac/s.tmac, tmac/troffrc-end: Use DEVTAG*
macros instead of HTML-TAG*.
* tmac/devtag.tmac: New file, defining the DEVTAG-* macros.
* tmac/www.tmac: Load devtag.tmac.
Replace HTML-TAG* macros with DEVTAG* macros.
(HTML, HTML-NS): Changed definitions.
(URL): Use HTML-NS.
(HTML-TAG, HTML-TAG-NS, HTML-TAG-NEXT): Removed.
* tmac/Makefile.sub (NORMALFILES): Add devtag.tmac.
Diffstat (limited to 'tmac/devtag.tmac')
-rw-r--r-- | tmac/devtag.tmac | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/tmac/devtag.tmac b/tmac/devtag.tmac new file mode 100644 index 00000000..22ea976d --- /dev/null +++ b/tmac/devtag.tmac @@ -0,0 +1,123 @@ +.ig +www.tmac - macro package for adding HTML elements to roff documents. + +File position: <groff_source_top>/tmac/devtag.tmac +Installed position: groff's main macro directory. + +------------------------------------------------------------------------ + Legalize +------------------------------------------------------------------------ + +This file is part of groff, the GNU roff type-setting system. + +Copyright (C) 2004 Free Software Foundation, Inc. +written by Gaius Mulley <gaius@glam.ac.uk>. + +groff is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +groff is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with groff; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. + + +------------------------------------------------------------------------ + Description +------------------------------------------------------------------------ + +A simple set of macros to provide markup devices (currently only grohtml) +with tags that define the meaning of the formatted text and also +basic formatting instructions. It generalises the tag concept used within +grohtml and in the future it is hoped that more markup based devices +can capitalise on this work. It also clearly defines those tags which are +honoured by grohtml. Note that not all tags are included here. Some +of the grohtml specific tags (header specific and jobname etc) are +called directly from within www.tmac. The tags defined here are +reasonably generic and could be applied to the -Tdoc device when it +is written. +.. +. +.\" -------------------------------------------------------------------- +.\" DEVTAG <name> +.\" +.\" Emit a tag <name> +.\" +.de DEVTAG +. tag devtag:\\$* +.. +.\" -------------------------------------------------------------------- +.\" DEVTAG-NEXT <name> +.\" +.\" When the troff state changes, emit tag <name> +.\" +.de DEVTAG-NEXT +. taga devtag:\\$* +.. +. +.\" -------------------------------------------------------------------- +.\" SH <level> +.\" NH <level> +.\" tell device we are starting a numbered heading +.\" Takes a single parameter <level>. <level> 1 +.\" is the outer most level. +. +.de DEVTAG-NH +. DEVTAG ".NH \\$1" +.. +.als DEVTAG-SH DEVTAG-NH +. +.\" -------------------------------------------------------------------- +.\" COL <n> +.\" indicate that the following text is aligned for the column <n> +.\" n: [1..MAX(n)] +. +.de DEVTAG-COL +. DEVTAG ".col \\$1" +.. +. +.\" -------------------------------------------------------------------- +.\" EO-H +.\" indicate that a header has finished. +. +.de DEVTAG-EO-H +. DEVTAG ".eo.h" +.. +.\" -------------------------------------------------------------------- +.\" EO-TL +.\" indicate that a title has finished. +. +.de DEVTAG-EO-TL +. DEVTAG ".eo.tl" +.. +.\" -------------------------------------------------------------------- +.\" TL +.\" indicate that the following text forms a title. +. +.de DEVTAG-TL +. DEVTAG ".tl" +.. +. +.\" -------------------------------------------------------------------- +.\" COL-NEXT <n> +.\" emit a column tag just before the next glyph. +. +.de DEVTAG-COL-NEXT +. DEVTAG-NEXT ".col \\$1" +.. +. +.\" -------------------------------------------------------------------- +.\" Emacs settings +.\" -------------------------------------------------------------------- +. +.\" Local Variables: +.\" mode: nroff +.\" End: +.\" EOF |