version 1.2, 2006/03/24 23:08:33
|
version 1.4, 2008/12/04 12:17:13
|
Line 1
|
Line 1
|
<!-- |
<!-- |
**************************************************************************** |
**************************************************************************** |
* Copyright(c) 2002-2005, 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 m a n u a l</nobr></b> <br> |
<b><nobr>m i m e T e X m a n u a l</nobr></b> <br> |
<font size=3>( for mimeTeX version 1.60 )</font> <br> |
<font size=3>( for mimeTeX version 1.70 )</font> <br> |
<font size=3> <b>Click for:</b> |
<font size=3> <b>Click for:</b> |
<!-- <a href="http://www.forkosh.com" target="_top">homepage</a>, |
<!-- <a href="http://www.forkosh.com" target="_top">homepage</a>, |
<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 126 Banner across top of page, containing ti
|
Line 134 Banner across top of page, containing ti
|
<a href="http://www.forkosh.com/mimetex.html" target="_top"> |
<a href="http://www.forkosh.com/mimetex.html" target="_top"> |
mimeTeX QuickStart</a><br> |
mimeTeX QuickStart</a><br> |
<a href="http://www.forkosh.com/mimetex.zip"> |
<a href="http://www.forkosh.com/mimetex.zip"> |
<!-- jfa <a href="ftp://ftp.tex.ac.uk/tex-archive/support/mimetex/mimetex.zip"> --> |
<!-- jfa <a href="ftp://ftp.tex.ac.uk/tex-archive/support/mimetex/mimetex.zip"></a> --> |
<font size=4>download mimeTeX</font></a></font> |
<font size=4>download mimeTeX</font></a></font> |
</font> </center> </td> |
</font> </center> </td> |
<td align="center"> |
<td align="center"> |
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>©</font> 2002-2005, |
Copyright <font size=5>©</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@forkosh.com">john@forkosh.com</a> |
email: <a href="mailto:john@forkosh.com">john@forkosh.com</a> |
</font></b> <br><br> |
</font></b> <br><br> |
Line 219 Table of Contents
|
Line 227 Table of Contents
|
<b> unzip mimetex.zip</b> <br> |
<b> unzip mimetex.zip</b> <br> |
<b> cc -DAA mimetex.c gifsave.c -lm -o mimetex.cgi</b> |
<b> cc -DAA mimetex.c gifsave.c -lm -o mimetex.cgi</b> |
<br>Now just <b>mv</b> mimetex.cgi to your <b>cgi-bin/</b> |
<br>Now just <b>mv</b> mimetex.cgi to your <b>cgi-bin/</b> |
directory, <br> and you're all done. </font></td></tr> |
directory, <br> set permissions as necessary, and you're all done. |
|
</font></td></tr> |
<tr><td colspan="2"> <font size="2"> </font> </td></tr> |
<tr><td colspan="2"> <font size="2"> </font> </td></tr> |
<tr><td align="right" valign="top"> |
<tr><td align="right" valign="top"> |
<a href="#introduction">Usage</a>: </td> |
<a href="#introduction">Usage</a>: </td> |
Line 261 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 <img> tag. |
alt="" border=0 style="Vertical-Align:-11px"></a> |
|
wherever you put that <img> 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. </p> |
create separate gif files for each converted expression. |
|
(But you can enable image caching with mimeTeX's |
<p> There's also no inherent need to repeatedly write the cumbersome |
<b>-DCACHEPATH=\"<i>path/</i>\"</b> |
<img> tag illustrated above. You can write your own custom |
<a href="#options">compile option</a>.) </p> |
tags, or write a wrapper script around mimeTeX to simplify the |
|
notation. For example, |
<h3> <a name="plugins"> |
<a href="http://www.pmichaud.com/wiki/PmWiki/PmWiki" target="_top"> |
mimeTeX plugins<font size=5>...</font></a> </h3> |
PmWiki</a> already has a |
<p> There's no inherent need to repeatedly write the cumbersome |
<a href="http://www.pmichaud.com/wiki/Cookbook/MimeTeX" target="_top"> |
<img> tag illustrated above. You can write your own <a href= |
mimeTeX plugin</a> that lets you just write |
"http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro9.html#wp73314" |
<b>{$ f(x)=\int_{-\infty}^xe^{-t^2}dt $}</b> |
target="_top">custom tags</a>, |
to obtain the same image. Or, if you're using |
or write a wrapper script around mimeTeX to simplify the |
<a href="http://www.phpbb.com" target="_top">phpBB</a>, then |
notation. </p> |
<a href="http://www.themathforum.com" target="_top">Jameson</a> |
|
contributed the following one-line mod that lets you just write |
<p style="margin-bottom:0"> For example, |
<b>[tex] ... [/tex]</b> to obtain mimeTeX images: </p> |
the following javascript snippet (based on |
<pre class="medium"> #--------[open]----------------------------------------------------- |
<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 |
|
<b><img alt="mimetex:c=\sqrt{a^2+b^2}"></b> |
|
wherever you want to see <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> </p> |
|
<pre class="medium" style="margin-top:0;margin-bottom:0" |
|
> <script type="text/javascript"> |
|
<!-- |
|
// 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<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 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); |
|
--> |
|
</script></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.themathforum.com/" target="_top">Jameson</a> |
|
contributed the following typical one-line mod that lets you write |
|
<b>[tex] c=\sqrt{a^2+b^2} [/tex]</b> to obtain the |
|
same <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 </p> |
|
<pre class="medium" style="margin-top:0;margin-bottom:0" |
|
> #--------[open]----------------------------------------------------- |
/includes/bbcode.php |
/includes/bbcode.php |
#--------[find]----------------------------------------------------- |
#--------[find]----------------------------------------------------- |
// Remove our padding from the string.. |
// Remove our padding from the string.. |
Line 287 SECTION I. INTRODUCTION
|
Line 358 SECTION I. INTRODUCTION
|
$text = preg_replace('/\[tex\](.*?)\[\/tex\]/ie', |
$text = preg_replace('/\[tex\](.*?)\[\/tex\]/ie', |
"'<img src=\"/cgi-bin/mimetex.cgi?'.rawurlencode('$1').'\" align=\"middle\" />'", |
"'<img src=\"/cgi-bin/mimetex.cgi?'.rawurlencode('$1').'\" align=\"middle\" />'", |
$text);</pre> |
$text);</pre> |
|
<p class="continue" style="margin-top:0"> If you're using |
|
<a href="http://www.phpbb.com" target="_top">phpBB3</a>, |
|
then no mod is even needed. |
|
Just click Postings from the Administrator Control Panel, |
|
and add the custom BBCode <b>[tex]{TEXT}[/tex]</b> |
|
with the HTML replacement |
|
<b><img src="/cgi-bin/mimetex.cgi?{TEXT}" align=middle></b></p> |
|
|
|
<p> Similarly, <a href="http://www.pmichaud.com/wiki/PmWiki/PmWiki" |
|
target="_top">PmWiki</a> also has a |
|
<a href="http://www.pmichaud.com/wiki/Cookbook/MimeTeX" target="_top"> |
|
mimeTeX plugin</a> that lets you just write |
|
<b>{$ f(x)=\int_{-\infty}^xe^{-t^2}dt $}</b> |
|
to obtain that same image. Several other packages |
|
also have similar mimeTeX plugins: </p> |
|
<center><table> |
|
<tr> <td align=center> <u> <b>Package</b> </u> </td> |
|
<td> </td> |
|
<td align=center> <u> <b>Plugin</b> </u> </td> |
|
</tr> |
|
<tr> <td align=center> |
|
<a href="http://www.pmichaud.com/wiki/PmWiki/PmWiki" target="_top"> |
|
PmWiki</a> </td> <td> </td> |
|
<td align=center> |
|
<a href="http://www.pmichaud.com/wiki/Cookbook/MimeTeX" |
|
target="_top">mimeTeX plugin</a> </td> </tr> |
|
<tr> <td align=center> |
|
<!-- a href="http://www.wikimedia.org/wiki/Main_Page" --> |
|
<a href="http://www.wikimediafoundation.org/wiki/Main_Page" |
|
target="_top">Wikimedia</a> </td> |
|
<td align=center> </td> |
|
<td align=center> |
|
<!-- a href="http://meta.wikimedia.org/wiki/Mimetex_alternative" --> |
|
<a href="http://www.mediawiki.org/wiki/Mimetex_alternative" |
|
target="_top">"mimeTeX alternative"</a> </td> </tr> |
|
<!-- ***redirect loop*** |
|
<tr> <td align=center> |
|
<a href="http://www.unitorganizer.com/mathwiki/index.php/Main_Page" |
|
target="_top">MathWiki</a> </td> <td> </td> |
|
<td align=center> <a href= |
|
"http://www.unitorganizer.com/mathwiki/index.php/MimetexParser" |
|
target="_top">"mimeTeX Parser"</a> </td> </tr> |
|
--> |
|
<tr> <td align=center> |
|
<a href="http://forums.punbb.org/" target="_top">PunBB</a> </td> |
|
<td> </td> <td align=center> |
|
<a href="http://www.math-linux.com/spip.php?article44" |
|
target="_top">mimeTeX plugin</a> </td> </tr> |
|
<tr> <td align=center> |
|
<!-- a href="http://www.sixapart.com/movabletype/" --> |
|
<a href="http://www.movabletype.com/" |
|
target="_top">Movable Type</a> </td> <td> </td> |
|
<td align=center> <a href= |
|
"http://www.unitorganizer.com/myblog/2006/08/creating_equations_in_movable.html" |
|
target="_top">mimeTeX plugin</a> </td> </tr> |
|
<tr> <td align=center> |
|
<a href="http://wordpress.org/" target="_top">WordPress</a> </td> |
|
<td> </td> <td align=center> <a href= |
|
"http://www.anlak.com/?page_id=66" target="_top"> |
|
<!-- "http://sixthform.info/steve/wordpress/index.php?p=13&page=2" --> |
|
mimeTeX plugin</a> <!-- (see item 9) --> </td> </tr> |
|
<!--- dead links ---> |
|
<!-- tr> <td align=center> |
|
<a href="http://www.phpbb.com" target="_top">phpBB</a> </td> |
|
<td> </td> <td align=center> |
|
<a href= |
|
"http://www.themathforum.com/math/showthread.php?p=621#post621" |
|
target="_top">mimeTeX plugin</a> </td> </tr --> |
|
<!-- tr> <td align=center> |
|
<a href="http://www.mamboserver.com/" target="_top">Mambo</a> </td> |
|
<td> </td> <td align=center> |
|
<a href="http://mamboxchange.com/projects/mimetexbot/" |
|
target="_top">"mimeTeX bot"</a> </td> </tr --> |
|
</table></center> |
|
|
|
<p> <b>Please note:</b> If you're writing your own plugin for mimeTeX, |
|
please don't write php code using <b>system( )</b>, or any other |
|
shell escape mechanism, just to cache images. Use mimeTeX's |
|
<b>-DCACHEPATH=\"<i>path/</i>\"</b> |
|
<a href="#options">compile option</a> instead. |
|
<b>system( )</b> raises security |
|
issues, either real ones if used carelessly, or just in the minds of |
|
system administrators. Either way, I've received many emails from |
|
people unable to use mimeTeX because of unnecessary <b>system( )</b> |
|
calls prohibited by security-conscious sysadmins. MimeTeX itself poses |
|
minimal risk when used as illustrated above, but you're responsible |
|
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 header fields</a>, mimeTeX also emits a special |
|
<b>Vertical-Align: –<i>nn</i></b> |
|
header, where <b>–<i>nn</i></b> is the number of pixels |
|
(usually negative as illustrated) needed for a |
|
<b>style="Vertical-Align: –<i>nn</i> px"</b> |
|
attribute in the <b><img></b> 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 <img> 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" |
|
> <?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 ' <img src="',$url,'" '; |
|
echo ' style="Vertical-Align:',$valign,'px" '; |
|
echo ' alt="" border=0>', "\n"; |
|
} |
|
?></pre> |
|
|
|
<p> Now you can write |
|
<?php mimetextag('\frac12\left(a^2+b^2\right)'); ?> |
|
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 \ must be written \\), --> |
|
This code calls mimeTeX twice to render each expression, |
|
once to get the Vertical-Align: header and build an |
|
<img> 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 |
|
<b>-DCACHEPATH=\"<i>path</i>/\"</b> |
|
<a href="#options">compile option</a>, prefix your |
|
<b><i>path</i>/</b> with a leading <b>%</b> and write |
|
<b>-DCACHEPATH=\"%<i>path</i>/\"</b> instead. |
|
That leading <b>%</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"> |
|
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 |
mentioned above, its easy installation. But if that's not a |
mentioned above, its easy installation. But if that's not a |
problem for you, and if your site's server already has a LaTeX |
problem for you, and if your site's server already has a LaTeX |
Line 301 SECTION I. INTRODUCTION
|
Line 547 SECTION I. INTRODUCTION
|
<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> </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> </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 338 SECTION I. INTRODUCTION
|
Line 587 SECTION I. INTRODUCTION
|
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 <head> of your |
|
html page, place the tag <br> |
|
|
|
<script type="text/javascript" <br> |
|
|
|
src="http://www.mathtran.org/js/mathtran_img.js"></script><br> |
|
and in the <body>, wherever you want to see latex images, |
|
place tags like <br> |
|
|
|
<img alt=<b>"</b>tex:<i>any latex math expression</i><b>"</b>><br> |
|
For comparison, <br> |
|
|
|
<img alt="tex: f(x) = \frac1{\sigma\sqrt{2\pi}} <br> |
|
|
|
\int_{-\infty}^x e^{-\frac{(t-\mu)^2}{2\sigma^2}}dt"> <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> </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 368 QUICKSTART
|
Line 660 QUICKSTART
|
math markup to use it. If you're not, many online LaTeX |
math markup to use it. If you're not, many online LaTeX |
<a href="http://www.tug.org/begin.html#doc" target="_top">turorials</a> |
<a href="http://www.tug.org/begin.html#doc" target="_top">turorials</a> |
are readily available. You may also want to browse Andrew Roberts' |
are readily available. You may also want to browse Andrew Roberts' |
<a href="http://www.comp.leeds.ac.uk/andyr/misc/latex/latextutorial9.html" |
<a href="http://www.andy-roberts.net/misc/latex/latextutorial9.html" |
target="_top">Latex Math I</a> and |
target="_top">Latex Math I</a> and |
<a href="http://www.comp.leeds.ac.uk/andyr/misc/latex/latextutorial10.html" |
<a href="http://www.andy-roberts.net/misc/latex/latextutorial10.html" |
target="_top">Latex Math II</a>, or my own |
target="_top">Latex Math II</a>, or my own |
<a href="http://www.forkosh.com/mimetextutorial.html" target="_top"> |
<a href="http://www.forkosh.com/mimetextutorial.html" target="_top"> |
LaTeX math tutorial</a>. |
LaTeX math tutorial</a>. |
Line 397 QUICKSTART
|
Line 689 QUICKSTART
|
renders |
renders |
<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>, whereas |
alt="" border=0 style="Vertical-Align:-2px"></a>, |
"<b>\small a+{\Large b+}c</b>" renders |
whereas "<b>\small a+{\Large b+}c</b>" |
|
renders |
<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 |
<!-- <li> At smaller font sizes, try preceding your expression with |
<b>\light</b> which adjusts mimeTeX's anti-aliasing |
<b>\light</b> 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 432 QUICKSTART
|
Line 725 QUICKSTART
|
By default, mimeTeX renders limits textstyle |
By default, mimeTeX renders limits textstyle |
<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 |
at sizes <b>\normalsize</b> and smaller, |
style="Vertical-Align:-5px"></a> |
|
at sizes <b>\normalsize</b> and smaller, |
and renders them displaystyle |
and renders them displaystyle |
<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 |
at sizes <b>\large</b> and larger. |
style="Vertical-Align:-15px"></a> |
|
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 480 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> |
already in the box. </p> |
if you submit the sample expression already in the box. </p> |
|
|
<p> And the <img> tag to embed this same integral anywhere |
<p> And the <img> tag to embed this same integral anywhere |
in your own document is </p> |
in your own document is </p> |
Line 563 EXAMPLES
|
Line 858 EXAMPLES
|
alt="" border=0 align=middle></a>     |
alt="" border=0 align=middle></a>     |
<a href="#preview"> |
<a href="#preview"> |
<img id="example1d" onclick="eqntext('example1d')" |
<img id="example1d" onclick="eqntext('example1d')" |
src="../cgi-bin/mimetex.cgi?\reverse\opaque\light |
src="../cgi-bin/mimetex.cgi?\reverse\opaque |
\LARGE e^x=\sum_{n=0}^\infty\frac{x^n}{n!}" |
\LARGE e^x=\sum_{n=0}^\infty\frac{x^n}{n!}" |
alt="" border=0 align=middle></a>     |
alt="" border=0 align=middle></a>     |
<a href="#preview"> |
<a href="#preview"> |
Line 840 using \longxxxarrow[] and \begin{array}
|
Line 1135 using \longxxxarrow[] and \begin{array}
|
available with mimeTeX. All symbols and sizes from cmr, cmmi, |
available with mimeTeX. All symbols and sizes from cmr, cmmi, |
cmmib (use <b>\mathbf{ }</b>), cmsy, cmex, bbold (use |
cmmib (use <b>\mathbf{ }</b>), cmsy, cmex, bbold (use |
<b>\mathbb{ }</b>), rsfs (use <b>\mathscr{ }</b>), |
<b>\mathbb{ }</b>), rsfs (use <b>\mathscr{ }</b>), |
and stmary should be available, but they're not all shown. |
stmary and cyrillic wncyr (use <b>{\cyr }</b> or |
|
<b>\cyr{ }</b>) should be available, but they're not all shown. |
And also not shown are various "constructed symbols" like \sqrt, |
And also not shown are various "constructed symbols" like \sqrt, |
accents, etc. The illustrated font sizes are numbered 4=\Large, |
accents, etc. The illustrated font sizes are numbered 4=\Large, |
3=\large and 2=\normalsize (not shown are 7=\Huge, 6=\huge, |
3=\large and 2=\normalsize (not shown are 7=\Huge, 6=\huge, |
Line 912 to the larger size in \displaystyle mode
|
Line 1208 to the larger size in \displaystyle mode
|
1$\rm~117-127:~&\sqcap&\sqsubseteq&\sqsupseteq&\S&\dag&\ddag&\P&\clubsuit& |
1$\rm~117-127:~&\sqcap&\sqsubseteq&\sqsupseteq&\S&\dag&\ddag&\P&\clubsuit& |
\Diamond&\Heart&\spadesuit}" alt="" border=0 align=middle> </p> |
\Diamond&\Heart&\spadesuit}" alt="" border=0 align=middle> </p> |
|
|
<h3>a few other cmmi, cmr, and stmary symbols at mimeTeX font size 4</h3> |
<h3>a few other cmmi, cmr, stmary and wncyr symbols |
|
at mimeTeX font size 4</h3> |
<p> <img src="../cgi-bin/mimetex.cgi?\array{4,r$ |
<p> <img src="../cgi-bin/mimetex.cgi?\array{4,r$ |
1$\rm~cmmi:~&\leftharpoonup&\leftharpoondo&\rightharpoonup&\rightharpoondo& |
1$\rm~cmmi:~&\leftharpoonup&\leftharpoondo&\rightharpoonup&\rightharpoondo& |
\triangleright&\triangleleft&\star&\partial& |
\triangleright&\triangleleft&\star&\partial& |
\flat&\natural&\sharp&\smile&\frown&\ell&\imath&\jmath&\wp&\vec\\ |
\flat&\natural&\sharp&\smile&\frown&\ell&\imath&\jmath&\wp&\vec\\ |
1$\rm~cmr:~&\ss&\ae&\oe&\AE&\OE \\ |
1$\rm~cmr:~&\ss&\ae&\oe&\AE&\OE \\ |
1$\rm~stmary:~&\moo&\Lbag&\Rbag&\lightning&\llbracket&\rrbracket& |
1$\rm~stmary:~&\moo&\Lbag&\Rbag&\lightning&\llbracket&\rrbracket& |
\subsetpluseq&\supsetpluseq&\Yup&\Ydown}" |
\subsetpluseq&\supsetpluseq&\Yup&\Ydown\\ |
|
1$\rm~wncyr:~&\cyr A&\cyr a&\cyr B&\cyr b&\cyr V&\cyr v&\cyr G&\cyr g& |
|
\cyr D&\cyr d&\cyr Dj&\cyr dj&\cyr\=E&\cyr\=e&\cyr Zh&\cyr zh}" |
alt="" border=0 align=middle> </p> |
alt="" border=0 align=middle> </p> |
|
|
|
|
Line 953 Indira Gandhi, the late Prime Minister o
|
Line 1252 Indira Gandhi, the late Prime Minister o
|
|
|
<p> To protect your own intellectual property, I recommend |
<p> To protect your own intellectual property, I recommend |
<a href="http://lcweb.loc.gov/copyright/circs/circ1.html" |
<a href="http://lcweb.loc.gov/copyright/circs/circ1.html" |
target="_top">Copyright Basics</a> from The Library of Congress, and |
target="_top">Copyright Basics</a> from The Library of Congress, |
similarly, <a href="http://www.abanet.org/intelprop/comm106/106copy.html" |
in particular <a href="http://www.copyright.gov/circs/circ61.html" |
target="_top">Copyright Basics</a> from The American Bar Association. |
target="_top">Circular 61</a>, Copyright Registration for |
|
Computer Programs. |
|
<!-- and similarly, |
|
<a href="http://www.abanet.org/intelprop/comm106/106copy.html" |
|
target="_top">Copyright Basics</a> from The American Bar Association. --> |
Very briefly, download |
Very briefly, download |
<a href="http://www.copyright.gov/forms/formtxi.pdf">Form TX</a> |
<a href="http://www.copyright.gov/forms/formtxi.pdf">Form TX</a> |
and follow the included instructions. |
and follow the included instructions. |
In principle, you automatically own the copyright |
In principle, you automatically own the copyright |
to anything you write the moment it's on paper. In practice, |
to anything you write the moment it's on paper. In practice, |
if the matter comes under dispute, the courts look _very_ favorably |
if the matter comes under dispute, the courts look _very_ favorably |
on you for demonstrating your intent by registering the copyright. </p> |
on you for demonstrating your intent by registering the copyright. |
|
For example, courts will stop unauthorized use of unregistered |
|
material, but monetary damages are awarded _only_ if you |
|
register the copyright before infringement occurs. </p> |
|
|
|
|
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
Line 975 SECTION II. BUILDING MIMETEX
|
Line 1280 SECTION II. BUILDING MIMETEX
|
<table border="0" cellpadding="0" cellspacing="0"> |
<table border="0" cellpadding="0" cellspacing="0"> |
<tr><td><center><hr size="2">Very quickly --- download |
<tr><td><center><hr size="2">Very quickly --- download |
<a href="http://www.forkosh.com/mimetex.zip"> |
<a href="http://www.forkosh.com/mimetex.zip"> |
<!-- jfa <a href="ftp://ftp.tex.ac.uk/tex-archive/support/mimetex/mimetex.zip"> --> |
<!-- jfa <a href="ftp://ftp.tex.ac.uk/tex-archive/support/mimetex/mimetex.zip"></a> --> |
mimetex.zip</a> and then type |
mimetex.zip</a> and then type |
<table border="0" cellpadding="0" cellspacing="0"> |
<table border="0" cellpadding="0" cellspacing="0"> |
<tr align="left"> |
<tr align="left"> |
Line 1003 SECTION II. BUILDING MIMETEX
|
Line 1308 SECTION II. BUILDING MIMETEX
|
<ul> |
<ul> |
<li> Download and unzip |
<li> Download and unzip |
<a href="http://www.forkosh.com/mimetex.zip"> |
<a href="http://www.forkosh.com/mimetex.zip"> |
<!-- jfa <a href="ftp://ftp.tex.ac.uk/tex-archive/support/mimetex/mimetex.zip"> --> |
<!-- jfa <a href="ftp://ftp.tex.ac.uk/tex-archive/support/mimetex/mimetex.zip"></a> --> |
mimetex.zip</a> in any convenient working directory. |
mimetex.zip</a> in any convenient working directory. |
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 1137 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 |
which should display |
<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> in the upper-left corner of your window, |
style="Vertical-Align:-3px"> |
|
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> |
|
|
<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 <img src="../cgi-bin/mimetex.cgi? |
If you see the same <img src="../cgi-bin/mimetex.cgi? |
\normalsize x^2+y^2" alt="" border=0 align=middle> image |
\normalsize x^2+y^2" alt="" border=0 style="Vertical-Align:-3px"> |
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 1230 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> |
When caching a new image, mimeTeX also |
If you're also using mimeTeX's |
|
<a href="#valignment">Vertical-Align:</a> feature, prefix your |
|
<b><i>path</i>/</b> with a leading <b>%</b> and write |
|
<b>-DCACHEPATH=\"%<i>path</i>/\"</b> |
|
instead. That leading <b>%</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> |
|
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 1262 Ascii dump of bitmap image...
|
Line 1577 Ascii dump of bitmap image...
|
<b>\textstyle</b>, <b>\displaystyle</b>, <b>\limits</b> or |
<b>\textstyle</b>, <b>\displaystyle</b>, <b>\limits</b> or |
<b>\nolimits</b> directives in an expression always override |
<b>\nolimits</b> directives in an expression always override |
the <b>DISPLAYSIZE</b> default. </dd> |
the <b>DISPLAYSIZE</b> default. </dd> |
|
<dt><b>-DGAMMA=<i>gammacorrection</i></b> </dt> |
|
<dd> Applies <b><i>gammacorrection</i></b> to antialiased |
|
gif images. Default is 1.25 (rather than the standard 2.2). |
|
Specify 0.0 to turn off gamma correction (1.0 makes no |
|
gamma correction but doesn't actually turn it off). </dd> |
<dt><b>-DNEWCOMMANDS=\"<i>newcommands.h</i>\"</b> </dt> |
<dt><b>-DNEWCOMMANDS=\"<i>newcommands.h</i>\"</b> </dt> |
<dd> LaTeX-like <b>\newcommand</b>'s are available in mimeTeX, |
<dd> LaTeX-like <b>\newcommand</b>'s are available in mimeTeX, |
via the following facility to help you define your |
via the following facility to help you define your |
Line 1313 Ascii dump of bitmap image...
|
Line 1633 Ascii dump of bitmap image...
|
<br> To see many additional examples, search for the |
<br> To see many additional examples, search for the |
uppercase string NEWCOMMANDS in mimetex.c, and look below that. |
uppercase string NEWCOMMANDS in mimetex.c, and look below that. |
All the above examples are already there. </dd> |
All the above examples are already there. </dd> |
|
<dt> <b>-DOPAQUE</b> </dt> |
|
<dd> By default, mimeTeX renders gif images with black symbols |
|
on a transparent white background. Defining OPAQUE renders |
|
images on an opaque background instead. </dd> |
<dt> <b>-DPATHPREFIX=\"<i>path/</i>\"</b> </dt> |
<dt> <b>-DPATHPREFIX=\"<i>path/</i>\"</b> </dt> |
<dd> The <a href="#input">\input{ }</a> and |
<dd> The <a href="#input">\input{ }</a> and |
<a href="#counter">\counter{ }</a> commands discussed below |
<a href="#counter">\counter{ }</a> commands discussed below |
Line 1324 Ascii dump of bitmap image...
|
Line 1648 Ascii dump of bitmap image...
|
defined as <i>path</i><b>/</b> if you want input files in some |
defined as <i>path</i><b>/</b> if you want input files in some |
other directory. And make sure your <i>path</i><b>/</b> ends |
other directory. And make sure your <i>path</i><b>/</b> ends |
with <b>/</b> (or with <b>\</b> for Windows). </dd> |
with <b>/</b> (or with <b>\</b> for Windows). </dd> |
<dt> <b>-DREFERER=\"<i>domain</i>\" or <br> |
<dt> <b>-DPLUSBLANK <i>-or-</i><br> |
|
-DPLUSNOTBLANK</b> </dt> |
|
<dd> mimeTeX receives your LaTeX math expression as a url |
|
query string, in which blank spaces are often encoded |
|
as <b>%20</b> or as plus signs <b>+</b>, and |
|
where actual plus signs are often encoded as <b>%2B</b>. |
|
But these conventions aren't always respected, |
|
and even when they are blank spaces may be either |
|
<b>%20</b> or <b>+</b>. The only ambiguity for |
|
mimeTeX is whether or not to translate plus signs <b>+</b> |
|
back to blank spaces. <br> |
|
If you know how your applications behave, |
|
then define PLUSBLANK to always translate plus signs <b>+</b> |
|
to blank spaces, or define PLUSNOTBLANK to never translate. <br> |
|
Otherwise, if you define neither, |
|
mimeTeX applies some common-sense rules to decide whether or |
|
not to translate. These usually work, but can't be guaranteed. |
|
If your query string contains actual blank spaces or |
|
blanks encoded as <b>%20</b>, then plus signs <b>+</b> |
|
aren't translated. Otherwise, if your query string |
|
contains <b>%2B</b>, then plus signs <b>+</b> are |
|
translated. If neither <b>%20</b> nor <b>%2B</b>, or both |
|
<b>%20</b> and <b>%2B</b>, occur in your query string, |
|
then the situation is ambiguous. In this case, if mimeTeX |
|
finds two or more plus signs <b>++</b> with no intervening |
|
space, then they're translated; otherwise they're not. </dd> |
|
<dt> <b>-DREFERER=\"<i>domain</i>\" <i>-or-</i><br> |
-DREFERER=\"<i>domain1,domain2,etc</i>\"</b> </dt> |
-DREFERER=\"<i>domain1,domain2,etc</i>\"</b> </dt> |
<dd> Blocks mimeTeX requests from unauthorized domains that |
<dd> Blocks mimeTeX requests from unauthorized domains that |
are using your mimetex.cgi (hence your server's resources) |
are using your mimetex.cgi (hence your server's resources) |
Line 1355 Ascii dump of bitmap image...
|
Line 1705 Ascii dump of bitmap image...
|
could conceivably flood your file system by submitting |
could conceivably flood your file system by submitting |
zillions of <b>\counter{<i>filename</i>}</b> commands |
zillions of <b>\counter{<i>filename</i>}</b> commands |
to mimeTeX, each with a different <b><i>filename</i></b>. </dd> |
to mimeTeX, each with a different <b><i>filename</i></b>. </dd> |
<dt><b>-DSMASHMARGIN=<i>n</i> or <br> |
<dt><b>-DSMASHMARGIN=<i>n</i> <i>-or-</i><br> |
-DNOSMASH</b> </dt> |
-DNOSMASH</b> </dt> |
<dd> TeX typically renders an expression like |
<dd> TeX typically renders an expression like |
<b>\frac12\int_{a+b+c}^{d+e+f}g(x)dx</b> as <a href="#preview"> |
<b>\frac12\int_{a+b+c}^{d+e+f}g(x)dx</b> as <a href="#preview"> |
Line 1373 Ascii dump of bitmap image...
|
Line 1723 Ascii dump of bitmap image...
|
number of pixels between smashed symbols (default is 3), |
number of pixels between smashed symbols (default is 3), |
compile with <b>-DSMASHMARGIN=<i>n</i></b>. |
compile with <b>-DSMASHMARGIN=<i>n</i></b>. |
See <a href="#smash">Smash</a> for further discussion. </dd> |
See <a href="#smash">Smash</a> for further discussion. </dd> |
<dt> <b>-DWARNINGS=<i>n</i> or <br> |
<dt> <b>-DWARNINGS=<i>n</i> <i>-or-</i> <br> |
-DNOWARNINGS</b> </dt> |
-DNOWARNINGS</b> </dt> |
<dd> If an expression submitted to mimeTeX contains an |
<dd> If an expression submitted to mimeTeX contains an |
unrecognzied escape sequence, e.g., "y=x+\abc+1", then |
unrecognzied escape sequence, e.g., "y=x+\abc+1", then |
Line 1387 Ascii dump of bitmap image...
|
Line 1737 Ascii dump of bitmap image...
|
<dt> <b>-DWHITE</b> </dt> |
<dt> <b>-DWHITE</b> </dt> |
<dd> MimeTeX usually renders black symbols on a white |
<dd> MimeTeX usually renders black symbols on a white |
background. This option renders white symbols on |
background. This option renders white symbols on |
a black background instead. </dd> |
a transparent black background instead (or on an opaque |
|
black background when combined with <b>-DOPAQUE</b> ). </dd> |
</dl> |
</dl> |
|
|
|
|
Line 1403 Ascii dump of bitmap image...
|
Line 1754 Ascii dump of bitmap image...
|
possibly useful functionality from the command line. In particular, |
possibly useful functionality from the command line. In particular, |
you can store a gif (or xbitmap) image of any expression to a file. |
you can store a gif (or xbitmap) image of any expression to a file. |
No syntax checking is applied to command-line arguments, so enter |
No syntax checking is applied to command-line arguments, so enter |
them carefully. </p> |
them carefully. (Likewise, plus signs <b>+</b> are never |
|
translated to blank spaces, nor is any other <b>%xx</b> url decoding |
|
performed on command-line arguments.) </p> |
|
|
<p> The complete command-line syntax for mimeTeX is </p> |
<p> The complete command-line syntax for mimeTeX is </p> |
<pre> |
<pre> |
Line 1468 Ascii dump of bitmap image...
|
Line 1821 Ascii dump of bitmap image...
|
display utility, |
display utility, |
./mimetex -o -d "x^2+y^2" | display & |
./mimetex -o -d "x^2+y^2" | display & |
opens a small window containing the rendered expression. |
opens a small window containing the rendered expression. |
|
(Note: if you already compiled mimeTeX with -DOPAQUE |
|
then -o renders images on a transparent background.) |
|
|
-s fontsize 0-7, font size. Font size can also be specified |
-s fontsize 0-7, font size. Font size can also be specified |
within the expression by a directive, e.g., \Large f(x)=x^2 |
within the expression by a directive, e.g., \Large f(x)=x^2 |
Line 1555 SECTION III. SYNTAX REFERENCE
|
Line 1910 SECTION III. SYNTAX REFERENCE
|
As usual, you must explicitly write one of the recognized math |
As usual, you must explicitly write one of the recognized math |
spaces to put extra visible space in your rendered expressions. </p> |
spaces to put extra visible space in your rendered expressions. </p> |
|
|
<p> MimeTeX recognizes math spaces <b>\, \: \;</b> as well as |
<p> MimeTeX recognizes math spaces <b>\/ \, \: \;</b> |
<b>\/</b> and <b>\quad</b> and <b>\qquad</b> . You may also |
as well as <b>\quad</b> and <b>\qquad</b> , |
write <b>\hspace{10}</b> to insert a 10-pixel (or any other number) |
and also a backslashed blank |
space, scaled by any preceding <a href="#unitlength">\unitlength</a>, |
<img src="../cgi-bin/mimetex.cgi?1$\backsl\raise{-5}{\rotate{-90}]}" |
as illustrated just above. There are no negative spaces. </p> |
alt="" border=0 align=middle> |
|
(i.e., a <b>\</b> followed by a blank). |
|
For example, |
|
<b>(a\/b\,c\:d\;e\ f\quad g\qquad h)</b> |
|
  renders |
|
<a href="#preview"><img id="spacing2" onclick="eqntext('spacing2')" |
|
src="../cgi-bin/mimetex.cgi?(a\/b\,c\:d\;e\ f\quad g\qquad h)" |
|
alt="" border=0 align="middle"></a>. |
|
In mimeTeX, you may also write <b>\hspace{10}</b> |
|
to insert a 10-pixel (or any other number) space, scaled by any |
|
preceding <a href="#unitlength">\unitlength</a>, as illustrated |
|
just above. </p> |
|
|
|
<p> For negative spaces, <b>\!</b> produces a small (two |
|
pixel) negative space, e.g., <b>a=b</b> renders |
|
<img src="../cgi-bin/mimetex.cgi?a=b"alt="" border=0 align="bottom"> |
|
whereas <b>a\!=b</b> renders |
|
<img src="../cgi-bin/mimetex.cgi?a\!=b"alt="" border=0 align="bottom"> |
|
and <b>a\!\!=b</b> renders |
|
<img src="../cgi-bin/mimetex.cgi?a\!\!=b"alt="" border=0 align="bottom">. |
|
For large negative space, <b>\hspace{-10}</b> permits |
|
a negative argument. But it stops at the first pixel to its left |
|
rather than "erasing" pixels. If you don't want to stop, use |
|
<b>\hspace*{-10}</b> instead. For example, |
|
<b>ABC\hspace*{-20}-DEF</b> renders |
|
<img src="../cgi-bin/mimetex.cgi?ABC\hspace*{-20}-DEF" |
|
alt="" border=0 align="bottom">, erasing all of the <b>C</b> |
|
and the right half of the <b>B</b>. </p> |
|
|
|
<!-- |
<p> Although some browsers occasionally misinterpret typed blank spaces |
<p> Although some browsers occasionally misinterpret typed blank spaces |
inside html query_string's, mimeTeX also recognizes escaped blanks |
inside html query_string's, mimeTeX also recognizes escaped blanks |
<img src="../cgi-bin/mimetex.cgi?\small\backsl\raise{-5}{\rotate{-90}]}" |
<img src="../cgi-bin/mimetex.cgi?\small\backsl\raise{-5}{\rotate{-90}]}" |
alt="" border=0 align=middle> (a <b>\</b> followed by a blank) as math |
alt="" border=0 align=middle> (a <b>\</b> followed by a blank) as math |
spaces, just in case you can safely use them. </p> |
spaces, just in case you can safely use them. </p> |
|
--> |
|
|
<p> MimeTeX also supports <b>\hfill{<i>textwidth</i>}</b>, where |
<p> MimeTeX also supports <b>\hfill{<i>textwidth</i>}</b>, where |
<b><i>textwidth</i></b> is roughly equivalent to LaTeX's |
<b><i>textwidth</i></b> is roughly equivalent to LaTeX's |
Line 1574 SECTION III. SYNTAX REFERENCE
|
Line 1958 SECTION III. SYNTAX REFERENCE
|
expression will span. However, if <b>\hfill{ }</b> appears |
expression will span. However, if <b>\hfill{ }</b> appears |
within a <b>{ }</b>-enclosed subexpression, then it applies |
within a <b>{ }</b>-enclosed subexpression, then it applies |
only to that subexpression. For example, </p> <center> |
only to that subexpression. For example, </p> <center> |
<b>{abc \hfill{50} def} \hfill{100} ghi</b> |
<b>{abc \hfill{75} def} \hfill{150} ghi</b> |
produces |
produces |
<a href="#preview"><img id="mathspace1" onclick="eqntext('mathspace1')" |
<a href="#preview"><img id="mathspace1" onclick="eqntext('mathspace1')" |
src="../cgi-bin/mimetex.cgi?\large{abc\hfill{50}def}\hfill{100}ghi" |
src="../cgi-bin/mimetex.cgi?\large{abc\hfill{75}def}\hfill{150}ghi" |
alt="" border=0 align=middle></a> </center> <p class="continue"> |
alt="" border=0 align=middle></a> </center> <p class="continue"> |
The first/inner <b>\hfill{50}</b> inserts exactly enough whitespace so |
The first/inner <b>\hfill{75}</b> inserts exactly enough whitespace so |
that subexpression "<b><i>abc def</i></b>" spans 50 pixels. |
that subexpression "<b><i>abc def</i></b>" spans 75 pixels. |
Then the second/outer <b>\hfill{100}</b> inserts exactly enough |
Then the second/outer <b>\hfill{150}</b> inserts exactly enough |
whitespace so that the entire expression spans 100 pixels. |
whitespace so that the entire expression spans 150 pixels. |
Without explicit <b>{ }</b>-nesting, mimeTeX evaluates expressions |
Without explicit <b>{ }</b>-nesting, mimeTeX evaluates expressions |
left-to-right (sinistrally), e.g., <b>...\hfill{100}...\hfill{50}...</b> |
left-to-right (sinistrally), e.g., <b>...\hfill{150}...\hfill{75}...</b> |
is exactly equivalent to <b>...\hfill{100}{...\hfill{50}...}</b>. |
is exactly equivalent to <b>...\hfill{150}{...\hfill{75}...}</b>. |
Notice that, this time, the second/right <b><i>textwidth</i></b> |
Notice that, this time, the second/right <b><i>textwidth</i></b> |
argument is necessarily smaller than the first/left. </p> |
argument is necessarily smaller than the first/left. </p> |
|
|
Line 1675 and some other characters<font size=5>..
|
Line 2059 and some other characters<font size=5>..
|
defined by the mimeTeX preprocessor, function <b>mimeprep( )</b> |
defined by the mimeTeX preprocessor, function <b>mimeprep( )</b> |
in <b>mimetex.c</b> Generally speaking, I've tried to |
in <b>mimetex.c</b> Generally speaking, I've tried to |
encode the cmr10, cmmi10, cmmib10, cmsy10, cmex10, bbold10, rsfs10, |
encode the cmr10, cmmi10, cmmib10, cmsy10, cmex10, bbold10, rsfs10, |
and stmary10 families with "names", e.g., <b>\alpha \beta |
stmary10 and wncyr10 families with "names", e.g., <b>\alpha \beta |
\forall \sqcup</b>, etc, identical to your LaTeX expectations. |
\forall \sqcup</b>, etc, identical to your LaTeX expectations. |
For example, the calligraphic symbols in cmsy10 are accessed by |
For example, the calligraphic symbols in cmsy10 are accessed by |
writing <b>\mathcal{A} \mathcal{B} \mathcal{XYZ}</b>. Similarly, |
writing <b>\mathcal{A} \mathcal{B} \mathcal{XYZ}</b>. Similarly, |
write <b>\mathbf{A}</b> for the cmmib fonts, write <b>\mathscr{A}</b> |
write <b>\mathbf{A}</b> for the cmmib fonts, write <b>\mathscr{A}</b> |
for rsfs10, and write <b>\mathbb{R}</b> for bbold10. |
for rsfs10, write <b>\mathbb{R}</b> for bbold10, and write |
And see stmaryrd.dvi or stmaryrd.sty, supplied with most LaTeX |
<b>{\cyr Khrushchev}</b> or <b>\cyr{Khrushchev}</b> to see |
distributions, for the names of the stmary10 symbols. </p> |
<a href="#preview"><img id="cyrillic1" onclick="eqntext('cyrillic1')" |
|
src="../cgi-bin/mimetex.cgi?\large\cyr Khrushchev" |
|
alt="" border=0 align=middle></a>. |
|
Most LaTeX distributions supply stmaryrd.dvi and stmaryrd.sty |
|
that both document the names of the stmary10 symbols. |
|
Similarly, amsfndoc.dvi documents the names of the wncyr10 |
|
cyrillic symbols and ligatures. </p> |
<!-- But there are various additions and omissions and exceptions |
<!-- But there are various additions and omissions and exceptions |
vis-a-vis LaTeX. For example, </p> |
vis-a-vis LaTeX. For example, </p> |
<ul> |
<ul> |
Line 1706 and some other characters<font size=5>..
|
Line 2096 and some other characters<font size=5>..
|
<b>&quot;</b>, <b>&amp;</b>, etc. Some web tools apparently |
<b>&quot;</b>, <b>&amp;</b>, etc. Some web tools apparently |
translate characters like, e.g., <b>></b> to <b>&gt;</b>, |
translate characters like, e.g., <b>></b> to <b>&gt;</b>, |
even inside quoted query_string's, so mimeTeX's preprocessor |
even inside quoted query_string's, so mimeTeX's preprocessor |
translates them back to LaTeX symbols for you. </p> |
translates them back to LaTeX symbols for you. Moreover, html |
|
misinterprets quotes <b>"</b> inside a quoted |
|
query string as the end of the query string. So, for example, |
|
the cyrillic ligature <b>\"E</b> has to be written in the |
|
even more cumbersome form <b>\&quot;E</b> inside a query |
|
string. </p> |
|
|
<h3> <a name="sizes">Font Sizes<font size=5>...</font></a> </h3> |
<h3> <a name="sizes">Font Sizes<font size=5>...</font></a> </h3> |
|
|
Line 1953 and some other characters<font size=5>..
|
Line 2348 and some other characters<font size=5>..
|
<b>anything at all</b> in italic (font family cmmi10). |
<b>anything at all</b> in italic (font family cmmi10). |
All four forms respect spaces between words, except that the |
All four forms respect spaces between words, except that the |
first/required space after <b>{\rm etc}</b> and |
first/required space after <b>{\rm etc}</b> and |
<b>{\it etc}</b> is still ignored. For example, </p> <center> |
<b>{\it etc}</b> is still ignored. <!-- Math <b>$...$</b> |
|
subexpressions inside <b>\mbox{ }</b> or <b>\text{ }</b> |
|
are treated in the usual way. --> For example, </p> <center> |
<b>anything at all</b> just produces |
<b>anything at all</b> just produces |
<a href="#preview"><img id="textboxes1" onclick="eqntext('textboxes1')" |
<a href="#preview"><img id="textboxes1" onclick="eqntext('textboxes1')" |
src="../cgi-bin/mimetex.cgi?\normalsize anything at all" |
src="../cgi-bin/mimetex.cgi?\normalsize anything at all" |
Line 1967 and some other characters<font size=5>..
|
Line 2364 and some other characters<font size=5>..
|
src="../cgi-bin/mimetex.cgi?\normalsize\textit{anything at all}" |
src="../cgi-bin/mimetex.cgi?\normalsize\textit{anything at all}" |
alt="" border=0 align=middle></a> instead. </center> |
alt="" border=0 align=middle></a> instead. </center> |
|
|
|
<p> You don't usually surround mimeTeX expressions with <b>$</b>'s, |
|
but that works in the usual way for <b>\text{ }</b> and |
|
<b>\mbox{ }</b>, rendering the <b>$...$</b>-enclosed |
|
subexpression in mathmode. For example, </p> <center> |
|
<b>n=\left\{m/2\text{ if $m$ even} |
|
\\(m+1)/2\text{ if $m$ odd}\right.</b> |
|
produces |
|
<a href="#preview"><img id="textboxes9" onclick="eqntext('textboxes9')" |
|
src="../cgi-bin/mimetex.cgi? |
|
n=\left\{m/2\text{ if $m$ even}\\(m+1)/2\text{ if $m$ odd}\right." |
|
alt="" border=0 align=middle></a> </center> |
|
|
|
|
<h2> <a name="delimiters"> (IIIc) Delimiters </a> </h2> |
<h2> <a name="delimiters"> (IIIc) Delimiters </a> </h2> |
|
|
Line 2165 and some other characters<font size=5>..
|
Line 2574 and some other characters<font size=5>..
|
<b>[ ]</b> and <b>\{ \}</b>, limits are default-rendered |
<b>[ ]</b> and <b>\{ \}</b>, limits are default-rendered |
\displaystyle, which is why <b>\right|\nolimits_a^b</b> was required. --> |
\displaystyle, which is why <b>\right|\nolimits_a^b</b> was required. --> |
You can also write <b>\left\sum</b>, <b>\left\prod</b>, |
You can also write <b>\left\sum</b>, <b>\left\prod</b>, |
<b>\left\cup</b>, etc, for many of the symbols in CMEX10. |
<b>\left\cup</b>, etc, for many of the symbols in CMEX10 and STMARY10. |
And any symbol that works with <b>\left</b> will also work |
And any symbol that works with <b>\left</b> will also work |
with <b>\right</b> . <!-- But mimeTeX abbreviations like |
with <b>\right</b> . <!-- But mimeTeX abbreviations like |
<b>\(...\)</b> for <b>\left(...\right)</b> |
<b>\(...\)</b> for <b>\left(...\right)</b> |
Line 2291 Raise and rotate, Compose, Abb
|
Line 2700 Raise and rotate, Compose, Abb
|
displays super/subscripts in the usual way. </p> |
displays super/subscripts in the usual way. </p> |
|
|
<h3> <a name="raiserotate">\raisebox{ }{ } and |
<h3> <a name="raiserotate">\raisebox{ }{ } and |
\rotatebox{ }{ }<font size=5>...</font></a> </h3> |
\rotatebox{ }{ } and \reflectbox[ ]{ } |
|
<font size=5>...</font></a> </h3> |
|
|
<p> The <b>\raisebox{<i>height</i>}{<i>expression</i>}</b> |
<p> The <b>\raisebox{<i>height</i>}{<i>expression</i>}</b> |
and <b>\rotatebox{<i>angle</i>}{<i>expression</i>}</b> |
and <b>\rotatebox{<i>angle</i>}{<i>expression</i>}</b> |
commands help you fine-tune and manipulate mimeTeX renderings. |
and <b>\reflectbox[<i>axis</i>]{<i>expression</i>}</b> |
The <b><i>height</i></b> argument is number of pixels, scaled by |
commands help you fine-tune and manipulate mimeTeX renderings: </p> |
<a href="#unitlength">\unitlength</a>, and can be positive |
<ul> |
or negative. The <b><i>angle</i></b> argument is number of degrees, |
<li> <b>\raisebox</b>'s <b><i>height</i></b> argument is number |
and can also be positive (for clockwise) or negative, but must be a |
of pixels, scaled by <a href="#unitlength">\unitlength</a>, |
multiple of 90. Finally, the <b><i>expression</i></b> can be any |
and can be positive or negative. </li> |
valid LaTeX/mimeTeX expression. For example, mimeTeX's preprocessor |
<li> <b>\rotatebox</b>'s <b><i>angle</i></b> argument is number |
|
of degrees, and can also be positive (for clockwise) or |
|
negative, but must be a multiple of 90. </li> |
|
<li> <b>\reflectbox</b>'s optional <b><i>axis</i></b> argument |
|
defaults to 1 if not given, which reflects horizontally |
|
(the usual LaTeX behavior), or reflects vertically if |
|
specified as 2. </li> |
|
<li> For all three commands, the <b><i>expression</i></b> |
|
can be any valid LaTeX/mimeTeX expression. </li> |
|
</ul> |
|
<p> For example, mimeTeX's preprocessor |
defines the LaTeX <b>?`</b> symbol, an upside-down question |
defines the LaTeX <b>?`</b> symbol, an upside-down question |
mark, like </p> <center> |
mark, like </p> <center> |
<b>abc\raisebox{-2}{\rotatebox{180}?}def</b> produces |
<b>abc\raisebox{-2}{\rotatebox{180}?}def</b> produces |
Line 2309 Raise and rotate, Compose, Abb
|
Line 2729 Raise and rotate, Compose, Abb
|
src="../cgi-bin/mimetex.cgi? |
src="../cgi-bin/mimetex.cgi? |
\large\rm abc\raiseb{-2}{\rotateb{180}{\LARGE?}}def" |
\large\rm abc\raiseb{-2}{\rotateb{180}{\LARGE?}}def" |
alt="" border=0 align=middle></a> </center> |
alt="" border=0 align=middle></a> </center> |
|
<p> Using <b>\reflectbox[2]{ }</b> instead of |
|
<b>\rotatebox{180}{ }</b> would result in the slightly |
|
different </p> <center> |
|
<b>abc\raisebox{-2}{\reflectbox[2]?}def</b> produces |
|
<a href="#preview"><img id="raiserot2" onclick="eqntext('raiserot2')" |
|
src="../cgi-bin/mimetex.cgi? |
|
\large\rm abc\raiseb{-2}{\reflectb[2]{\LARGE?}}def" |
|
alt="" border=0 align=middle></a> </center> |
|
|
<h3> <a name="compose">\compose{ }{ }<font size=5>...</font></a></h3> |
<h3> <a name="compose">\compose{ }{ }<font size=5>...</font></a></h3> |
|
|
Line 2325 Raise and rotate, Compose, Abb
|
Line 2753 Raise and rotate, Compose, Abb
|
alt="" border=0 align=middle></a> </center> |
alt="" border=0 align=middle></a> </center> |
|
|
<p> Separately or in some judicious combination, <b>\compose</b> and |
<p> Separately or in some judicious combination, <b>\compose</b> and |
<b>\raisebox</b> and <b>\rotatebox</b> should help you construct |
<b>\raisebox</b> and <b>\rotatebox</b> and <b>\reflectbox</b> |
special symbols not "natively" available with mimeTeX's limited |
should help you construct special symbols not "natively" available |
set of built-in font families. This can be especially useful |
with mimeTeX's limited set of built-in font families. |
in conjunction with the <b>-DNEWCOMMANDS</b> compile-time |
This can be especially useful in conjunction with the |
|
<b>-DNEWCOMMANDS</b> compile-time |
<a href="#options">option</a> discussed above. </p> |
<a href="#options">option</a> discussed above. </p> |
|
|
|
<h3> <a name="rule">\rule{ }{ }<font size=5>...</font></a></h3> |
|
|
|
<p class="continue"> |
|
<b>\rule{<i>width</i>}{<i>height</i>}</b> behaves in the usual way, |
|
rendering a black rectangle <b><i>width</i></b> pixels wide and |
|
<b><i>height</i></b> pixels high, with its base on the established |
|
baseline. For example, </p> <center> |
|
<b>\frac12xyz\rule{10}{20}ghi</b> produces |
|
<a href="#preview"><img id="rule1" onclick="eqntext('rule1')" |
|
src="../cgi-bin/mimetex.cgi?\frac12xyz\rule{10}{20}ghi" |
|
alt="" border=0 align=middle></a> </center> |
|
|
|
<p> The mimeTeX version of <b>\rule</b> has an optional |
|
<b>[<i>lift</i>]</b> argument, so that its full form is |
|
<b>\rule[<i>lift</i>]{<i>width</i>}{<i>height</i>}</b>. |
|
<b><i>lift</i></b> moves the rule's baseline by the specified |
|
number of pixels, up if positive or down if negative. |
|
For example, </p> <center> |
|
<b>\frac12xyz\rule[5]{10}{20}ghi</b> produces |
|
<a href="#preview"><img id="rule2" onclick="eqntext('rule2')" |
|
src="../cgi-bin/mimetex.cgi?\frac12xyz\rule[5]{10}{20}ghi" |
|
alt="" border=0 align=middle></a> and <br> |
|
<b>\frac12xyz\rule[-15]{10}{20}ghi</b> produces |
|
<a href="#preview"><img id="rule3" onclick="eqntext('rule3')" |
|
src="../cgi-bin/mimetex.cgi?\frac12xyz\rule[-15]{10}{20}ghi" |
|
alt="" border=0 align=middle></a> </center> |
|
|
<h3> <a name="abbreviations">Abbreviations<font size=5>...</font></a> </h3> |
<h3> <a name="abbreviations">Abbreviations<font size=5>...</font></a> </h3> |
|
|
<p class="continue"> |
<p class="continue"> |
Line 2498 Raise and rotate, Compose, Abb
|
Line 2954 Raise and rotate, Compose, Abb
|
<tr> <td align="left"> <b>\begin{align}</b> </td> |
<tr> <td align="left"> <b>\begin{align}</b> </td> |
<td align="center"> <b>a&=b \\ c&=d \\ etc</b> </td> |
<td align="center"> <b>a&=b \\ c&=d \\ etc</b> </td> |
<td align="left"> <b>\end{align}</b> </td> </tr> |
<td align="left"> <b>\end{align}</b> </td> </tr> |
|
<tr> <td align="left"> <b>\begin{cases}</b> </td> |
|
<td align="center"> <b>a&b \\ c&d \\ etc</b> </td> |
|
<td align="left"> <b>\end{cases}</b> </td> </tr> |
<tr> <td align="left"> <b>\begin{gather}</b> </td> |
<tr> <td align="left"> <b>\begin{gather}</b> </td> |
<td align="center"> <b>a \\ b \\ etc</b> </td> |
<td align="center"> <b>a \\ b \\ etc</b> </td> |
<td align="left"> <b>\end{gather}</b> </td> </tr> |
<td align="left"> <b>\end{gather}</b> </td> </tr> |
Line 2756 Raise and rotate, Compose, Abb
|
Line 3215 Raise and rotate, Compose, Abb
|
in LaTeX, and won't be discussed further. Short discussions |
in LaTeX, and won't be discussed further. Short discussions |
of some other commands follow. </p> |
of some other commands follow. </p> |
|
|
<h3> <a name="stackrel">\stackrel{ }{ } and |
<h3> <a name="stackrel">\overset{ }{ } or |
\relstack{ }{ }<font size=5>...</font></a> </h3> |
\stackrel{ }{ } and |
|
\underset{ }{ } or \relstack{ }{ } |
|
<font size=5>...</font></a> </h3> |
|
|
<p class="continue"> |
<p class="continue"> |
<b>\stackrel{ }{ }</b> behaves as usual in LaTeX, |
<b>\stackrel{ }{ }</b> behaves as usual in LaTeX, |
rendering its first argument one font size smaller and centered above |
rendering its first argument one font size smaller and centered above |
its second. And the amsmath-style <b>\overset{ }{ }</b> is |
its second. And the amsmath-style <b>\overset{ }{ }</b> is |
identical. For example, </p> <center> |
identical. For example, </p> <center> |
<b>"\vec x\stackrel{\rm def}=(x_1\ldots x_n)"</b> |
<b>"\vec x\overset{\rm def}=(x_1\ldots x_n)"</b> |
produces |
produces |
<a href="#preview"><img id="stackrel1" onclick="eqntext('stackrel1')" |
<a href="#preview"><img id="stackrel1" onclick="eqntext('stackrel1')" |
src="../cgi-bin/mimetex.cgi? |
src="../cgi-bin/mimetex.cgi? |
\Large\vec x\,\stackrel{\small\rm def}= |
\Large\vec x\,\overset{\small\rm def}= |
\,(x_1\ldots x_n)" alt="" border=0 align=middle></a> </center> |
\,(x_1\ldots x_n)" alt="" border=0 align=middle></a> </center> |
|
|
<p> "Conversely" to <b>\stackrel{ }{ }</b>, mimeTeX provides |
<p> "Conversely" to <b>\stackrel{ }{ }</b>, mimeTeX provides |
Line 2778 Raise and rotate, Compose, Abb
|
Line 3239 Raise and rotate, Compose, Abb
|
first argument one font size smaller and centered below its second. |
first argument one font size smaller and centered below its second. |
For example, the <b>\log</b> function name doesn't treat |
For example, the <b>\log</b> function name doesn't treat |
limits like <b>\lim_</b>, but you can write, for example, </p> <center> |
limits like <b>\lim_</b>, but you can write, for example, </p> <center> |
<b>"\relstack{\log}{\rm base 2}32=5"</b> to render |
<b>"\underset{\rm base 2}\log32=5"</b> to render |
<a href="#preview"><img id="stackrel2" onclick="eqntext('stackrel2')" |
<a href="#preview"><img id="stackrel2" onclick="eqntext('stackrel2')" |
src="../cgi-bin/mimetex.cgi? |
src="../cgi-bin/mimetex.cgi? |
\Large\relstack\log{\small\rm base 2}32\,=\,5" |
\Large\underset{\small\rm base 2}\log32\,=\,5" |
alt="" border=0 align=middle></a> </center> |
alt="" border=0 align=middle></a> </center> |
|
|
<p> MimeTeX's <b>\limits</b> provides an easier but non-standard |
<p> MimeTeX's <b>\limits</b> provides an easier but non-standard |
Line 2930 Raise and rotate, Compose, Abb
|
Line 3391 Raise and 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 <<i>tag</i>>=99 192.168.1.1 <i>http_referer</i></b> |
<b>2008-09-07:12:59:33pm <<i>tag</i>>=99 192.168.1.1 <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 2987 SECTION IV. APPENDICES
|
Line 3448 SECTION IV. APPENDICES
|
bitmap information it needs to render one particular font |
bitmap information it needs to render one particular font |
family at one particular size. The file <b>texfonts.h</b> |
family at one particular size. The file <b>texfonts.h</b> |
supplied with your mimeTeX distribution collects the output |
supplied with your mimeTeX distribution collects the output |
from 56 such (sequences of) runs, representing seven font |
from 72 such (sequences of) runs, representing nine font |
families at eight sizes each. </p> |
families at eight sizes each. </p> |
|
|
<p> This collection of information in texfonts.h is |
<p> This collection of information in texfonts.h is |
Line 3034 SECTION IV. APPENDICES
|
Line 3495 SECTION IV. APPENDICES
|
Then pull all the output files into one big <b>texfonts.h</b> file |
Then pull all the output files into one big <b>texfonts.h</b> file |
(or write a small texfonts.h which just #include's them all). </p> |
(or write a small texfonts.h which just #include's them all). </p> |
|
|
<p> For your information, the 64 sequences of runs represented |
<p> For your information, the 72 sequences of runs represented |
in the texfonts.h file supplied with your mimeTeX distribution |
in the texfonts.h file supplied with your mimeTeX distribution |
correspond to the following eight inital metafont runs for cmr10 </p> |
correspond to the following eight inital metafont runs for cmr10 </p> |
<!-- |
<!-- |
Line 3053 SECTION IV. APPENDICES
|
Line 3514 SECTION IV. APPENDICES
|
6 (.210gf) mf '\mode=preview; mag=magstep(-13.804885); input cmr10' |
6 (.210gf) mf '\mode=preview; mag=magstep(-13.804885); input cmr10' |
7 (.250gf) mf '\mode=preview; mag=magstep(-12.848589); input cmr10'</pre> |
7 (.250gf) mf '\mode=preview; mag=magstep(-12.848589); input cmr10'</pre> |
<p class="continue"> |
<p class="continue"> |
Then ditto for the seven other font families cmmi10, cmmib10, cmsy10, |
Then ditto for the eight other font families cmmi10, cmmib10, cmsy10, |
cmex10, bbold10, rsfs10, stmary10. And to generate other |
cmex10, bbold10, rsfs10, stmary10 and wncyr10. And to generate other |
<b>.</b><i>dpi</i><b>gf</b> font sizes, calculate magsteps |
<b>.</b><i>dpi</i><b>gf</b> font sizes, calculate magsteps |
<img src="../cgi-bin/mimetex.cgi?\normalsize\frac{\log(dpi/2602)}{\log1.2}" |
<img src="../cgi-bin/mimetex.cgi?\normalsize\frac{\log(dpi/2602)}{\log1.2}" |
alt="" align=middle border=0>. All the subsequent gftype and |
alt="" align=middle border=0>. All the subsequent gftype and |
Line 3074 SECTION IV. APPENDICES
|
Line 3535 SECTION IV. APPENDICES
|
{ RSFS10,{ rsfs83, rsfs100, rsfs118, rsfs131, rsfs160, rsfs180, rsfs210, rsfs250}}, |
{ RSFS10,{ rsfs83, rsfs100, rsfs118, rsfs131, rsfs160, rsfs180, rsfs210, rsfs250}}, |
{ BBOLD10,{ bbold83, bbold100, bbold118, bbold131, bbold160, bbold180, bbold210, bbold250}}, |
{ BBOLD10,{ bbold83, bbold100, bbold118, bbold131, bbold160, bbold180, bbold210, bbold250}}, |
{STMARY10,{stmary83,stmary100,stmary118,stmary131,stmary160,stmary180,stmary210,stmary250}}, |
{STMARY10,{stmary83,stmary100,stmary118,stmary131,stmary160,stmary180,stmary210,stmary250}}, |
|
{ CYR10,{ wncyr83, wncyr100, wncyr118, wncyr131, wncyr160, wncyr180, wncyr210, wncyr250}}, |
{ -999,{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}} |
{ -999,{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}} |
} ; /* --- end-of-fonttable[] --- */</pre><p class="continue"> |
} ; /* --- end-of-fonttable[] --- */</pre><p class="continue"> |
Note the 64 names <b>cmr83...stmary250</b> in the table. These must |
Note the 72 names <b>cmr83...wncyr250</b> in the table. These must |
correspond to (or must be changed to) the names following the <b>-n</b> |
correspond to (or must be changed to) the names following the <b>-n</b> |
switch you specified for your gfuntype runs. </p> |
switch you specified for your gfuntype runs. </p> |
|
|
Line 3115 SECTION IV. APPENDICES
|
Line 3577 SECTION IV. APPENDICES
|
<p> Finally, the Unix/Linux bash shell script |
<p> Finally, the Unix/Linux bash shell script |
<a href="http://www.forkosh.com/texfonts.sh" |
<a href="http://www.forkosh.com/texfonts.sh" |
target="_top">texfonts.sh</a> generates file texfonts.h |
target="_top">texfonts.sh</a> generates file texfonts.h |
containing the information for all 64 mimeTeX fonts discussed above |
containing the information for all 72 mimeTeX fonts discussed above |
(and, optionally, an extra 1200dpi cmr font used to test mimeTeX's |
(and, optionally, an extra 1200dpi cmr font used to test mimeTeX's |
supersampling algorithm). You'll need to understand and edit this |
supersampling algorithm). You'll need to understand and edit this |
script to use it meaningfully. But it helps automate mimeTeX's font |
script to use it meaningfully. But it helps automate mimeTeX's font |
Line 3148 function </a> </h2>
|
Line 3610 function </a> </h2>
|
|
|
<p> Cut-and-paste the above sample code from this file to, say, |
<p> Cut-and-paste the above sample code from this file to, say, |
mimedemo.c (and fix the brackets around stdio.h). Then compile <br> |
mimedemo.c (and fix the brackets around stdio.h). Then compile <br> |
cc mimedemo.c mimetex.c -lm -o mimedemo <br> |
|
|
cc -DTEXFONTS mimedemo.c mimetex.c -lm -o mimedemo <br> |
and run it from your unix shell command line like <br> |
and run it from your unix shell command line like <br> |
./mimedemo "x^2+y^2" </p> |
./mimedemo "x^2+y^2" </p> |
|
|
Line 3203 function </a> </h2>
|
Line 3666 function </a> </h2>
|
}</pre> |
}</pre> |
|
|
<p> Cut-and-paste as before, compile like <br> |
<p> Cut-and-paste as before, compile like <br> |
cc mimedemo.c mimetex.c gifsave.c |
|
-lm -o mimedemo <br> |
cc -DTEXFONTS mimedemo.c mimetex.c gifsave.c -lm -o mimedemo <br> |
and run it like the first example, but this time you may want to redirect |
and run it like the first example, but this time you may want to redirect |
stdout <br> |
stdout <br> |
./mimedemo "x^2+y^2" |
./mimedemo "x^2+y^2" |
Line 3487 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>©</font> 2002-2005, |
<nobr>Copyright <font size=5>©</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@forkosh.com">john@forkosh.com</a> |
email: <a href="mailto:john@forkosh.com">john@forkosh.com</a> |