From 1c4c0acaeb284c5b65c6e117fdf2d2aa3c4dbdcb Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 13 Mar 2013 17:05:55 +0100 Subject: prevent image generation during HTML production, instead generate HTML tables using htbl.tes preprocessor --- .gitignore | 1 + doc/Makefile.am | 15 +++++------ doc/htbl.tes | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 8 deletions(-) create mode 100755 doc/htbl.tes diff --git a/.gitignore b/.gitignore index 1516665..570636c 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ stamp-* /doc/sciteco.[17] /doc/sciteco.[17].html /doc/sciteco.7.in +/doc/sciteco.7.htbl /doc/Doxyfile /doc/doxygen diff --git a/doc/Makefile.am b/doc/Makefile.am index e5973c2..3740557 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -6,10 +6,10 @@ CLEANFILES = sciteco.1 man_MANS += sciteco.7 EXTRA_DIST += sciteco.7.template -CLEANFILES += sciteco.7 sciteco.7.in +CLEANFILES += sciteco.7 sciteco.7.in sciteco.7.htbl SOURCES = $(wildcard @top_srcdir@/src/*.cpp) -EXTRA_DIST += generate-docs.tes +EXTRA_DIST += generate-docs.tes htbl.tes %.in : %.template generate-docs.tes $(SOURCES) $(BOOTSTRAP_SCITECO) -m @srcdir@/generate-docs.tes \ @@ -20,8 +20,11 @@ html_DATA = sciteco.1.html sciteco.7.html CLEANFILES += $(html_DATA) endif -%.html : % - @GROFF@ -Thtml -P -I$<. -man -t $< >$@ +%.htbl : % htbl.tes + $(BOOTSTRAP_SCITECO) -m @srcdir@/htbl.tes $< $@ + +%.html : %.htbl + @GROFF@ -Thtml -man $< >$@ # # Doxygen processing (do not install or distribute) @@ -34,9 +37,5 @@ endif doxygen/ : Doxyfile @DOXYGEN@ $< -install-data-local: - @INSTALL@ sciteco.*.png $(DESTDIR)$(htmldir) - clean-local: - -rm -f sciteco.*.png -rm -rf doxygen/ diff --git a/doc/htbl.tes b/doc/htbl.tes new file mode 100755 index 0000000..408f5a8 --- /dev/null +++ b/doc/htbl.tes @@ -0,0 +1,80 @@ +#!/usr/bin/sciteco -m +! ./htbl.tes ! +! Troff tbl "drop-in" replacement ! + +LR 0X#in 2LR 0X#ou EBQ#in EB -EF + +< +! will implicitly close

's so we must recalculate the margin. + we do this using the same formula as

indentions are calculated by post-grohtml + except for the line-length which is apparently always 6.5i (the default) +! +fs.TS.nr tbl-margin ((\n[.in]+\n[.o])*100+(6.5i/2))/6.5i-((6.5i/2)/6.5i) +.nr tbl-width 100-\n[tbl-margin] +.HTML

 l + +1u.{row} 1u.{col} @.r{ + .{format.U.{row}.U.{col}.align} 0U.{format.U.{row}.U.{col}.bold} 0U.{format.U.{row}.U.{col}.italic} + 1U.{format.U.{row}.U.{col}.rowspan} 1U.{format.U.{row}.U.{col}.colspan} +} :M.r +< +0a-L"=.{format.U.{row}.U.{col}.align}left' +0a-C"=.{format.U.{row}.U.{col}.align}center' +0a-R"=.{format.U.{row}.U.{col}.align}right' +0a-B"=1U.{format.U.{row}.U.{col}.bold}' +0a-I"=1U.{format.U.{row}.U.{col}.italic}' +0a- "=%.{col} :M.r' +0a-,"=%.{row} 1u.{col} :M.r' 0a-10"=%.{row} 1u.{col} :M.r' +0a-."=1;' +D> + +k q.{row}u.{frows} q.{col}u.{fcols} 1u.{row} 1u.{col} .u.#bd + +EQ.{format.U.{row}.U.{col}.align} G.{format.U.{frows}.U.{col}.align} 1EB +Q.{format.U.{frows}.U.{col}.bold}U.{format.U.{row}.U.{col}.bold} +Q.{format.U.{frows}.U.{col}.italic}U.{format.U.{row}.U.{col}.italic} +Q.{format.U.{frows}.U.{col}.rowspan}U.{format.U.{row}.U.{col}.rowspan} +Q.{format.U.{frows}.U.{col}.colspan}U.{format.U.{row}.U.{col}.colspan} ' +.,.+3:sT{ +"S .,s +T}.-3X.{data.U.{row}.U.{col}} C 1| .,.+2:s\^^"S +0U.{format.U.{row}.U.{col}.rowspan} +Q.{row}-1U.#cr 1;' -%.#cr> +%.{format.U.#cr.U.{col}.rowspan} ' +.u.f s[U.{tab}, + q.f,.-1X.{data.U.{row}.U.{col}} 0'u.{data.U.{row}.U.{col}.block} +-a-q.{tab}"= %.{col} | %.{row} 1u.{col} .,.+4:s.TE +"S1;' '> +q.#bd,.D + +q.{row}-1u.{drows} 1u.{row} +q.{drows} + +1u.{col} +q.{fcols} +I.HTML + | I> +Q.{data.U.{row}.U.{col}} +.HTML + ' ' +%.{col}> +I.HTML + +%.{row}> +I.HTML
 +Q.{format.U.{row}.U.{col}.bold}"N I ' +Q.{format.U.{row}.U.{col}.italic}"N I ' +G.{data.U.{row}.U.{col}} +Q.{format.U.{row}.U.{col}.bold}"N I ' +Q.{format.U.{row}.U.{col}.italic}"N I ' +I
+ +> + +EWQ#ou +EX \ No newline at end of file -- cgit v1.2.3