aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2013-03-13 17:05:55 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2013-03-16 18:07:32 +0100
commit1c4c0acaeb284c5b65c6e117fdf2d2aa3c4dbdcb (patch)
tree50e62bfae1ad5ef3eba28fdfd79241519865773a
parent9e2f53295699aea8f0333ae0acba35d26a3a58c0 (diff)
downloadsciteco-1c4c0acaeb284c5b65c6e117fdf2d2aa3c4dbdcb.tar.gz
prevent image generation during HTML production, instead generate HTML tables using htbl.tes preprocessor
-rw-r--r--.gitignore1
-rw-r--r--doc/Makefile.am15
-rwxr-xr-xdoc/htbl.tes80
3 files changed, 88 insertions, 8 deletions
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 <input> <output> !
+! Troff tbl "drop-in" replacement !
+
+LR 0X#in 2LR 0X#ou EBQ#in EB -EF
+
+<
+! <table> will implicitly close <p>'s so we must recalculate the margin.
+ we do this using the same formula as <p> 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 <table class="tbl" style="margin-left:\n[tbl-margin]%";
+9u.{tab}
+l.u.fl.-1u.t i
+
+q.f,q.t:sbox"Sli border="1"' q.f,q.t:sallbox"Sli rules="all"' q.f,q.t:sexpand"Sli width="\n[tbl-width]%"' q.f,q.t:stab("s0au.{tab}' q.fjk-dlri> 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
+<Q.{row}-Q.{frows}">
+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 <Q.{format.U.#cr.U.{col}.rowspan}">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}<I.HTML <tr>
+
+1u.{col}
+q.{fcols}<Q.{format.U.{row}.U.{col}.rowspan}">
+I.HTML <td rowspan="Q.{format.U.{row}.U.{col}.rowspan}\I colspan="Q.{format.U.{row}.U.{col}.colspan}\I"
+q.{data.U.{row}.U.{col}.block}"= I align="Q.{format.U.{row}.U.{col}.align}">
+Q.{format.U.{row}.U.{col}.bold}"N I<b> '
+Q.{format.U.{row}.U.{col}.italic}"N I<i> '
+G.{data.U.{row}.U.{col}}
+Q.{format.U.{row}.U.{col}.bold}"N I</b> '
+Q.{format.U.{row}.U.{col}.italic}"N I</i> '
+I</td>
+ | I>
+Q.{data.U.{row}.U.{col}}
+.HTML </td>
+ ' '
+%.{col}>
+I.HTML </tr>
+
+%.{row}>
+I.HTML </table>
+
+>
+
+EWQ#ou
+EX \ No newline at end of file