home *** CD-ROM | disk | FTP | other *** search
/ Media Depot 5 / mediadepotvolume51993.iso / FILES / 13 / FAQ202S.ZIP / faq / faqmacro.txi < prev    next >
Encoding:
Text File  |  1996-10-13  |  9.4 KB  |  575 lines

  1. @c  faqmacro.txi: -*- Texinfo -*-
  2.  
  3. @c -------------------------------------------------------------------------
  4. @c
  5. @c Macros for making DJGPP FAQ list in various formats.
  6. @c
  7. @c Author: Eli Zaretskii (eliz@is.elta.co.il) Tue Oct 17 19:56:23 1995.
  8. @c
  9. @c Many ideas taken from files `multifmt.texi' and html.texi'
  10. @c written by Brian J. Fox and distributed with GNU Texinfo archive:
  11. @c
  12. @c Author: Brian J. Fox  (bfox@ua.com)           Sun Apr  2 07:56:23 1995.
  13. @c
  14. @c -------------------------------------------------------------------------
  15.  
  16. @c
  17. @c Auxilliary macros for frequently-used addresses and program versions
  18. @c
  19. @include faq-addr.txi
  20. @include faq-vers.txi
  21.  
  22. @ifset html
  23.  
  24. @c
  25. @c --------------------- HTML part ----------------------------------
  26. @c
  27.  
  28. @c
  29. @c This creates a standard HTML prolog.
  30. @c
  31. @macro html
  32. <html>
  33.  
  34. @format
  35.  
  36. <!-- This HTML file has been created by Texinfo from  ---------
  37. ---- djgppfaq.txi, using a special set of macros from ---------
  38. ---- `faqmacro.txi' on @today{}.
  39.  
  40. ---- Please don't look at it but through your Web browser:  ---
  41. ---- it looks ugly and ain't supposed to be read by humans. ---
  42. ---- You HAVE been warned!                                  --->
  43.  
  44. @end format
  45. @end macro
  46.  
  47. @c
  48. @c TITLEs for HTML
  49. @c
  50. @macro htmltitle{line}
  51. <head>@*
  52. @w{<TITLE> \line\ </TITLE>}@*
  53. </head>@*
  54. <body>@*
  55. @w{<H1> \line\ </H1>}@*
  56. @end macro
  57. @macro htmlsubtitle{line}
  58. @w{<h2> \line\ </h2>}@*
  59. @end macro
  60. @macro htmlauthor{line}
  61. @w{<ADDRESS> \line\ </ADDRESS>}@*
  62. @end macro
  63.  
  64. @c
  65. @c When making HTML output, @bye does some cleanup.
  66. @c
  67. @macro bye
  68. </body>@*
  69. </html>@*
  70. @bye
  71. @end macro
  72.  
  73. @c
  74. @c @anchor{Brian Fox, http://www.ua.com/users/bfox/}
  75. @c
  76. @macro anchor{text, link}
  77. @w{<a href="\link\">\text\</a>}
  78. @end macro
  79.  
  80. @macro TeX
  81. <i>T</i>e<i>X</i>
  82. @end macro
  83.  
  84. @macro paragraph{}
  85. <p>
  86. @end macro
  87.  
  88. @c
  89. @c @mail{Eli Zaretskii, eliz@@is.elta.co.il}
  90. @c
  91. @macro mail{name, address}
  92. @w{<a href="mailto:\address\">\name\</a>}
  93. @end macro
  94.  
  95. @c
  96. @c @ftp{SimTel, ftp.coast.net/SimTel/vendors/djgpp/}
  97. @c
  98. @macro ftp{desc, path}
  99. @w{<a href="ftp://\path\">\desc\</a>}
  100. @end macro
  101.  
  102. @c
  103. @c @ftpdir{ftp.coast.net, /SimTel/vendors/djgpp}
  104. @c
  105. @macro ftpdir{host, dir}
  106. @w{<a href="ftp://\host\\dir\/">\host\</a>}
  107. @end macro
  108.  
  109. @c
  110. @c ftpusr{riceng.rice.edu, login: ezgcc, passwd: ezgcc}
  111. @c
  112. @macro ftpusr{desc, host, login, passwd}
  113. @w{<a href="ftp://\login\:\passwd\@@\host\/">\desc\</a>}
  114. @end macro
  115.  
  116. @c
  117. @c @www{DJGPP server, www.delorie.com/djgpp/}
  118. @c
  119. @macro www{desc, path}
  120. @w{<a href="http://\path\">\desc\</a>.}
  121. @end macro
  122.  
  123. @c
  124. @c @gopher{SimTel, ftp.coast.net/SimTel/vendors/djgpp/}
  125. @c
  126. @macro gopher{desc, path}
  127. @w{<a href="gopher://\path\">\desc\</a>}
  128. @end macro
  129.  
  130. @c
  131. @c @news{comp.os.msdos.djgpp}
  132. @c
  133. @macro news{name}
  134. @w{<a href="news:\name\">\name\</a>} news group
  135. @end macro
  136.  
  137. @c
  138. @c Redefine the TeXinfo commands which have direct HTML counterparts.
  139. @c 
  140.  
  141. @macro html-define-0arg{command, html-insertion}
  142. @macro \command\
  143. @w{\html-insertion\}
  144. @end macro
  145. @end macro
  146.  
  147. @macro html-define-1arg{command, html-insertion}
  148. @macro \command\{arg}
  149. @quote-arg
  150. @w{\html-insertion\}
  151. @end macro
  152. @end macro
  153.  
  154. @macro html-define-line{command, html-insertion}
  155. @macro \command\{line}
  156. @w{\html-insertion\}
  157. @end macro
  158. @end macro
  159.  
  160. @macro asis
  161. @end macro
  162.  
  163. @c
  164. @c Various lists (@table, @itemize, @enumerate)
  165. @c
  166.  
  167. @macro table{flavor}
  168.  
  169. <dl>@*
  170. @end macro
  171. @macro end_table
  172. @*
  173. </dl>@*
  174. @end macro
  175. @macro titem{line}
  176. @*
  177. <dt> \line\@*
  178. <dd>
  179. @end macro
  180. @macro titemx{line}
  181. <dt> \line\@*
  182. @end macro
  183. @macro titeml{line}
  184. <dt> \line\@*
  185. <dd>
  186. @end macro
  187.  
  188. @macro itemize{style}
  189. @*
  190. <ul>@*
  191. @end macro
  192. @macro item{line}
  193. @*
  194. <li>\line\
  195. @end macro
  196. @macro end_itemize
  197. @*
  198. </ul>@*
  199. @end macro
  200. @macro enumerate{style}
  201. @*
  202. <ol>@*
  203. @end macro
  204. @macro end_enumerate
  205. @*
  206. </ol>@*
  207. @end macro
  208.  
  209. @c
  210. @c Preformatted stuff (@example, @display, @smallexample, @quotation)
  211. @c
  212.  
  213. @macro display
  214. @exdent <pre>@*
  215. @display
  216. @end macro
  217. @macro example
  218. @exdent <pre>@*
  219. @example
  220. @end macro
  221. @macro smallexample
  222. @exdent <pre>@*
  223. @smallexample
  224. @end macro
  225. @macro quotation
  226. @exdent <blockquote>@*
  227. @quotation
  228. @end macro
  229. @macro end_example
  230. @end example
  231. @exdent </pre>@*
  232. @*
  233. @end macro
  234. @macro end_smallexample
  235. @end smallexample
  236. @exdent </pre>@*
  237. @*
  238. @end macro
  239. @macro end_display
  240. @end display
  241. @exdent </pre>@*
  242. @*
  243. @end macro
  244. @macro end_quotation
  245. @end quotation
  246. @exdent </blockquote>@*
  247. @*
  248. @end macro
  249.  
  250. @c
  251. @c Nodes, chapters, sections and menus
  252. @c
  253.  
  254. @macro menu
  255. <p>@*
  256. <ul>@*
  257.  
  258. @end macro
  259. @macro mitem{node, rest}
  260. <li>@w{<A HREF="#\node\"> \node\---\rest\ </A>}@*
  261. @end macro
  262. @macro end_menu
  263.  
  264. </ul>@*
  265.  
  266. @end macro
  267.  
  268. @macro node{this, next, prev, up}
  269. @ifeq{"\next\", "", @set no_next}
  270. @ifeq{"\up\", "(dir)", @set have_topnode}
  271. @ifeq{"\up\", "Top", @set have_chapter}
  272.  
  273. @ifclear have_topnode
  274. @ifset no_next
  275.  
  276. @ifclear have_chapter
  277. <P>@*
  278. <P> | @w{<A HREF="#\prev\"> Previous </A> | <A HREF="#\up\"> Up </A> | <A HREF="#Top"> Top </A> | <P>}@*
  279. @end ifclear
  280.  
  281. @ifset have_chapter
  282. <P>@*
  283. <P> | @w{<A HREF="#\prev\"> Previous </A> | <A HREF="#Top"> Up </A> | <P>}@*
  284. @end ifset
  285.  
  286. @end ifset
  287. @ifclear no_next
  288.  
  289. @ifclear have_chapter
  290. <P>@*
  291. <P> | @w{<A HREF="#\prev\"> Previous </A> | <A HREF="#\next\"> Next </A> | <A HREF="#\up\"> Up </A> | <A HREF="#Top"> Top </A> | <P>}@*
  292. @end ifclear
  293.  
  294. @ifset have_chapter
  295. <P>@*
  296. <P> | @w{<A HREF="#\prev\"> Previous </A> | <A HREF="#\next\"> Next </A> | <A HREF="#Top"> Up </A> | <P>}@*
  297. @end ifset
  298.  
  299. @end ifclear
  300.  
  301. @end ifclear
  302.  
  303. @clear no_next
  304. <P>@*
  305. <P>@*
  306. <CENTER>@*
  307. @ifset have_topnode
  308. <H1>
  309. @end ifset
  310. @ifclear have_topnode
  311. @ifset have_chapter
  312. <H2>
  313. @end ifset
  314. @ifclear have_chapter
  315. <H3>
  316. @end ifclear
  317.  
  318. @end ifclear
  319. <A NAME="\this\">
  320. @clear have_topnode
  321. @clear have_chapter
  322.  
  323. @end macro
  324. @macro top{line}
  325.  \line\ </A></H1><P>@*
  326. </CENTER>@*
  327. @end macro
  328.  
  329. @macro chapter{line}
  330.  \line\ </A></H2><P>@*
  331. </CENTER>@*
  332. @end macro
  333.  
  334. @macro section{line}
  335.  \line\ </A></H3><P>@*
  336. </CENTER>@*
  337. @end macro
  338.  
  339. @macro unnumbered{line}
  340.  \line\ </A></H2><P>
  341.  
  342. @end macro
  343.  
  344. @macro unnumberedsec{line}
  345.  \line\ </A></H3><P>
  346.  
  347. @end macro
  348.  
  349. @macro appendix{line}
  350.  \line\ </A></H3><P>
  351.  
  352. @end macro
  353.  
  354. @macro appendixsec{line}
  355.  \line\</A></H3><P>
  356.  
  357. @end macro
  358.  
  359. @c
  360. @c Footnotes
  361. @
  362.  
  363. @macro footnote{stuff}
  364. @quote-arg
  365.  
  366. <P><i><b> Note: </b>\stuff\ </i><P>
  367.  
  368. @end macro
  369.  
  370. @macro quest{stuff}
  371. @quote-arg
  372. @*
  373. <em><strong>Q</strong>: \stuff\ </em>
  374. <p>@*
  375. @end macro
  376.  
  377. @macro ans
  378. @*
  379. @exdent <hr>
  380. <strong>A</strong> :
  381. @end macro
  382.  
  383. @c
  384. @c Cross-references
  385. @c
  386.  
  387. @c NOTE: The internal cross-references only support 2-argument
  388. @c       varieties of the Texinfo commands, and the external
  389. @c       cross-reference only support 4-argument form!
  390.  
  391. @macro xref{node, desc}
  392. See @w{<A HREF="#\node\">}\desc\</A>
  393. @end macro
  394.  
  395. @macro pxref{node, desc}
  396. see @w{<A HREF="#\node\">}\desc\</A>
  397. @end macro
  398.  
  399. @macro ref{node, desc}
  400. @w{<A HREF="#\node\">}\desc\</A>
  401. @end macro
  402.  
  403. @macro extref{node, desc, file, title, url}
  404. See @w{<A HREF="http://\url\">}the ``\node\'' section of the ``\title\''</A>
  405. @end macro
  406.  
  407. @end ifset
  408.  
  409. @c ====================================================================
  410.  
  411. @ifclear html
  412.  
  413. @c
  414. @c ------------------- non-HTML part ----------------------------------
  415. @c
  416.  
  417. @macro html
  418. @end macro
  419.  
  420. @macro htmltitle{line}
  421. @end macro
  422.  
  423. @macro htmlsubtitle{line}
  424. @end macro
  425.  
  426. @macro htmlauthor{line}
  427. @end macro
  428.  
  429. @macro bye
  430. @end macro
  431.  
  432. @macro anchor{text, link}
  433. \text\, \link\
  434. @end macro
  435.  
  436. @macro TeX
  437. @TeX{}
  438. @end macro
  439.  
  440. @macro paragraph{}
  441. @sp 1
  442. @end macro
  443.  
  444. @macro mail{name, address}
  445. \name\ <\address\>
  446. @end macro
  447.  
  448. @macro ftp{desc, path}
  449. \desc\, e.g. ftp://\path\
  450. @end macro
  451.  
  452. @macro ftpdir{host, dir}
  453. \host\, directory \dir\
  454. @end macro
  455.  
  456. @macro ftpusr{desc, host, login, passwd}
  457. \desc\ (FTP to \host\, login as \login\, give \passwd\ as password)
  458. @end macro
  459.  
  460. @macro www{desc, path}
  461. \desc\, at this URL:
  462. @sp 1
  463. @display
  464. http://\path\
  465. @end display
  466. @sp 1
  467. @end macro
  468.  
  469. @macro gopher{desc, path}
  470. \desc\, gopher://\path\
  471. @end macro
  472.  
  473. @macro news{name}
  474. \name\ news group
  475. @end macro
  476.  
  477. @macro html-define-0arg{command, html-insertion}
  478. @macro \command\
  479. @\command\
  480. @end macro
  481. @end macro
  482.  
  483. @macro html-define-1arg{command, html-insertion}
  484. @macro \command\{arg}
  485. @quote-arg
  486. @\command\{\arg\}
  487. @end macro
  488. @end macro
  489.  
  490. @macro html-define-line{command, html-insertion}
  491. @macro \command\{line}
  492. @\command\ \line\
  493. @end macro
  494. @end macro
  495.  
  496. @macro titem{line}
  497. @item \line\
  498. @end macro
  499. @macro titemx{line}
  500. @itemx \line\
  501. @end macro
  502. @macro titeml{line}
  503. @itemx \line\
  504. @end macro
  505.  
  506. @macro quest{stuff}
  507. @quote-arg
  508. @emph{@strong{Q}: \stuff\}
  509. @sp 2
  510. @end macro
  511.  
  512. @macro ans
  513. @strong{A} :
  514. @end macro
  515.  
  516. @c
  517. @c Cross-references: mostly for Text version
  518.  
  519. @ifset text
  520.  
  521. @macro pxref{chapter, desc}
  522. see \desc\ in \chapter\
  523. @end macro
  524.  
  525. @macro xref{chapter, desc}
  526. See \desc\ in \chapter\
  527. @end macro
  528.  
  529. @macro ref{chapter, desc}
  530. \desc\ in \chapter\
  531. @end macro
  532.  
  533. @macro extref{node, desc, file, title, url}
  534. See \desc\ in ``\title\'', or point your Web browser to http://\url\
  535. @end macro
  536.  
  537. @macro footnote{stuff}
  538. @quote-arg
  539. (\stuff\)
  540. @end macro
  541.  
  542. @end ifset
  543.  
  544. @ifclear text
  545.  
  546. @macro extref{node, desc, file, title, url}
  547. @xref{\node\ , , \desc\ , \file\ , \title\}
  548. @end macro
  549.  
  550. @end ifclear
  551.  
  552. @end ifclear
  553.  
  554. @c
  555. @c =================================================================
  556. @c
  557.  
  558. @c
  559. @c ---------------- Common part ------------------------------------
  560. @c
  561.  
  562. @html-define-1arg{b, <b> \\arg\\ </b>}
  563. @html-define-1arg{code, <code> \\arg\\ </code>}
  564. @html-define-1arg{file, <code>\\arg\\</code>}
  565. @html-define-1arg{emph, <em> \\arg\\ </em>}
  566. @html-define-1arg{strong, <strong>\\arg\\</strong>}
  567. @html-define-1arg{kbd, <kbd>\\arg\\</kbd>}
  568. @html-define-1arg{key, <kbd>\\arg\\</kbd>}
  569. @html-define-1arg{samp, <samp>\\arg\\</samp>}
  570. @html-define-1arg{var, <var>\\arg\\</var>}
  571. @html-define-1arg{dfn, <dfn>\\arg\\</dfn>}
  572. @html-define-1arg{i, <i> \\arg\\ </i>}
  573. @html-define-1arg{t, <tt>\\arg\\</tt>}
  574. @html-define-1arg{sc, <b><tt>\\arg\\</tt></b>}
  575.