AutorÃa | Ultima modificación | Ver Log |
--------------------------------------------------------------------------March 31, 2012 Version 1.74m i m e T e X R e a d m e F i l eCopyright(c) 2002-2012, John Forkosh Associates, Inc. All rights reserved.--------------------------------------------------------------------------by: John Forkoshjohn@forkosh.com www.forkosh.comThis file is part of mimeTeX, which is free software.You may redistribute and/or modify it under the termsof the GNU General Public License, version 3 or later,as published by the Free Software Foundation. Seehttp://www.gnu.org/licenses/gpl.htmlMimeTeX is discussed and illustrated online atits homepagehttp://www.forkosh.com/mimetex.htmlOr you can follow the Quick Start instructions below(or the more detailed instructions in Section III)to immediately install mimeTeX on your own machine.Then point your browser tohttp://www.yourdomain.com/mimetex.htmlfor a demo/tutorial and reference.Installation problems? Point your browser tomimeTeX's homepagehttp://www.forkosh.com/mimetex.htmlthen click its "full mimeTeX manual" link and seeSection II.I. QUICK START------------------------------------------------------------------------To compile and install mimeTeX* unzip mimetex.zip in any convenient working directory* to produce an executable that emits anti-aliasedgif images (recommended)cc -DAA mimetex.c gifsave.c -lm -o mimetex.cgi-or- for gif images without anti-aliasingcc -DGIF mimetex.c gifsave.c -lm -o mimetex.cgi-or- to produce an executable that emits mime xbitmapscc -DXBITMAP mimetex.c -lm -o mimetex.cgi(For Windows, see "Compile Notes" in Section III below.)* mv mimetex.cgi to your server's cgi-bin/ directory* mv mimetex.html to your server's htdocs/ directory* if the relative path from htdocs to cgi-bin isn't../cgi-bin then edit mimetex.html and change thefew dozen occurrences as necessary.Then, to quickly learn more about mimeTeX* point your browser to www.yourdomain.com/mimetex.htmlAny problems with the above?* read the more detailed instructions below,or see http://www.forkosh.com/mimetex.htmlII. INTRODUCTION------------------------------------------------------------------------MimeTeX, licensed under the gpl, lets you easily embed LaTeX math inyour html pages. It parses a LaTeX math expression and immediatelyemits the corresponding gif image, rather than the usual TeX dvi.And mimeTeX is an entirely separate little program that doesn'tuse TeX or its fonts in any way. It's just one cgi that you put inyour site's cgi-bin/ directory, with no other dependencies.So mimeTeX is very easy to install. And it's equally easy to use.Just place an html <img> tag in your document wherever you want tosee the corresponding LaTeX expression. For example,<img src="../cgi-bin/mimetex.cgi?f(x)=\int_{-\infty}^x~e^{-t^2}dt"border=0 align=absmiddle>generates and displays the corresponding gif image on-the-fly,wherever you put that <img> tag. MimeTeX doesn't need intermediatedvi-to-gif conversion, and it doesn't clutter your filesystem withseparate little gif files for each converted expression. (Optionalimage caching does store gif files, and subsequently reads them asneeded, rather than re-rendering the same images every time a pageis reloaded.)III. COMPILATION AND INSTALLATION------------------------------------------------------------------------I've built and run mimeTeX under Linux and NetBSD using gcc.The source code is ansi-standard C, and should compileand execute under all environments without any change whatsoever.Build instructions below are for Unix. Modify them as necessaryfor your particular situation. Note the -DWINDOWS switch ifapplicable.Unzip mimetex.zip in any convenient working directory.Your working directory should now containmimetex.zip your gnu zipped mimeTeX distribution containing...README this file (see mimetex.html for demo/tutorial)COPYING GPL license, under which you may use mimeTeXmimetex.c mimeTeX source program and all required functionsmimetex.h header file for mimetex.c (and for gfuntype.c)gfuntype.c parses output from gftype -i and writes bitmap datatexfonts.h output from several gfuntype runs, needed by mimetex.cgifsave.c gif library by Sverre H. Huseby <sverrehu@online.no>mimetex.html sample html document, mimeTeX demo and tutorialNote: all files in mimetex.zip use Unix line termination,i.e., linefeeds (without carriage returns) signal line endings.Conversion for Windows, Macs, VMS, etc, can usually be accomplishedwith unzip's -a option, i.e., unzip -a mimetex.zipNow, to compile a mimeTeX executable that emits anti-aliased gifimages (recommended for most uses), type the commandcc -DAA mimetex.c gifsave.c -lm -o mimetex.cgiOr, for an executable that emits gif images withoutanti-aliasing,cc -DGIF mimetex.c gifsave.c -lm -o mimetex.cgiAlternatively, to compile a mimeTeX executable that emitsmime xbitmaps, just type the commandcc -DXBITMAP mimetex.c -lm -o mimetex.cgiCompile Notes:* If (and only if) you're compiling a Windows executablewith the -DAA or -DGIF option (but not -DXBITMAP), thenadd -DWINDOWS also. For example,cc -DAA -DWINDOWS mimetex.c gifsave.c -lm -o mimetex.cgiThe above Unix-like syntax works with MinGW (http://www.mingw.org)and djgpp (http://www.delorie.com/djgpp/) Windows compilers, butprobably not with most others, where it's only intended as a"template".* Several additional command-line options that you may finduseful are discussed in Section IId (href="#options")of your mimetex.html page.That's all there is to building mimeTeX. You can now test yourmimetex.cgi executable from the Unix command line by typing, e.g.,./mimetex.cgi "x^2+y^2"which should emit two ascii rasters something like the followingAscii dump of bitmap image... Hex dump of colormap indexes...........**..................**.. .......1**1................1**1........*..*.....*..........*..*. .......*23*.....*..........*23*...........*.....*.............*. ..........*.....*.............*..***......*.....*....**.*.....*. .***1....2*.....*....**3*....2*..**.*....*......*....**.*....*.. .**.*...1*......*....**.*...1*....*.....*.*..******...*.*...*.*. ..*....2*.*..******...*.*..2*.*.**.*...****.....*....*.*...****. **.*...****.....*....*.*2..****.****............*.....**........ ****............*....1**........................*......*........ ................*......*........................*....**......... ................*....**1........The 5 colormap indexes denote rgb....-->255 1-->196 2-->186 3-->177 *-->0The right-hand illustration shows asterisks in the same positions asthe left-hand one, along with anti-aliased grayscale colormap indexesassigned to neighboring pixels, and with the rgb value for eachindex. Just typing ./mimetex.cgi without an argument should produceascii rasters for the default expression f(x)=x^2. If you see thetwo ascii rasters then your binary's good, so mv it to your server'scgi-bin/ directory and set permissions as necessary.Once mimetex.cgi is working, mv it to your server's cgi-bin/ directory(wherever cgi programs are expected), and chmod/chown it as necessary.Then mv mimetex.html to your server's htdocs/ directory. Now pointyour browser to www.yourdomain.com/mimetex.html and you should seeyour mimeTeX user's manual reference page.Install Notes:* These two directories are typically of the formsomewhere/www/cgi-bin/ and somewhere/www/htdocs/so I set up mimtex.html to access mimetex.cgi fromthe relative path ../cgi-bin/ If your directoriesare non-conforming, you may have to edit the few dozenoccurrences of ../cgi-bin/mimetex.cgi in mimetex.htmlSometimes a suitable symlink works. If not, you'llhave to edit. In that case, globally changing../cgi-bin/mimetex.cgi often works.* Either way, once mimetex.html displays properly, you canassume everything is working, and can begin authoring htmldocuments using mimetex.cgi to render your own math.IV. REVISION HISTORY------------------------------------------------------------------------A more detailed account of mimeTeX's revision historyis maintained at http://www.forkosh.com/mimetexchangelog.html---03/31/12 J.Forkosh version 1.74 released.08/24/11 J.Forkosh version 1.72 released.09/06/08 J.Forkosh version 1.70 released.11/30/04 J.Forkosh version 1.60 released10/02/04 J.Forkosh version 1.50 released on CTAN with various newfeatures and fixes, and updated documentation.07/18/04 J.Forkosh version 1.40 re-released on CTAN with minorchanges, e.g., \mathbb font and nested \array'snow supported.03/21/04 J.Forkosh version 1.40 released on CTAN, with improvedLaTeX compatibility, various new features andfixes, including fix to work under Windows.12/21/03 J.Forkosh version 1.30 released on CTAN, with improvedLaTeX compatibility and anti-aliasing, various newfeatures, and thoroughly updated documentation.10/17/03 J.Forkosh version 1.20 released on CTAN, adding pictureenvironment and various other changes (e.g.,more delimiters arbitrarily sized) and fixes.07/29/03 J.Forkosh version 1.10 released on CTAN, completely replacingmimeTeX's original built-in fonts with thinner andmore pleasing fonts, and adding one larger size.06/27/03 J.Forkosh version 1.01 released on CTAN, adding lowpassanti-aliasing for gifs, and http_referer checks,and fixing a few very obscure bugs.12/11/02 J.Forkosh version 1.00 released on CTAN, fixing \array bugand adding various new features.10/31/02 J.Forkosh version 0.99 released on CTAN09/18/02 J.Forkosh internal beta test releaseV. CONCLUDING REMARKS------------------------------------------------------------------------I hope you find mimeTeX useful. If so, a contribution to yourcountry's TeX Users Group, or to the GNU project, is suggested,especially if you're a company that's currently profitable.========================= END-OF-FILE README ===========================