annotate doc/manual/manual_tex4ht.cfg @ 70:33c333ec5ad2

- progress on html doc generation
author cslag
date Sun, 06 Mar 2016 23:30:44 +0100
parents 43675cb378ce
children edc2afc17aa0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
70
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
1 %//////////////////////////////////////////////////////////////////////////////
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
2 %
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
3 % Copyright (c) 2015-2016 Tassilo Philipp <tphilipp@potion-studios.com>
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
4 %
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
5 % Permission to use, copy, modify, and distribute this software for any
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
6 % purpose with or without fee is hereby granted, provided that the above
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
7 % copyright notice and this permission notice appear in all copies.
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
8 %
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
9 % THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
10 % WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
11 % MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
12 % ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
13 % WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
14 % ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
15 % OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
16 %
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
17 %//////////////////////////////////////////////////////////////////////////////
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
18
69
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
19 % Set html output type and how the pages will be organized; index=a,b,c means a
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
20 % column index, b depth partitioning per page, and if c is present and 'next',
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
21 % that next-links recurses.
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
22 % Use b=1 for outputting one big html page. b=2 would partition by sections, b=3
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
23 % by sections and subsections, and so on...
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
24 \Preamble{html,info,index=2,1,next,pic-tabular,charset="utf-8",p-width,pic-align}
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
25 % For manual partitioning we use b=1 above, then \CutAt
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
26 %\CutAt{subsubsection,subsection,likesubsection,section,likesection,part}
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
27 \CutAt{section}
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
28
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
29 %% Don't want TOC to be on own page.
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
30 %\ConfigureToc{likesubsubsection}{}{~}{}{ }
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
31
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
32 % Here goes stuff that should be *before* <head>...</head>
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
33 % Use it for configurations, no actual output.
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
34
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
35 \Configure{VERSION}{}
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
36 \Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}}
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
37 \Configure{HTML}{\HCode{<html>\Hnewline}}{\HCode{\Hnewline</html>}}
69
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
38 \Configure{BODY}{\HCode{<body><div class="mainDiv">\Hnewline}}{\HCode{\Hnewline</div></body>}}
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
39
70
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
40 % TITLE+ is only on main page, other use section title. Prefix everything, though.
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
41 \Configure{TITLE}{\HCode{<title>}dyncall Manual - }{\HCode{</title>}}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
42 \Configure{TITLE+}{Index}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
43
69
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
44 % Clear default header, define our custom one. Using @HEAD will make this be used on all pages generated.
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
45 \Configure{@HEAD}{}
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
46 \Configure{@HEAD}{\HCode{<meta http-equiv="content-type" content="text/html; charset=utf-8"/>\Hnewline}}
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
47 \Configure{@HEAD}{\HCode{<meta name="resource-type" content="document"/>\Hnewline}}
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
48 \Configure{@HEAD}{\HCode{<meta name="keywords" content="C, function, dynamic, call, calling, convention, VM, abstraction, closure"/>\Hnewline}}
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
49 \Configure{@HEAD}{\HCode{<meta name="distribution" content="global"/>\Hnewline}}
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
50 \Configure{@HEAD}{\HCode{<link rel="stylesheet" id="dyn-fonts-css" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&amp;subset=latin,latin-ext" type="text/css" media="all"/>\Hnewline}}
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
51 % should this really rely on online content (dyncall's .css) even for an offline build? @@@
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
52 \Configure{@HEAD}{\HCode{<link rel="stylesheet" href="http://dyncall.org/data/main.css" type="text/css" media="all"/>\Hnewline}}
69
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
53
70
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
54 % Make TOC display as nested "ul"s.
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
55 \Configure{tableofcontents} {}{\tocItem{0}}{}{}{}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
56 \ConfigureToc{section} {}{\tocItem{1}{\HCode{<li>}}}{}{}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
57 \ConfigureToc{subsection} {}{\tocItem{2}{\HCode{<li>}}}{}{}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
58 \ConfigureToc{subsubsection} {}{\tocItem{3}{\HCode{<li>}}}{}{}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
59
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
60 % Logic to open/close "ul"s correctly.
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
61 \newcount\c
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
62 \def\tocItem#1{%
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
63 \loop
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
64 \ifnum \c<#1
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
65 \advance\c by 1
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
66 \HCode{<ul>}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
67 \else
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
68 \ifnum \c>#1
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
69 \advance\c by -1
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
70 \HCode{</li></ul>}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
71 \fi
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
72 \ifnum \c=#1
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
73 \ifnum #1>0 \HCode{</li>} \fi
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
74 \fi
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
75 \fi
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
76 \unless\ifnum \c=#1 \repeat
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
77 }
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
78
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
79 % On site navigation texts
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
80 \Configure{crosslinks}%
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
81 {}%left delimiter
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
82 {}%right delimiter
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
83 {next}%
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
84 {previous}%
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
85 {}%previous-tail
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
86 {}%front
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
87 {}%tail
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
88 {index}%up
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
89
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
90 % Which nav links to show
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
91 \Configure{crosslinks*}%
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
92 {prev}%
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
93 {up}%
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
94 {next}%
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
95 {}%
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
96
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
97 % What's around top and bottom links section
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
98 \Configure{crosslinks+}%
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
99 {\HCode{<div style="width:100\%;text-align:left"><div style="width:30\%;display:inline-block;text-align:left">}}%
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
100 {\HCode{</div></div><hr>}}%
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
101 {\HCode{<hr><div style="width:100\%;text-align:left"><div style="width:30\%;display:inline-block;text-align:left">}}%
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
102 {\HCode{</div></div>}}%
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
103
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
104 % Hacky - output div stuff before specific crosslinks, has to play together with crosslinks+, above
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
105 \Configure{crosslinks:next}{\HCode{</div><div style="width:30\%;display:inline-block;text-align:right">}}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
106 \Configure{crosslinks:up} {\HCode{</div><div style="width:40\%;display:inline-block;text-align:center">}}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
107
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
108
69
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
109 %\ConfigureEnv{titlepage}
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
110 %{\ifvmode \IgnorePar\fi
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
111 % \EndP
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
112 % \HCode{<h1>}\IgnorePar }
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
113 %{\ifvmode \IgnorePar\fi
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
114 % \EndP \HCode{</h1>}}
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
115 %{}
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
116 %{}
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
117 %\ConfigureList{enumerate}
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
118 %{\HCode{<div>}}
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
119 %{\HCode{</div>}}
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
120 %{\HCode{<span class="mark">}}
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
121 %{\HCode{</span>} }
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
122
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
123 % Configure element translations.
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
124
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
125 % Sections (to include number, use \thesection)
70
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
126 \Configure{section} {} {} {\HCode{<h1>}} {\HCode{</h1>}}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
127 \Configure{likesection} {} {} {\HCode{<h1>}} {\HCode{</h1>}}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
128 \Configure{subsection} {} {} {\HCode{<h2>}} {\HCode{</h2>}}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
129 \Configure{likesubsection} {} {} {\HCode{<h2>}} {\HCode{</h2>}}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
130 \Configure{subsubsection} {} {} {\HCode{<h3>}} {\HCode{</h3>}}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
131 \Configure{likesubsubsection} {} {} {\HCode{<h3>}} {\HCode{</h3>}}
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
132
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
133 %\DeclareMathSizes{12}{11}{7}{6}
69
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
134 %\DeclareMathSizes{10}{9}{5}{4}
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
135 %\DeclareMathSizes{11}{10}{6}{5}
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
136
69
43675cb378ce - work on html doc generation
cslag
parents: 0
diff changeset
137
70
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
138 \begin{document}
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
139
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
140 % Add here stuff that should be *in* <head>...</head>, however only for main generated page.
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
141
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
142 \EndPreamble
70
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
143
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
144 % vim: ft=tex
33c333ec5ad2 - progress on html doc generation
cslag
parents: 69
diff changeset
145