Diff for /loncom/cgi/mimeTeX/mimetex.html between versions 1.3 and 1.4

version 1.3, 2007/10/09 21:41:41 version 1.4, 2008/12/04 12:17:13
Line 1 Line 1
 <!--  <!--
  ****************************************************************************   ****************************************************************************
  * Copyright(c) 2002-2006, John Forkosh Associates, Inc. All rights reserved.   * Copyright(c) 2002-2008, John Forkosh Associates, Inc. All rights reserved.
    *           http://www.forkosh.com   mailto: john@forkosh.com
  * ==========================================================================   * ==========================================================================
  * This file is part of mimeTeX, which is free software. You may redistribute   * This file is part of mimeTeX, which is free software. You may redistribute
  * and/or modify it under the terms of the GNU General Public License,   * and/or modify it under the terms of the GNU General Public License,
  * version 2 or later, as published by the Free Software Foundation.   * version 3 or later, as published by the Free Software Foundation.
  *      MimeTeX is distributed in the hope that it will be useful, but   *      MimeTeX is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY, not even the implied warranty of MERCHANTABILITY.   * WITHOUT ANY WARRANTY, not even the implied warranty of MERCHANTABILITY.
  * See the GNU General Public License for specific details.   * See the GNU General Public License for specific details.
Line 12 Line 13
  * agreed to these terms and conditions, and that you possess the legal   * agreed to these terms and conditions, and that you possess the legal
  * right and ability to enter into this agreement and to use mimeTeX   * right and ability to enter into this agreement and to use mimeTeX
  * in accordance with it.   * in accordance with it.
  *      Your mimeTeX distribution should contain a copy of the GNU General   *      Your mimetex.zip distribution file should contain the file COPYING,
  * Public License.  If not, write to the Free Software Foundation, Inc.,   * an ascii text copy of the GNU General Public License, version 3.
  * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA,   * If not, point your browser to  http://www.gnu.org/licenses/
  * or point your browser to  http://www.gnu.org/licenses/gpl.html   * or write to the Free Software Foundation, Inc.,
    * 59 Temple Place, Suite 330,  Boston, MA 02111-1307 USA.
  ****************************************************************************   ****************************************************************************
  -->   -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
Line 99  Preamble Line 101  Preamble
         document.expression.formdata.focus(); }          document.expression.formdata.focus(); }
     -->      -->
   </script>    </script>
   
   <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   + javascript from mathtran.org to render <img alt="tex:math expression">
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
   <script type="text/javascript"
       src="http://www.mathtran.org/js/mathtran_img.js"></script>
   </head>    </head>
 <body>  <body>
   
Line 117  Banner across top of page, containing ti Line 125  Banner across top of page, containing ti
    <td align="center" valign="middle">     <td align="center" valign="middle">
     <center> <font color="maroon" size=4>      <center> <font color="maroon" size=4>
     <b><nobr>m i m e T e X &nbsp; m a n u a l</nobr></b> <br>      <b><nobr>m i m e T e X &nbsp; m a n u a l</nobr></b> <br>
     <font size=3>( for mimeTeX version 1.64 )</font> <br>      <font size=3>( for mimeTeX version 1.70 )</font> <br>
     <font size=3> <b>Click for:</b>&nbsp;      <font size=3> <b>Click for:</b>&nbsp;
      <!-- <a href="http://www.forkosh.com" target="_top">homepage</a>, &nbsp;       <!-- <a href="http://www.forkosh.com" target="_top">homepage</a>, &nbsp;
      <a href="http://www.forkosh.com/resume.html" target="_top">resume</a> -->       <a href="http://www.forkosh.com/resume.html" target="_top">resume</a> -->
Line 140  Banner across top of page, containing ti Line 148  Banner across top of page, containing ti
 </center>  </center>
 <hr size=4>  <hr size=4>
 <center><b><font color="maroon" size=3>  <center><b><font color="maroon" size=3>
 Copyright <font size=5>&copy;</font> 2002-2006,  Copyright <font size=5>&copy;</font> 2002-2008,
 <a href="http://www.forkosh.com">John Forkosh Associates, Inc.</a> <br>  <a href="http://www.forkosh.com">John Forkosh Associates, Inc.</a> <br>
 email: <a href="mailto:john&#64;forkosh&#46;com">john&#64;forkosh&#46;com</a>  email: <a href="mailto:john&#64;forkosh&#46;com">john&#64;forkosh&#46;com</a>
 </font></b> <br><br>  </font></b> <br><br>
Line 262  SECTION I.  INTRODUCTION Line 270  SECTION I.  INTRODUCTION
     <a href="#preview"><img id="imageI1" onclick="eqntext('imageI1')"      <a href="#preview"><img id="imageI1" onclick="eqntext('imageI1')"
     src="../cgi-bin/mimetex.cgi?\normalsize      src="../cgi-bin/mimetex.cgi?\normalsize
     f(x)=\int\limits_{-\infty}^xe^{-t^2}dt"      f(x)=\int\limits_{-\infty}^xe^{-t^2}dt"
     alt="" border=0 align=middle></a> wherever you put that &lt;img&gt tag.      alt="" border=0 style="Vertical-Align:-11px"></a>
       wherever you put that &lt;img&gt tag.
     MimeTeX doesn't need intermediate dvi-to-gif conversion, and it doesn't      MimeTeX doesn't need intermediate dvi-to-gif conversion, and it doesn't
     create separate gif files for each converted expression.      create separate gif files for each converted expression.
     (But you can enable image caching with mimeTeX's      (But you can enable image caching with mimeTeX's
Line 278  mimeTeX plugins<font size=5>...</font></ Line 287  mimeTeX plugins<font size=5>...</font></
     or write a wrapper&nbsp;script around mimeTeX to simplify the      or write a wrapper&nbsp;script around mimeTeX to simplify the
     notation. </p>      notation. </p>
   
 <p style="margin-bottom:0">  For example, if you're using  <p style="margin-bottom:0">  For example,
       the following javascript snippet (based on
       <a href="http://www.mathtran.org" target="_top">mathtran</a>'s
       <a href="http://www.mathtran.org/js/mathtran_img.js"
       target="_top">mathtran_img.js</a>) lets you just write &nbsp;
       <b>&lt;img&nbsp;alt="mimetex:c=\sqrt{a^2+b^2}"&gt;</b> &nbsp;
       wherever you want to see&nbsp;<a href="#preview"><img id="imageJS1"
       onclick="eqntext('imageJS1')" src="../cgi-bin/mimetex.cgi?
       \normalsize c=\sqrt{a^2+b^2}" alt="" border=0
       style="Vertical-Align:-1px"></a>&nbsp; </p>
       <pre class="medium" style="margin-top:0;margin-bottom:0"
   >   &lt;script type="text/javascript"&gt;
      &lt;!--
      // Create a namespace to hold variables and functions
      mimetex = new Object();
      // Change this to use your server
      mimetex.imgSrc = "http://www.<i>yourdomain</i>.com/cgi-bin/mimetex.cgi?";
      // Transform the whole document: add src to each img with
      // alt text starting with "mimetex:", unless img already has a src.
      mimetex.init = function () {
          if (! document.getElementsByTagName) return;
          var objs = document.getElementsByTagName("img");
          var len  = objs.length;
          for (i=0; i&lt;len; i++) {
             var img = objs[i];
             if (img.alt.substring(0,8) == 'mimetex:')
                if (!img.src) {
                   var tex_src = img.alt.substring(8);
                   img.src = mimetex.imgSrc + encodeURIComponent(tex_src);
                   // Append TEX to the class of the IMG.
                   img.className +=' tex'; }
             }
          mimetex.hideElementById("mimetex.error"); }
      // Utility function
      mimetex.hideElementById = function (id) {
          var obj = document.getElementById(id);
          if (obj) obj.style.display = 'none'; }
      // resolve a cross-browser issue (see <a href="http://scottandrew.com/weblog/articles/cbs-events" target="_top">CBS&nbsp;events</a>)
      mimetex.addEvent = function (obj, evType, fn, useCapture) {
          if (obj.addEventListener) { //For Mozilla.
              obj.addEventListener(evType, fn, useCapture);
              return true; }
          else if (obj.attachEvent) { //For Internet Explorer.
              var r = obj.attachEvent("on"+evType, fn);
              return r; }
          }
      // Initialize after entire document is loaded
      mimetex.addEvent(window, 'load', mimetex.init, false);
      --&gt;
      &lt;/script&gt;</pre>
   
   <p style="margin-bottom:0">
       Bulletin boards, wikis, etc, can also incorporate mimeTeX images
       with short scripts.  For example, if you're using
     <a href="http://www.phpbb.com" target="_top">phpBB2</a>, then      <a href="http://www.phpbb.com" target="_top">phpBB2</a>, then
     <a href="http://www.themathforum.com/" target="_top">Jameson</a>      <a href="http://www.themathforum.com/" target="_top">Jameson</a>
     contributed the following typical one-line mod that lets you just write      contributed the following typical one-line mod that lets you write
     <b>[tex]&nbsp;f(x)=\int_{-\infty}^xe^{-t^2}dt&nbsp;[/tex]</b>      <b>[tex]&nbsp;c=\sqrt{a^2+b^2}&nbsp;[/tex]</b> to obtain the
     to obtain the same image illustrated above: </p>      same&nbsp;<a href="#preview"><img id="imageJS2"
       onclick="eqntext('imageJS2')" src="../cgi-bin/mimetex.cgi?
       \normalsize c=\sqrt{a^2+b^2}" alt="" border=0
       style="Vertical-Align:-1px"></a> image illustrated above&nbsp; </p>
     <pre class="medium" style="margin-top:0;margin-bottom:0"      <pre class="medium" style="margin-top:0;margin-bottom:0"
 >   #--------[open]-----------------------------------------------------  >   #--------[open]-----------------------------------------------------
      /includes/bbcode.php       /includes/bbcode.php
Line 320  mimeTeX plugins<font size=5>...</font></ Line 385  mimeTeX plugins<font size=5>...</font></
   <a href="http://www.pmichaud.com/wiki/Cookbook/MimeTeX"    <a href="http://www.pmichaud.com/wiki/Cookbook/MimeTeX"
   target="_top">mimeTeX&nbsp;plugin</a> </td> </tr>    target="_top">mimeTeX&nbsp;plugin</a> </td> </tr>
      <tr> <td align=center>       <tr> <td align=center>
   <a href="http://www.wikimedia.org/wiki/Main_Page" target="_top">    <!-- a href="http://www.wikimedia.org/wiki/Main_Page" -->
   Wikimedia</a> </td>    <a href="http://www.wikimediafoundation.org/wiki/Main_Page"
             target="_top">Wikimedia</a> </td>
   <td align=center> &nbsp; </td>    <td align=center> &nbsp; </td>
   <td align=center>    <td align=center>
   <a href="http://meta.wikimedia.org/wiki/Mimetex_alternative"    <!-- a href="http://meta.wikimedia.org/wiki/Mimetex_alternative" -->
     <a href="http://www.mediawiki.org/wiki/Mimetex_alternative"
   target="_top">&quot;mimeTeX&nbsp;alternative&quot;</a> </td> </tr>    target="_top">&quot;mimeTeX&nbsp;alternative&quot;</a> </td> </tr>
   <!-- ***redirect loop***
      <tr> <td align=center>       <tr> <td align=center>
   <a href="http://www.unitorganizer.com/mathwiki/index.php/Main_Page"    <a href="http://www.unitorganizer.com/mathwiki/index.php/Main_Page"
   target="_top">MathWiki</a> </td> <td> &nbsp; </td>    target="_top">MathWiki</a> </td> <td> &nbsp; </td>
   <td align=center> <a href=    <td align=center> <a href=
   "http://www.unitorganizer.com/mathwiki/index.php/MimetexParser"    "http://www.unitorganizer.com/mathwiki/index.php/MimetexParser"
   target="_top">&quot;mimeTeX&nbsp;Parser&quot;</a> </td> </tr>    target="_top">&quot;mimeTeX&nbsp;Parser&quot;</a> </td> </tr>
   -->
      <tr> <td align=center>       <tr> <td align=center>
   <a href="http://forums.punbb.org/" target="_top">PunBB</a> </td>    <a href="http://forums.punbb.org/" target="_top">PunBB</a> </td>
   <td> &nbsp; </td> <td align=center>    <td> &nbsp; </td> <td align=center>
   <a href="http://www.math-linux.com/spip.php?article44"    <a href="http://www.math-linux.com/spip.php?article44"
   target="_top">mimeTeX&nbsp;plugin</a> </td> </tr>    target="_top">mimeTeX&nbsp;plugin</a> </td> </tr>
      <tr> <td align=center>       <tr> <td align=center>
   <a href="http://www.sixapart.com/movabletype/" target="_top">    <!-- a href="http://www.sixapart.com/movabletype/" -->
   Movable&nbsp;Type</a> </td> <td> &nbsp; </td>    <a href="http://www.movabletype.com/"
     target="_top">Movable&nbsp;Type</a> </td> <td> &nbsp; </td>
   <td align=center> <a href=    <td align=center> <a href=
   "http://www.unitorganizer.com/myblog/2006/08/creating_equations_in_movable.html"    "http://www.unitorganizer.com/myblog/2006/08/creating_equations_in_movable.html"
           target="_top">mimeTeX&nbsp;plugin</a> </td> </tr>            target="_top">mimeTeX&nbsp;plugin</a> </td> </tr>
Line 376  mimeTeX plugins<font size=5>...</font></ Line 446  mimeTeX plugins<font size=5>...</font></
     minimal risk when used as illustrated above, but you're responsible      minimal risk when used as illustrated above, but you're responsible
     for any plugin/wrapper script you write around it. </p>      for any plugin/wrapper script you write around it. </p>
   
   <h3> <a name="valignment">
   Vertical alignment<font size=5>...</font></a> </h3>
   <p> An image like
       <a href="#preview"><img id="imageAV1" onclick="eqntext('imageAV1')"
       src="../cgi-bin/mimetex.cgi?
       \normalsize f(x)=\int\limits_{-\infty}^xe^{-t^2}dt"
       alt="" border=0 align=middle></a>
       doesn't look as good as the same image
       <a href="#preview"><img id="imageAV2" onclick="eqntext('imageAV2')"
       src="../cgi-bin/mimetex.cgi?
       \normalsize f(x)=\int\limits_{-\infty}^xe^{-t^2}dt"
       alt="" border=0 style="Vertical-Align:-11px"></a>
       that's vertically aligned with your surrounding text.
       Along with several standard 
       <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">
       HTTP&nbsp;header&nbsp;fields</a>, mimeTeX also emits a special
       &nbsp; <b>Vertical-Align:&nbsp;&#150;<i>nn</i></b> &nbsp;
       header, where <b>&#150;<i>nn</i></b> is the number of pixels
       (usually negative as illustrated) needed for a
       &nbsp; <b>style="Vertical-Align:&nbsp;&#150;<i>nn</i>&nbsp;px"</b>
       &nbsp; attribute in the <b>&lt;img&gt;</b>&nbsp;tag used to
       render your expression. </p>
   
   <p> But mimeTeX's special Vertical-Align: header
       is unrecognized and ignored by your browser.  You have to get the
       header, interpret it, and write the corresponding &lt;img&gt; tag.
       The only feasible way to do all this is using a scripting language,
       as illustrated by the following, rather naive, php code </p>
       <pre class="medium" style="margin-top:.5em;margin-bottom:.5em"
   >   &lt;?php
      $mimetexurl = "http://www.<i>yourdomain</i>.com/cgi-bin/mimetex.cgi?";
      function verticalalign( $expression ) {
         global $mimetexurl;
         // note: curl_init() stops at the first whitespace char in $url argument
         $expression = ereg_replace(" ","~",$expression); // so remove whitespace
         $url     = $mimetexurl . $expression;
         $valign  = "0";
         $ch      = curl_init( $url );
         curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
         curl_setopt( $ch, CURLOPT_HEADER, true );
         $gif     = curl_exec( $ch );
         $errno   = curl_errno( $ch );
         curl_close( $ch );
         if ( $errno == 0 ) {
           $fields = explode("Vertical-Align:",$gif);
           $vfield = trim($fields[1]);
           $fldlen = strspn($vfield,"+-0123456789");
           $valign = substr($vfield,0,$fldlen); }
         return $valign;
         }
      function mimetextag( $expression ) {
         global $mimetexurl;
         $valign = verticalalign($expression);
         $url    = $mimetexurl . $expression;
         echo ' &lt;img src="',$url,'" ';
         echo ' style="Vertical-Align:',$valign,'px" ';
         echo ' alt="" border=0&gt;', "\n";
         }
      ?&gt;</pre>
   
   <p> Now you can write &nbsp;
       &lt;?php&nbsp;mimetextag('\frac12\left(a^2+b^2\right)');&nbsp;?&gt;
       wherever you want to see
       <a href="#preview"><img id="imageAV5" onclick="eqntext('imageAV5')"
       src="../cgi-bin/mimetex.cgi?
       \normalsize\frac12\left(a^2+b^2\right)"
       alt="" border=0 style="Vertical-Align:-5px"></a>
       correctly aligned.  <!-- Besides making you escape backslashes
       (each&nbsp;&#092;&nbsp;must be written&nbsp;&#092;&#092;), -->
       This code calls mimeTeX twice to render each expression,
       once to get the Vertical-Align: header and build an
       &lt;img&gt; tag, and then again to render that tag.
       If you're a good php programmer and write better code,
       please email me a copy. </p>
   
   <p> If you're using mimeTeX's
       &nbsp; <b>-DCACHEPATH=\&quot;<i>path</i>/\&quot;</b> &nbsp;
       <a href="#options">compile&nbsp;option</a>, prefix your
       <b><i>path</i>/</b> with a leading&nbsp;<b>&#037;</b> and write &nbsp;
       <b>-DCACHEPATH=\&quot;&#037;<i>path</i>/\&quot;</b> &nbsp; instead.
       That leading&nbsp;<b>&#037;</b> won't become part of your cache
       directory's <b><i>path</i>/</b>, but it will signal mimeTeX
       to cache headers along with each image.
       Otherwise, the Vertical-Align: information is lost,
       and attempts to align cached images will fail. </p>
   
 <h3> <a name="alternatives">  <h3> <a name="alternatives">
 Alternative solutions<font size=5>...</font></a> </h3>  Alternative solutions<font size=5>...</font></a> </h3>
 <p> MimeTeX's benefit over similar math-on-the-web solutions is, as  <p> MimeTeX's benefit over similar math-on-the-web solutions is, as
Line 391  Alternative solutions<font size=5>...</f Line 547  Alternative solutions<font size=5>...</f
     <a href="#preview"><img id="imageI2" onclick="eqntext('imageI2')"      <a href="#preview"><img id="imageI2" onclick="eqntext('imageI2')"
     src="../cgi-bin/mimetex.cgi?\normalsize      src="../cgi-bin/mimetex.cgi?\normalsize
     f(x)=\int\limits_{-\infty}^xe^{-t^2}dt"      f(x)=\int\limits_{-\infty}^xe^{-t^2}dt"
     alt="" border=0 align=middle></a>, with arbitrary mean      alt="" border=0 style="Vertical-Align:-11px"></a>,
       with arbitrary mean
     <a href="#preview"><img id="imageI3" onclick="eqntext('imageI3')"      <a href="#preview"><img id="imageI3" onclick="eqntext('imageI3')"
     src="../cgi-bin/mimetex.cgi?\large\mu" alt="" border=0 align=middle></a>      src="../cgi-bin/mimetex.cgi?\large\mu" alt="" border=0
     and standard deviation      style="Vertical-Align:-5px"></a> and standard deviation
     <a href="#preview"><img id="imageI4" onclick="eqntext('imageI4')"      <a href="#preview"><img id="imageI4" onclick="eqntext('imageI4')"
     src="../cgi-bin/mimetex.cgi?\large\sigma" alt="" border=0      src="../cgi-bin/mimetex.cgi?\large\sigma" alt="" border=0
     align=middle></a>, and at mimeTeX's next larger font size, looks like </p>      style="Vertical-Align:0px"></a>,
       and at mimeTeX's next larger font size, looks like </p>
      <center>       <center>
       <table>        <table>
        <tr align="center">         <tr align="center">
  <td> <font size="4">mimeTeX</font> </td>   <td> <font size="4">latexrender</font> </td>
  <td> <img src="../cgi-bin/mimetex.cgi?\hspace{30}"   <td> <img src="../cgi-bin/mimetex.cgi?\hspace{30}"
               alt="" border=0> </td>                alt="" border=0> </td>
  <td> <font size="4">latexrender</font> </td>   <td> <font size="4">mimeTeX</font> </td>
        </tr>         </tr>
        <tr align="center">         <tr align="center">
    <td> <img src="http://www.forkosh.com/lrender.gif"
    alt="" border=0 align=middle> </td>
           <td> &nbsp; </td>
   <td>    <td>
  <a href="#preview"><img id="imageI5" onclick="eqntext('imageI5')"   <a href="#preview"><img id="imageI5" onclick="eqntext('imageI5')"
  src="../cgi-bin/mimetex.cgi?\large   src="../cgi-bin/mimetex.cgi?\large
          f(x)={\Large\frac1{\sigma\sqrt{2\pi}}}           f(x)={\Large\frac1{\sigma\sqrt{2\pi}}}
  \int_{\small-\infty}^xe^{-\small\frac{(t-\mu)^2}{2\sigma^2}}dt"   \int_{\small-\infty}^xe^{-\small\frac{(t-\mu)^2}{2\sigma^2}}dt"
  alt="" border=0 align=middle></a> </td>   alt="" border=0 align=middle></a> </td>
         <td> &nbsp; </td>  
  <td> <img src="http://www.forkosh.com/lrender.gif"  
  alt="" border=0 align=middle> </td>  
        </tr>         </tr>
       </table>        </table>
      </center>       </center>
 <p> Similar LaTeX-based solutions that you may want to look at are  <p> Similar LaTeX-based solutions that you may want to look at are
       <a href="http://www.mathtran.org" target="_top">mathtran</a>,
     <a href="http://www.fourmilab.ch/webtools/textogif/textogif.html"      <a href="http://www.fourmilab.ch/webtools/textogif/textogif.html"
     target="_top">textogif</a> and      target="_top">textogif</a> and
     <a href="http://www.math.uio.no/~martingu/gladtex/"      <a href="http://www.math.uio.no/~martingu/gladtex/"
Line 428  Alternative solutions<font size=5>...</f Line 587  Alternative solutions<font size=5>...</f
     target="_top">www.tug.org/interest.html</a> and in the      target="_top">www.tug.org/interest.html</a> and in the
     <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=LaTeX2HTML"      <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=LaTeX2HTML"
     target="_top">tex-faq</a>. </p>      target="_top">tex-faq</a>. </p>
   
   <p> For example, <a href="http://www.mathtran.org" target="_top">mathtran</a>
       is a public LaTeX web service that's
       particularly easy to use by following these simple
       <a href="http://www.mathtran.org/wiki/index.php/TeX_image"
       target="_top">instructions</a>.  In the &lt;head&gt; of your
       html page, place the tag <br>
       &nbsp; &nbsp;
         &lt;script type="text/javascript" <br>
       &nbsp; &nbsp; &nbsp; &nbsp;
         src="http://www.mathtran.org/js/mathtran_img.js"&gt;&lt;/script&gt;<br>
       and in the &lt;body&gt;, wherever you want to see latex images,
       place tags like <br>
       &nbsp; &nbsp;
         &lt;img alt=<b>"</b>tex:<i>any latex math expression</i><b>"</b>&gt;<br>
       For comparison, <br>
       &nbsp; &nbsp;
         &lt;img alt="tex: f(x) = \frac1{\sigma\sqrt{2\pi}} <br>
       &nbsp; &nbsp;
         \int_{-\infty}^x e^{-\frac{(t-\mu)^2}{2\sigma^2}}dt"&gt; <br>
       looks like </p>
        <center>
         <table>
          <tr align="center">
    <td> <font size="4">mathtran</font> </td>
    <td> <img src="../cgi-bin/mimetex.cgi?\hspace{30}"
                 alt="" border=0> </td>
    <td> <font size="4">mimeTeX</font> </td>
          </tr>
          <tr align="center">
    <td> <img alt="tex:\displaystyle f(x) = \frac1{\sigma\sqrt{2\pi}}
            \int_{-\infty}^x e^{-\frac{(t-\mu)^2}{2\sigma^2}}dt"> <br> </td>
           <td> &nbsp; </td>
     <td>
    <a href="#preview"><img id="imageP3" onclick="eqntext('imageP3')"
    src="../cgi-bin/mimetex.cgi?\large
            f(x)={\Large\frac1{\sigma\sqrt{2\pi}}}
    \int_{\small-\infty}^xe^{-\small\frac{(t-\mu)^2}{2\sigma^2}}dt"
    alt="" border=0 align=middle></a> </td>
          </tr>
         </table>
        </center>
   
 <!--  <!--
 <p> The remainder of this introductory mimeTeX tutorial section contains </p>  <p> The remainder of this introductory mimeTeX tutorial section contains </p>
      <ul>       <ul>
Line 487  QUICKSTART Line 689  QUICKSTART
            &nbsp; renders &nbsp;             &nbsp; renders &nbsp;
            <a href="#preview"> <img id="imageBu" onclick="eqntext('imageBu')"             <a href="#preview"> <img id="imageBu" onclick="eqntext('imageBu')"
            src="../cgi-bin/mimetex.cgi?\large a+\small b+c"             src="../cgi-bin/mimetex.cgi?\large a+\small b+c"
            alt="" border=0 align=bottom></a>, &nbsp; whereas &nbsp;             alt="" border=0 style="Vertical-Align:-2px"></a>, &nbsp;
            "<b>\small&nbsp;a+{\Large&nbsp;b+}c</b>" &nbsp; renders &nbsp;             whereas &nbsp; "<b>\small&nbsp;a+{\Large&nbsp;b+}c</b>" &nbsp;
              renders &nbsp;
            <a href="#preview"> <img id="imageBv" onclick="eqntext('imageBv')"             <a href="#preview"> <img id="imageBv" onclick="eqntext('imageBv')"
            src="../cgi-bin/mimetex.cgi?\small a+{\Large b+}c"             src="../cgi-bin/mimetex.cgi?\small a+{\Large b+}c"
            alt="" border=0 align=bottom></a>. </li>             alt="" border=0 style="Vertical-Align:-2px"></a>. </li>
 <!--  <li> At smaller font sizes, try preceding your expression with &nbsp;  <!--  <li> At smaller font sizes, try preceding your expression with &nbsp;
            <b>\light</b> &nbsp; which adjusts mimeTeX's anti-aliasing             <b>\light</b> &nbsp; which adjusts mimeTeX's anti-aliasing
            parameters to produce thinner lines that you may feel are             parameters to produce thinner lines that you may feel are
Line 522  QUICKSTART Line 725  QUICKSTART
            By default, mimeTeX renders limits textstyle &nbsp;             By default, mimeTeX renders limits textstyle &nbsp;
            <a href="#preview"> <img id="imageB1" onclick="eqntext('imageB1')"             <a href="#preview"> <img id="imageB1" onclick="eqntext('imageB1')"
            src="../cgi-bin/mimetex.cgi?\normalsize\textstyle             src="../cgi-bin/mimetex.cgi?\normalsize\textstyle
            \sum_{n=0}^\infty\frac{x^n}{n!}" alt="" border=0 align=middle></a>             \sum_{n=0}^\infty\frac{x^n}{n!}" alt="" border=0
            &nbsp; at sizes <b>\normalsize</b> and smaller,             style="Vertical-Align:-5px"></a> &nbsp;
              at sizes <b>\normalsize</b> and smaller,
            and renders them displaystyle &nbsp;             and renders them displaystyle &nbsp;
            <a href="#preview"> <img id="imageB2" onclick="eqntext('imageB2')"             <a href="#preview"> <img id="imageB2" onclick="eqntext('imageB2')"
            src="../cgi-bin/mimetex.cgi?\normalsize\displaystyle             src="../cgi-bin/mimetex.cgi?\normalsize\displaystyle
            \sum_{n=0}^\infty\frac{x^n}{n!}" alt="" border=0 align=middle></a>             \sum_{n=0}^\infty\frac{x^n}{n!}" alt="" border=0
            &nbsp; at sizes <b>\large</b> and larger.             style="Vertical-Align:-15px"></a> &nbsp;
              at sizes <b>\large</b> and larger.
            The LaTeX directives <b>\displaystyle</b> or <b>\textstyle</b>,             The LaTeX directives <b>\displaystyle</b> or <b>\textstyle</b>,
            and <b>\limits</b> or <b>\nolimits</b>, override mimeTeX's default             and <b>\limits</b> or <b>\nolimits</b>, override mimeTeX's default
            in the usual way.  Or see the <b>-DDISPLAYSIZE=<i>n</i></b>             in the usual way.  Or see the <b>-DDISPLAYSIZE=<i>n</i></b>
Line 570  QUICKSTART Line 775  QUICKSTART
      <a href="#preview"><img id="imageIA3" onclick="eqntext('imageIA3')"       <a href="#preview"><img id="imageIA3" onclick="eqntext('imageIA3')"
      src="../cgi-bin/mimetex.cgi?\normalsize       src="../cgi-bin/mimetex.cgi?\normalsize
      f(x)=\int\limits_{-\infty}^x e^{-t^2}dt"       f(x)=\int\limits_{-\infty}^x e^{-t^2}dt"
      alt="" border=0 align=middle></a> if you submit the sample expression       alt="" border=0 style="Vertical-Align:-11px"></a> &nbsp;
      already in the box. </p>       if you submit the sample expression already in the box. </p>
   
  <p> And the &lt;img&gt; tag to embed this same integral anywhere   <p> And the &lt;img&gt; tag to embed this same integral anywhere
      in your own document is </p>       in your own document is </p>
Line 1108  SECTION II.  BUILDING MIMETEX Line 1313  SECTION II.  BUILDING MIMETEX
         Your working directory should now contain <center>          Your working directory should now contain <center>
         <table cellpadding=0 cellspacing=0>          <table cellpadding=0 cellspacing=0>
          <tr><td width=100>README</td> <td>mimeTeX release notes</td></tr>           <tr><td width=100>README</td> <td>mimeTeX release notes</td></tr>
          <tr><td>LICENSE</td>    <td>GPL license, under which you may use           <tr><td>COPYING</td>    <td>GPL license, under which you may use
                                      mimeTeX</td></tr>                                       mimeTeX</td></tr>
          <tr><td>mimetex.c</td>  <td>mimeTeX source program and all required           <tr><td>mimetex.c</td>  <td>mimeTeX source program and all required
                                      functions</td></tr>                                       functions</td></tr>
Line 1237  Ascii dump of bitmap image... Line 1442  Ascii dump of bitmap image...
       <b>http://www.<i>yourdomain</i>.com/cgi-bin/mimetex.cgi?x^2+y^2</b> <br>        <b>http://www.<i>yourdomain</i>.com/cgi-bin/mimetex.cgi?x^2+y^2</b> <br>
      which should display &nbsp;       which should display &nbsp;
      <img src="../cgi-bin/mimetex.cgi?\normalsize x^2+y^2" alt="" border=0       <img src="../cgi-bin/mimetex.cgi?\normalsize x^2+y^2" alt="" border=0
      align=middle> &nbsp; in the upper-left corner of your window,       style="Vertical-Align:-3px"> &nbsp;
        in the upper-left corner of your window,
      just like clicking this link does, which tests my mimetex.cgi, <br>       just like clicking this link does, which tests my mimetex.cgi, <br>
      &nbsp; &nbsp; &nbsp; &nbsp;       &nbsp; &nbsp; &nbsp; &nbsp;
       <a href="http://www.forkosh.com/cgi-bin/mimetex.cgi?x^2+y^2"        <a href="http://www.forkosh.com/cgi-bin/mimetex.cgi?x^2+y^2"
       target="_top">http://www.forkosh.com/cgi-bin/mimetex.cgi?x^2+y^2</a><br>        target="_top">http://www.forkosh.com/cgi-bin/mimetex.cgi?x^2+y^2</a><br>
      If you see the same &nbsp; <img src="../cgi-bin/mimetex.cgi?       If you see the same &nbsp; <img src="../cgi-bin/mimetex.cgi?
      \normalsize x^2+y^2" alt="" border=0 align=middle> &nbsp; image       \normalsize x^2+y^2" alt="" border=0 style="Vertical-Align:-3px"> &nbsp;
      from the <b><i>yourdomain</i></b> link, then you've completed       image from the <b><i>yourdomain</i></b> link, then you've completed
      a successful mimeTeX installation. </p>       a successful mimeTeX installation. </p>
   
  <p> If you don't see the image, then your installation failed.   <p> If you don't see the image, then your installation failed.
Line 1330  Ascii dump of bitmap image... Line 1536  Ascii dump of bitmap image...
            is relative to mimetex.cgi, and must be writable by it.             is relative to mimetex.cgi, and must be writable by it.
            Files created under <b><i>path/</i></b> are named             Files created under <b><i>path/</i></b> are named
            <b><i>filename</i>.gif</b>, where <b><i>filename</i></b>             <b><i>filename</i>.gif</b>, where <b><i>filename</i></b>
            is the 32-character MD5 hash of the LaTeX expression. <br>             is the 32-character MD5 hash of your LaTeX expression. <br>
            &nbsp; &nbsp; &nbsp; When caching a new image, mimeTeX also                &nbsp; &nbsp; &nbsp; If you're also using mimeTeX's
              <a href="#valignment">Vertical-Align:</a> feature, prefix your
              <b><i>path</i>/</b> with a leading&nbsp;<b>&#037;</b> and write
              &nbsp; <b>-DCACHEPATH=\&quot;&#037;<i>path</i>/\&quot;</b> &nbsp;
              instead.  That leading&nbsp;<b>&#037;</b> won't become part of
              your cache directory's <b><i>path</i>/</b>, but it will signal
              mimeTeX to cache headers along with each image.
              Otherwise, the Vertical-Align: information is lost,
              and attempts to align cached images will fail. <br>
                 &nbsp; &nbsp; &nbsp; When caching a new image, mimeTeX also
            updates the file <b><i>path/</i>mimetex.log</b> containing             updates the file <b><i>path/</i>mimetex.log</b> containing
            a timestamp, filename and LaTeX expression for each new file             a timestamp, filename and LaTeX expression for each new file
            created.  A sample entry looks like             created.  A sample entry looks like
 <pre>---------------------------------------------------------------------  <pre>---------------------------------------------------------------------
 2004-08-07:09:00:53am            f8ccc8dd93c8eeb1d9c40b353ef781e0.gif  2008-09-07:11:29:53am            f8ccc8dd93c8eeb1d9c40b353ef781e0.gif
 \LARGE x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}  \LARGE x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}
 ---------------------------------------------------------------------</pre></dd>  ---------------------------------------------------------------------</pre></dd>
       <dt><b>-DDEFAULTSIZE=<i>n</i></b> </dt>        <dt><b>-DDEFAULTSIZE=<i>n</i></b> </dt>
Line 3176  Raise&nbsp;and&nbsp;rotate, Compose, Abb Line 3391  Raise&nbsp;and&nbsp;rotate, Compose, Abb
  <p> Somewhat more detailed log information can be accumulated in   <p> Somewhat more detailed log information can be accumulated in
      the optional <b><i>logfile</i></b>.  If you provide that       the optional <b><i>logfile</i></b>.  If you provide that
      filename, mimeTeX writes a line to it of the form       filename, mimeTeX writes a line to it of the form
      <b>2004-09-20:12:59:33pm&nbsp;&lt;<i>tag</i>&gt;=99&nbsp;192.168.1.1&nbsp;<i>http_referer</i></b>       <b>2008-09-07:12:59:33pm&nbsp;&lt;<i>tag</i>&gt;=99&nbsp;192.168.1.1&nbsp;<i>http_referer</i></b>
      containing a timestamp, the counter tag and its current value,       containing a timestamp, the counter tag and its current value,
      and the user's IP address and http_referer page if they're       and the user's IP address and http_referer page if they're
      available. </p>       available. </p>
Line 3735  Footer across bottom of page Line 3950  Footer across bottom of page
 <hr size=4>  <hr size=4>
 <table> <tr>  <table> <tr>
  <td> <font size=3 color="maroon"> <b>   <td> <font size=3 color="maroon"> <b>
   <nobr>Copyright <font size=5>&copy;</font> 2002-2006,    <nobr>Copyright <font size=5>&copy;</font> 2002-2008,
   <a href="http://www.forkosh.com">John Forkosh Associates, Inc.</a>    <a href="http://www.forkosh.com">John Forkosh Associates, Inc.</a>
   </nobr><br>    </nobr><br>
   email: <a href="mailto:john&#64;forkosh&#46;com">john&#64;forkosh&#46;com</a>    email: <a href="mailto:john&#64;forkosh&#46;com">john&#64;forkosh&#46;com</a>

Removed from v.1.3  
changed lines
  Added in v.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>