README 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. --------------------------------------------------------------------------
  2. September 6, 2008 Version 1.70
  3. m i m e T e X R e a d m e F i l e
  4. Copyright(c) 2002-2008, John Forkosh Associates, Inc. All rights reserved.
  5. --------------------------------------------------------------------------
  6. by: John Forkosh
  7. john@forkosh.com www.forkosh.com
  8. This file is part of mimeTeX, which is free software.
  9. You may redistribute and/or modify it under the terms
  10. of the GNU General Public License, version 3 or later,
  11. as published by the Free Software Foundation. See
  12. http://www.gnu.org/licenses/gpl.html
  13. MimeTeX is discussed and illustrated online at
  14. its homepage
  15. http://www.forkosh.com/mimetex.html
  16. Or you can follow the Quick Start instructions below
  17. (or the more detailed instructions in Section III)
  18. to immediately install mimeTeX on your own machine.
  19. Then point your browser to
  20. http://www.yourdomain.com/mimetex.html
  21. for a demo/tutorial and reference.
  22. Installation problems? Point your browser to
  23. mimeTeX's homepage
  24. http://www.forkosh.com/mimetex.html
  25. then click its "full mimeTeX manual" link and see
  26. Section II.
  27. I. QUICK START
  28. ------------------------------------------------------------------------
  29. To compile and install mimeTeX
  30. * unzip mimetex.zip in any convenient working directory
  31. * to produce an executable that emits anti-aliased
  32. gif images (recommended)
  33. cc -DAA mimetex.c gifsave.c -lm -o mimetex.cgi
  34. -or- for gif images without anti-aliasing
  35. cc -DGIF mimetex.c gifsave.c -lm -o mimetex.cgi
  36. -or- to produce an executable that emits mime xbitmaps
  37. cc -DXBITMAP mimetex.c -lm -o mimetex.cgi
  38. (For Windows, see "Compile Notes" in Section III below.)
  39. * mv mimetex.cgi to your server's cgi-bin/ directory
  40. * mv mimetex.html to your server's htdocs/ directory
  41. * if the relative path from htdocs to cgi-bin isn't
  42. ../cgi-bin then edit mimetex.html and change the
  43. few dozen occurrences as necessary.
  44. Then, to quickly learn more about mimeTeX
  45. * point your browser to www.yourdomain.com/mimetex.html
  46. Any problems with the above?
  47. * read the more detailed instructions below,
  48. or see http://www.forkosh.com/mimetex.html
  49. II. INTRODUCTION
  50. ------------------------------------------------------------------------
  51. MimeTeX, licensed under the gpl, lets you easily embed LaTeX math in
  52. your html pages. It parses a LaTeX math expression and immediately
  53. emits the corresponding gif image, rather than the usual TeX dvi.
  54. And mimeTeX is an entirely separate little program that doesn't
  55. use TeX or its fonts in any way. It's just one cgi that you put in
  56. your site's cgi-bin/ directory, with no other dependencies.
  57. So mimeTeX is very easy to install. And it's equally easy to use.
  58. Just place an html <img> tag in your document wherever you want to
  59. see the corresponding LaTeX expression. For example,
  60. <img src="../cgi-bin/mimetex.cgi?f(x)=\int_{-\infty}^x~e^{-t^2}dt"
  61. border=0 align=absmiddle>
  62. generates and displays the corresponding gif image on-the-fly,
  63. wherever you put that <img> tag. MimeTeX doesn't need intermediate
  64. dvi-to-gif conversion, and it doesn't clutter your filesystem with
  65. separate little gif files for each converted expression. (Optional
  66. image caching does store gif files, and subsequently reads them as
  67. needed, rather than re-rendering the same images every time a page
  68. is reloaded.)
  69. III. COMPILATION AND INSTALLATION
  70. ------------------------------------------------------------------------
  71. I've built and run mimeTeX under Linux and NetBSD using gcc.
  72. The source code is ansi-standard C, and should compile
  73. and execute under all environments without any change whatsoever.
  74. Build instructions below are for Unix. Modify them as necessary
  75. for your particular situation. Note the -DWINDOWS switch if
  76. applicable.
  77. Unzip mimetex.zip in any convenient working directory.
  78. Your working directory should now contain
  79. mimetex.zip your gnu zipped mimeTeX distribution containing...
  80. README this file (see mimetex.html for demo/tutorial)
  81. COPYING GPL license, under which you may use mimeTeX
  82. mimetex.c mimeTeX source program and all required functions
  83. mimetex.h header file for mimetex.c (and for gfuntype.c)
  84. gfuntype.c parses output from gftype -i and writes bitmap data
  85. texfonts.h output from several gfuntype runs, needed by mimetex.c
  86. gifsave.c gif library by Sverre H. Huseby <sverrehu@online.no>
  87. mimetex.html sample html document, mimeTeX demo and tutorial
  88. Note: all files in mimetex.zip use Unix line termination,
  89. i.e., linefeeds (without carriage returns) signal line endings.
  90. Conversion for Windows, Macs, VMS, etc, can usually be accomplished
  91. with unzip's -a option, i.e., unzip -a mimetex.zip
  92. Now, to compile a mimeTeX executable that emits anti-aliased gif
  93. images (recommended for most uses), type the command
  94. cc -DAA mimetex.c gifsave.c -lm -o mimetex.cgi
  95. Or, for an executable that emits gif images without
  96. anti-aliasing,
  97. cc -DGIF mimetex.c gifsave.c -lm -o mimetex.cgi
  98. Alternatively, to compile a mimeTeX executable that emits
  99. mime xbitmaps, just type the command
  100. cc -DXBITMAP mimetex.c -lm -o mimetex.cgi
  101. Compile Notes:
  102. * If (and only if) you're compiling a Windows executable
  103. with the -DAA or -DGIF option (but not -DXBITMAP), then
  104. add -DWINDOWS also. For example,
  105. cc -DAA -DWINDOWS mimetex.c gifsave.c -lm -o mimetex.cgi
  106. The above Unix-like syntax works with MinGW (http://www.mingw.org)
  107. and djgpp (http://www.delorie.com/djgpp/) Windows compilers, but
  108. probably not with most others, where it's only intended as a
  109. "template".
  110. * Several additional command-line options that you may find
  111. useful are discussed in Section IId (href="#options")
  112. of your mimetex.html page.
  113. That's all there is to building mimeTeX. You can now test your
  114. mimetex.cgi executable from the Unix command line by typing, e.g.,
  115. ./mimetex.cgi "x^2+y^2"
  116. which should emit two ascii rasters something like the following
  117. Ascii dump of bitmap image... Hex dump of colormap indexes...
  118. ........**..................**.. .......1**1................1**1.
  119. .......*..*.....*..........*..*. .......*23*.....*..........*23*.
  120. ..........*.....*.............*. ..........*.....*.............*.
  121. .***......*.....*....**.*.....*. .***1....2*.....*....**3*....2*.
  122. .**.*....*......*....**.*....*.. .**.*...1*......*....**.*...1*..
  123. ..*.....*.*..******...*.*...*.*. ..*....2*.*..******...*.*..2*.*.
  124. **.*...****.....*....*.*...****. **.*...****.....*....*.*2..****.
  125. ****............*.....**........ ****............*....1**........
  126. ................*......*........ ................*......*........
  127. ................*....**......... ................*....**1........
  128. The 5 colormap indexes denote rgb...
  129. .-->255 1-->196 2-->186 3-->177 *-->0
  130. The right-hand illustration shows asterisks in the same positions as
  131. the left-hand one, along with anti-aliased grayscale colormap indexes
  132. assigned to neighboring pixels, and with the rgb value for each
  133. index. Just typing ./mimetex.cgi without an argument should produce
  134. ascii rasters for the default expression f(x)=x^2. If you see the
  135. two ascii rasters then your binary's good, so mv it to your server's
  136. cgi-bin/ directory and set permissions as necessary.
  137. Once mimetex.cgi is working, mv it to your server's cgi-bin/ directory
  138. (wherever cgi programs are expected), and chmod/chown it as necessary.
  139. Then mv mimetex.html to your server's htdocs/ directory. Now point
  140. your browser to www.yourdomain.com/mimetex.html and you should see
  141. your mimeTeX user's manual reference page.
  142. Install Notes:
  143. * These two directories are typically of the form
  144. somewhere/www/cgi-bin/ and somewhere/www/htdocs/
  145. so I set up mimtex.html to access mimetex.cgi from
  146. the relative path ../cgi-bin/ If your directories
  147. are non-conforming, you may have to edit the few dozen
  148. occurrences of ../cgi-bin/mimetex.cgi in mimetex.html
  149. Sometimes a suitable symlink works. If not, you'll
  150. have to edit. In that case, globally changing
  151. ../cgi-bin/mimetex.cgi often works.
  152. * Either way, once mimetex.html displays properly, you can
  153. assume everything is working, and can begin authoring html
  154. documents using mimetex.cgi to render your own math.
  155. IV. REVISION HISTORY
  156. ------------------------------------------------------------------------
  157. A more detailed account of mimeTeX's revision history
  158. is maintained at http://www.forkosh.com/mimetexchangelog.html
  159. ---
  160. 09/06/08 J.Forkosh version 1.70 released.
  161. 11/30/04 J.Forkosh version 1.60 released
  162. 10/02/04 J.Forkosh version 1.50 released on CTAN with various new
  163. features and fixes, and updated documentation.
  164. 07/18/04 J.Forkosh version 1.40 re-released on CTAN with minor
  165. changes, e.g., \mathbb font and nested \array's
  166. now supported.
  167. 03/21/04 J.Forkosh version 1.40 released on CTAN, with improved
  168. LaTeX compatibility, various new features and
  169. fixes, including fix to work under Windows.
  170. 12/21/03 J.Forkosh version 1.30 released on CTAN, with improved
  171. LaTeX compatibility and anti-aliasing, various new
  172. features, and thoroughly updated documentation.
  173. 10/17/03 J.Forkosh version 1.20 released on CTAN, adding picture
  174. environment and various other changes (e.g.,
  175. more delimiters arbitrarily sized) and fixes.
  176. 07/29/03 J.Forkosh version 1.10 released on CTAN, completely replacing
  177. mimeTeX's original built-in fonts with thinner and
  178. more pleasing fonts, and adding one larger size.
  179. 06/27/03 J.Forkosh version 1.01 released on CTAN, adding lowpass
  180. anti-aliasing for gifs, and http_referer checks,
  181. and fixing a few very obscure bugs.
  182. 12/11/02 J.Forkosh version 1.00 released on CTAN, fixing \array bug
  183. and adding various new features.
  184. 10/31/02 J.Forkosh version 0.99 released on CTAN
  185. 09/18/02 J.Forkosh internal beta test release
  186. V. CONCLUDING REMARKS
  187. ------------------------------------------------------------------------
  188. I hope you find mimeTeX useful. If so, a contribution to your
  189. country's TeX Users Group, or to the GNU project, is suggested,
  190. especially if you're a company that's currently profitable.
  191. ========================= END-OF-FILE README ===========================