1 @c html.texi: -*- Texinfo -*- Macros which support HTML output.
3 @c Copyright (c) 1995 Brian Fox (bfox@ai.mit.edu)
4 @c Author: Brian J. Fox (bfox@ai.mit.edu) Sat Apr 1 20:30:54 1995.
6 @c I didn't want to write this myself, because I wanted some HTML wizard
7 @c to get everything exactly right. However, rms continues to believe
8 @c that the macro system is not a good idea. I couldn't disagree more,
9 @c so I am writing this as an example of how useful such macros can be.
17 @c The first step is to define the macros which really only have meaning
18 @c when producing output for HTML.
21 @c @anchor{Brian Fox, http://www.ua.com/users/bfox/}
23 @macro anchor{text, link}
25 <a href="\link\">\text\</a>
60 @c @email{bfox@@ai.mit.edu}
63 @anchor{mailto:\address\, \address\}
67 @c Redefine the TeXinfo commands which have direct HTML counterparts.
70 @macro html-define-0arg{command, html-insertion}
81 @macro html-define-1arg{command, html-insertion}
92 @macro html-define-line{command, html-insertion}
93 @macro \command\{line}
103 @html-define-0arg{*, <br>}
104 @html-define-1arg{b, <b>\\arg\\</b>}
105 @html-define-1arg{code, <tt><b>\\arg\\</b></tt>}
106 @html-define-line{itemize, <ul>}
107 @html-define-line{item,<p><li>}
108 @html-define-line{heading,<h1>\\line\\</h1>}
109 @html-define-0arg{bye, </html>}
112 @c Define into nothing the macros which do nothing in html.
114 @html-define-line{group,}
117 @c Define a macro which is used to define other macros. This one makes
118 @c a macro which creates an HTML header line. No sectioning commands
119 @c are used. This takes advantage of the non-recursion feature of
121 @macro node_define{orig-name, header-style}
122 @macro \orig-name\{title}
125 <a name="\title\"><\header-style\>\title\</\header-style\></a>
134 @c The same as NODE_DEFINE, but italicized.
135 @macro inode_define{orig-name, header-style}
136 @macro \orig-name\{title}
139 <a name="\title\"><\header-style\><i>\title\</i></\header-style\></a>
147 @c Ignore @node commands.
148 @html-define-line{node,}
150 @c Here is a special one for "@top".
154 @c Now actually define a new set of sectioning commands.
155 @node_define {appendix, h1}
156 @node_define {appendixsec, h2}
157 @node_define {appendixsubsec, h3}
158 @node_define {appendixsubsubsec, h4}
159 @node_define {chapter, h1}
160 @node_define {section, h2}
161 @node_define {subsection, h3}
162 @node_define {subsubsec, h4}
163 @node_define {unnumbered, h1}
164 @node_define {unnumberedsec, h2}
165 @node_define {unnumberedsubsec, h3}
166 @node_define {unnumberedsubsubsec, h4}
168 @c The italicized analogues.
169 @inode_define {iappendix, h1}
170 @inode_define {iappendixsec, h2}
171 @inode_define {iappendixsubsec, h3}
172 @inode_define {iappendixsubsubsec, h4}
173 @inode_define {ichapter, h1}
174 @inode_define {isection, h2}
175 @inode_define {isubsection, h3}
176 @inode_define {isubsubsec, h4}
177 @inode_define {iunnumbered, h1}
178 @inode_define {iunnumberedsec, h2}
179 @inode_define {iunnumberedsubsec, h3}
180 @inode_define {iunnumberedsubsubsec, h4}
184 @c Pass arguments of TITLE, AUTHOR, and a short DESCRIPTION.
185 @c Immediately following, insert the Top node's menu.
189 @c @document{Makeinfo, Brian J. Fox, This file documents the use of the
190 @c @code{makeinfo} program\, versions 1.61 and later.}
193 @c * What is @makeinfo{}?::
195 @macro document{title, author, description}
199 Copyright @copyright{} 1995 \author\
200 Copyright @copyright{} 1995 Free Software Foundation, Inc.
202 Permission is granted to make and distribute verbatim copies of
203 this manual provided the copyright notice and this permission notice
204 are preserved on all copies.
206 Permission is granted to process this file through TeX and print the
207 results, provided the printed document carries copying permission
208 notice identical to this one except for the removal of this paragraph
209 (this paragraph not being relevant to the printed manual).
211 Permission is granted to copy and distribute modified versions of this
212 manual under the conditions for verbatim copying, provided that the entire
213 resulting derived work is distributed under the terms of a permission
214 notice identical to this one.
216 Permission is granted to copy and distribute translations of this manual
217 into another language, under the above conditions for modified versions,
218 except that this permission notice may be stated in a translation approved
219 by the copyright holders.
227 @vskip 0pt plus 1filll
228 Copyright @copyright{} 1995 \author\
229 Copyright @copyright{} 1995 Free Software Foundation, Inc.
231 Permission is granted to make and distribute verbatim copies of
232 this manual provided the copyright notice and this permission notice
233 are preserved on all copies.
235 Permission is granted to copy and distribute modified versions of this
236 manual under the conditions for verbatim copying, provided that the entire
237 resulting derived work is distributed under the terms of a permission
238 notice identical to this one.
240 Permission is granted to copy and distribute translations of this manual
241 into another language, under the above conditions for modified versions,
242 except that this permission notice may be stated in a translation approved
243 by the copyright holders.
251 @html-define-line{end,
252 @ifeq{"\\line\\"\, "ifinfo"\, @end ifinfo}
253 @ifeq{"\\line\\"\, "ifset"\, @end ifset}
254 @ifeq{"\\line\\"\, "ifclear"\, @end ifclear}
255 @ifeq{"\\line\\"\, "cartouche"\, @end cartouche}
256 @ifeq{"\\line\\"\, "menu"\, @end menu}
257 @ifeq{"\\line\\"\, "itemize"\, </ul>}
258 @ifeq{"\\line\\"\, "enumerate"\, </ul>}
259 @ifeq{"\\line\\"\, "table"\, </ul>}
260 @ifeq{"\\line\\"\, "ftable"\, </ul>}
261 @ifeq{"\\line\\"\, "vtable"\, </ul>}
262 @ifeq{"\\line\\"\, "menu"\, xxx}
263 @ifeq{"\\line\\"\, "quotation"\, </pre>}
264 @ifeq{"\\line\\"\, "example"\, </tt></pre>}
265 @ifeq{"\\line\\"\, "smallexample"\, </tt></pre>}
266 @ifeq{"\\line\\"\, "lisp"\, </tt></pre>}
267 @ifeq{"\\line\\"\, "format"\, </tt></pre>}
268 @ifeq{"\\line\\"\, "display"\, </tt></pre>}
269 @ifeq{"\\line\\"\, "group"}}