--- /srv/reproducible-results/rbuild-debian/r-b-build.lE8VrJCN/b1/htp_1.19-8_i386.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.lE8VrJCN/b2/htp_1.19-8_i386.changes ├── Files │ @@ -1,3 +1,3 @@ │ │ 3c78c31a0a9054bb73d601413e14a19b 58944 debug optional htp-dbgsym_1.19-8_i386.deb │ - 7ea48f5ce74cc0df474c1b4932454f5b 120976 web optional htp_1.19-8_i386.deb │ + a379c29cb38220dbb09e60de0e3f9dd8 121008 web optional htp_1.19-8_i386.deb ├── htp_1.19-8_i386.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2020-06-14 23:21:19.000000 debian-binary │ │ -rw-r--r-- 0 0 0 3616 2020-06-14 23:21:19.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 117168 2020-06-14 23:21:19.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 117200 2020-06-14 23:21:19.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./control │ │ │ │ @@ -1,12 +1,12 @@ │ │ │ │ Package: htp │ │ │ │ Version: 1.19-8 │ │ │ │ Architecture: i386 │ │ │ │ Maintainer: Marcelo Soares Mota │ │ │ │ -Installed-Size: 672 │ │ │ │ +Installed-Size: 695 │ │ │ │ Depends: libc6 (>= 2.38) │ │ │ │ Section: web │ │ │ │ Priority: optional │ │ │ │ Homepage: http://htp.sourceforge.net │ │ │ │ Description: nice HTML pre-processor │ │ │ │ htp is an HTML pre-processor. It is designed to be a flexible authoring tool │ │ │ │ that can easily be integrated into the HTML design process. │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -1,27 +1,27 @@ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/bin/ │ │ │ │ -rwxr-xr-x 0 root (0) root (0) 75284 2020-06-14 23:21:19.000000 ./usr/bin/htp │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/doc/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/ │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14789 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/alttext.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14270 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/alttext.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1418 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/alttext.htp │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14129 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/block.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13729 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/block.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 781 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/block.htp │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14550 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/blockdef.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13301 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/blockdef.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1075 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/blockdef.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4763 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/bugs.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 737 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/bugs.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 878 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/changelog.Debian.gz │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14722 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/comment.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11458 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/comment.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 676 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/comment.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 13083 2020-06-14 23:16:46.000000 ./usr/share/doc/htp/copyright │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12644 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/def.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16765 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/def.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3601 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/def.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 8030 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/default.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3149 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/default.htp │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/examples/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 536 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/Makefile.sub │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2404 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/album.hti │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1087 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/album.htt │ │ │ │ @@ -32,64 +32,64 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 818 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/prime.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1576 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/examples/quine.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1576 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/quine.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 604 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/section.def │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1189 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/examples/section.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 918 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/section.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 375 2015-05-16 17:04:11.000000 ./usr/share/doc/htp/examples/section.htt │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11924 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/expand.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8233 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/expand.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3702 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/expand.htp │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14272 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/file.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12794 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/file.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2490 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/file.htp.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 14293 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/history.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3946 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/history.htp.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3911 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/hlhtp.pl │ │ │ │ -rw-r--r-- 0 root (0) root (0) 165 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/htp.def │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4049 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/htp.htt │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13018 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/if.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14288 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/if.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 932 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/if.htp │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11112 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/imageurl.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8626 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/imageurl.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2507 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/imageurl.htp │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8639 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/img.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14043 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/img.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1168 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/img.htp │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8466 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/inc.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13908 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/inc.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1092 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/inc.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9881 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/include.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1894 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/include.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4874 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/index.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 78 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/index.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7733 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/intro.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3489 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/intro.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 10774 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/license.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 454 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/license.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3782 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/macros.def │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5088 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/macros.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 388 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/macros.htp │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15729 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/metatag.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23994 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/metatag.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2439 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/metatag.htp.gz │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8179 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/opt.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13324 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/opt.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 608 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/opt.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7809 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/options.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3100 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/options.htp │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8227 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/output.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13543 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/output.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 695 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/output.htp │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 171 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/arrow.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 262 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/download.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 708 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/htpicon.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 25563 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/logo.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 455 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/manbig.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 491 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/manual.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1313 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/poweredbyhtp.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 679 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/sficon.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 492 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pic/source.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 523 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/pphtp.pl │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7953 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/quote.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7816 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/quote.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 390 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/quote.htp │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9508 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/set.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14096 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/set.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1200 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/set.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 500 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/styles.css │ │ │ │ -rw-r--r-- 0 root (0) root (0) 27219 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/template.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2235 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/template.htp.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1914 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/toc.def │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tut/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 146 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tut/footer.hti │ │ │ │ @@ -102,23 +102,23 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 192 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tut/tut2.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 501 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tut/tut3.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 191 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tut/tut3.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 356 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tut/tut3.htt │ │ │ │ -rw-r--r-- 0 root (0) root (0) 297 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tut/tut4.htt │ │ │ │ -rw-r--r-- 0 root (0) root (0) 10517 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tutorial.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3393 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/tutorial.htp │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9119 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/undef.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7804 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/undef.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 460 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/undef.htp │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11437 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/unset.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9193 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/unset.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 658 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/unset.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7681 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/usage.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2959 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/usage.htp │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12127 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/use.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14477 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/use.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3300 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/use.htp │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10616 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/while.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8622 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/while.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 938 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/while.htp │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5288 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/wishlist.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1311 2020-06-14 23:21:19.000000 ./usr/share/doc/htp/wishlist.htp │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/doc-base/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 235 2020-06-14 17:36:12.000000 ./usr/share/doc-base/htp.htp │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/lintian/ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-06-14 23:21:19.000000 ./usr/share/lintian/overrides/ │ │ │ ├── ./usr/share/doc/htp/alttext.html │ │ │ │ @@ -114,30 +114,27 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -  <[ref]set time="0">
│ │ │ │ -  <[ref]block name=a>
│ │ │ │ -    a is expanded at time <[ref]use time>.
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]block name=b expand>
│ │ │ │ -    b is expanded at time <[ref]use time>.
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]set time="1">
│ │ │ │ -  <[ref]use a>
│ │ │ │ -  <[ref]use b>
│ │ │ │ -  contents of a: <[ref]use a noexpand>
│ │ │ │ -  contents of b: <[ref]use b noexpand>
│ │ │ │ -  <[ref]block name=c expand>
│ │ │ │ -    c is expanded at time <[ref]use time>; <[ref]use a>
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]block name=d expand>
│ │ │ │ +<[ref]use macroname [parameters ...] [noexpand]>
│ │ │ │ +<... $macroname ...>
│ │ │ │ +<... ${macroname} ...>
│ │ │ │ +
│ │ │ │ +ludefilename" [parameters ...]>
│ │ │ │ +<[ref]file name>
│ │ │ │ +<[ref]file [ name="filename" ] size[ = (byte|kbyte|mbyte|gbyte) ] [precision=n]>
│ │ │ │ +<[ref]file [ name="filename" ] time[ ="format" ]>
│ │ │ │ +<[ref]file [ name="filename" ] date[ ="format" ]>
│ │ │ │ +<[ref]file search="searchpath">
│ │ │ │ +<[ref]file template="templatefilename">
│ │ │ │ +
│ │ │ │ +nd>
│ │ │ │     d is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │   <[ref]/block>
│ │ │ │   <[ref]block name=e>
│ │ │ │     e is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │   <[ref]/block>
│ │ │ │   <[ref]set time="2">
│ │ │ │   <[ref]block name=a>
│ │ │ │ @@ -155,15 +152,15 @@ │ │ │ │

│ │ │ │ When an IMG tag with a matching source is encountered, htp will add an ALT │ │ │ │ attribute only if one is not already present. This allows for ALT text to │ │ │ │ be overridden on specific images and default text on all others. │ │ │ │

│ │ │ │ For example: │ │ │ │

│ │ │ │ -    <[ref]IF name="Jim">...<[ref]/IF>
│ │ │ │ +    <[ref]IF name>...<[ref]/IF>
│ │ │ │

│ │ │ │

│ │ │ │ An ALTTEXT tag with a name but no text attribute removes any ALT │ │ │ │ mapping for this image. Successing IMG tags with a matching SRC name are not │ │ │ │ changed. │ │ │ │

│ │ │ │ Since this is useful for an image used throughout a set of documents, │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,39 +1,36 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: AALLTTTTEEXXTT ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n   <_[_[_r_e_f_]_]_s_e_t time="0"> │ │ │ │ │ -  _L_i_c_e_n_s_e   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ -  _T_u_t_o_r_i_a_l     a is expanded at time <_[_[_r_e_f_]_]_u_s_e time>. │ │ │ │ │ -  _U_s_a_g_e   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -  HTP Tags   <_[_[_r_e_f_]_]_b_l_o_c_k name=b expand> │ │ │ │ │ -  [>] _A_L_T_T_E_X_T     b is expanded at time <_[_[_r_e_f_]_]_u_s_e time>. │ │ │ │ │ -    _B_L_O_C_K   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -    _B_L_O_C_K_D_E_F   <_[_[_r_e_f_]_]_s_e_t time="1"> │ │ │ │ │ -    _D_E_F   <_[_[_r_e_f_]_]_u_s_e a> │ │ │ │ │ -    _F_I_L_E   <_[_[_r_e_f_]_]_u_s_e b> │ │ │ │ │ -    _I_F   contents of a: <_[_[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ -    _I_N_C   contents of b: <_[_[_r_e_f_]_]_u_s_e b noexpand> │ │ │ │ │ -    _I_M_G   <_[_[_r_e_f_]_]_b_l_o_c_k name=c expand> │ │ │ │ │ -    _I_M_A_G_E_U_R_L     c is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ -    _O_P_T _[_r_e_f_]_]_u_s_e a> │ │ │ │ │ -    _O_U_T_P_U_T   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -    _Q_U_O_T_E   <_[_[_r_e_f_]_]_b_l_o_c_k name=d expand> │ │ │ │ │ -    _S_E_T     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ -    _U_N_D_E_F _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ -    _U_N_S_E_T   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ -    _W_H_I_L_E     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ -    _<_!_-_-_- _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ -  _H_i_s_t_o_r_y   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -  _W_i_s_h_ _l_i_s_t   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ -  _B_u_g_s   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ -     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ │ - time>. │ │ │ │ │ -   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_u_s_e macroname [parameters ...] [noexpand]> │ │ │ │ │ +  _L_i_c_e_n_s_e <... $macroname ...> │ │ │ │ │ +  _T_u_t_o_r_i_a_l <... ${macroname} ...> │ │ │ │ │ +  _U_s_a_g_e │ │ │ │ │ +  HTP Tags ludefilename" [parameters ...]> │ │ │ │ │ +  [>] _A_L_T_T_E_X_T <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ │ +    _B_L_O_C_K <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ │ +    _B_L_O_C_K_D_E_F (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ │ +    _D_E_F <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time[ ="format" ]> │ │ │ │ │ +    _F_I_L_E <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] date[ ="format" ]> │ │ │ │ │ +    _I_F <_[_[_r_e_f_]_]_f_i_l_e search="searchpath"> │ │ │ │ │ +    _I_N_C <_[_[_r_e_f_]_]_f_i_l_e template="templatefilename"> │ │ │ │ │ +    _I_M_G │ │ │ │ │ +    _I_M_A_G_E_U_R_L nd> │ │ │ │ │ +    _O_P_T     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _O_U_T_P_U_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _Q_U_O_T_E   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _S_E_T   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ +    _U_N_D_E_F     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _U_N_S_E_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _W_H_I_L_E   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ +    _<_!_-_-_-   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ +  _H_i_s_t_o_r_y     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ │ +  _W_i_s_h_ _l_i_s_t time>. │ │ │ │ │ +  _B_u_g_s   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │   <_[_[_r_e_f_]_]_u_s_e c> │ │ │ │ │   <_[_[_r_e_f_]_]_u_s_e d> │ │ │ │ │   <_[_[_r_e_f_]_]_u_s_e e> │ │ │ │ │ ********** ssyynnooppssiiss ********** │ │ │ │ │ AALLTTTTEEXXTT declares an ALT attribute for any _I_M_G tag │ │ │ │ │ with a SRC matching the ALTTEXT NAME. Since │ │ │ │ │ relative paths can be used to point to the same │ │ │ │ │ @@ -41,15 +38,15 @@ │ │ │ │ │ comparisons. │ │ │ │ │ When an IMG tag with a matching source is │ │ │ │ │ encountered, htp will add an ALT attribute only if │ │ │ │ │ one is not already present. This allows for ALT │ │ │ │ │ text to be overridden on specific images and │ │ │ │ │ default text on all others. │ │ │ │ │ For example: │ │ │ │ │ -     <_[_[_r_e_f_]_]_I_F name="Jim">...<_[_[_r_e_f_]_]_/_I_F> │ │ │ │ │ +     <_[_[_r_e_f_]_]_I_F name>...<_[_[_r_e_f_]_]_/_I_F> │ │ │ │ │ An ALTTEXT tag with a name but no text attribute │ │ │ │ │ removes any ALT mapping for this image. Successing │ │ │ │ │ IMG tags with a matching SRC name are not changed. │ │ │ │ │ Since this is useful for an image used throughout a │ │ │ │ │ set of documents, ALTTEXT is most appropriate in an │ │ │ │ │ _i_n_c_l_u_d_e_ _f_i_l_e or a _d_e_f_a_u_l_t_ _f_i_l_e. │ │ │ │ │ In addition to ALTTEXT, htp can also automatically │ │ │ ├── ./usr/share/doc/htp/block.html │ │ │ │ @@ -114,30 +114,28 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -  <[ref]set time="0">
│ │ │ │ -  <[ref]block name=a>
│ │ │ │ -    a is expanded at time <[ref]use time>.
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]block name=b expand>
│ │ │ │ -    b is expanded at time <[ref]use time>.
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]set time="1">
│ │ │ │ -  <[ref]use a>
│ │ │ │ -  <[ref]use b>
│ │ │ │ -  contents of a: <[ref]use a noexpand>
│ │ │ │ -  contents of b: <[ref]use b noexpand>
│ │ │ │ -  <[ref]block name=c expand>
│ │ │ │ -    c is expanded at time <[ref]use time>; <[ref]use a>
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]block name=d expand>
│ │ │ │ +<[ref]WHILE [NOT] conditional>
│ │ │ │ +    block
│ │ │ │ +<[ref]/WHILE>
│ │ │ │ +
│ │ │ │ +" | redirect) [noerror]>
│ │ │ │ +<[ref]file include="includefilename" [parameters ...]>
│ │ │ │ +<[ref]file name>
│ │ │ │ +<[ref]file [ name="filename" ] size[ = (byte|kbyte|mbyte|gbyte) ] [precision=n]>
│ │ │ │ +<[ref]file [ name="filename" ] time[ ="format" ]>
│ │ │ │ +<[ref]file [ name="filename" ] date[ ="format" ]>
│ │ │ │ +<[ref]file search="searchpath">
│ │ │ │ +<[ref]file template="templatefilename">
│ │ │ │ +
│ │ │ │ +nd>
│ │ │ │     d is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │   <[ref]/block>
│ │ │ │   <[ref]block name=e>
│ │ │ │     e is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │   <[ref]/block>
│ │ │ │   <[ref]set time="2">
│ │ │ │   <[ref]block name=a>
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,37 +1,36 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: BBLLOOCCKK,, //BBLLOOCCKK ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n   <_[_[_r_e_f_]_]_s_e_t time="0"> │ │ │ │ │ -  _L_i_c_e_n_s_e   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ -  _T_u_t_o_r_i_a_l     a is expanded at time <_[_[_r_e_f_]_]_u_s_e time>. │ │ │ │ │ -  _U_s_a_g_e   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -  HTP Tags   <_[_[_r_e_f_]_]_b_l_o_c_k name=b expand> │ │ │ │ │ -    _A_L_T_T_E_X_T     b is expanded at time <_[_[_r_e_f_]_]_u_s_e time>. │ │ │ │ │ -  [>] _B_L_O_C_K   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -    _B_L_O_C_K_D_E_F   <_[_[_r_e_f_]_]_s_e_t time="1"> │ │ │ │ │ -    _D_E_F   <_[_[_r_e_f_]_]_u_s_e a> │ │ │ │ │ -    _F_I_L_E   <_[_[_r_e_f_]_]_u_s_e b> │ │ │ │ │ -    _I_F   contents of a: <_[_[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ -    _I_N_C   contents of b: <_[_[_r_e_f_]_]_u_s_e b noexpand> │ │ │ │ │ -    _I_M_G   <_[_[_r_e_f_]_]_b_l_o_c_k name=c expand> │ │ │ │ │ -    _I_M_A_G_E_U_R_L     c is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ -    _O_P_T _[_r_e_f_]_]_u_s_e a> │ │ │ │ │ -    _O_U_T_P_U_T   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -    _Q_U_O_T_E   <_[_[_r_e_f_]_]_b_l_o_c_k name=d expand> │ │ │ │ │ -    _S_E_T     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ -    _U_N_D_E_F _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ -    _U_N_S_E_T   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ -    _W_H_I_L_E     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ -    _<_!_-_-_- _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ -  _H_i_s_t_o_r_y   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -  _W_i_s_h_ _l_i_s_t   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ -  _B_u_g_s   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ -     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_W_H_I_L_E [NOT] conditional> │ │ │ │ │ +  _L_i_c_e_n_s_e     block │ │ │ │ │ +  _T_u_t_o_r_i_a_l <_[_[_r_e_f_]_]_/_W_H_I_L_E> │ │ │ │ │ +  _U_s_a_g_e │ │ │ │ │ +  HTP Tags " | redirect) [noerror]> │ │ │ │ │ +    _A_L_T_T_E_X_T <_[_[_r_e_f_]_]_f_i_l_e include="includefilename" [parameters │ │ │ │ │ +  [>] _B_L_O_C_K ...]> │ │ │ │ │ +    _B_L_O_C_K_D_E_F <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ │ +    _D_E_F <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ │ +    _F_I_L_E (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ │ +    _I_F <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time[ ="format" ]> │ │ │ │ │ +    _I_N_C <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] date[ ="format" ]> │ │ │ │ │ +    _I_M_G <_[_[_r_e_f_]_]_f_i_l_e search="searchpath"> │ │ │ │ │ +    _I_M_A_G_E_U_R_L <_[_[_r_e_f_]_]_f_i_l_e template="templatefilename"> │ │ │ │ │ +    _O_P_T │ │ │ │ │ +    _O_U_T_P_U_T nd> │ │ │ │ │ +    _Q_U_O_T_E     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _S_E_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _U_N_D_E_F   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _U_N_S_E_T   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ +    _U_S_E_,_ _$     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _W_H_I_L_E _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _<_!_-_-_-   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +  _H_i_s_t_o_r_y   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ +  _W_i_s_h_ _l_i_s_t   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ +  _B_u_g_s     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ │ time>. │ │ │ │ │   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │   <_[_[_r_e_f_]_]_u_s_e c> │ │ │ │ │   <_[_[_r_e_f_]_]_u_s_e d> │ │ │ │ │   <_[_[_r_e_f_]_]_u_s_e e> │ │ │ │ │ ********** ssyynnooppssiiss ********** │ │ │ │ │ BBLLOOCCKK aanndd //BBLLOOCCKK are used to create block macros, │ │ │ ├── ./usr/share/doc/htp/blockdef.html │ │ │ │ @@ -114,54 +114,50 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -  <[ref]set time="0">
│ │ │ │ -  <[ref]block name=a>
│ │ │ │ -    a is expanded at time <[ref]use time>.
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]block name=b expand>
│ │ │ │ -    b is expanded at time <[ref]use time>.
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]set time="1">
│ │ │ │ -  <[ref]use a>
│ │ │ │ -  <[ref]use b>
│ │ │ │ -  contents of a: <[ref]use a noexpand>
│ │ │ │ -  contents of b: <[ref]use b noexpand>
│ │ │ │ -  <[ref]block name=c expand>
│ │ │ │ -    c is expanded at time <[ref]use time>; <[ref]use a>
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]block name=d expand>
│ │ │ │ +

│ │ │ │ +

synopsis

│ │ │ │ +BLOCKDEF creates block metatags, which is a fancy way of saying it │ │ │ │ +creates new block tags. A block tag is a tag that takes a whole block │ │ │ │ +as additional parameter. This block is surrounded by <tagname> and │ │ │ │ +</tagname>. The contents of this block are automatically stored │ │ │ │ +in the block macro named BLOCK. │ │ │ │ +

For example:

│ │ │ │ +

│ │ │ │ +<[ref]use macroname [parameters ...] [noexpand]>
│ │ │ │ +<... $macroname ...>
│ │ │ │ +<... ${macroname} ...>
│ │ │ │ +
│ │ │ │ +ludefilename" [parameters ...]>
│ │ │ │ +<[ref]file name>
│ │ │ │ +<[ref]file [ name="filename" ] size[ = (byte|kbyte|mbyte|gbyte) ] [precision=n]>
│ │ │ │ +<[ref]file [ name="filename" ] time[ ="format" ]>
│ │ │ │ +<[ref]file [ name="filename" ] date[ ="format" ]>
│ │ │ │ +<[ref]file search="searchpath">
│ │ │ │ +<[ref]file template="templatefilename">
│ │ │ │ +
│ │ │ │ +nd>
│ │ │ │     d is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │   <[ref]/block>
│ │ │ │   <[ref]block name=e>
│ │ │ │     e is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │   <[ref]/block>
│ │ │ │   <[ref]set time="2">
│ │ │ │   <[ref]block name=a>
│ │ │ │     a is defined for the 2nd time <[ref]use time>.
│ │ │ │   <[ref]/block>
│ │ │ │   <[ref]use c>
│ │ │ │   <[ref]use d>
│ │ │ │   <[ref]use e>
│ │ │ │

│ │ │ │ -

synopsis

│ │ │ │ -BLOCKDEF creates block metatags, which is a fancy way of saying it │ │ │ │ -creates new block tags. A block tag is a tag that takes a whole block │ │ │ │ -as additional parameter. This block is surrounded by <tagname> and │ │ │ │ -</tagname>. The contents of this block are automatically stored │ │ │ │ -in the block macro named BLOCK. │ │ │ │ -

For example:

│ │ │ │ -

│ │ │ │ -    <[ref]IF name="Jim">...<[ref]/IF>
│ │ │ │ -

│ │ │ │

│ │ │ │ All block metatags have the implicit option EXPAND, which tells htp to expand the contents │ │ │ │ of the block before the definition is expanded. │ │ │ │

│ │ │ │

│ │ │ │ A more thorough discussion and more elaborate examples are discussed in the │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,52 +1,48 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: BBLLOOCCKKDDEEFF,, //BBLLOOCCKKDDEEFF ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n   <_[_[_r_e_f_]_]_s_e_t time="0"> │ │ │ │ │ -  _L_i_c_e_n_s_e   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ -  _T_u_t_o_r_i_a_l     a is expanded at time <_[_[_r_e_f_]_]_u_s_e time>. │ │ │ │ │ -  _U_s_a_g_e   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -  HTP Tags   <_[_[_r_e_f_]_]_b_l_o_c_k name=b expand> │ │ │ │ │ -    _A_L_T_T_E_X_T     b is expanded at time <_[_[_r_e_f_]_]_u_s_e time>. │ │ │ │ │ -    _B_L_O_C_K   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -  [>] _B_L_O_C_K_D_E_F   <_[_[_r_e_f_]_]_s_e_t time="1"> │ │ │ │ │ -    _D_E_F   <_[_[_r_e_f_]_]_u_s_e a> │ │ │ │ │ -    _F_I_L_E   <_[_[_r_e_f_]_]_u_s_e b> │ │ │ │ │ -    _I_F   contents of a: <_[_[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ -    _I_N_C   contents of b: <_[_[_r_e_f_]_]_u_s_e b noexpand> │ │ │ │ │ -    _I_M_G   <_[_[_r_e_f_]_]_b_l_o_c_k name=c expand> │ │ │ │ │ -    _I_M_A_G_E_U_R_L     c is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ -    _O_P_T _[_r_e_f_]_]_u_s_e a> │ │ │ │ │ -    _O_U_T_P_U_T   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -    _Q_U_O_T_E   <_[_[_r_e_f_]_]_b_l_o_c_k name=d expand> │ │ │ │ │ -    _S_E_T     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ -    _U_N_D_E_F _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ -    _U_N_S_E_T   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ -    _W_H_I_L_E     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ -    _<_!_-_-_- _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ -  _H_i_s_t_o_r_y   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -  _W_i_s_h_ _l_i_s_t   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ -  _B_u_g_s   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n ********** ssyynnooppssiiss ********** │ │ │ │ │ +  _L_i_c_e_n_s_e BBLLOOCCKKDDEEFF creates block _m_e_t_a_t_a_g_s, which is a fancy │ │ │ │ │ +  _T_u_t_o_r_i_a_l way of saying it creates new block tags. A block │ │ │ │ │ +  _U_s_a_g_e tag is a tag that takes a whole block as additional │ │ │ │ │ +  HTP Tags parameter. This block is surrounded by │ │ │ │ │ +    _A_L_T_T_E_X_T and . The contents of this block are │ │ │ │ │ +    _B_L_O_C_K automatically stored in the block macro named │ │ │ │ │ +  [>] _B_L_O_C_K_D_E_F BLOCK. │ │ │ │ │ +    _D_E_F For example: │ │ │ │ │ +    _F_I_L_E <_[_[_r_e_f_]_]_u_s_e macroname [parameters ...] [noexpand]> │ │ │ │ │ +    _I_F <... $macroname ...> │ │ │ │ │ +    _I_N_C <... ${macroname} ...> │ │ │ │ │ +    _I_M_G │ │ │ │ │ +    _I_M_A_G_E_U_R_L ludefilename" [parameters ...]> │ │ │ │ │ +    _O_P_T <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ │ +    _O_U_T_P_U_T <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ │ +    _Q_U_O_T_E (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ │ +    _S_E_T <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time[ ="format" ]> │ │ │ │ │ +    _U_N_D_E_F <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] date[ ="format" ]> │ │ │ │ │ +    _U_N_S_E_T <_[_[_r_e_f_]_]_f_i_l_e search="searchpath"> │ │ │ │ │ +    _U_S_E_,_ _$ <_[_[_r_e_f_]_]_f_i_l_e template="templatefilename"> │ │ │ │ │ +    _W_H_I_L_E │ │ │ │ │ +    _<_!_-_-_- nd> │ │ │ │ │ +  _H_i_s_t_o_r_y     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +  _W_i_s_h_ _l_i_s_t _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +  _B_u_g_s   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ +     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ + _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ +   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ │ time>. │ │ │ │ │   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │   <_[_[_r_e_f_]_]_u_s_e c> │ │ │ │ │   <_[_[_r_e_f_]_]_u_s_e d> │ │ │ │ │   <_[_[_r_e_f_]_]_u_s_e e> │ │ │ │ │ - ********** ssyynnooppssiiss ********** │ │ │ │ │ - BBLLOOCCKKDDEEFF creates block _m_e_t_a_t_a_g_s, which is a fancy │ │ │ │ │ - way of saying it creates new block tags. A block │ │ │ │ │ - tag is a tag that takes a whole block as additional │ │ │ │ │ - parameter. This block is surrounded by │ │ │ │ │ - and . The contents of this block are │ │ │ │ │ - automatically stored in the block macro named │ │ │ │ │ - BLOCK. │ │ │ │ │ - For example: │ │ │ │ │ -     <_[_[_r_e_f_]_]_I_F name="Jim">...<_[_[_r_e_f_]_]_/_I_F> │ │ │ │ │ All block metatags have the implicit option _E_X_P_A_N_D, │ │ │ │ │ which tells htp to expand the contents of the block │ │ │ │ │ before the definition is expanded. │ │ │ │ │ A more thorough discussion and more elaborate │ │ │ │ │ examples are discussed in the _m_e_t_a_t_a_g section. │ │ │ ├── ./usr/share/doc/htp/comment.html │ │ │ │ @@ -114,60 +114,52 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -  <[ref]set time="0">
│ │ │ │ -  <[ref]block name=a>
│ │ │ │ -    a is expanded at time <[ref]use time>.
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]block name=b expand>
│ │ │ │ -    b is expanded at time <[ref]use time>.
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]set time="1">
│ │ │ │ -  <[ref]use a>
│ │ │ │ -  <[ref]use b>
│ │ │ │ -  contents of a: <[ref]use a noexpand>
│ │ │ │ -  contents of b: <[ref]use b noexpand>
│ │ │ │ -  <[ref]block name=c expand>
│ │ │ │ -    c is expanded at time <[ref]use time>; <[ref]use a>
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]block name=d expand>
│ │ │ │ -    d is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]block name=e>
│ │ │ │ -    e is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]set time="2">
│ │ │ │ -  <[ref]block name=a>
│ │ │ │ -    a is defined for the 2nd time <[ref]use time>.
│ │ │ │ -  <[ref]/block>
│ │ │ │ -  <[ref]use c>
│ │ │ │ -  <[ref]use d>
│ │ │ │ -  <[ref]use e>
│ │ │ │ +    <[ref]def name="centered">
│ │ │ │ +    <p align=center>
│ │ │ │ +    <[ref]/def>
│ │ │ │ +
│ │ │ │ +    <centered>
│ │ │ │ +    This text is centered.
│ │ │ │ +se time>.
│ │ │ │ +  contents of b:   b is expanded at time 0.
│ │ │ │ +    c is expanded at time 1;   a is expanded at time 1.
│ │ │ │ +    d is expanded at time 1;   a is expanded at time 2.
│ │ │ │ +    e is expanded at time 2;   a is defined for the 2nd time <[ref]use time>.
│ │ │ │

│ │ │ │

synopsis

│ │ │ │

│ │ │ │ This is a simple comment that is not included in the output. This is useful │ │ │ │ when commenting metatags, since the metatags do not appear the output either. │ │ │ │ Example: │ │ │ │

│ │ │ │

│ │ │ │ -<[ref]INC macroname1="increment1" [macroname2="increment2" ... ] [GLOBAL]>
│ │ │ │ +  <[ref]def name="sharedimg" option="name alt">
│ │ │ │ +    <[ref]img src="/home/sharedimages/${name}" alt="${alt}">;
│ │ │ │ +  <[ref]/def>
│ │ │ │
│ │ │ │ +  <sharedimg name="bubble.gif" alt="Bubble image">
│ │ │ │

│ │ │ │

│ │ │ │ Note that these comments should not include < or >, that is you │ │ │ │ should not use it to comment out htp code. For that purpose use something │ │ │ │ like this: │ │ │ │

│ │ │ │

│ │ │ │ -    <[ref]IF name>...<[ref]/IF>
│ │ │ │ +  <[ref]set sect-ctr="0">
│ │ │ │ +  <[ref]blockdef name="section">
│ │ │ │ +    <[ref]inc sect-ctr>
│ │ │ │ +    <[ref]block name="sect-${sect-ctr}" expand global>
│ │ │ │ +      <[ref]use block noexpand>
│ │ │ │ +    <[ref]/block>
│ │ │ │ +  <[ref]/blockdef>
│ │ │ │

│ │ │ │

Make sure that the variable is never defined and xyz should be the │ │ │ │ reason why you don't want to include this block

│ │ │ │

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,54 +1,46 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: < │ │ │ │ │ -  _L_i_c_e_n_s_e   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ -  _T_u_t_o_r_i_a_l     a is expanded at time <_[_[_r_e_f_]_]_u_s_e time>. │ │ │ │ │ -  _U_s_a_g_e   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -  HTP Tags   <_[_[_r_e_f_]_]_b_l_o_c_k name=b expand> │ │ │ │ │ -    _A_L_T_T_E_X_T     b is expanded at time <_[_[_r_e_f_]_]_u_s_e time>. │ │ │ │ │ -    _B_L_O_C_K   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -    _B_L_O_C_K_D_E_F   <_[_[_r_e_f_]_]_s_e_t time="1"> │ │ │ │ │ -    _D_E_F   <_[_[_r_e_f_]_]_u_s_e a> │ │ │ │ │ -    _F_I_L_E   <_[_[_r_e_f_]_]_u_s_e b> │ │ │ │ │ -    _I_F   contents of a: <_[_[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ -    _I_N_C   contents of b: <_[_[_r_e_f_]_]_u_s_e b noexpand> │ │ │ │ │ -    _I_M_G   <_[_[_r_e_f_]_]_b_l_o_c_k name=c expand> │ │ │ │ │ -    _I_M_A_G_E_U_R_L     c is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ -    _O_P_T _[_r_e_f_]_]_u_s_e a> │ │ │ │ │ -    _O_U_T_P_U_T   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -    _Q_U_O_T_E   <_[_[_r_e_f_]_]_b_l_o_c_k name=d expand> │ │ │ │ │ -    _S_E_T     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ -    _U_N_D_E_F _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ -    _U_N_S_E_T   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ -    _W_H_I_L_E     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ -  [>] _<_!_-_-_- _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ -  _H_i_s_t_o_r_y   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -  _W_i_s_h_ _l_i_s_t   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ -  _B_u_g_s   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ -     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ │ - time>. │ │ │ │ │ -   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -   <_[_[_r_e_f_]_]_u_s_e c> │ │ │ │ │ -   <_[_[_r_e_f_]_]_u_s_e d> │ │ │ │ │ -   <_[_[_r_e_f_]_]_u_s_e e> │ │ │ │ │ - ********** ssyynnooppssiiss ********** │ │ │ │ │ - This is a simple comment that is not included in │ │ │ │ │ - the output. This is useful when commenting │ │ │ │ │ - metatags, since the metatags do not appear the │ │ │ │ │ - output either. Example: │ │ │ │ │ - <_[_[_r_e_f_]_]_I_N_C macroname1="increment1" │ │ │ │ │ - [macroname2="increment2" ... ] [GLOBAL]> │ │ │ │ │ - │ │ │ │ │ - Note that these comments should not include < or >, │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n     <_[_[_r_e_f_]_]_d_e_f name="centered"> │ │ │ │ │ +  _L_i_c_e_n_s_e    

│ │ │ │ │ +  _T_u_t_o_r_i_a_l     <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ │ +  _U_s_a_g_e │ │ │ │ │ +  HTP Tags     │ │ │ │ │ +    _A_L_T_T_E_X_T     This text is centered. │ │ │ │ │ +    _B_L_O_C_K se time>. │ │ │ │ │ +    _B_L_O_C_K_D_E_F   contents of b:   b is expanded at time 0. │ │ │ │ │ +    _D_E_F     c is expanded at time 1;   a is expanded at │ │ │ │ │ +    _F_I_L_E time 1. │ │ │ │ │ +    _I_F     d is expanded at time 1;   a is expanded at │ │ │ │ │ +    _I_N_C time 2. │ │ │ │ │ +    _I_M_G     e is expanded at time 2;   a is defined for the │ │ │ │ │ +    _I_M_A_G_E_U_R_L 2nd time <_[_[_r_e_f_]_]_u_s_e time>. │ │ │ │ │ +    _O_P_T ********** ssyynnooppssiiss ********** │ │ │ │ │ +    _O_U_T_P_U_T This is a simple comment that is not included in │ │ │ │ │ +    _Q_U_O_T_E the output. This is useful when commenting │ │ │ │ │ +    _S_E_T metatags, since the metatags do not appear the │ │ │ │ │ +    _U_N_D_E_F output either. Example: │ │ │ │ │ +    _U_N_S_E_T   <_[_[_r_e_f_]_]_d_e_f name="sharedimg" option="name alt"> │ │ │ │ │ +    _U_S_E_,_ _$     <_[_[_r_e_f_]_]_i_m_g src="/home/sharedimages/${name}" │ │ │ │ │ +    _W_H_I_L_E alt="${alt}">; │ │ │ │ │ +  [>] _<_!_-_-_-   <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ │ +  _H_i_s_t_o_r_y │ │ │ │ │ +  _W_i_s_h_ _l_i_s_t   │ │ │ │ │ +  _B_u_g_s Note that these comments should not include < or >, │ │ │ │ │ that is you should not use it to comment out htp │ │ │ │ │ code. For that purpose use something like this: │ │ │ │ │ -     <_[_[_r_e_f_]_]_I_F name>...<_[_[_r_e_f_]_]_/_I_F> │ │ │ │ │ +   <_[_[_r_e_f_]_]_s_e_t sect-ctr="0"> │ │ │ │ │ +   <_[_[_r_e_f_]_]_b_l_o_c_k_d_e_f name="section"> │ │ │ │ │ +     <_[_[_r_e_f_]_]_i_n_c sect-ctr> │ │ │ │ │ +     <_[_[_r_e_f_]_]_b_l_o_c_k name="sect-${sect-ctr}" expand │ │ │ │ │ + global> │ │ │ │ │ +       <_[_[_r_e_f_]_]_u_s_e block noexpand> │ │ │ │ │ +     <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +   <_[_[_r_e_f_]_]_/_b_l_o_c_k_d_e_f> │ │ │ │ │ Make sure that the variable is never defined and │ │ │ │ │ xyz should be the reason why you don't want to │ │ │ │ │ include this block │ │ │ ├── ./usr/share/doc/htp/def.html │ │ │ │ @@ -114,62 +114,72 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -<[ref]IF [NOT] conditional>
│ │ │ │ -    block #1
│ │ │ │ -[
│ │ │ │ -<ELSEIF [NOT] conditional>
│ │ │ │ -    block #2
│ │ │ │ -...
│ │ │ │ -]
│ │ │ │ -[
│ │ │ │ -<ELSE>
│ │ │ │ -    block #3
│ │ │ │ -]
│ │ │ │ -<[ref]/IF>
│ │ │ │ +<[ref]use macroname [parameters ...] [noexpand]>
│ │ │ │ +<... $macroname ...>
│ │ │ │ +<... ${macroname} ...>
│ │ │ │
│ │ │ │ +ludefilename" [parameters ...]>
│ │ │ │ +<[ref]file name>
│ │ │ │ +<[ref]file [ name="filename" ] size[ = (byte|kbyte|mbyte|gbyte) ] [precision=n]>
│ │ │ │ +<[ref]file [ name="filename" ] time[ ="format" ]>
│ │ │ │ +<[ref]file [ name="filename" ] date[ ="format" ]>
│ │ │ │ +<[ref]file search="searchpath">
│ │ │ │ +<[ref]file template="templatefilename">
│ │ │ │ +
│ │ │ │ +nd>
│ │ │ │ +    d is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]block name=e>
│ │ │ │ +    e is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]set time="2">
│ │ │ │ +  <[ref]block name=a>
│ │ │ │ +    a is defined for the 2nd time <[ref]use time>.
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]use c>
│ │ │ │ +  <[ref]use d>
│ │ │ │ +  <[ref]use e>
│ │ │ │

│ │ │ │

synopsis

│ │ │ │

│ │ │ │ DEF creates metatags, which is a │ │ │ │ fancy way of saying it creates new tags. The mechanism is very similar to │ │ │ │ BLOCK macros, except that the USE │ │ │ │ tag is not used to expand them. Instead, they are expanded by their own name. │ │ │ │ For example: │ │ │ │

│ │ │ │

│ │ │ │ -<[ref]INC macroname1="increment1" [macroname2="increment2" ... ] [GLOBAL]>
│ │ │ │ -
│ │ │ │ +    <[ref]IF name>...<[ref]/IF>
│ │ │ │

│ │ │ │

│ │ │ │ Some metatags will require an opening and closing tag (comparable to │ │ │ │ and ). In this case, you should use the BLOCKDEF macro. Another slightly faster │ │ │ │ alternative is to use two metatags, the opening tag and the closing │ │ │ │ tag with a preceding slash. For example: │ │ │ │

│ │ │ │

│ │ │ │ -    File image.gif <[ref]FILE NAME="image.gif" SIZE=KBYTE> kilobytes
│ │ │ │ -    Last modified <[ref]FILE NAME="image.gif" TIME>, <[ref]FILE NAME="image.gif" DATE>
│ │ │ │ +<a href="mailto:$email">mailto hyperlink</a>
│ │ │ │ +<a href="http://$domain/~${username}/">another hyperlink</a>
│ │ │ │

│ │ │ │

You should really use BLOCKDEF, though, │ │ │ │ as it will check for matching end tag. It is not that slower.

│ │ │ │

│ │ │ │ Options can be passed to a metatag, which can then expand as if it were │ │ │ │ a SET macro. Option names are parameterized with │ │ │ │ the OPTION attribute. Multiple options can be listed by separating their │ │ │ │ name with a space (which therefore requires they be surrounded by quotes.) │ │ │ │

│ │ │ │

│ │ │ │ -    <[ref]FILE INCLUDE="include.hti" name="Jim Nelson" email="jnelson@crl.com">
│ │ │ │ -    This tag will fail: <[ref]USE name>
│ │ │ │ +    <${tagName} ${attrName}=${value$ctr}>
│ │ │ │

│ │ │ │

│ │ │ │ htp will do very specific checking of parameters when a metatag is │ │ │ │ invoked. htp assumes that all parameter options to the metatag are │ │ │ │ optional. This is why the HEADERIMG definition uses IF to verify the │ │ │ │ SIZE option is defined before expanding it in the block. If a │ │ │ │ parameter is required, simply expand it without first checking. When │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,54 +1,65 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: DDEEFF,, //DDEEFF ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_I_F [NOT] conditional> │ │ │ │ │ -  _L_i_c_e_n_s_e     block #1 │ │ │ │ │ -  _T_u_t_o_r_i_a_l [ │ │ │ │ │ -  _U_s_a_g_e │ │ │ │ │ -  HTP Tags     block #2 │ │ │ │ │ -    _A_L_T_T_E_X_T ... │ │ │ │ │ -    _B_L_O_C_K ] │ │ │ │ │ -    _B_L_O_C_K_D_E_F [ │ │ │ │ │ -  [>] _D_E_F │ │ │ │ │ -    _F_I_L_E     block #3 │ │ │ │ │ -    _I_F ] │ │ │ │ │ -    _I_N_C <_[_[_r_e_f_]_]_/_I_F> │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_u_s_e macroname [parameters ...] [noexpand]> │ │ │ │ │ +  _L_i_c_e_n_s_e <... $macroname ...> │ │ │ │ │ +  _T_u_t_o_r_i_a_l <... ${macroname} ...> │ │ │ │ │ +  _U_s_a_g_e │ │ │ │ │ +  HTP Tags ludefilename" [parameters ...]> │ │ │ │ │ +    _A_L_T_T_E_X_T <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ │ +    _B_L_O_C_K <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ │ +    _B_L_O_C_K_D_E_F (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ │ +  [>] _D_E_F <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time[ ="format" ]> │ │ │ │ │ +    _F_I_L_E <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] date[ ="format" ]> │ │ │ │ │ +    _I_F <_[_[_r_e_f_]_]_f_i_l_e search="searchpath"> │ │ │ │ │ +    _I_N_C <_[_[_r_e_f_]_]_f_i_l_e template="templatefilename"> │ │ │ │ │     _I_M_G │ │ │ │ │ -    _I_M_A_G_E_U_R_L ********** ssyynnooppssiiss ********** │ │ │ │ │ -    _O_P_T DDEEFF creates _m_e_t_a_t_a_g_s, which is a fancy way of │ │ │ │ │ -    _O_U_T_P_U_T saying it creates new tags. The mechanism is very │ │ │ │ │ -    _Q_U_O_T_E similar to _B_L_O_C_K macros, except that the _U_S_E tag is │ │ │ │ │ -    _S_E_T not used to expand them. Instead, they are expanded │ │ │ │ │ -    _U_N_D_E_F by their own name. For example: │ │ │ │ │ -    _U_N_S_E_T <_[_[_r_e_f_]_]_I_N_C macroname1="increment1" │ │ │ │ │ -    _U_S_E_,_ _$ [macroname2="increment2" ... ] [GLOBAL]> │ │ │ │ │ -    _W_H_I_L_E │ │ │ │ │ -    _<_!_-_-_- Some metatags will require an opening and closing │ │ │ │ │ -  _H_i_s_t_o_r_y tag (comparable to │ │ │ │ │ -  _W_i_s_h_ _l_i_s_t and │ │ │ │ │ -  _B_u_g_s ). In this case, you should use the _B_L_O_C_K_D_E_F macro. │ │ │ │ │ +    _I_M_A_G_E_U_R_L nd> │ │ │ │ │ +    _O_P_T     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _O_U_T_P_U_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _Q_U_O_T_E   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _S_E_T   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ +    _U_N_D_E_F     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _U_N_S_E_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _W_H_I_L_E   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ +    _<_!_-_-_-   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ +  _H_i_s_t_o_r_y     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ │ +  _W_i_s_h_ _l_i_s_t time>. │ │ │ │ │ +  _B_u_g_s   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e c> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e d> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e e> │ │ │ │ │ + ********** ssyynnooppssiiss ********** │ │ │ │ │ + DDEEFF creates _m_e_t_a_t_a_g_s, which is a fancy way of │ │ │ │ │ + saying it creates new tags. The mechanism is very │ │ │ │ │ + similar to _B_L_O_C_K macros, except that the _U_S_E tag is │ │ │ │ │ + not used to expand them. Instead, they are expanded │ │ │ │ │ + by their own name. For example: │ │ │ │ │ +     <_[_[_r_e_f_]_]_I_F name>...<_[_[_r_e_f_]_]_/_I_F> │ │ │ │ │ + Some metatags will require an opening and closing │ │ │ │ │ + tag (comparable to │ │ │ │ │ + and │ │ │ │ │ + ). In this case, you should use the _B_L_O_C_K_D_E_F macro. │ │ │ │ │ Another slightly faster alternative is to use two │ │ │ │ │ metatags, the opening tag and the closing tag with │ │ │ │ │ a preceding slash. For example: │ │ │ │ │ -     File image.gif <_[_[_r_e_f_]_]_F_I_L_E NAME="image.gif" │ │ │ │ │ - SIZE=KBYTE> kilobytes │ │ │ │ │ -     Last modified <_[_[_r_e_f_]_]_F_I_L_E NAME="image.gif" │ │ │ │ │ - TIME>, <_[_[_r_e_f_]_]_F_I_L_E NAME="image.gif" DATE> │ │ │ │ │ + mailto hyperlink │ │ │ │ │ + another │ │ │ │ │ + hyperlink │ │ │ │ │ You should really use _B_L_O_C_K_D_E_F, though, as it will │ │ │ │ │ check for matching end tag. It is not that slower. │ │ │ │ │ Options can be passed to a metatag, which can then │ │ │ │ │ expand as if it were a _S_E_T macro. Option names are │ │ │ │ │ parameterized with the OPTION attribute. Multiple │ │ │ │ │ options can be listed by separating their name with │ │ │ │ │ a space (which therefore requires they be │ │ │ │ │ surrounded by quotes.) │ │ │ │ │ -     <_[_[_r_e_f_]_]_F_I_L_E INCLUDE="include.hti" name="Jim │ │ │ │ │ - Nelson" email="jnelson@crl.com"> │ │ │ │ │ -     This tag will fail: <_[_[_r_e_f_]_]_U_S_E name> │ │ │ │ │ +     <${tagName} ${attrName}=${value$ctr}> │ │ │ │ │ htp will do very specific checking of parameters │ │ │ │ │ when a metatag is invoked. htp assumes that all │ │ │ │ │ parameter options to the metatag are optional. This │ │ │ │ │ is why the HEADERIMG definition uses IF to verify │ │ │ │ │ the SIZE option is defined before expanding it in │ │ │ │ │ the block. If a parameter is required, simply │ │ │ │ │ expand it without first checking. When htp expands │ │ │ ├── ./usr/share/doc/htp/expand.html │ │ │ │ @@ -98,47 +98,18 @@ │ │ │ │

However, if the block tag is marked with the expand │ │ │ │ modifier it is expanded immediately. This is useful if you want to │ │ │ │ store something in a block macro, that depends on the current value of │ │ │ │ another macro. This other macro may no longer have the correct value │ │ │ │ when the macro is expanded. Here is some code that demonstrate when │ │ │ │ the htp tags are expanded:

│ │ │ │

│ │ │ │ - 1. <[ref]imageurl url="imageurl" [ path="path/in/local/filesystem" ]>
│ │ │ │ - 2.
│ │ │ │

│ │ │ │ This produces the following: │ │ │ │

│ │ │ │ -  <[ref]def name="bigfont">
│ │ │ │ -    <font size="+4">
│ │ │ │ -  <[ref]/def>
│ │ │ │ -
│ │ │ │ -  <[ref]def name="/bigfont">
│ │ │ │ -    </font>
│ │ │ │ -  <[ref]/def>
│ │ │ │ -
│ │ │ │ -  <bigfont>Some large text</bigfont>
│ │ │ │ - For this line: <[ref]img src="logo.gif">
│ │ │ │ -  the local filename "logo.gif" will be used to determine image dimensions
│ │ │ │ -  (no URL replacement).
│ │ │ │ -
│ │ │ │ -  For this line: <[ref]img src="http://my.domain.org/logo.gif">
│ │ │ │ -  the local filename "/var/www/my.domain/logo.gif" will be used.
│ │ │ │ -
│ │ │ │ -  But for this line: <[ref]img src="http://other.domain.org/logo.gif">
│ │ │ │ -  the local file cannot be found (no prefix match), so the image dimensions
│ │ │ │ -  will not be added.
│ │ │ │ -
│ │ │ │ -  Order is important; last IMAGEURL tag takes precedence:
│ │ │ │ -  <[ref]imageurl url="/" path="/var/www/htdocs/">
│ │ │ │ -  <[ref]imageurl url="/test/" path="/var/www/test/">
│ │ │ │ -
│ │ │ │ -  <[ref]img src="/image.gif"> and <[ref]img src="/test/image.gif"> are mapped to
│ │ │ │ -  /var/www/htdocs/image.gif and /var/www/test/image.gif, resp.
│ │ │ │ -  If the order of the imageurl lines would be swapped, the second
│ │ │ │ -  image would be mapped to /var/www/htdocs/test/image.gif.
│ │ │ │ +    <[ref]IF name>...<[ref]/IF>
│ │ │ │

│ │ │ │

│ │ │ │ When block a and block b are defined in lines 2-7 the contents of a │ │ │ │ are taken literally, however, the contents for b are already expanded │ │ │ │ so the macro time is evaluated. So a is expanded when it │ │ │ │ is used, while the contents of b are already expanded. │ │ │ │

│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -24,57 +24,16 @@ │ │ │ │ │ However, if the block tag is marked with the expand │ │ │ │ │ modifier it is expanded immediately. This is useful │ │ │ │ │ if you want to store something in a block macro, │ │ │ │ │ that depends on the current value of another macro. │ │ │ │ │ This other macro may no longer have the correct │ │ │ │ │ value when the macro is expanded. Here is some code │ │ │ │ │ that demonstrate when the htp tags are expanded: │ │ │ │ │ -  1. <_[_[_r_e_f_]_]_i_m_a_g_e_u_r_l url="imageurl" [ path="path/ │ │ │ │ │ - in/local/filesystem" ]> │ │ │ │ │ -  2. │ │ │ │ │ This produces the following: │ │ │ │ │ -   <_[_[_r_e_f_]_]_d_e_f name="bigfont"> │ │ │ │ │ -     │ │ │ │ │ -   <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ │ - │ │ │ │ │ -   <_[_[_r_e_f_]_]_d_e_f name="/bigfont"> │ │ │ │ │ -     │ │ │ │ │ -   <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ │ - │ │ │ │ │ -   Some large text │ │ │ │ │ -  For this line: <_[_[_r_e_f_]_]_i_m_g src="logo.gif"> │ │ │ │ │ -   the local filename "logo.gif" will be used to │ │ │ │ │ - determine image dimensions │ │ │ │ │ -   (no URL replacement). │ │ │ │ │ - │ │ │ │ │ -   For this line: <_[_[_r_e_f_]_]_i_m_g src="http:// │ │ │ │ │ - my.domain.org/logo.gif"> │ │ │ │ │ -   the local filename "/var/www/my.domain/logo.gif" │ │ │ │ │ - will be used. │ │ │ │ │ - │ │ │ │ │ -   But for this line: <_[_[_r_e_f_]_]_i_m_g src="http:// │ │ │ │ │ - other.domain.org/logo.gif"> │ │ │ │ │ -   the local file cannot be found (no prefix match), │ │ │ │ │ - so the image dimensions │ │ │ │ │ -   will not be added. │ │ │ │ │ - │ │ │ │ │ -   Order is important; last IMAGEURL tag takes │ │ │ │ │ - precedence: │ │ │ │ │ -   <_[_[_r_e_f_]_]_i_m_a_g_e_u_r_l url="/" path="/var/www/htdocs/"> │ │ │ │ │ -   <_[_[_r_e_f_]_]_i_m_a_g_e_u_r_l url="/test/" path="/var/www/ │ │ │ │ │ - test/"> │ │ │ │ │ - │ │ │ │ │ -   <_[_[_r_e_f_]_]_i_m_g src="/image.gif"> and <_[_[_r_e_f_]_]_i_m_g │ │ │ │ │ - src="/test/image.gif"> are mapped to │ │ │ │ │ -   /var/www/htdocs/image.gif and /var/www/test/ │ │ │ │ │ - image.gif, resp. │ │ │ │ │ -   If the order of the imageurl lines would be │ │ │ │ │ - swapped, the second │ │ │ │ │ -   image would be mapped to /var/www/htdocs/test/ │ │ │ │ │ - image.gif. │ │ │ │ │ +     <_[_[_r_e_f_]_]_I_F name>...<_[_[_r_e_f_]_]_/_I_F> │ │ │ │ │ When block a and block b are defined in lines 2- │ │ │ │ │ 7 the contents of a are taken literally, however, │ │ │ │ │ the contents for b are already expanded so the │ │ │ │ │ macro time is evaluated. So a is expanded when it │ │ │ │ │ is used, while the contents of b are already │ │ │ │ │ expanded. │ │ │ │ │ In line 10 and 12 the _[_[_r_e_f_]_]_u_s_e tag is used with │ │ │ ├── ./usr/share/doc/htp/file.html │ │ │ │ @@ -114,15 +114,14 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -    <[ref]IF name="Jim">...<[ref]/IF>
│ │ │ │

│ │ │ │

synopsis

│ │ │ │ FILE has several optional parameters of differing purpose. │ │ │ │ The output file's name, the current date and time, and the contents of │ │ │ │ another file may be included. Another file's time, date, or size may be │ │ │ │ added to the output file as well. │ │ │ │

│ │ │ │ @@ -134,21 +133,14 @@ │ │ │ │

│ │ │ │

NAME, TIME, SIZE

│ │ │ │

│ │ │ │ To include information about another file, such as an archive file or │ │ │ │ graphic image, specify its name with the NAME attribute followed by the │ │ │ │ type of information to be displayed: │ │ │ │

│ │ │ │ -  <[ref]blockdef name="bolditalic">
│ │ │ │ -    <b><i>
│ │ │ │ -    <[ref]use block>
│ │ │ │ -    </i></b>
│ │ │ │ -  <[ref]/blockdef>
│ │ │ │ -
│ │ │ │ -  This is <bolditalic>bold and italic</bolditalic>
│ │ │ │

│ │ │ │

│ │ │ │ For file size information, the value BYTE, KBYTE, etc. dictates how the │ │ │ │ information is displayed. In anything other than byte format, the information │ │ │ │ is displayed in floating-point notation. The amount of precision (the number │ │ │ │ of digits to the right of the decimal point) can be set with the optional │ │ │ │ PRECISION attribute. The default precision is zero (0), which means no │ │ │ │ @@ -177,17 +169,15 @@ │ │ │ │

│ │ │ │ Additional parameters can be set in the FILE INCLUDE tag, which are │ │ │ │ interpreted as macros that are "passed" to the included file. The macros │ │ │ │ are available only to the include file (and any macros or included files it │ │ │ │ holds). After the file is completely included, the macros are no longer │ │ │ │ available. So: │ │ │ │

│ │ │ │ -<[ref]UNDEF tagname>
│ │ │ │ -<[ref]UNDEF tagname1 tagname2 ... >
│ │ │ │ -
│ │ │ │ +    <${tagName} ${attrName}=${value$ctr}>
│ │ │ │

│ │ │ │

│ │ │ │ Macros named "name" and "email" are set, and available inside the included │ │ │ │ file. They are not available, however, past the tag (which is why the │ │ │ │ second statement will fail.) │ │ │ │

│ │ │ │

TEMPLATE

│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,44 +1,36 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: FFIILLEE ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n     <_[_[_r_e_f_]_]_I_F name="Jim">...<_[_[_r_e_f_]_]_/_I_F> │ │ │ │ │ -  _L_i_c_e_n_s_e ********** ssyynnooppssiiss ********** │ │ │ │ │ -  _T_u_t_o_r_i_a_l FFIILLEE has several optional parameters of differing │ │ │ │ │ -  _U_s_a_g_e purpose. The output file's name, the current date │ │ │ │ │ -  HTP Tags and time, and the contents of another file may be │ │ │ │ │ -    _A_L_T_T_E_X_T included. Another file's time, date, or size may be │ │ │ │ │ -    _B_L_O_C_K added to the output file as well. │ │ │ │ │ -    _B_L_O_C_K_D_E_F As with all HTML, these tags do not have to be on │ │ │ │ │ -    _D_E_F their own line, so the following is perfectly │ │ │ │ │ -  [>] _F_I_L_E acceptable: │ │ │ │ │ -    _I_F     <_[_[_r_e_f_]_]_I_F name>...<_[_[_r_e_f_]_]_/_I_F> │ │ │ │ │ -    _I_N_C ******** NNAAMMEE,, TTIIMMEE,, SSIIZZEE ******** │ │ │ │ │ -    _I_M_G To include information about another file, such as │ │ │ │ │ -    _I_M_A_G_E_U_R_L an archive file or graphic image, specify its name │ │ │ │ │ -    _O_P_T with the NAME attribute followed by the type of │ │ │ │ │ -    _O_U_T_P_U_T information to be displayed: │ │ │ │ │ -    _Q_U_O_T_E   <_[_[_r_e_f_]_]_b_l_o_c_k_d_e_f name="bolditalic"> │ │ │ │ │ -    _S_E_T     │ │ │ │ │ -    _U_N_D_E_F     <_[_[_r_e_f_]_]_u_s_e block> │ │ │ │ │ -    _U_N_S_E_T     │ │ │ │ │ -    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_/_b_l_o_c_k_d_e_f> │ │ │ │ │ -    _W_H_I_L_E │ │ │ │ │ -    _<_!_-_-_-   This is bold and italic │ │ │ │ │ -  _H_i_s_t_o_r_y For file size information, the value BYTE, KBYTE, │ │ │ │ │ -  _W_i_s_h_ _l_i_s_t etc. dictates how the information is displayed. In │ │ │ │ │ -  _B_u_g_s anything other than byte format, the information is │ │ │ │ │ - displayed in floating-point notation. The amount of │ │ │ │ │ - precision (the number of digits to the right of the │ │ │ │ │ - decimal point) can be set with the optional │ │ │ │ │ - PRECISION attribute. The default precision is zero │ │ │ │ │ - (0), which means no fractional portion is │ │ │ │ │ - displayed. │ │ │ │ │ - At the request of many people, the TIME and DATE │ │ │ │ │ - attributes will now accept formatting characters │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n ********** ssyynnooppssiiss ********** │ │ │ │ │ +  _L_i_c_e_n_s_e FFIILLEE has several optional parameters of differing │ │ │ │ │ +  _T_u_t_o_r_i_a_l purpose. The output file's name, the current date │ │ │ │ │ +  _U_s_a_g_e and time, and the contents of another file may be │ │ │ │ │ +  HTP Tags included. Another file's time, date, or size may be │ │ │ │ │ +    _A_L_T_T_E_X_T added to the output file as well. │ │ │ │ │ +    _B_L_O_C_K As with all HTML, these tags do not have to be on │ │ │ │ │ +    _B_L_O_C_K_D_E_F their own line, so the following is perfectly │ │ │ │ │ +    _D_E_F acceptable: │ │ │ │ │ +  [>] _F_I_L_E     <_[_[_r_e_f_]_]_I_F name>...<_[_[_r_e_f_]_]_/_I_F> │ │ │ │ │ +    _I_F ******** NNAAMMEE,, TTIIMMEE,, SSIIZZEE ******** │ │ │ │ │ +    _I_N_C To include information about another file, such as │ │ │ │ │ +    _I_M_G an archive file or graphic image, specify its name │ │ │ │ │ +    _I_M_A_G_E_U_R_L with the NAME attribute followed by the type of │ │ │ │ │ +    _O_P_T information to be displayed: │ │ │ │ │ +    _O_U_T_P_U_T For file size information, the value BYTE, KBYTE, │ │ │ │ │ +    _Q_U_O_T_E etc. dictates how the information is displayed. In │ │ │ │ │ +    _S_E_T anything other than byte format, the information is │ │ │ │ │ +    _U_N_D_E_F displayed in floating-point notation. The amount of │ │ │ │ │ +    _U_N_S_E_T precision (the number of digits to the right of the │ │ │ │ │ +    _U_S_E_,_ _$ decimal point) can be set with the optional │ │ │ │ │ +    _W_H_I_L_E PRECISION attribute. The default precision is zero │ │ │ │ │ +    _<_!_-_-_- (0), which means no fractional portion is │ │ │ │ │ +  _H_i_s_t_o_r_y displayed. │ │ │ │ │ +  _W_i_s_h_ _l_i_s_t At the request of many people, the TIME and DATE │ │ │ │ │ +  _B_u_g_s attributes will now accept formatting characters │ │ │ │ │ that are passed directly into the ANSI C library │ │ │ │ │ function. This allows for the time and date to be │ │ │ │ │ displayed in virtually any format. Users not │ │ │ │ │ wishing to mess around with this should stick to │ │ │ │ │ the default format, which is used if no formatting │ │ │ │ │ value is specified (i.e., just using 05:04:11 PM). │ │ │ │ │ Consult any C programmer's guide discussing the │ │ │ │ │ @@ -58,17 +50,15 @@ │ │ │ │ │ Additional parameters can be set in the FILE │ │ │ │ │ INCLUDE tag, which are interpreted as macros that │ │ │ │ │ are "passed" to the included file. The macros are │ │ │ │ │ available only to the include file (and any macros │ │ │ │ │ or included files it holds). After the file is │ │ │ │ │ completely included, the macros are no longer │ │ │ │ │ available. So: │ │ │ │ │ - <_[_[_r_e_f_]_]_U_N_D_E_F tagname> │ │ │ │ │ - <_[_[_r_e_f_]_]_U_N_D_E_F tagname1 tagname2 ... > │ │ │ │ │ - │ │ │ │ │ +     <${tagName} ${attrName}=${value$ctr}> │ │ │ │ │ Macros named "name" and "email" are set, and │ │ │ │ │ available inside the included file. They are not │ │ │ │ │ available, however, past the tag (which is why the │ │ │ │ │ second statement will fail.) │ │ │ │ │ ******** TTEEMMPPLLAATTEE ******** │ │ │ │ │ A template file is nothing more than a default │ │ │ │ │ include file, one that is included once the input │ │ │ ├── ./usr/share/doc/htp/if.html │ │ │ │ @@ -114,63 +114,55 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -    <[ref]def name="centered">
│ │ │ │ -    <p align=center>
│ │ │ │ -    <[ref]/def>
│ │ │ │ -
│ │ │ │ -    <centered>
│ │ │ │ -    This text is centered.
│ │ │ │ +<[ref]use macroname [parameters ...] [noexpand]>
│ │ │ │ +<... $macroname ...>
│ │ │ │ +<... ${macroname} ...>
│ │ │ │ +
│ │ │ │ +ludefilename" [parameters ...]>
│ │ │ │ +<[ref]file name>
│ │ │ │ +<[ref]file [ name="filename" ] size[ = (byte|kbyte|mbyte|gbyte) ] [precision=n]>
│ │ │ │ +<[ref]file [ name="filename" ] time[ ="format" ]>
│ │ │ │ +<[ref]file [ name="filename" ] date[ ="format" ]>
│ │ │ │ +<[ref]file search="searchpath">
│ │ │ │ +<[ref]file template="templatefilename">
│ │ │ │ +
│ │ │ │ +nd>
│ │ │ │ +    d is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]block name=e>
│ │ │ │ +    e is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]set time="2">
│ │ │ │ +  <[ref]block name=a>
│ │ │ │ +    a is defined for the 2nd time <[ref]use time>.
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]use c>
│ │ │ │ +  <[ref]use d>
│ │ │ │ +  <[ref]use e>
│ │ │ │

│ │ │ │

synopsis

│ │ │ │ IF, NOT, ELSEIF, ELSE, and /IF are the building │ │ │ │ blocks for conditional processing. The basic form is shown above. │ │ │ │

"Conditional" is either a "compare" or "is defined" operation. A │ │ │ │ compare operator is a test of the value of a macro against a literal │ │ │ │ string: │ │ │ │

│ │ │ │ -  <[ref]def name="bigfont">
│ │ │ │ -    <font size="+4">
│ │ │ │ -  <[ref]/def>
│ │ │ │ -
│ │ │ │ -  <[ref]def name="/bigfont">
│ │ │ │ -    </font>
│ │ │ │ -  <[ref]/def>
│ │ │ │ -
│ │ │ │ -  <bigfont>Some large text</bigfont>
│ │ │ │ - For this line: <[ref]img src="logo.gif">
│ │ │ │ -  the local filename "logo.gif" will be used to determine image dimensions
│ │ │ │ -  (no URL replacement).
│ │ │ │ -
│ │ │ │ -  For this line: <[ref]img src="http://my.domain.org/logo.gif">
│ │ │ │ -  the local filename "/var/www/my.domain/logo.gif" will be used.
│ │ │ │ -
│ │ │ │ -  But for this line: <[ref]img src="http://other.domain.org/logo.gif">
│ │ │ │ -  the local file cannot be found (no prefix match), so the image dimensions
│ │ │ │ -  will not be added.
│ │ │ │ -
│ │ │ │ -  Order is important; last IMAGEURL tag takes precedence:
│ │ │ │ -  <[ref]imageurl url="/" path="/var/www/htdocs/">
│ │ │ │ -  <[ref]imageurl url="/test/" path="/var/www/test/">
│ │ │ │ -
│ │ │ │ -  <[ref]img src="/image.gif"> and <[ref]img src="/test/image.gif"> are mapped to
│ │ │ │ -  /var/www/htdocs/image.gif and /var/www/test/image.gif, resp.
│ │ │ │ -  If the order of the imageurl lines would be swapped, the second
│ │ │ │ -  image would be mapped to /var/www/htdocs/test/image.gif.
│ │ │ │ +<!--- This comment doesn't appear in the HTML file --->
│ │ │ │

│ │ │ │

│ │ │ │ and a defined operator is a test of a macro's existance: │ │ │ │

│ │ │ │

│ │ │ │ -    File image.gif <[ref]FILE NAME="image.gif" SIZE=KBYTE> kilobytes
│ │ │ │ -    Last modified <[ref]FILE NAME="image.gif" TIME>, <[ref]FILE NAME="image.gif" DATE>
│ │ │ │ +<a href="mailto:$email">mailto hyperlink</a>
│ │ │ │ +<a href="http://$domain/~${username}/">another hyperlink</a>
│ │ │ │

│ │ │ │

│ │ │ │ If the NOT tag is present in the IF markup, the evaluation of the │ │ │ │ conditional is reversed. The first IF or ELSEIF condition that │ │ │ │ evaluates to true is chosen. If none of the conditions is true the │ │ │ │ ELSE block is taken if it is present. A conditional block │ │ │ │ must be closed with the /IF tag. IF tags can be nested. │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,68 +1,53 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: IIFF,, EELLSSEEIIFF,, EELLSSEE,, //IIFF ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n     <_[_[_r_e_f_]_]_d_e_f name="centered"> │ │ │ │ │ -  _L_i_c_e_n_s_e    

│ │ │ │ │ -  _T_u_t_o_r_i_a_l     <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_u_s_e macroname [parameters ...] [noexpand]> │ │ │ │ │ +  _L_i_c_e_n_s_e <... $macroname ...> │ │ │ │ │ +  _T_u_t_o_r_i_a_l <... ${macroname} ...> │ │ │ │ │   _U_s_a_g_e │ │ │ │ │ -  HTP Tags     │ │ │ │ │ -    _A_L_T_T_E_X_T     This text is centered. │ │ │ │ │ -    _B_L_O_C_K ********** ssyynnooppssiiss ********** │ │ │ │ │ -    _B_L_O_C_K_D_E_F IIFF,, NNOOTT,, EELLSSEEIIFF,, EELLSSEE,, aanndd //IIFF are the building │ │ │ │ │ -    _D_E_F blocks for conditional processing. The basic form │ │ │ │ │ -    _F_I_L_E is shown above. │ │ │ │ │ -  [>] _I_F "Conditional" is either a "compare" or "is defined" │ │ │ │ │ -    _I_N_C operation. A compare operator is a test of the │ │ │ │ │ -    _I_M_G value of a macro against a literal string: │ │ │ │ │ -    _I_M_A_G_E_U_R_L   <_[_[_r_e_f_]_]_d_e_f name="bigfont"> │ │ │ │ │ -    _O_P_T     │ │ │ │ │ -    _O_U_T_P_U_T   <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ │ -    _Q_U_O_T_E │ │ │ │ │ -    _S_E_T   <_[_[_r_e_f_]_]_d_e_f name="/bigfont"> │ │ │ │ │ -    _U_N_D_E_F     │ │ │ │ │ -    _U_N_S_E_T   <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ │ -    _U_S_E_,_ _$ │ │ │ │ │ -    _W_H_I_L_E   Some large text │ │ │ │ │ -    _<_!_-_-_-  For this line: <_[_[_r_e_f_]_]_i_m_g src="logo.gif"> │ │ │ │ │ -  _H_i_s_t_o_r_y   the local filename "logo.gif" will be used to │ │ │ │ │ -  _W_i_s_h_ _l_i_s_t determine image dimensions │ │ │ │ │ -  _B_u_g_s   (no URL replacement). │ │ │ │ │ - │ │ │ │ │ -   For this line: <_[_[_r_e_f_]_]_i_m_g src="http:// │ │ │ │ │ - my.domain.org/logo.gif"> │ │ │ │ │ -   the local filename "/var/www/my.domain/logo.gif" │ │ │ │ │ - will be used. │ │ │ │ │ - │ │ │ │ │ -   But for this line: <_[_[_r_e_f_]_]_i_m_g src="http:// │ │ │ │ │ - other.domain.org/logo.gif"> │ │ │ │ │ -   the local file cannot be found (no prefix match), │ │ │ │ │ - so the image dimensions │ │ │ │ │ -   will not be added. │ │ │ │ │ - │ │ │ │ │ -   Order is important; last IMAGEURL tag takes │ │ │ │ │ - precedence: │ │ │ │ │ -   <_[_[_r_e_f_]_]_i_m_a_g_e_u_r_l url="/" path="/var/www/htdocs/"> │ │ │ │ │ -   <_[_[_r_e_f_]_]_i_m_a_g_e_u_r_l url="/test/" path="/var/www/ │ │ │ │ │ - test/"> │ │ │ │ │ - │ │ │ │ │ -   <_[_[_r_e_f_]_]_i_m_g src="/image.gif"> and <_[_[_r_e_f_]_]_i_m_g │ │ │ │ │ - src="/test/image.gif"> are mapped to │ │ │ │ │ -   /var/www/htdocs/image.gif and /var/www/test/ │ │ │ │ │ - image.gif, resp. │ │ │ │ │ -   If the order of the imageurl lines would be │ │ │ │ │ - swapped, the second │ │ │ │ │ -   image would be mapped to /var/www/htdocs/test/ │ │ │ │ │ - image.gif. │ │ │ │ │ +  HTP Tags ludefilename" [parameters ...]> │ │ │ │ │ +    _A_L_T_T_E_X_T <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ │ +    _B_L_O_C_K <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ │ +    _B_L_O_C_K_D_E_F (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ │ +    _D_E_F <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time[ ="format" ]> │ │ │ │ │ +    _F_I_L_E <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] date[ ="format" ]> │ │ │ │ │ +  [>] _I_F <_[_[_r_e_f_]_]_f_i_l_e search="searchpath"> │ │ │ │ │ +    _I_N_C <_[_[_r_e_f_]_]_f_i_l_e template="templatefilename"> │ │ │ │ │ +    _I_M_G │ │ │ │ │ +    _I_M_A_G_E_U_R_L nd> │ │ │ │ │ +    _O_P_T     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _O_U_T_P_U_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _Q_U_O_T_E   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _S_E_T   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ +    _U_N_D_E_F     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _U_N_S_E_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _W_H_I_L_E   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ +    _<_!_-_-_-   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ +  _H_i_s_t_o_r_y     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ │ +  _W_i_s_h_ _l_i_s_t time>. │ │ │ │ │ +  _B_u_g_s   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e c> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e d> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e e> │ │ │ │ │ + ********** ssyynnooppssiiss ********** │ │ │ │ │ + IIFF,, NNOOTT,, EELLSSEEIIFF,, EELLSSEE,, aanndd //IIFF are the building │ │ │ │ │ + blocks for conditional processing. The basic form │ │ │ │ │ + is shown above. │ │ │ │ │ + "Conditional" is either a "compare" or "is defined" │ │ │ │ │ + operation. A compare operator is a test of the │ │ │ │ │ + value of a macro against a literal string: │ │ │ │ │ + │ │ │ │ │ and a defined operator is a test of a macro's │ │ │ │ │ existance: │ │ │ │ │ -     File image.gif <_[_[_r_e_f_]_]_F_I_L_E NAME="image.gif" │ │ │ │ │ - SIZE=KBYTE> kilobytes │ │ │ │ │ -     Last modified <_[_[_r_e_f_]_]_F_I_L_E NAME="image.gif" │ │ │ │ │ - TIME>, <_[_[_r_e_f_]_]_F_I_L_E NAME="image.gif" DATE> │ │ │ │ │ + mailto hyperlink │ │ │ │ │ + another │ │ │ │ │ + hyperlink │ │ │ │ │ If the NOT tag is present in the IF markup, the │ │ │ │ │ evaluation of the conditional is reversed. The │ │ │ │ │ first IF or ELSEIF condition that evaluates to true │ │ │ │ │ is chosen. If none of the conditions is true the │ │ │ │ │ ELSE block is taken if it is present. A conditional │ │ │ │ │ block mmuusstt be closed with the /IF tag. IF tags can │ │ │ │ │ be nested. │ │ │ ├── ./usr/share/doc/htp/imageurl.html │ │ │ │ @@ -114,16 +114,14 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -<[ref]INC macroname1="increment1" [macroname2="increment2" ... ] [GLOBAL]>
│ │ │ │ -
│ │ │ │

│ │ │ │

synopsis

│ │ │ │

│ │ │ │ IMAGEURL tells htp, where to find images on the local │ │ │ │ file system. declares an URL replacement that is used for │ │ │ │ size lookups in any IMG tag. This definitions │ │ │ │ takes effect only if the IMGXY option is │ │ │ │ @@ -137,27 +135,14 @@ │ │ │ │ checks (case-insensitive) if it is a prefix of the image's SRC │ │ │ │ attribute. If it matches this prefix is replaced by the given PATH. │ │ │ │ If no IMAGEURL matches the SRC is considered as relative link and │ │ │ │ looked up in the current directory.

│ │ │ │

│ │ │ │ For example:

│ │ │ │

│ │ │ │ - <[ref]def name="imghr">
│ │ │ │ -   <table border="0" cellspacing="0" cellpadding="0">
│ │ │ │ -   <tr>
│ │ │ │ -    <td width=10><[ref]img src="leftsep.png"></td>
│ │ │ │ -    <td width="95%" background="midsep.png">&nbsp;</td>
│ │ │ │ -    <td width=10><[ref]img src="rightsep.png"></td>
│ │ │ │ -   </tr>
│ │ │ │ -   </table>
│ │ │ │ - <[ref]/def>
│ │ │ │ -
│ │ │ │ - paragraph
│ │ │ │ - <imghr>
│ │ │ │ - paragraph
│ │ │ │

│ │ │ │

│ │ │ │ If IMAGEURL is specified with a URL but no PATH attribute, it is treated as │ │ │ │ an undefine, and is removed.

│ │ │ │

│ │ │ │ Since you usually need the url mapping for a number of images used throughout │ │ │ │ a set of documents, IMAGEURL is most appropriately put into an │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,56 +1,36 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: IIMMAAGGEEUURRLL ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_I_N_C macroname1="increment1" │ │ │ │ │ -  _L_i_c_e_n_s_e [macroname2="increment2" ... ] [GLOBAL]> │ │ │ │ │ -  _T_u_t_o_r_i_a_l │ │ │ │ │ -  _U_s_a_g_e ********** ssyynnooppssiiss ********** │ │ │ │ │ -  HTP Tags IIMMAAGGEEUURRLL tells htp, where to find images on the │ │ │ │ │ -    _A_L_T_T_E_X_T local file system. declares an URL replacement that │ │ │ │ │ -    _B_L_O_C_K is used for size lookups in any _I_M_G tag. This │ │ │ │ │ -    _B_L_O_C_K_D_E_F definitions takes effect only if the _I_M_G_X_Y option │ │ │ │ │ -    _D_E_F is enabled. Beacause htp can't lookup files in the │ │ │ │ │ -    _F_I_L_E world wide web you have to map absolute image URLs │ │ │ │ │ -    _I_F to a directory in the local file system. │ │ │ │ │ -    _I_N_C When an IMG tag is encountered where htp has to │ │ │ │ │ -    _I_M_G insert width and height the defined URL │ │ │ │ │ -  [>] _I_M_A_G_E_U_R_L replacements will be taken into account (later │ │ │ │ │ -    _O_P_T definitions take precedence to earlier): For each │ │ │ │ │ -    _O_U_T_P_U_T defined imageurl it checks (case-insensitive) if it │ │ │ │ │ -    _Q_U_O_T_E is a prefix of the image's SRC attribute. If it │ │ │ │ │ -    _S_E_T matches this prefix is replaced by the given PATH. │ │ │ │ │ -    _U_N_D_E_F If no IMAGEURL matches the SRC is considered as │ │ │ │ │ -    _U_N_S_E_T relative link and looked up in the current │ │ │ │ │ -    _U_S_E_,_ _$ directory. │ │ │ │ │ -    _W_H_I_L_E For example: │ │ │ │ │ -    _<_!_-_-_-  <_[_[_r_e_f_]_]_d_e_f name="imghr"> │ │ │ │ │ -  _H_i_s_t_o_r_y     │ │ │ │ │ -  _B_u_g_s     │ │ │ │ │ -     │ │ │ │ │ -     │ │ │ │ │ -    
<_[_[_r_e_f_]_]_i_m_g src="leftsep.png"> │ │ │ │ │ -      <_[_[_r_e_f_]_]_i_m_g src="rightsep.png"> │ │ │ │ │ -    
│ │ │ │ │ -  <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ │ - │ │ │ │ │ -  paragraph │ │ │ │ │ -   │ │ │ │ │ -  paragraph │ │ │ │ │ - If IMAGEURL is specified with a URL but no PATH │ │ │ │ │ - attribute, it is treated as an undefine, and is │ │ │ │ │ - removed. │ │ │ │ │ - Since you usually need the url mapping for a number │ │ │ │ │ - of images used throughout a set of documents, │ │ │ │ │ - IMAGEURL is most appropriately put into an _i_n_c_l_u_d_e │ │ │ │ │ - _f_i_l_e or the _h_t_p_._d_e_f file. │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n ********** ssyynnooppssiiss ********** │ │ │ │ │ +  _L_i_c_e_n_s_e IIMMAAGGEEUURRLL tells htp, where to find images on the │ │ │ │ │ +  _T_u_t_o_r_i_a_l local file system. declares an URL replacement that │ │ │ │ │ +  _U_s_a_g_e is used for size lookups in any _I_M_G tag. This │ │ │ │ │ +  HTP Tags definitions takes effect only if the _I_M_G_X_Y option │ │ │ │ │ +    _A_L_T_T_E_X_T is enabled. Beacause htp can't lookup files in the │ │ │ │ │ +    _B_L_O_C_K world wide web you have to map absolute image URLs │ │ │ │ │ +    _B_L_O_C_K_D_E_F to a directory in the local file system. │ │ │ │ │ +    _D_E_F When an IMG tag is encountered where htp has to │ │ │ │ │ +    _F_I_L_E insert width and height the defined URL │ │ │ │ │ +    _I_F replacements will be taken into account (later │ │ │ │ │ +    _I_N_C definitions take precedence to earlier): For each │ │ │ │ │ +    _I_M_G defined imageurl it checks (case-insensitive) if it │ │ │ │ │ +  [>] _I_M_A_G_E_U_R_L is a prefix of the image's SRC attribute. If it │ │ │ │ │ +    _O_P_T matches this prefix is replaced by the given PATH. │ │ │ │ │ +    _O_U_T_P_U_T If no IMAGEURL matches the SRC is considered as │ │ │ │ │ +    _Q_U_O_T_E relative link and looked up in the current │ │ │ │ │ +    _S_E_T directory. │ │ │ │ │ +    _U_N_D_E_F For example: │ │ │ │ │ +    _U_N_S_E_T If IMAGEURL is specified with a URL but no PATH │ │ │ │ │ +    _U_S_E_,_ _$ attribute, it is treated as an undefine, and is │ │ │ │ │ +    _W_H_I_L_E removed. │ │ │ │ │ +    _<_!_-_-_- Since you usually need the url mapping for a number │ │ │ │ │ +  _H_i_s_t_o_r_y of images used throughout a set of documents, │ │ │ │ │ +  _W_i_s_h_ _l_i_s_t IMAGEURL is most appropriately put into an _i_n_c_l_u_d_e │ │ │ │ │ +  _B_u_g_s _f_i_l_e or the _h_t_p_._d_e_f file. │ │ │ │ │ In addition to WIDTH and HEIGHT, htp can also │ │ │ │ │ (semi-)automatically add an _A_L_T_ _t_e_x_t attribute to │ │ │ │ │ _I_M_G tags. │ │ │ ├── ./usr/share/doc/htp/img.html │ │ │ │ @@ -114,15 +114,39 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -    <[ref]IF name="Jim">...<[ref]/IF>
│ │ │ │ +<[ref]use macroname [parameters ...] [noexpand]>
│ │ │ │ +<... $macroname ...>
│ │ │ │ +<... ${macroname} ...>
│ │ │ │ +
│ │ │ │ +ludefilename" [parameters ...]>
│ │ │ │ +<[ref]file name>
│ │ │ │ +<[ref]file [ name="filename" ] size[ = (byte|kbyte|mbyte|gbyte) ] [precision=n]>
│ │ │ │ +<[ref]file [ name="filename" ] time[ ="format" ]>
│ │ │ │ +<[ref]file [ name="filename" ] date[ ="format" ]>
│ │ │ │ +<[ref]file search="searchpath">
│ │ │ │ +<[ref]file template="templatefilename">
│ │ │ │ +
│ │ │ │ +nd>
│ │ │ │ +    d is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]block name=e>
│ │ │ │ +    e is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]set time="2">
│ │ │ │ +  <[ref]block name=a>
│ │ │ │ +    a is defined for the 2nd time <[ref]use time>.
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]use c>
│ │ │ │ +  <[ref]use d>
│ │ │ │ +  <[ref]use e>
│ │ │ │

│ │ │ │

synopsis

│ │ │ │

img is a standard HTML tag. htp can add the specified │ │ │ │ image's width and height to the tag automatically. This has the advantage │ │ │ │ of not having to determine each image's size manually, which is especially │ │ │ │ useful if the image may change frequently.

│ │ │ │

htp adds this information with the WIDTH and HEIGHT markup │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,36 +1,64 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: IIMMGG ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n     <_[_[_r_e_f_]_]_I_F name="Jim">...<_[_[_r_e_f_]_]_/_I_F> │ │ │ │ │ -  _L_i_c_e_n_s_e ********** ssyynnooppssiiss ********** │ │ │ │ │ -  _T_u_t_o_r_i_a_l iimmgg is a standard HTML tag. htp can add the │ │ │ │ │ -  _U_s_a_g_e specified image's width and height to the tag │ │ │ │ │ -  HTP Tags automatically. This has the advantage of not having │ │ │ │ │ -    _A_L_T_T_E_X_T to determine each image's size manually, which is │ │ │ │ │ -    _B_L_O_C_K especially useful if the image may change │ │ │ │ │ -    _B_L_O_C_K_D_E_F frequently. │ │ │ │ │ -    _D_E_F htp adds this information with the WIDTH and HEIGHT │ │ │ │ │ -    _F_I_L_E markup attributes. If htp detects these attributes │ │ │ │ │ -    _I_F are already present in the tag, it will nnoott modify │ │ │ │ │ -    _I_N_C the values. If htp cannot find the image file, it │ │ │ │ │ -  [>] _I_M_G will issue a warning but not halt processing. │ │ │ │ │ -    _I_M_A_G_E_U_R_L At this time, GIF (Graphic Interchange Format), PNG │ │ │ │ │ -    _O_P_T (Portable Network Graphics), and JFIF (JPEG File │ │ │ │ │ -    _O_U_T_P_U_T Interchange Format) are supported. │ │ │ │ │ -    _Q_U_O_T_E The _I_M_G_X_Y_ _a_n_d_ _N_O_I_M_G_X_Y options control whether or │ │ │ │ │ -    _S_E_T not htp actually adds this information as it │ │ │ │ │ -    _U_N_D_E_F executes. │ │ │ │ │ -    _U_N_S_E_T Since htp is able to lookup files only in the local │ │ │ │ │ -    _U_S_E_,_ _$ filesystem, the _I_M_A_G_E_U_R_L tag may be used to map │ │ │ │ │ -    _W_H_I_L_E URLs to local files. │ │ │ │ │ -    _<_!_-_-_- htp can also add default ALT text to IMG tags using │ │ │ │ │ -  _H_i_s_t_o_r_y _A_L_T_T_E_X_T. │ │ │ │ │ -  _W_i_s_h_ _l_i_s_t │ │ │ │ │ -  _B_u_g_s │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_u_s_e macroname [parameters ...] [noexpand]> │ │ │ │ │ +  _L_i_c_e_n_s_e <... $macroname ...> │ │ │ │ │ +  _T_u_t_o_r_i_a_l <... ${macroname} ...> │ │ │ │ │ +  _U_s_a_g_e │ │ │ │ │ +  HTP Tags ludefilename" [parameters ...]> │ │ │ │ │ +    _A_L_T_T_E_X_T <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ │ +    _B_L_O_C_K <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ │ +    _B_L_O_C_K_D_E_F (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ │ +    _D_E_F <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time[ ="format" ]> │ │ │ │ │ +    _F_I_L_E <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] date[ ="format" ]> │ │ │ │ │ +    _I_F <_[_[_r_e_f_]_]_f_i_l_e search="searchpath"> │ │ │ │ │ +    _I_N_C <_[_[_r_e_f_]_]_f_i_l_e template="templatefilename"> │ │ │ │ │ +  [>] _I_M_G │ │ │ │ │ +    _I_M_A_G_E_U_R_L nd> │ │ │ │ │ +    _O_P_T     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _O_U_T_P_U_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _Q_U_O_T_E   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _S_E_T   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ +    _U_N_D_E_F     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _U_N_S_E_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _W_H_I_L_E   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ +    _<_!_-_-_-   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ +  _H_i_s_t_o_r_y     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ │ +  _W_i_s_h_ _l_i_s_t time>. │ │ │ │ │ +  _B_u_g_s   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e c> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e d> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e e> │ │ │ │ │ + ********** ssyynnooppssiiss ********** │ │ │ │ │ + iimmgg is a standard HTML tag. htp can add the │ │ │ │ │ + specified image's width and height to the tag │ │ │ │ │ + automatically. This has the advantage of not having │ │ │ │ │ + to determine each image's size manually, which is │ │ │ │ │ + especially useful if the image may change │ │ │ │ │ + frequently. │ │ │ │ │ + htp adds this information with the WIDTH and HEIGHT │ │ │ │ │ + markup attributes. If htp detects these attributes │ │ │ │ │ + are already present in the tag, it will nnoott modify │ │ │ │ │ + the values. If htp cannot find the image file, it │ │ │ │ │ + will issue a warning but not halt processing. │ │ │ │ │ + At this time, GIF (Graphic Interchange Format), PNG │ │ │ │ │ + (Portable Network Graphics), and JFIF (JPEG File │ │ │ │ │ + Interchange Format) are supported. │ │ │ │ │ + The _I_M_G_X_Y_ _a_n_d_ _N_O_I_M_G_X_Y options control whether or │ │ │ │ │ + not htp actually adds this information as it │ │ │ │ │ + executes. │ │ │ │ │ + Since htp is able to lookup files only in the local │ │ │ │ │ + filesystem, the _I_M_A_G_E_U_R_L tag may be used to map │ │ │ │ │ + URLs to local files. │ │ │ │ │ + htp can also add default ALT text to IMG tags using │ │ │ │ │ + _A_L_T_T_E_X_T. │ │ │ │ │ + │ │ │ │ │ + │ │ │ ├── ./usr/share/doc/htp/inc.html │ │ │ │ @@ -114,15 +114,39 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -    <[ref]IF name>...<[ref]/IF>
│ │ │ │ +<[ref]use macroname [parameters ...] [noexpand]>
│ │ │ │ +<... $macroname ...>
│ │ │ │ +<... ${macroname} ...>
│ │ │ │ +
│ │ │ │ +ludefilename" [parameters ...]>
│ │ │ │ +<[ref]file name>
│ │ │ │ +<[ref]file [ name="filename" ] size[ = (byte|kbyte|mbyte|gbyte) ] [precision=n]>
│ │ │ │ +<[ref]file [ name="filename" ] time[ ="format" ]>
│ │ │ │ +<[ref]file [ name="filename" ] date[ ="format" ]>
│ │ │ │ +<[ref]file search="searchpath">
│ │ │ │ +<[ref]file template="templatefilename">
│ │ │ │ +
│ │ │ │ +nd>
│ │ │ │ +    d is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]block name=e>
│ │ │ │ +    e is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]set time="2">
│ │ │ │ +  <[ref]block name=a>
│ │ │ │ +    a is defined for the 2nd time <[ref]use time>.
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]use c>
│ │ │ │ +  <[ref]use d>
│ │ │ │ +  <[ref]use e>
│ │ │ │

│ │ │ │

synopsis

│ │ │ │ The INC can be used for incrementing/decrementing a │ │ │ │ variable or for variable addition. The basic form is shown above. │ │ │ │

│ │ │ │ The "increment" is anything that evaluates to a integer. It can be a │ │ │ │ literal string or a macro preceeded by the '$'-operator. The │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,36 +1,64 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: IINNCC ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n     <_[_[_r_e_f_]_]_I_F name>...<_[_[_r_e_f_]_]_/_I_F> │ │ │ │ │ -  _L_i_c_e_n_s_e ********** ssyynnooppssiiss ********** │ │ │ │ │ -  _T_u_t_o_r_i_a_l The IINNCC can be used for incrementing/decrementing a │ │ │ │ │ -  _U_s_a_g_e variable or for variable addition. The basic form │ │ │ │ │ -  HTP Tags is shown above. │ │ │ │ │ -    _A_L_T_T_E_X_T The "increment" is anything that evaluates to a │ │ │ │ │ -    _B_L_O_C_K integer. It can be a literal string or a macro │ │ │ │ │ -    _B_L_O_C_K_D_E_F preceeded by the '$'-operator. The macroname must │ │ │ │ │ -    _D_E_F be the name of a defined macro that contains an │ │ │ │ │ -    _F_I_L_E integer. If the increment is ommitted it defaults │ │ │ │ │ -    _I_F to 1. The effect of this operation is that the │ │ │ │ │ -  [>] _I_N_C macro is redefined to contain the sum of its │ │ │ │ │ -    _I_M_G previous value and its increment. │ │ │ │ │ -    _I_M_A_G_E_U_R_L To increment or decrement a variable you can use │ │ │ │ │ -    _O_P_T this form: │ │ │ │ │ -    _O_U_T_P_U_T Note that INC doesn't check if the strings really │ │ │ │ │ -    _Q_U_O_T_E denote integers. It may give weired results when │ │ │ │ │ -    _S_E_T used on arbitrary strings. The integer values are │ │ │ │ │ -    _U_N_D_E_F limited to the range -2^31..2^31. │ │ │ │ │ -    _U_N_S_E_T Note further that htp wasn't designed to do │ │ │ │ │ -    _U_S_E_,_ _$ extensive calculations. The INC tag is useful in │ │ │ │ │ -    _W_H_I_L_E conjunction with WHILE to iterate over the defined │ │ │ │ │ -    _<_!_-_-_- blocks. │ │ │ │ │ -  _H_i_s_t_o_r_y │ │ │ │ │ -  _W_i_s_h_ _l_i_s_t │ │ │ │ │ -  _B_u_g_s │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_u_s_e macroname [parameters ...] [noexpand]> │ │ │ │ │ +  _L_i_c_e_n_s_e <... $macroname ...> │ │ │ │ │ +  _T_u_t_o_r_i_a_l <... ${macroname} ...> │ │ │ │ │ +  _U_s_a_g_e │ │ │ │ │ +  HTP Tags ludefilename" [parameters ...]> │ │ │ │ │ +    _A_L_T_T_E_X_T <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ │ +    _B_L_O_C_K <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ │ +    _B_L_O_C_K_D_E_F (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ │ +    _D_E_F <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time[ ="format" ]> │ │ │ │ │ +    _F_I_L_E <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] date[ ="format" ]> │ │ │ │ │ +    _I_F <_[_[_r_e_f_]_]_f_i_l_e search="searchpath"> │ │ │ │ │ +  [>] _I_N_C <_[_[_r_e_f_]_]_f_i_l_e template="templatefilename"> │ │ │ │ │ +    _I_M_G │ │ │ │ │ +    _I_M_A_G_E_U_R_L nd> │ │ │ │ │ +    _O_P_T     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _O_U_T_P_U_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _Q_U_O_T_E   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _S_E_T   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ +    _U_N_D_E_F     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _U_N_S_E_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _W_H_I_L_E   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ +    _<_!_-_-_-   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ +  _H_i_s_t_o_r_y     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ │ +  _W_i_s_h_ _l_i_s_t time>. │ │ │ │ │ +  _B_u_g_s   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e c> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e d> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e e> │ │ │ │ │ + ********** ssyynnooppssiiss ********** │ │ │ │ │ + The IINNCC can be used for incrementing/decrementing a │ │ │ │ │ + variable or for variable addition. The basic form │ │ │ │ │ + is shown above. │ │ │ │ │ + The "increment" is anything that evaluates to a │ │ │ │ │ + integer. It can be a literal string or a macro │ │ │ │ │ + preceeded by the '$'-operator. The macroname must │ │ │ │ │ + be the name of a defined macro that contains an │ │ │ │ │ + integer. If the increment is ommitted it defaults │ │ │ │ │ + to 1. The effect of this operation is that the │ │ │ │ │ + macro is redefined to contain the sum of its │ │ │ │ │ + previous value and its increment. │ │ │ │ │ + To increment or decrement a variable you can use │ │ │ │ │ + this form: │ │ │ │ │ + Note that INC doesn't check if the strings really │ │ │ │ │ + denote integers. It may give weired results when │ │ │ │ │ + used on arbitrary strings. The integer values are │ │ │ │ │ + limited to the range -2^31..2^31. │ │ │ │ │ + Note further that htp wasn't designed to do │ │ │ │ │ + extensive calculations. The INC tag is useful in │ │ │ │ │ + conjunction with WHILE to iterate over the defined │ │ │ │ │ + blocks. │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ ├── ./usr/share/doc/htp/metatag.html │ │ │ │ @@ -88,22 +88,39 @@ │ │ │ │

Metatags are defined with the [ref]def and [ref]blockdef tags and │ │ │ │ undefined with the [ref]undef tag.

│ │ │ │

│ │ │ │ As an example we show how to define a tag that builds a │ │ │ │ fancy horizontal rule out of several images. │ │ │ │

│ │ │ │

│ │ │ │ - 1. <[ref]OPT (IMGXY|NOIMGXY)>
│ │ │ │ - 2. <[ref]OPT (QUIET|VERBOSE)>
│ │ │ │ - 3. <[ref]OPT (DEPEND|NODEPEND)>
│ │ │ │ - 4. <[ref]OPT (PRECIOUS|NOPRECIOUS)>
│ │ │ │ - 5. <[ref]OPT (CONDENSE|SEMICONDENSE|NOCONDENSE)>
│ │ │ │ - 6. <[ref]OPT DELIM=(HTML|SQUARE|CURLY)>
│ │ │ │ - 7. <[ref]OPT (XML|XML=FALSE)>
│ │ │ │ - 8.
│ │ │ │ + 1. <[ref]use macroname [parameters ...] [noexpand]>
│ │ │ │ + 2. <... $macroname ...>
│ │ │ │ + 3. <... ${macroname} ...>
│ │ │ │ + 4.
│ │ │ │ + 5. ludefilename" [parameters ...]>
│ │ │ │ + 6. <[ref]file name>
│ │ │ │ + 7. <[ref]file [ name="filename" ] size[ = (byte|kbyte|mbyte|gbyte) ] [precision=n]>
│ │ │ │ + 8. <[ref]file [ name="filename" ] time[ ="format" ]>
│ │ │ │ + 9. <[ref]file [ name="filename" ] date[ ="format" ]>
│ │ │ │ +10. <[ref]file search="searchpath">
│ │ │ │ +11. <[ref]file template="templatefilename">
│ │ │ │ +12.
│ │ │ │ +13. nd>
│ │ │ │ +14.     d is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +15.   <[ref]/block>
│ │ │ │ +16.   <[ref]block name=e>
│ │ │ │ +17.     e is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +18.   <[ref]/block>
│ │ │ │ +19.   <[ref]set time="2">
│ │ │ │ +20.   <[ref]block name=a>
│ │ │ │ +21.     a is defined for the 2nd time <[ref]use time>.
│ │ │ │ +22.   <[ref]/block>
│ │ │ │ +23.   <[ref]use c>
│ │ │ │ +24.   <[ref]use d>
│ │ │ │ +25.   <[ref]use e>
│ │ │ │

│ │ │ │

In line 1 of the above example a new tag named imghr is defined. │ │ │ │ The html code which implements this rule is following in lines 2-8. │ │ │ │ between the [ref]def and │ │ │ │ /def tags. You don't have to understand this │ │ │ │ html code, but you should understand that this is just pure html to │ │ │ │ draw the fancy rule. Every time you write <imghr> │ │ │ │ @@ -113,42 +130,57 @@ │ │ │ │ file.

│ │ │ │

Often you want to define tags that have an opening and a closing │ │ │ │ variant. For this purpose you should use the [ref]blockdef tag. When htp │ │ │ │ encounters a blockdef tag it will automatically search for the │ │ │ │ matching closing tag and put everything between these tags in a block │ │ │ │ macro named block. Here is an example for this.

│ │ │ │

│ │ │ │ - 1.     <[ref]FILE INCLUDE="include.hti" name="Jim Nelson" email="jnelson@crl.com">
│ │ │ │ - 2.     This tag will fail: <[ref]USE name>
│ │ │ │ + 1.     File image.gif <[ref]FILE NAME="image.gif" SIZE=KBYTE> kilobytes
│ │ │ │ + 2.     Last modified <[ref]FILE NAME="image.gif" TIME>, <[ref]FILE NAME="image.gif" DATE>
│ │ │ │

│ │ │ │

Using parameters

│ │ │ │

More sophisticated tags accept parameters. The │ │ │ │ option parameter lets multiple metatag parameters be │ │ │ │ named and expanded inside the def or │ │ │ │ blockdef block:

│ │ │ │

│ │ │ │ - 1. <[ref]UNDEF tagname>
│ │ │ │ - 2. <[ref]UNDEF tagname1 tagname2 ... >
│ │ │ │ - 3.
│ │ │ │ + 1.   <[ref]DEF NAME="HEADERIMG" OPTION="SRC TITLE SIZE">
│ │ │ │ + 2.     <[ref]IF size>
│ │ │ │ + 3.         <FONT SIZE=${size}>
│ │ │ │ + 4.     <[ref]/IF>
│ │ │ │ + 5.     <[ref]IMG SRC=pics/${src}>
│ │ │ │ + 6.     <[ref]USE title>
│ │ │ │ + 7.     <[ref]IF size>
│ │ │ │ + 8.         </FONT>
│ │ │ │ + 9.     <[ref]/IF>
│ │ │ │ +10.   <[ref]/DEF>
│ │ │ │ +11.
│ │ │ │ +12.   <HEADERIMG SRC="logo.gif" SIZE="+2" TITLE="A title">
│ │ │ │ +13.
│ │ │ │ +14.   <HEADERIMG SRC="logo.gif" TITLE="Normal sized title">
│ │ │ │ +15.
│ │ │ │ +16.   This will fail:
│ │ │ │ +17.   <HEADERIMG SRC="logo.gif" ALT="Our logo" TITLE="Another title">
│ │ │ │ +18.
│ │ │ │ +19.   Instead, use * like this:
│ │ │ │ +20.   <[ref]DEF NAME="MYIMG" OPTION="SRC *">
│ │ │ │ +21.     <[ref]IMG SRC="pics/${src}" $*>
│ │ │ │ +22.   <[ref]/DEF>
│ │ │ │ +23.    
│ │ │ │ +24.   <MYIMG SRC="logo.gif" ALT="Our logo">
│ │ │ │

│ │ │ │

Saving blocks for later

│ │ │ │

When you are using templates, the html should only be written by │ │ │ │ the template file. The normal htp files should just define macros │ │ │ │ that are used later in the template. So you may want to write block │ │ │ │ tags that just save the block in a macro for later use. Although this │ │ │ │ is possible with htp it is quite tricky, so here we present the way to │ │ │ │ do this:

│ │ │ │

│ │ │ │ - 1.   <[ref]set sect-ctr="0">
│ │ │ │ - 2.   <[ref]blockdef name="section">
│ │ │ │ - 3.     <[ref]inc sect-ctr>
│ │ │ │ - 4.     <[ref]block name="sect-${sect-ctr}" expand global>
│ │ │ │ - 5.       <[ref]use block noexpand>
│ │ │ │ - 6.     <[ref]/block>
│ │ │ │ - 7.   <[ref]/blockdef>
│ │ │ │ + 1.     <${tagName} ${attrName}=${value$ctr}>
│ │ │ │

│ │ │ │

This defines a block macro named section. This macro uses a │ │ │ │ counter sect-ctr that enumerates the sections. It is │ │ │ │ increased for every section (line 3) and then the block macro name is │ │ │ │ build from this counter. So the first section is stored in block │ │ │ │ sect-1, the second in sect-2 and so on. The [ref]global flag │ │ │ │ in line 4 tells htp that these macros should be defined globally │ │ │ │ @@ -167,18 +199,21 @@ │ │ │ │ contents of block to be expanded twice. If you omit it, it would be │ │ │ │ expanded when defining the sect-1 macro and when using it later in the │ │ │ │ template. Generally it is a good idea to use noexpand whenever you │ │ │ │ use expand in a block around it.

│ │ │ │

To close this example we show how to expand the │ │ │ │ sect-${sect-ctr} blocks in the template:

│ │ │ │

│ │ │ │ - 1. <[ref]WHILE [NOT] conditional>
│ │ │ │ - 2.     block
│ │ │ │ - 3. <[ref]/WHILE>
│ │ │ │ - 4.
│ │ │ │ + 1. <[ref]file include="header.hti">
│ │ │ │ + 2.   <[ref]set sect-ctr="1">
│ │ │ │ + 3.   <[ref]while sect-${sect-ctr}>
│ │ │ │ + 4.     <[ref]use sect-${sect-ctr}>
│ │ │ │ + 5.     <[ref]inc sect-ctr>
│ │ │ │ + 6.   <[ref]/while>
│ │ │ │ + 7. <[ref]file include="footer.hti">
│ │ │ │

│ │ │ │

│ │ │ │ The [ref]while tag in line 3 checks whether │ │ │ │ the macro sect-${sect-ctr} is defined. If it is defined the body is │ │ │ │ evaluated, which expands the macro and increases sect-ctr. Afterwards │ │ │ │ the while condition is checked again to check for sect-2 macro. This │ │ │ │ repeats until sect-${sect-ctr} is not defined. │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -9,22 +9,46 @@ │ │ │ │ │     _T_e_m_p_l_a_t_e_s functionality. │ │ │ │ │     _F_i_l_e_s Metatags are defined with the _[_[_r_e_f_]_]_d_e_f and _[ │ │ │ │ │   [>] _M_e_t_a_t_a_g_s _[_r_e_f_]_]_b_l_o_c_k_d_e_f tags and undefined with the _[ │ │ │ │ │   _U_s_a_g_e _[_r_e_f_]_]_u_n_d_e_f tag. │ │ │ │ │   _H_T_P_ _T_a_g_s As an example we show how to define a tag that │ │ │ │ │   _H_i_s_t_o_r_y builds a fancy horizontal rule out of several │ │ │ │ │   _W_i_s_h_ _l_i_s_t images. │ │ │ │ │ -  _B_u_g_s  1. <_[_[_r_e_f_]_]_O_P_T (IMGXY|NOIMGXY)> │ │ │ │ │ -  2. <_[_[_r_e_f_]_]_O_P_T (QUIET|VERBOSE)> │ │ │ │ │ -  3. <_[_[_r_e_f_]_]_O_P_T (DEPEND|NODEPEND)> │ │ │ │ │ -  4. <_[_[_r_e_f_]_]_O_P_T (PRECIOUS|NOPRECIOUS)> │ │ │ │ │ -  5. <_[_[_r_e_f_]_]_O_P_T (CONDENSE|SEMICONDENSE|NOCONDENSE)> │ │ │ │ │ -  6. <_[_[_r_e_f_]_]_O_P_T DELIM=(HTML|SQUARE|CURLY)> │ │ │ │ │ -  7. <_[_[_r_e_f_]_]_O_P_T (XML|XML=FALSE)> │ │ │ │ │ -  8. │ │ │ │ │ +  _B_u_g_s  1. <_[_[_r_e_f_]_]_u_s_e macroname [parameters ...] │ │ │ │ │ + [noexpand]> │ │ │ │ │ +  2. <... $macroname ...> │ │ │ │ │ +  3. <... ${macroname} ...> │ │ │ │ │ +  4. │ │ │ │ │ +  5. ludefilename" [parameters ...]> │ │ │ │ │ +  6. <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ │ +  7. <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ │ + (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ │ +  8. <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time │ │ │ │ │ + [ ="format" ]> │ │ │ │ │ +  9. <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] date │ │ │ │ │ + [ ="format" ]> │ │ │ │ │ + 10. <_[_[_r_e_f_]_]_f_i_l_e search="searchpath"> │ │ │ │ │ + 11. <_[_[_r_e_f_]_]_f_i_l_e template="templatefilename"> │ │ │ │ │ + 12. │ │ │ │ │ + 13. nd> │ │ │ │ │ + 14.     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ + _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ + 15.   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ + 16.   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ + 17.     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ + _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ + 18.   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ + 19.   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ + 20.   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ + 21.     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ │ + time>. │ │ │ │ │ + 22.   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ + 23.   <_[_[_r_e_f_]_]_u_s_e c> │ │ │ │ │ + 24.   <_[_[_r_e_f_]_]_u_s_e d> │ │ │ │ │ + 25.   <_[_[_r_e_f_]_]_u_s_e e> │ │ │ │ │ In line 1 of the above example a new tag named │ │ │ │ │ imghr is defined. The html code which implements │ │ │ │ │ this rule is following in lines 2-8. between the _[ │ │ │ │ │ _[_r_e_f_]_]_d_e_f_ _a_n_d_ _/_d_e_f tags. You don't have to │ │ │ │ │ understand this html code, but you should │ │ │ │ │ understand that this is just pure html to draw the │ │ │ │ │ fancy rule. Every time you write as in line │ │ │ │ │ @@ -35,41 +59,60 @@ │ │ │ │ │ Often you want to define tags that have an opening │ │ │ │ │ and a closing variant. For this purpose you should │ │ │ │ │ use the _[_[_r_e_f_]_]_b_l_o_c_k_d_e_f tag. When htp encounters a │ │ │ │ │ blockdef tag it will automatically search for the │ │ │ │ │ matching closing tag and put everything between │ │ │ │ │ these tags in a block macro named block. Here is an │ │ │ │ │ example for this. │ │ │ │ │ -  1.     <_[_[_r_e_f_]_]_F_I_L_E INCLUDE="include.hti" │ │ │ │ │ - name="Jim Nelson" email="jnelson@crl.com"> │ │ │ │ │ -  2.     This tag will fail: <_[_[_r_e_f_]_]_U_S_E name> │ │ │ │ │ +  1.     File image.gif <_[_[_r_e_f_]_]_F_I_L_E │ │ │ │ │ + NAME="image.gif" SIZE=KBYTE> kilobytes │ │ │ │ │ +  2.     Last modified <_[_[_r_e_f_]_]_F_I_L_E NAME="image.gif" │ │ │ │ │ + TIME>, <_[_[_r_e_f_]_]_F_I_L_E NAME="image.gif" DATE> │ │ │ │ │ ********** UUssiinngg ppaarraammeetteerrss ********** │ │ │ │ │ More sophisticated tags accept parameters. The │ │ │ │ │ option parameter lets multiple metatag parameters │ │ │ │ │ be named and expanded inside the def or blockdef │ │ │ │ │ block: │ │ │ │ │ -  1. <_[_[_r_e_f_]_]_U_N_D_E_F tagname> │ │ │ │ │ -  2. <_[_[_r_e_f_]_]_U_N_D_E_F tagname1 tagname2 ... > │ │ │ │ │ -  3. │ │ │ │ │ +  1.   <_[_[_r_e_f_]_]_D_E_F NAME="HEADERIMG" OPTION="SRC │ │ │ │ │ + TITLE SIZE"> │ │ │ │ │ +  2.     <_[_[_r_e_f_]_]_I_F size> │ │ │ │ │ +  3.         │ │ │ │ │ +  4.     <_[_[_r_e_f_]_]_/_I_F> │ │ │ │ │ +  5.     <_[_[_r_e_f_]_]_I_M_G SRC=pics/${src}> │ │ │ │ │ +  6.     <_[_[_r_e_f_]_]_U_S_E title> │ │ │ │ │ +  7.     <_[_[_r_e_f_]_]_I_F size> │ │ │ │ │ +  8.         │ │ │ │ │ +  9.     <_[_[_r_e_f_]_]_/_I_F> │ │ │ │ │ + 10.   <_[_[_r_e_f_]_]_/_D_E_F> │ │ │ │ │ + 11. │ │ │ │ │ + 12.   │ │ │ │ │ + 13. │ │ │ │ │ + 14.   │ │ │ │ │ + 15. │ │ │ │ │ + 16.   This will fail: │ │ │ │ │ + 17.   │ │ │ │ │ + 18. │ │ │ │ │ + 19.   Instead, use * like this: │ │ │ │ │ + 20.   <_[_[_r_e_f_]_]_D_E_F NAME="MYIMG" OPTION="SRC *"> │ │ │ │ │ + 21.     <_[_[_r_e_f_]_]_I_M_G SRC="pics/${src}" $*> │ │ │ │ │ + 22.   <_[_[_r_e_f_]_]_/_D_E_F> │ │ │ │ │ + 23.     │ │ │ │ │ + 24.   │ │ │ │ │ ********** SSaavviinngg bblloocckkss ffoorr llaatteerr ********** │ │ │ │ │ When you are using templates, the html should only │ │ │ │ │ be written by the template file. The normal htp │ │ │ │ │ files should just define macros that are used later │ │ │ │ │ in the template. So you may want to write block │ │ │ │ │ tags that just save the block in a macro for later │ │ │ │ │ use. Although this is possible with htp it is quite │ │ │ │ │ tricky, so here we present the way to do this: │ │ │ │ │ -  1.   <_[_[_r_e_f_]_]_s_e_t sect-ctr="0"> │ │ │ │ │ -  2.   <_[_[_r_e_f_]_]_b_l_o_c_k_d_e_f name="section"> │ │ │ │ │ -  3.     <_[_[_r_e_f_]_]_i_n_c sect-ctr> │ │ │ │ │ -  4.     <_[_[_r_e_f_]_]_b_l_o_c_k name="sect-${sect-ctr}" │ │ │ │ │ - expand global> │ │ │ │ │ -  5.       <_[_[_r_e_f_]_]_u_s_e block noexpand> │ │ │ │ │ -  6.     <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -  7.   <_[_[_r_e_f_]_]_/_b_l_o_c_k_d_e_f> │ │ │ │ │ +  1.     <${tagName} ${attrName}=${value$ctr}> │ │ │ │ │ This defines a block macro named section. This │ │ │ │ │ macro uses a counter sect-ctr that enumerates the │ │ │ │ │ sections. It is increased for every section (line │ │ │ │ │ 3) and then the block macro name is build from this │ │ │ │ │ counter. So the first section is stored in block │ │ │ │ │ sect-1, the second in sect-2 and so on. The _[ │ │ │ │ │ _[_r_e_f_]_]_g_l_o_b_a_l flag in line 4 tells htp that these │ │ │ │ │ @@ -92,18 +135,21 @@ │ │ │ │ │ block to be expanded twice. If you omit it, it │ │ │ │ │ would be expanded when defining the sect-1 macro │ │ │ │ │ and when using it later in the template. Generally │ │ │ │ │ it is a good idea to use noexpand whenever you use │ │ │ │ │ expand in a block around it. │ │ │ │ │ To close this example we show how to expand the │ │ │ │ │ sect-${sect-ctr} blocks in the template: │ │ │ │ │ -  1. <_[_[_r_e_f_]_]_W_H_I_L_E [NOT] conditional> │ │ │ │ │ -  2.     block │ │ │ │ │ -  3. <_[_[_r_e_f_]_]_/_W_H_I_L_E> │ │ │ │ │ -  4. │ │ │ │ │ +  1. <_[_[_r_e_f_]_]_f_i_l_e include="header.hti"> │ │ │ │ │ +  2.   <_[_[_r_e_f_]_]_s_e_t sect-ctr="1"> │ │ │ │ │ +  3.   <_[_[_r_e_f_]_]_w_h_i_l_e sect-${sect-ctr}> │ │ │ │ │ +  4.     <_[_[_r_e_f_]_]_u_s_e sect-${sect-ctr}> │ │ │ │ │ +  5.     <_[_[_r_e_f_]_]_i_n_c sect-ctr> │ │ │ │ │ +  6.   <_[_[_r_e_f_]_]_/_w_h_i_l_e> │ │ │ │ │ +  7. <_[_[_r_e_f_]_]_f_i_l_e include="footer.hti"> │ │ │ │ │ The _[_[_r_e_f_]_]_w_h_i_l_e tag in line 3 checks whether the │ │ │ │ │ macro sect-${sect-ctr} is defined. If it is defined │ │ │ │ │ the body is evaluated, which expands the macro and │ │ │ │ │ increases sect-ctr. Afterwards the while condition │ │ │ │ │ is checked again to check for sect-2 macro. This │ │ │ │ │ repeats until sect-${sect-ctr} is not defined. │ │ │ │ │ ********** CCoonncclluussiioonnss ********** │ │ │ ├── ./usr/share/doc/htp/opt.html │ │ │ │ @@ -114,16 +114,39 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -    <[ref]FILE INCLUDE="include.hti" name="Jim Nelson" email="jnelson@crl.com">
│ │ │ │ -    This tag will fail: <[ref]USE name>
│ │ │ │ +<[ref]use macroname [parameters ...] [noexpand]>
│ │ │ │ +<... $macroname ...>
│ │ │ │ +<... ${macroname} ...>
│ │ │ │ +
│ │ │ │ +ludefilename" [parameters ...]>
│ │ │ │ +<[ref]file name>
│ │ │ │ +<[ref]file [ name="filename" ] size[ = (byte|kbyte|mbyte|gbyte) ] [precision=n]>
│ │ │ │ +<[ref]file [ name="filename" ] time[ ="format" ]>
│ │ │ │ +<[ref]file [ name="filename" ] date[ ="format" ]>
│ │ │ │ +<[ref]file search="searchpath">
│ │ │ │ +<[ref]file template="templatefilename">
│ │ │ │ +
│ │ │ │ +nd>
│ │ │ │ +    d is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]block name=e>
│ │ │ │ +    e is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]set time="2">
│ │ │ │ +  <[ref]block name=a>
│ │ │ │ +    a is defined for the 2nd time <[ref]use time>.
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]use c>
│ │ │ │ +  <[ref]use d>
│ │ │ │ +  <[ref]use e>
│ │ │ │

│ │ │ │

synopsis

│ │ │ │ OPT is an htp tag that can be used to specify processing │ │ │ │ options inside the actual document being processed. The options are │ │ │ │ used exactly as they would be on the command-line, although they are not │ │ │ │ preceded by a ‘-’ character. │ │ │ │

│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,36 +1,62 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: OOPPTT ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n     <_[_[_r_e_f_]_]_F_I_L_E INCLUDE="include.hti" name="Jim │ │ │ │ │ -  _L_i_c_e_n_s_e Nelson" email="jnelson@crl.com"> │ │ │ │ │ -  _T_u_t_o_r_i_a_l     This tag will fail: <_[_[_r_e_f_]_]_U_S_E name> │ │ │ │ │ -  _U_s_a_g_e ********** ssyynnooppssiiss ********** │ │ │ │ │ -  HTP Tags OOPPTT is an htp tag that can be used to specify │ │ │ │ │ -    _A_L_T_T_E_X_T processing options inside the actual document being │ │ │ │ │ -    _B_L_O_C_K processed. The options are used exactly as they │ │ │ │ │ -    _B_L_O_C_K_D_E_F would be on the command-line, although they are not │ │ │ │ │ -    _D_E_F preceded by a ‘-’ character. │ │ │ │ │ -    _F_I_L_E Click here for _m_o_r_e_ _i_n_f_o_r_m_a_t_i_o_n_ _o_n_ _u_s_i_n_g │ │ │ │ │ -    _I_F _c_u_s_t_o_m_i_z_a_t_i_o_n_ _o_p_t_i_o_n_s_ _w_i_t_h_ _h_t_p. │ │ │ │ │ -    _I_N_C │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_u_s_e macroname [parameters ...] [noexpand]> │ │ │ │ │ +  _L_i_c_e_n_s_e <... $macroname ...> │ │ │ │ │ +  _T_u_t_o_r_i_a_l <... ${macroname} ...> │ │ │ │ │ +  _U_s_a_g_e │ │ │ │ │ +  HTP Tags ludefilename" [parameters ...]> │ │ │ │ │ +    _A_L_T_T_E_X_T <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ │ +    _B_L_O_C_K <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ │ +    _B_L_O_C_K_D_E_F (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ │ +    _D_E_F <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time[ ="format" ]> │ │ │ │ │ +    _F_I_L_E <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] date[ ="format" ]> │ │ │ │ │ +    _I_F <_[_[_r_e_f_]_]_f_i_l_e search="searchpath"> │ │ │ │ │ +    _I_N_C <_[_[_r_e_f_]_]_f_i_l_e template="templatefilename"> │ │ │ │ │     _I_M_G │ │ │ │ │ -    _I_M_A_G_E_U_R_L │ │ │ │ │ -  [>] _O_P_T │ │ │ │ │ -    _O_U_T_P_U_T │ │ │ │ │ -    _Q_U_O_T_E │ │ │ │ │ -    _S_E_T │ │ │ │ │ -    _U_N_D_E_F │ │ │ │ │ -    _U_N_S_E_T │ │ │ │ │ -    _U_S_E_,_ _$ │ │ │ │ │ -    _W_H_I_L_E │ │ │ │ │ -    _<_!_-_-_- │ │ │ │ │ -  _H_i_s_t_o_r_y │ │ │ │ │ -  _W_i_s_h_ _l_i_s_t │ │ │ │ │ -  _B_u_g_s │ │ │ │ │ +    _I_M_A_G_E_U_R_L nd> │ │ │ │ │ +  [>] _O_P_T     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _O_U_T_P_U_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _Q_U_O_T_E   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _S_E_T   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ +    _U_N_D_E_F     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _U_N_S_E_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _W_H_I_L_E   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ +    _<_!_-_-_-   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ +  _H_i_s_t_o_r_y     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ │ +  _W_i_s_h_ _l_i_s_t time>. │ │ │ │ │ +  _B_u_g_s   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e c> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e d> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e e> │ │ │ │ │ + ********** ssyynnooppssiiss ********** │ │ │ │ │ + OOPPTT is an htp tag that can be used to specify │ │ │ │ │ + processing options inside the actual document being │ │ │ │ │ + processed. The options are used exactly as they │ │ │ │ │ + would be on the command-line, although they are not │ │ │ │ │ + preceded by a ‘-’ character. │ │ │ │ │ + Click here for _m_o_r_e_ _i_n_f_o_r_m_a_t_i_o_n_ _o_n_ _u_s_i_n_g │ │ │ │ │ + _c_u_s_t_o_m_i_z_a_t_i_o_n_ _o_p_t_i_o_n_s_ _w_i_t_h_ _h_t_p. │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │   _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ │   _h_t_p_ _p_r_o_j_e_c_t │ │ │ ├── ./usr/share/doc/htp/output.html │ │ │ │ @@ -114,17 +114,39 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -<[ref]UNDEF tagname>
│ │ │ │ -<[ref]UNDEF tagname1 tagname2 ... >
│ │ │ │ +<[ref]use macroname [parameters ...] [noexpand]>
│ │ │ │ +<... $macroname ...>
│ │ │ │ +<... ${macroname} ...>
│ │ │ │
│ │ │ │ +ludefilename" [parameters ...]>
│ │ │ │ +<[ref]file name>
│ │ │ │ +<[ref]file [ name="filename" ] size[ = (byte|kbyte|mbyte|gbyte) ] [precision=n]>
│ │ │ │ +<[ref]file [ name="filename" ] time[ ="format" ]>
│ │ │ │ +<[ref]file [ name="filename" ] date[ ="format" ]>
│ │ │ │ +<[ref]file search="searchpath">
│ │ │ │ +<[ref]file template="templatefilename">
│ │ │ │ +
│ │ │ │ +nd>
│ │ │ │ +    d is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]block name=e>
│ │ │ │ +    e is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]set time="2">
│ │ │ │ +  <[ref]block name=a>
│ │ │ │ +    a is defined for the 2nd time <[ref]use time>.
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]use c>
│ │ │ │ +  <[ref]use d>
│ │ │ │ +  <[ref]use e>
│ │ │ │

│ │ │ │

synopsis

│ │ │ │

The OUTPUT tag can be used to create auxillary │ │ │ │ files besides the main HTML file. The text between this tag and the │ │ │ │ corresponding </OUTPUT> tag is written to output file.

│ │ │ │

Normally the outputfile is cleared before writing to it, but you │ │ │ │ can use the APPEND attribute to extend an existing file. The text │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,36 +1,62 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: OOUUTTPPUUTT ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_U_N_D_E_F tagname> │ │ │ │ │ -  _L_i_c_e_n_s_e <_[_[_r_e_f_]_]_U_N_D_E_F tagname1 tagname2 ... > │ │ │ │ │ -  _T_u_t_o_r_i_a_l │ │ │ │ │ -  _U_s_a_g_e ********** ssyynnooppssiiss ********** │ │ │ │ │ -  HTP Tags The OOUUTTPPUUTT tag can be used to create auxillary │ │ │ │ │ -    _A_L_T_T_E_X_T files besides the main HTML file. The text between │ │ │ │ │ -    _B_L_O_C_K this tag and the corresponding tag is │ │ │ │ │ -    _B_L_O_C_K_D_E_F written to output file. │ │ │ │ │ -    _D_E_F Normally the outputfile is cleared before writing │ │ │ │ │ -    _F_I_L_E to it, but you can use the APPEND attribute to │ │ │ │ │ -    _I_F extend an existing file. The text written to the │ │ │ │ │ -    _I_N_C file is normally not expanded, i.e. all tags inside │ │ │ │ │ -    _I_M_G this block are not executed but written unmodified │ │ │ │ │ -    _I_M_A_G_E_U_R_L to the file. However, you can use the _E_X_P_A_N_D │ │ │ │ │ -    _O_P_T attribute to override this behaviour. │ │ │ │ │ -  [>] _O_U_T_P_U_T │ │ │ │ │ -    _Q_U_O_T_E │ │ │ │ │ -    _S_E_T │ │ │ │ │ -    _U_N_D_E_F │ │ │ │ │ -    _U_N_S_E_T │ │ │ │ │ -    _U_S_E_,_ _$ │ │ │ │ │ -    _W_H_I_L_E │ │ │ │ │ -    _<_!_-_-_- │ │ │ │ │ -  _H_i_s_t_o_r_y │ │ │ │ │ -  _W_i_s_h_ _l_i_s_t │ │ │ │ │ -  _B_u_g_s │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_u_s_e macroname [parameters ...] [noexpand]> │ │ │ │ │ +  _L_i_c_e_n_s_e <... $macroname ...> │ │ │ │ │ +  _T_u_t_o_r_i_a_l <... ${macroname} ...> │ │ │ │ │ +  _U_s_a_g_e │ │ │ │ │ +  HTP Tags ludefilename" [parameters ...]> │ │ │ │ │ +    _A_L_T_T_E_X_T <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ │ +    _B_L_O_C_K <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ │ +    _B_L_O_C_K_D_E_F (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ │ +    _D_E_F <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time[ ="format" ]> │ │ │ │ │ +    _F_I_L_E <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] date[ ="format" ]> │ │ │ │ │ +    _I_F <_[_[_r_e_f_]_]_f_i_l_e search="searchpath"> │ │ │ │ │ +    _I_N_C <_[_[_r_e_f_]_]_f_i_l_e template="templatefilename"> │ │ │ │ │ +    _I_M_G │ │ │ │ │ +    _I_M_A_G_E_U_R_L nd> │ │ │ │ │ +    _O_P_T     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +  [>] _O_U_T_P_U_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _Q_U_O_T_E   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _S_E_T   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ +    _U_N_D_E_F     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _U_N_S_E_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _W_H_I_L_E   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ +    _<_!_-_-_-   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ +  _H_i_s_t_o_r_y     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ │ +  _W_i_s_h_ _l_i_s_t time>. │ │ │ │ │ +  _B_u_g_s   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e c> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e d> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e e> │ │ │ │ │ + ********** ssyynnooppssiiss ********** │ │ │ │ │ + The OOUUTTPPUUTT tag can be used to create auxillary │ │ │ │ │ + files besides the main HTML file. The text between │ │ │ │ │ + this tag and the corresponding tag is │ │ │ │ │ + written to output file. │ │ │ │ │ + Normally the outputfile is cleared before writing │ │ │ │ │ + to it, but you can use the APPEND attribute to │ │ │ │ │ + extend an existing file. The text written to the │ │ │ │ │ + file is normally not expanded, i.e. all tags inside │ │ │ │ │ + this block are not executed but written unmodified │ │ │ │ │ + to the file. However, you can use the _E_X_P_A_N_D │ │ │ │ │ + attribute to override this behaviour. │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + │ │ │ ├── ./usr/share/doc/htp/quote.html │ │ │ │ @@ -114,17 +114,16 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -<[ref]UNDEF tagname>
│ │ │ │ -<[ref]UNDEF tagname1 tagname2 ... >
│ │ │ │ -
│ │ │ │ +    <[ref]INC i="1" j="-1">
│ │ │ │ +lson@crl.com">
│ │ │ │

│ │ │ │

synopsis

│ │ │ │ QUOTE is used to quote a macro that would otherwise │ │ │ │ be interpreted by HTP. It may be useful in conjunction with a │ │ │ │ surrounding EXPANDed block to prevent early │ │ │ │ expansion of some contained blocks. Note that '$' evaluation is still │ │ │ │ done inside a quote block. │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,20 +1,20 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: QQUUOOTTEE ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_U_N_D_E_F tagname> │ │ │ │ │ -  _L_i_c_e_n_s_e <_[_[_r_e_f_]_]_U_N_D_E_F tagname1 tagname2 ... > │ │ │ │ │ -  _T_u_t_o_r_i_a_l │ │ │ │ │ -  _U_s_a_g_e ********** ssyynnooppssiiss ********** │ │ │ │ │ -  HTP Tags QQUUOOTTEE is used to quote a macro that would otherwise │ │ │ │ │ -    _A_L_T_T_E_X_T be interpreted by HTP. It may be useful in │ │ │ │ │ -    _B_L_O_C_K conjunction with a surrounding _E_X_P_A_N_Ded block to │ │ │ │ │ -    _B_L_O_C_K_D_E_F prevent early expansion of some contained blocks. │ │ │ │ │ -    _D_E_F Note that '$' evaluation is still done inside a │ │ │ │ │ -    _F_I_L_E quote block. │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n     <_[_[_r_e_f_]_]_I_N_C i="1" j="-1"> │ │ │ │ │ +  _L_i_c_e_n_s_e lson@crl.com"> │ │ │ │ │ +  _T_u_t_o_r_i_a_l ********** ssyynnooppssiiss ********** │ │ │ │ │ +  _U_s_a_g_e QQUUOOTTEE is used to quote a macro that would otherwise │ │ │ │ │ +  HTP Tags be interpreted by HTP. It may be useful in │ │ │ │ │ +    _A_L_T_T_E_X_T conjunction with a surrounding _E_X_P_A_N_Ded block to │ │ │ │ │ +    _B_L_O_C_K prevent early expansion of some contained blocks. │ │ │ │ │ +    _B_L_O_C_K_D_E_F Note that '$' evaluation is still done inside a │ │ │ │ │ +    _D_E_F quote block. │ │ │ │ │ +    _F_I_L_E │ │ │ │ │     _I_F │ │ │ │ │     _I_N_C │ │ │ │ │     _I_M_G │ │ │ │ │     _I_M_A_G_E_U_R_L │ │ │ │ │     _O_P_T │ │ │ │ │     _O_U_T_P_U_T │ │ │ │ │   [>] _Q_U_O_T_E │ │ │ │ │ @@ -26,15 +26,14 @@ │ │ │ │ │     _<_!_-_-_- │ │ │ │ │   _H_i_s_t_o_r_y │ │ │ │ │   _W_i_s_h_ _l_i_s_t │ │ │ │ │   _B_u_g_s │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ │   _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ │   _h_t_p_ _p_r_o_j_e_c_t │ │ │ │ │   _h_t_p_ _h_o_m_e_p_a_g_e │ │ │ │ │ hosted by │ │ │ │ │ _S_o_u_r_c_e_f_o_r_g_e │ │ │ │ │ HTML coding_[_P_o_w_e_r_e_d_ _b_y │ │ │ │ │ _h_t_p_] │ │ │ ├── ./usr/share/doc/htp/set.html │ │ │ │ @@ -114,25 +114,45 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -  <[ref]def name="sharedimg" option="name alt">
│ │ │ │ -    <[ref]img src="/home/sharedimages/${name}" alt="${alt}">;
│ │ │ │ -  <[ref]/def>
│ │ │ │ +<[ref]use macroname [parameters ...] [noexpand]>
│ │ │ │ +<... $macroname ...>
│ │ │ │ +<... ${macroname} ...>
│ │ │ │
│ │ │ │ -  <sharedimg name="bubble.gif" alt="Bubble image">
│ │ │ │ +ludefilename" [parameters ...]>
│ │ │ │ +<[ref]file name>
│ │ │ │ +<[ref]file [ name="filename" ] size[ = (byte|kbyte|mbyte|gbyte) ] [precision=n]>
│ │ │ │ +<[ref]file [ name="filename" ] time[ ="format" ]>
│ │ │ │ +<[ref]file [ name="filename" ] date[ ="format" ]>
│ │ │ │ +<[ref]file search="searchpath">
│ │ │ │ +<[ref]file template="templatefilename">
│ │ │ │ +
│ │ │ │ +nd>
│ │ │ │ +    d is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]block name=e>
│ │ │ │ +    e is expanded at time <[ref]use time>; <[ref]use a noexpand>
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]set time="2">
│ │ │ │ +  <[ref]block name=a>
│ │ │ │ +    a is defined for the 2nd time <[ref]use time>.
│ │ │ │ +  <[ref]/block>
│ │ │ │ +  <[ref]use c>
│ │ │ │ +  <[ref]use d>
│ │ │ │ +  <[ref]use e>
│ │ │ │

│ │ │ │

synopsis

│ │ │ │ SET creates a macro definition that can later be expanded │ │ │ │ anywhere in the HTML document. To create a macro: │ │ │ │

│ │ │ │ -    <[ref]unset email_addr>
│ │ │ │ +<!--- This comment doesn't appear in the HTML file --->
│ │ │ │

│ │ │ │

│ │ │ │ The macro "emailaddr" can then be expanded later. The │ │ │ │ USE tag is used to expand the macro outside a tag (i.e., into the regular │ │ │ │ text). If the macro needs to be expanded inside a markup tag, use the │ │ │ │ '$' operator. │ │ │ │

│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,36 +1,60 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: SSEETT ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n   <_[_[_r_e_f_]_]_d_e_f name="sharedimg" option="name alt"> │ │ │ │ │ -  _L_i_c_e_n_s_e     <_[_[_r_e_f_]_]_i_m_g src="/home/sharedimages/${name}" │ │ │ │ │ -  _T_u_t_o_r_i_a_l alt="${alt}">; │ │ │ │ │ -  _U_s_a_g_e   <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ │ -  HTP Tags │ │ │ │ │ -    _A_L_T_T_E_X_T   │ │ │ │ │ -    _B_L_O_C_K ********** ssyynnooppssiiss ********** │ │ │ │ │ -    _B_L_O_C_K_D_E_F SSEETT creates a macro definition that can later be │ │ │ │ │ -    _D_E_F expanded anywhere in the HTML document. To create a │ │ │ │ │ -    _F_I_L_E macro: │ │ │ │ │ -    _I_F     <_[_[_r_e_f_]_]_u_n_s_e_t email_addr> │ │ │ │ │ -    _I_N_C The macro "emailaddr" can then be expanded later. │ │ │ │ │ -    _I_M_G The _U_S_E tag is used to expand the macro outside a │ │ │ │ │ -    _I_M_A_G_E_U_R_L tag (i.e., into the regular text). If the macro │ │ │ │ │ -    _O_P_T needs to be expanded inside a markup tag, use the │ │ │ │ │ -    _O_U_T_P_U_T _'_$_' operator. │ │ │ │ │ -    _Q_U_O_T_E Multiple macros can be declared in a single markup │ │ │ │ │ -  [>] _S_E_T tag, as the second syntax line shows. │ │ │ │ │ -    _U_N_D_E_F SET should only be used for a single line's worth │ │ │ │ │ -    _U_N_S_E_T of text. Multi-line macros can be defined with the │ │ │ │ │ -    _U_S_E_,_ _$ _B_L_O_C_K tag. The _B_L_O_C_K tag is also useful if the │ │ │ │ │ -    _W_H_I_L_E macro contains a quotation character and you don't │ │ │ │ │ -    _<_!_-_-_- want to fool around with special escape characters. │ │ │ │ │ -  _H_i_s_t_o_r_y Macros can be redefined by using another SET │ │ │ │ │ -  _W_i_s_h_ _l_i_s_t command with the same macro name. The prior │ │ │ │ │ -  _B_u_g_s definition will be destroyed, however. Also, the │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_u_s_e macroname [parameters ...] [noexpand]> │ │ │ │ │ +  _L_i_c_e_n_s_e <... $macroname ...> │ │ │ │ │ +  _T_u_t_o_r_i_a_l <... ${macroname} ...> │ │ │ │ │ +  _U_s_a_g_e │ │ │ │ │ +  HTP Tags ludefilename" [parameters ...]> │ │ │ │ │ +    _A_L_T_T_E_X_T <_[_[_r_e_f_]_]_f_i_l_e name> │ │ │ │ │ +    _B_L_O_C_K <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] size[ = │ │ │ │ │ +    _B_L_O_C_K_D_E_F (byte|kbyte|mbyte|gbyte) ] [precision=n]> │ │ │ │ │ +    _D_E_F <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] time[ ="format" ]> │ │ │ │ │ +    _F_I_L_E <_[_[_r_e_f_]_]_f_i_l_e [ name="filename" ] date[ ="format" ]> │ │ │ │ │ +    _I_F <_[_[_r_e_f_]_]_f_i_l_e search="searchpath"> │ │ │ │ │ +    _I_N_C <_[_[_r_e_f_]_]_f_i_l_e template="templatefilename"> │ │ │ │ │ +    _I_M_G │ │ │ │ │ +    _I_M_A_G_E_U_R_L nd> │ │ │ │ │ +    _O_P_T     d is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _O_U_T_P_U_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _Q_U_O_T_E   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +  [>] _S_E_T   <_[_[_r_e_f_]_]_b_l_o_c_k name=e> │ │ │ │ │ +    _U_N_D_E_F     e is expanded at time <_[_[_r_e_f_]_]_u_s_e time>; <_[ │ │ │ │ │ +    _U_N_S_E_T _[_r_e_f_]_]_u_s_e a noexpand> │ │ │ │ │ +    _U_S_E_,_ _$   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _W_H_I_L_E   <_[_[_r_e_f_]_]_s_e_t time="2"> │ │ │ │ │ +    _<_!_-_-_-   <_[_[_r_e_f_]_]_b_l_o_c_k name=a> │ │ │ │ │ +  _H_i_s_t_o_r_y     a is defined for the 2nd time <_[_[_r_e_f_]_]_u_s_e │ │ │ │ │ +  _W_i_s_h_ _l_i_s_t time>. │ │ │ │ │ +  _B_u_g_s   <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e c> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e d> │ │ │ │ │ +   <_[_[_r_e_f_]_]_u_s_e e> │ │ │ │ │ + ********** ssyynnooppssiiss ********** │ │ │ │ │ + SSEETT creates a macro definition that can later be │ │ │ │ │ + expanded anywhere in the HTML document. To create a │ │ │ │ │ + macro: │ │ │ │ │ + │ │ │ │ │ + The macro "emailaddr" can then be expanded later. │ │ │ │ │ + The _U_S_E tag is used to expand the macro outside a │ │ │ │ │ + tag (i.e., into the regular text). If the macro │ │ │ │ │ + needs to be expanded inside a markup tag, use the │ │ │ │ │ + _'_$_' operator. │ │ │ │ │ + Multiple macros can be declared in a single markup │ │ │ │ │ + tag, as the second syntax line shows. │ │ │ │ │ + SET should only be used for a single line's worth │ │ │ │ │ + of text. Multi-line macros can be defined with the │ │ │ │ │ + _B_L_O_C_K tag. The _B_L_O_C_K tag is also useful if the │ │ │ │ │ + macro contains a quotation character and you don't │ │ │ │ │ + want to fool around with special escape characters. │ │ │ │ │ + Macros can be redefined by using another SET │ │ │ │ │ + command with the same macro name. The prior │ │ │ │ │ + definition will be destroyed, however. Also, the │ │ │ │ │ macro can be removed (destroyed) with the _U_N_S_E_T │ │ │ │ │ tag. │ │ │ ├── ./usr/share/doc/htp/tut/jh.html │ │ │ │ @@ -16,10 +16,10 @@ │ │ │ │ Phone:+49 761 203-8243 │ │ │ │ Fax:+49 761 203-8242 │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │


│ │ │ │ Copyright by Joe Doe.
│ │ │ │ - last updated Sat May 04, 2024 │ │ │ │ + last updated Fri Jun 06, 2025 │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,8 +1,8 @@ │ │ │ │ │ ************ JJoocchheenn HHooeenniicckkee ************ │ │ │ │ │ Navigation bar [Photo] │ │ │ │ │ _M_a_i_n RRoooomm:: Bld.52 00-020 │ │ │ │ │ _E_x_a_m_p_l_e PPhhoonnee:: +49 761 203-8243 │ │ │ │ │ FFaaxx:: +49 761 203-8242 │ │ │ │ │ =============================================================================== │ │ │ │ │ Copyright by _J_o_e_ _D_o_e. │ │ │ │ │ -last updated Sat May 04, 2024 │ │ │ │ │ +last updated Fri Jun 06, 2025 │ │ │ ├── ./usr/share/doc/htp/tut/tut1.html │ │ │ │ @@ -5,9 +5,9 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ This page was produced by htp. │ │ │ │
│ │ │ │ Copyright by Joe Doe, │ │ │ │ webmaster@domain.com, │ │ │ │ -last updated Sat May 04, 2024 │ │ │ │ +last updated Fri Jun 06, 2025 │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,3 +1,3 @@ │ │ │ │ │ This page was produced by htp. │ │ │ │ │ =============================================================================== │ │ │ │ │ -Copyright by Joe Doe, _w_e_b_m_a_s_t_e_r_@_d_o_m_a_i_n_._c_o_m, last updated Sat May 04, 2024 │ │ │ │ │ +Copyright by Joe Doe, _w_e_b_m_a_s_t_e_r_@_d_o_m_a_i_n_._c_o_m, last updated Fri Jun 06, 2025 │ │ │ ├── ./usr/share/doc/htp/tut/tut2.html │ │ │ │ @@ -13,10 +13,10 @@ │ │ │ │

│ │ │ │ As you can see the file contains almost only the contents. │ │ │ │

│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ Copyright by Joe Doe.
│ │ │ │ - last updated Sat May 04, 2024 │ │ │ │ + last updated Fri Jun 06, 2025 │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,6 +1,6 @@ │ │ │ │ │ Navigation bar ********** HHeerree iiss tthhee ccoonntteenntt ********** │ │ │ │ │ _M_a_i_n As you can see the file contains almost only the contents. │ │ │ │ │ _E_x_a_m_p_l_e │ │ │ │ │ =============================================================================== │ │ │ │ │ Copyright by _J_o_e_ _D_o_e. │ │ │ │ │ -last updated Sat May 04, 2024 │ │ │ │ │ +last updated Fri Jun 06, 2025 │ │ │ ├── ./usr/share/doc/htp/tut/tut3.html │ │ │ │ @@ -13,10 +13,10 @@ │ │ │ │

│ │ │ │ As you can see the file contains almost only the contents. │ │ │ │

│ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ Copyright by Joe Doe.
│ │ │ │ - last updated Sat May 04, 2024 │ │ │ │ + last updated Fri Jun 06, 2025 │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,6 +1,6 @@ │ │ │ │ │ Navigation bar ********** HHeerree aarree tthhee ccoonntteennttss ********** │ │ │ │ │ _M_a_i_n As you can see the file contains almost only the contents. │ │ │ │ │ _E_x_a_m_p_l_e │ │ │ │ │ =============================================================================== │ │ │ │ │ Copyright by _J_o_e_ _D_o_e. │ │ │ │ │ -last updated Sat May 04, 2024 │ │ │ │ │ +last updated Fri Jun 06, 2025 │ │ │ ├── ./usr/share/doc/htp/undef.html │ │ │ │ @@ -114,21 +114,15 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -  <[ref]set sect-ctr="0">
│ │ │ │ -  <[ref]blockdef name="section">
│ │ │ │ -    <[ref]inc sect-ctr>
│ │ │ │ -    <[ref]block name="sect-${sect-ctr}" expand global>
│ │ │ │ -      <[ref]use block noexpand>
│ │ │ │ -    <[ref]/block>
│ │ │ │ -  <[ref]/blockdef>
│ │ │ │ +    <[ref]SET emailaddr="jnelson@crl.com">
│ │ │ │

│ │ │ │

synopsis

│ │ │ │

UNDEF removes a metatag definition. Metatags │ │ │ │ created by DEF and BLOCKDEF can be removed with the UNDEF │ │ │ │ command. Once removed, the metatag will no longer be recognized by │ │ │ │ htp until it is reassigned.

│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,45 +1,38 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: UUNNDDEEFF ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n   <_[_[_r_e_f_]_]_s_e_t sect-ctr="0"> │ │ │ │ │ -  _L_i_c_e_n_s_e   <_[_[_r_e_f_]_]_b_l_o_c_k_d_e_f name="section"> │ │ │ │ │ -  _T_u_t_o_r_i_a_l     <_[_[_r_e_f_]_]_i_n_c sect-ctr> │ │ │ │ │ -  _U_s_a_g_e     <_[_[_r_e_f_]_]_b_l_o_c_k name="sect-${sect-ctr}" expand │ │ │ │ │ -  HTP Tags global> │ │ │ │ │ -    _A_L_T_T_E_X_T       <_[_[_r_e_f_]_]_u_s_e block noexpand> │ │ │ │ │ -    _B_L_O_C_K     <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -    _B_L_O_C_K_D_E_F   <_[_[_r_e_f_]_]_/_b_l_o_c_k_d_e_f> │ │ │ │ │ -    _D_E_F ********** ssyynnooppssiiss ********** │ │ │ │ │ -    _F_I_L_E UUNNDDEEFF removes a metatag definition. Metatags │ │ │ │ │ -    _I_F created by _D_E_F and _B_L_O_C_K_D_E_F can be removed with the │ │ │ │ │ -    _I_N_C UNDEF command. Once removed, the metatag will no │ │ │ │ │ -    _I_M_G longer be recognized by htp until it is reassigned. │ │ │ │ │ -    _I_M_A_G_E_U_R_L Multiple metatags can be removed by placing each │ │ │ │ │ -    _O_P_T name as an attribute. │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n     <_[_[_r_e_f_]_]_S_E_T emailaddr="jnelson@crl.com"> │ │ │ │ │ +  _L_i_c_e_n_s_e ********** ssyynnooppssiiss ********** │ │ │ │ │ +  _T_u_t_o_r_i_a_l UUNNDDEEFF removes a metatag definition. Metatags │ │ │ │ │ +  _U_s_a_g_e created by _D_E_F and _B_L_O_C_K_D_E_F can be removed with the │ │ │ │ │ +  HTP Tags UNDEF command. Once removed, the metatag will no │ │ │ │ │ +    _A_L_T_T_E_X_T longer be recognized by htp until it is reassigned. │ │ │ │ │ +    _B_L_O_C_K Multiple metatags can be removed by placing each │ │ │ │ │ +    _B_L_O_C_K_D_E_F name as an attribute. │ │ │ │ │ +    _D_E_F │ │ │ │ │ +    _F_I_L_E │ │ │ │ │ +    _I_F │ │ │ │ │ +    _I_N_C │ │ │ │ │ +    _I_M_G │ │ │ │ │ +    _I_M_A_G_E_U_R_L │ │ │ │ │ +    _O_P_T │ │ │ │ │     _O_U_T_P_U_T │ │ │ │ │     _Q_U_O_T_E │ │ │ │ │     _S_E_T │ │ │ │ │   [>] _U_N_D_E_F │ │ │ │ │     _U_N_S_E_T │ │ │ │ │     _U_S_E_,_ _$ │ │ │ │ │     _W_H_I_L_E │ │ │ │ │     _<_!_-_-_- │ │ │ │ │   _H_i_s_t_o_r_y │ │ │ │ │   _W_i_s_h_ _l_i_s_t │ │ │ │ │   _B_u_g_s │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │   _p_a_g_e_ _s_o_u_r_c_e │ │ │ │ │   _h_t_p_ _p_r_o_j_e_c_t │ │ │ │ │   _h_t_p_ _h_o_m_e_p_a_g_e │ │ │ │ │ hosted by │ │ │ │ │ _S_o_u_r_c_e_f_o_r_g_e │ │ │ │ │ HTML coding_[_P_o_w_e_r_e_d_ _b_y │ │ │ │ │ _h_t_p_] │ │ │ ├── ./usr/share/doc/htp/unset.html │ │ │ │ @@ -114,50 +114,32 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -  <[ref]set sect-ctr="0">
│ │ │ │ -  <[ref]blockdef name="section">
│ │ │ │ -    <[ref]inc sect-ctr>
│ │ │ │ -    <[ref]block name="sect-${sect-ctr}" expand global>
│ │ │ │ -      <[ref]use block noexpand>
│ │ │ │ -    <[ref]/block>
│ │ │ │ -  <[ref]/blockdef>
│ │ │ │

│ │ │ │

synopsis

│ │ │ │ UNSET removes (or deletes) a macro and it's definition. │ │ │ │ The macro is subsequently not available for use in the pre-processed files. │ │ │ │ (Note that simply redefining the macro with another SET or │ │ │ │ BLOCK definition with the same name is acceptable. The │ │ │ │ old macro definition will be removed automatically.) │ │ │ │

│ │ │ │ For example: │ │ │ │

│ │ │ │ -<[ref]WHILE [NOT] conditional>
│ │ │ │ -    block
│ │ │ │ -<[ref]/WHILE>
│ │ │ │ -
│ │ │ │ -<[ref]/block>
│ │ │ │ -
│ │ │ │ -<[ref]set morestuff=$email>
│ │ │ │ -
│ │ │ │ -This works:     <[ref]use stuff email="jnelson@crl.com">
│ │ │ │ -But this fails: <[ref]use email>
│ │ │ │ -And this fails: <[ref]use morestuff email="jnelson@crl.com">
│ │ │ │ +    File image.gif <[ref]FILE NAME="image.gif" SIZE=KBYTE> kilobytes
│ │ │ │ +    Last modified <[ref]FILE NAME="image.gif" TIME>, <[ref]FILE NAME="image.gif" DATE>
│ │ │ │

│ │ │ │

│ │ │ │ More than one macro may be removed in the same tag: │ │ │ │

│ │ │ │ -  <[ref]WHILE NOT i="10">
│ │ │ │ -    ...
│ │ │ │ -    <[ref]INC i>
│ │ │ │ -  <[ref]/WHILE>
│ │ │ │ +    <[ref]FILE INCLUDE="include.hti" name="Jim Nelson" email="jnelson@crl.com">
│ │ │ │ +    This tag will fail: <[ref]USE name>
│ │ │ │

│ │ │ │

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,54 +1,36 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: UUNNSSEETT ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n   <_[_[_r_e_f_]_]_s_e_t sect-ctr="0"> │ │ │ │ │ -  _L_i_c_e_n_s_e   <_[_[_r_e_f_]_]_b_l_o_c_k_d_e_f name="section"> │ │ │ │ │ -  _T_u_t_o_r_i_a_l     <_[_[_r_e_f_]_]_i_n_c sect-ctr> │ │ │ │ │ -  _U_s_a_g_e     <_[_[_r_e_f_]_]_b_l_o_c_k name="sect-${sect-ctr}" expand │ │ │ │ │ -  HTP Tags global> │ │ │ │ │ -    _A_L_T_T_E_X_T       <_[_[_r_e_f_]_]_u_s_e block noexpand> │ │ │ │ │ -    _B_L_O_C_K     <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -    _B_L_O_C_K_D_E_F   <_[_[_r_e_f_]_]_/_b_l_o_c_k_d_e_f> │ │ │ │ │ -    _D_E_F ********** ssyynnooppssiiss ********** │ │ │ │ │ -    _F_I_L_E UUNNSSEETT removes (or deletes) a macro and it's │ │ │ │ │ -    _I_F definition. The macro is subsequently not available │ │ │ │ │ -    _I_N_C for use in the pre-processed files. (Note that │ │ │ │ │ -    _I_M_G simply redefining the macro with another _S_E_T or │ │ │ │ │ -    _I_M_A_G_E_U_R_L _B_L_O_C_K definition with the same name is acceptable. │ │ │ │ │ -    _O_P_T The old macro definition will be removed │ │ │ │ │ -    _O_U_T_P_U_T automatically.) │ │ │ │ │ -    _Q_U_O_T_E For example: │ │ │ │ │ -    _S_E_T <_[_[_r_e_f_]_]_W_H_I_L_E [NOT] conditional> │ │ │ │ │ -    _U_N_D_E_F     block │ │ │ │ │ -  [>] _U_N_S_E_T <_[_[_r_e_f_]_]_/_W_H_I_L_E> │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n ********** ssyynnooppssiiss ********** │ │ │ │ │ +  _L_i_c_e_n_s_e UUNNSSEETT removes (or deletes) a macro and it's │ │ │ │ │ +  _T_u_t_o_r_i_a_l definition. The macro is subsequently not available │ │ │ │ │ +  _U_s_a_g_e for use in the pre-processed files. (Note that │ │ │ │ │ +  HTP Tags simply redefining the macro with another _S_E_T or │ │ │ │ │ +    _A_L_T_T_E_X_T _B_L_O_C_K definition with the same name is acceptable. │ │ │ │ │ +    _B_L_O_C_K The old macro definition will be removed │ │ │ │ │ +    _B_L_O_C_K_D_E_F automatically.) │ │ │ │ │ +    _D_E_F For example: │ │ │ │ │ +    _F_I_L_E     File image.gif <_[_[_r_e_f_]_]_F_I_L_E NAME="image.gif" │ │ │ │ │ +    _I_F SIZE=KBYTE> kilobytes │ │ │ │ │ +    _I_N_C     Last modified <_[_[_r_e_f_]_]_F_I_L_E NAME="image.gif" │ │ │ │ │ +    _I_M_G TIME>, <_[_[_r_e_f_]_]_F_I_L_E NAME="image.gif" DATE> │ │ │ │ │ +    _I_M_A_G_E_U_R_L More than one macro may be removed in the same tag: │ │ │ │ │ +    _O_P_T     <_[_[_r_e_f_]_]_F_I_L_E INCLUDE="include.hti" name="Jim │ │ │ │ │ +    _O_U_T_P_U_T Nelson" email="jnelson@crl.com"> │ │ │ │ │ +    _Q_U_O_T_E     This tag will fail: <_[_[_r_e_f_]_]_U_S_E name> │ │ │ │ │ +    _S_E_T │ │ │ │ │ +    _U_N_D_E_F │ │ │ │ │ +  [>] _U_N_S_E_T │ │ │ │ │     _U_S_E_,_ _$ │ │ │ │ │ -    _W_H_I_L_E <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +    _W_H_I_L_E │ │ │ │ │     _<_!_-_-_- │ │ │ │ │ -  _H_i_s_t_o_r_y <_[_[_r_e_f_]_]_s_e_t morestuff=$email> │ │ │ │ │ +  _H_i_s_t_o_r_y │ │ │ │ │   _W_i_s_h_ _l_i_s_t │ │ │ │ │ -  _B_u_g_s This works:     <_[_[_r_e_f_]_]_u_s_e stuff │ │ │ │ │ - email="jnelson@crl.com"> │ │ │ │ │ - But this fails: <_[_[_r_e_f_]_]_u_s_e email> │ │ │ │ │ - And this fails: <_[_[_r_e_f_]_]_u_s_e morestuff │ │ │ │ │ - email="jnelson@crl.com"> │ │ │ │ │ - More than one macro may be removed in the same tag: │ │ │ │ │ -   <_[_[_r_e_f_]_]_W_H_I_L_E NOT i="10"> │ │ │ │ │ -     ... │ │ │ │ │ -     <_[_[_r_e_f_]_]_I_N_C i> │ │ │ │ │ -   <_[_[_r_e_f_]_]_/_W_H_I_L_E> │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ +  _B_u_g_s │ │ │ ├── ./usr/share/doc/htp/use.html │ │ │ │ @@ -114,18 +114,14 @@ │ │ │ │ Bugs │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -<[ref]WHILE [NOT] conditional>
│ │ │ │ -    block
│ │ │ │ -<[ref]/WHILE>
│ │ │ │ -
│ │ │ │

│ │ │ │

synopsis

│ │ │ │ USE will expand macros that have been previously │ │ │ │ declared with either SET or BLOCK. USE can only be used outside of other │ │ │ │ markup tags. │ │ │ │

If you USE a block macro the value of expanded block macros will │ │ │ │ @@ -135,18 +131,19 @@ │ │ │ │ attribute to prevent further expansion.

│ │ │ │

USE will accept additional parameters, which are "local" macros │ │ │ │ for the expanded macro. This is only valid for BLOCK macros. Macros created using SET cannot have parameters passed. For │ │ │ │ example:

│ │ │ │

│ │ │ │ - 1.   <[ref]WHILE NOT i="10">
│ │ │ │ - 2.     ...
│ │ │ │ - 3.     <[ref]INC i>
│ │ │ │ - 4.   <[ref]/WHILE>
│ │ │ │ + 1.   <[ref]def name="sharedimg" option="name alt">
│ │ │ │ + 2.     <[ref]img src="/home/sharedimages/${name}" alt="${alt}">;
│ │ │ │ + 3.   <[ref]/def>
│ │ │ │ + 4.
│ │ │ │ + 5.   <sharedimg name="bubble.gif" alt="Bubble image">
│ │ │ │

│ │ │ │

│ │ │ │ (See below for a description of the '$' operator.) The example on │ │ │ │ line 7 works because "stuff" has been declared as a block macro, and │ │ │ │ the tag is passing the "email" macro to the "stuff" macro. Line 8 │ │ │ │ fails because the "email" macro is unavailable once the block macro is │ │ │ │ completely expanded, and cannot be passed to a SET macro. │ │ │ │ @@ -157,18 +154,21 @@ │ │ │ │ Inside a markup tag, like IMG, A (anchor), or │ │ │ │ any other standard HTML or htp tag, the '$' operator must be used. │ │ │ │ The '$' should be immediately followed by the macro name, which may or │ │ │ │ may not be surrounded by curly braces. When htp encounters this it │ │ │ │ replaces the macro name by the contents of the macro without further │ │ │ │ processing the contents. │ │ │ │

│ │ │ │ - 1.   <[ref]WHILE sect-$i>
│ │ │ │ - 2.     ...
│ │ │ │ - 3.     <[ref]INC i>
│ │ │ │ - 4.   <[ref]/WHILE>
│ │ │ │ + 1.   <[ref]set sect-ctr="0">
│ │ │ │ + 2.   <[ref]blockdef name="section">
│ │ │ │ + 3.     <[ref]inc sect-ctr>
│ │ │ │ + 4.     <[ref]block name="sect-${sect-ctr}" expand global>
│ │ │ │ + 5.       <[ref]use block noexpand>
│ │ │ │ + 6.     <[ref]/block>
│ │ │ │ + 7.   <[ref]/blockdef>
│ │ │ │

│ │ │ │

│ │ │ │ The use of curly braces is encouraged, since it is more robust and │ │ │ │ should never cause confusion with surrounding text. If no curly │ │ │ │ braces are used the macro name consists either of a single punctuation │ │ │ │ character or the maximum sequence of letters, digits, "-" │ │ │ │ and "_" that follows it. │ │ │ │ @@ -182,15 +182,21 @@ │ │ │ │ delimiting the text as if it were additional markup attributes. │ │ │ │ If the '$' macro is surrounded by other text (as in the two examples above), │ │ │ │ quotation marks are not automatically supplied. │ │ │ │

│ │ │ │ Note that a '$' macro can be placed anywhere in a markup tag and can │ │ │ │ be nested. This is valid: │ │ │ │

│ │ │ │ -    <${tagName} ${attrName}=${value$ctr}>
│ │ │ │ +<[ref]file include="header.hti">
│ │ │ │ +  <[ref]set sect-ctr="1">
│ │ │ │ +  <[ref]while sect-${sect-ctr}>
│ │ │ │ +    <[ref]use sect-${sect-ctr}>
│ │ │ │ +    <[ref]inc sect-ctr>
│ │ │ │ +  <[ref]/while>
│ │ │ │ +<[ref]file include="footer.hti">
│ │ │ │

│ │ │ │

The tagName macro can contain any tag name, even a self-defined │ │ │ │ metatag. Note that $ctr is expanded before the valueX │ │ │ │ macro is expanded, so assuming that ctr was set to 1 it will expand │ │ │ │ value1. │ │ │ │

│ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,32 +1,32 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: UUSSEE,, $$ ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_W_H_I_L_E [NOT] conditional> │ │ │ │ │ -  _L_i_c_e_n_s_e     block │ │ │ │ │ -  _T_u_t_o_r_i_a_l <_[_[_r_e_f_]_]_/_W_H_I_L_E> │ │ │ │ │ -  _U_s_a_g_e │ │ │ │ │ -  HTP Tags ********** ssyynnooppssiiss ********** │ │ │ │ │ -    _A_L_T_T_E_X_T UUSSEE will expand macros that have been previously │ │ │ │ │ -    _B_L_O_C_K declared with either _S_E_T or _B_L_O_C_K. USE can only be │ │ │ │ │ -    _B_L_O_C_K_D_E_F used outside of other markup tags. │ │ │ │ │ -    _D_E_F If you USE a block macro the value of expanded │ │ │ │ │ -    _F_I_L_E block macros will be further parsed by htp. This is │ │ │ │ │ -    _I_F maybe not what you want, for example, if the use is │ │ │ │ │ -    _I_N_C inside a block which _e_x_p_a_n_d_s itself. You can use │ │ │ │ │ -    _I_M_G the noexpand attribute to prevent further │ │ │ │ │ -    _I_M_A_G_E_U_R_L expansion. │ │ │ │ │ -    _O_P_T USE will accept additional parameters, which are │ │ │ │ │ -    _O_U_T_P_U_T "local" macros for the expanded macro. This is only │ │ │ │ │ -    _Q_U_O_T_E valid for _B_L_O_C_K macros. Macros created using _S_E_T │ │ │ │ │ -    _S_E_T cannot have parameters passed. For example: │ │ │ │ │ -    _U_N_D_E_F  1.   <_[_[_r_e_f_]_]_W_H_I_L_E NOT i="10"> │ │ │ │ │ -    _U_N_S_E_T  2.     ... │ │ │ │ │ -  [>] _U_S_E_,_ _$  3.     <_[_[_r_e_f_]_]_I_N_C i> │ │ │ │ │ -    _W_H_I_L_E  4.   <_[_[_r_e_f_]_]_/_W_H_I_L_E> │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n ********** ssyynnooppssiiss ********** │ │ │ │ │ +  _L_i_c_e_n_s_e UUSSEE will expand macros that have been previously │ │ │ │ │ +  _T_u_t_o_r_i_a_l declared with either _S_E_T or _B_L_O_C_K. USE can only be │ │ │ │ │ +  _U_s_a_g_e used outside of other markup tags. │ │ │ │ │ +  HTP Tags If you USE a block macro the value of expanded │ │ │ │ │ +    _A_L_T_T_E_X_T block macros will be further parsed by htp. This is │ │ │ │ │ +    _B_L_O_C_K maybe not what you want, for example, if the use is │ │ │ │ │ +    _B_L_O_C_K_D_E_F inside a block which _e_x_p_a_n_d_s itself. You can use │ │ │ │ │ +    _D_E_F the noexpand attribute to prevent further │ │ │ │ │ +    _F_I_L_E expansion. │ │ │ │ │ +    _I_F USE will accept additional parameters, which are │ │ │ │ │ +    _I_N_C "local" macros for the expanded macro. This is only │ │ │ │ │ +    _I_M_G valid for _B_L_O_C_K macros. Macros created using _S_E_T │ │ │ │ │ +    _I_M_A_G_E_U_R_L cannot have parameters passed. For example: │ │ │ │ │ +    _O_P_T  1.   <_[_[_r_e_f_]_]_d_e_f name="sharedimg" option="name │ │ │ │ │ +    _O_U_T_P_U_T alt"> │ │ │ │ │ +    _Q_U_O_T_E  2.     <_[_[_r_e_f_]_]_i_m_g src="/home/sharedimages/$ │ │ │ │ │ +    _S_E_T {name}" alt="${alt}">; │ │ │ │ │ +    _U_N_D_E_F  3.   <_[_[_r_e_f_]_]_/_d_e_f> │ │ │ │ │ +    _U_N_S_E_T  4. │ │ │ │ │ +  [>] _U_S_E_,_ _$  5.   │ │ │ │ │     _<_!_-_-_- (See below for a description of the '$' operator.) │ │ │ │ │   _H_i_s_t_o_r_y The example on line 7 works because "stuff" has │ │ │ │ │   _W_i_s_h_ _l_i_s_t been declared as a block macro, and the tag is │ │ │ │ │   _B_u_g_s passing the "email" macro to the "stuff" macro. │ │ │ │ │ Line 8 fails because the "email" macro is │ │ │ │ │ unavailable once the block macro is completely │ │ │ │ │ expanded, and cannot be passed to a SET macro. │ │ │ │ │ @@ -36,18 +36,22 @@ │ │ │ │ │ Inside a markup tag, like _I_M_G, A (anchor), or any │ │ │ │ │ other standard HTML or htp tag, the '$' operator │ │ │ │ │ must be used. The '$' should be immediately │ │ │ │ │ followed by the macro name, which may or may not be │ │ │ │ │ surrounded by curly braces. When htp encounters │ │ │ │ │ this it replaces the macro name by the contents of │ │ │ │ │ the macro without further processing the contents. │ │ │ │ │ -  1.   <_[_[_r_e_f_]_]_W_H_I_L_E sect-$i> │ │ │ │ │ -  2.     ... │ │ │ │ │ -  3.     <_[_[_r_e_f_]_]_I_N_C i> │ │ │ │ │ -  4.   <_[_[_r_e_f_]_]_/_W_H_I_L_E> │ │ │ │ │ +  1.   <_[_[_r_e_f_]_]_s_e_t sect-ctr="0"> │ │ │ │ │ +  2.   <_[_[_r_e_f_]_]_b_l_o_c_k_d_e_f name="section"> │ │ │ │ │ +  3.     <_[_[_r_e_f_]_]_i_n_c sect-ctr> │ │ │ │ │ +  4.     <_[_[_r_e_f_]_]_b_l_o_c_k name="sect-${sect-ctr}" │ │ │ │ │ + expand global> │ │ │ │ │ +  5.       <_[_[_r_e_f_]_]_u_s_e block noexpand> │ │ │ │ │ +  6.     <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ +  7.   <_[_[_r_e_f_]_]_/_b_l_o_c_k_d_e_f> │ │ │ │ │ The use of curly braces is encouraged, since it is │ │ │ │ │ more robust and should never cause confusion with │ │ │ │ │ surrounding text. If no curly braces are used the │ │ │ │ │ macro name consists either of a single punctuation │ │ │ │ │ character or the maximum sequence of letters, │ │ │ │ │ digits, "-" and "_" that follows it. │ │ │ │ │ If a '$' character needs to be kept in the final │ │ │ │ │ @@ -59,15 +63,21 @@ │ │ │ │ │ it with quotation marks to prevent spaces from │ │ │ │ │ delimiting the text as if it were additional markup │ │ │ │ │ attributes. If the '$' macro is surrounded by other │ │ │ │ │ text (as in the two examples above), quotation │ │ │ │ │ marks are not automatically supplied. │ │ │ │ │ Note that a '$' macro can be placed anywhere in a │ │ │ │ │ markup tag and can be nested. This is valid: │ │ │ │ │ -     <${tagName} ${attrName}=${value$ctr}> │ │ │ │ │ + <_[_[_r_e_f_]_]_f_i_l_e include="header.hti"> │ │ │ │ │ +   <_[_[_r_e_f_]_]_s_e_t sect-ctr="1"> │ │ │ │ │ +   <_[_[_r_e_f_]_]_w_h_i_l_e sect-${sect-ctr}> │ │ │ │ │ +     <_[_[_r_e_f_]_]_u_s_e sect-${sect-ctr}> │ │ │ │ │ +     <_[_[_r_e_f_]_]_i_n_c sect-ctr> │ │ │ │ │ +   <_[_[_r_e_f_]_]_/_w_h_i_l_e> │ │ │ │ │ + <_[_[_r_e_f_]_]_f_i_l_e include="footer.hti"> │ │ │ │ │ The tagName macro can contain any tag name, even a │ │ │ │ │ self-defined metatag. Note that $ctr is expanded │ │ │ │ │ before the valueX macro is expanded, so assuming │ │ │ │ │ that ctr was set to 1 it will expand value1. │ │ │ ├── ./usr/share/doc/htp/while.html │ │ │ │ @@ -114,44 +114,31 @@ │ │ │ │ Bugs │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

syntax

│ │ │ │

│ │ │ │ -<[ref]block stuff>
│ │ │ │ -  <a href=$email>send email</a>
│ │ │ │ -<[ref]/block>
│ │ │ │ -
│ │ │ │ -<[ref]set morestuff=$email>
│ │ │ │ -
│ │ │ │ -This works:     <[ref]use stuff email="jnelson@crl.com">
│ │ │ │ -But this fails: <[ref]use email>
│ │ │ │ -And this fails: <[ref]use morestuff email="jnelson@crl.com">
│ │ │ │

│ │ │ │

synopsis

│ │ │ │ WHILE is the building block for repeated processing. │ │ │ │ The basic form is shown above. │ │ │ │

│ │ │ │ "Conditional" is either a "compare" or "is defined" operation. │ │ │ │ A compare operator is a test of the value of a macro against a literal string. │ │ │ │ If the NOT tag is present in the WHILE markup, the evaluation of the │ │ │ │ conditional is reversed: │ │ │ │

│ │ │ │ -<a href="mailto:$email">mailto hyperlink</a>
│ │ │ │ -<a href="http://$domain/~${username}/">another hyperlink</a>
│ │ │ │

│ │ │ │

│ │ │ │ Just as with [ref]IF you can also check for a │ │ │ │ macro's existance: │ │ │ │

│ │ │ │ -  <[ref]WHILE sect-$i>
│ │ │ │ -    ...
│ │ │ │ -    <[ref]INC i>
│ │ │ │ -  <[ref]/WHILE>
│ │ │ │ +    <[ref]FILE INCLUDE="include.hti" name="Jim Nelson" email="jnelson@crl.com">
│ │ │ │ +    This tag will fail: <[ref]USE name>
│ │ │ │

│ │ │ │

│ │ │ │ If the condition is true, the block is evaluated and afterwards the │ │ │ │ WHILE tag is evaluated again. If the '$'-operator is used in the │ │ │ │ WHILE tag it is also reevaluated on each iteration. │ │ │ │

│ │ │ │ A loop block must be closed with the /WHILE tag. │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,51 +1,36 @@ │ │ │ │ │ [HTP] │ │ │ │ │ ************ hhttpp oonn--lliinnee rreeffeerreennccee :: WWHHIILLEE ************ │ │ │ │ │ _T_a_b_l_e_ _o_f_ _C_o_n_t_e_n_t_s ********** ssyynnttaaxx ********** │ │ │ │ │ -  _I_n_t_r_o_d_u_c_t_i_o_n <_[_[_r_e_f_]_]_b_l_o_c_k stuff> │ │ │ │ │ -  _L_i_c_e_n_s_e   send email │ │ │ │ │ -  _T_u_t_o_r_i_a_l <_[_[_r_e_f_]_]_/_b_l_o_c_k> │ │ │ │ │ -  _U_s_a_g_e │ │ │ │ │ -  HTP Tags <_[_[_r_e_f_]_]_s_e_t morestuff=$email> │ │ │ │ │ -    _A_L_T_T_E_X_T │ │ │ │ │ -    _B_L_O_C_K This works:     <_[_[_r_e_f_]_]_u_s_e stuff │ │ │ │ │ -    _B_L_O_C_K_D_E_F email="jnelson@crl.com"> │ │ │ │ │ -    _D_E_F But this fails: <_[_[_r_e_f_]_]_u_s_e email> │ │ │ │ │ -    _F_I_L_E And this fails: <_[_[_r_e_f_]_]_u_s_e morestuff │ │ │ │ │ -    _I_F email="jnelson@crl.com"> │ │ │ │ │ -    _I_N_C ********** ssyynnooppssiiss ********** │ │ │ │ │ -    _I_M_G WWHHIILLEE is the building block for repeated │ │ │ │ │ -    _I_M_A_G_E_U_R_L processing. The basic form is shown above. │ │ │ │ │ -    _O_P_T "Conditional" is either a "compare" or "is defined" │ │ │ │ │ -    _O_U_T_P_U_T operation. A compare operator is a test of the │ │ │ │ │ -    _Q_U_O_T_E value of a macro against a literal string. If the │ │ │ │ │ -    _S_E_T NOT tag is present in the WHILE markup, the │ │ │ │ │ -    _U_N_D_E_F evaluation of the conditional is reversed: │ │ │ │ │ -    _U_N_S_E_T mailto hyperlink │ │ │ │ │ -    _U_S_E_,_ _$ another │ │ │ │ │ -  [>] _W_H_I_L_E hyperlink │ │ │ │ │ -    _<_!_-_-_- Just as with _[_[_r_e_f_]_]_I_F you can also check for a │ │ │ │ │ -  _H_i_s_t_o_r_y macro's existance: │ │ │ │ │ -  _W_i_s_h_ _l_i_s_t   <_[_[_r_e_f_]_]_W_H_I_L_E sect-$i> │ │ │ │ │ -  _B_u_g_s     ... │ │ │ │ │ -     <_[_[_r_e_f_]_]_I_N_C i> │ │ │ │ │ -   <_[_[_r_e_f_]_]_/_W_H_I_L_E> │ │ │ │ │ - If the condition is true, the block is evaluated │ │ │ │ │ - and afterwards the WHILE tag is evaluated again. If │ │ │ │ │ - the '$'-operator is used in the WHILE tag it is │ │ │ │ │ - also reevaluated on each iteration. │ │ │ │ │ - A loop block mmuusstt be closed with the /WHILE tag. │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ +  _I_n_t_r_o_d_u_c_t_i_o_n ********** ssyynnooppssiiss ********** │ │ │ │ │ +  _L_i_c_e_n_s_e WWHHIILLEE is the building block for repeated │ │ │ │ │ +  _T_u_t_o_r_i_a_l processing. The basic form is shown above. │ │ │ │ │ +  _U_s_a_g_e "Conditional" is either a "compare" or "is defined" │ │ │ │ │ +  HTP Tags operation. A compare operator is a test of the │ │ │ │ │ +    _A_L_T_T_E_X_T value of a macro against a literal string. If the │ │ │ │ │ +    _B_L_O_C_K NOT tag is present in the WHILE markup, the │ │ │ │ │ +    _B_L_O_C_K_D_E_F evaluation of the conditional is reversed: │ │ │ │ │ +    _D_E_F Just as with _[_[_r_e_f_]_]_I_F you can also check for a │ │ │ │ │ +    _F_I_L_E macro's existance: │ │ │ │ │ +    _I_F     <_[_[_r_e_f_]_]_F_I_L_E INCLUDE="include.hti" name="Jim │ │ │ │ │ +    _I_N_C Nelson" email="jnelson@crl.com"> │ │ │ │ │ +    _I_M_G     This tag will fail: <_[_[_r_e_f_]_]_U_S_E name> │ │ │ │ │ +    _I_M_A_G_E_U_R_L If the condition is true, the block is evaluated │ │ │ │ │ +    _O_P_T and afterwards the WHILE tag is evaluated again. If │ │ │ │ │ +    _O_U_T_P_U_T the '$'-operator is used in the WHILE tag it is │ │ │ │ │ +    _Q_U_O_T_E also reevaluated on each iteration. │ │ │ │ │ +    _S_E_T A loop block mmuusstt be closed with the /WHILE tag. │ │ │ │ │ +    _U_N_D_E_F │ │ │ │ │ +    _U_N_S_E_T │ │ │ │ │ +    _U_S_E_,_ _$ │ │ │ │ │ +  [>] _W_H_I_L_E │ │ │ │ │ +    _<_!_-_-_- │ │ │ │ │ +  _H_i_s_t_o_r_y │ │ │ │ │ +  _W_i_s_h_ _l_i_s_t │ │ │ │ │ +  _B_u_g_s