File: hh-mktoc.tex

package info (click to toggle)
gprolog 1.3.0-6.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 13,512 kB
  • ctags: 8,954
  • sloc: ansic: 57,431; perl: 16,620; sh: 5,900; makefile: 1,284
file content (47 lines) | stat: -rw-r--r-- 1,143 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
% use filter mode:  hevea -text -w 1000 <hh-mktoc.tex >hh-gprolog.hhc
\documentclass{article}

\def\bs{\char'134}
\def\lt{\char'074}
\def\gt{\char'076}
\def\lb{\char'173}
\def\rb{\char'175}
\def\us{\char'137}
\newcommand{\Tag}[1]{{\lt}#1{\gt}}

\renewenvironment{tocenv}{\Tag{ul}\\}{\Tag{/ul}\\}

\renewcommand{\tocitem}[1][]{}

\renewcommand{\@locref}[2]{\OneEntry{\csname#1\endcsname\#{}#1}{#2}}
\renewcommand{\ahrefloc}[2]{\@locref{#1}{#2}}

\newcommand{\OneEntry}[2]{%
\Tag{li}\Tag{object type="text/sitemap"}\\%
~~~~\Tag{param name="Name" value="{\def\\{}#2}"}\\%
~~~~\Tag{param name="Local" value="#1"}\\%
~~~~\Tag{/object}\\}

\newcommand{\remember}[2]{\def\csname#1\endcsname{#2}}

\input{/tmp/gprolog.hrf.hh}

\begin{document}
\Tag{HTML}\\
\Tag{HEAD}\\
\Tag{!-- Sitemap 1.0 --}\\
\Tag{/HEAD}\\
\Tag{BODY}\\
%\Tag{object type="text/site properties"}\\
%~~~~\Tag{param name="FrameName" value="right"}\\
%~~~~\Tag{param name="Window Styles" value="0x800025"}\\
%\Tag{/object}\\
\begin{tocenv}
\OneEntry{index.html}{The GNU Prolog Manual}
\input{../gprolog.htoc}
%\input{foo.htoc}
\end{tocenv}
\Tag{/BODY}\\
\Tag{/HTML}\\
\end{document}