login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for LaTeX revision 1 of 3

1 2 3
Editor: page
Time: 2007/09/12 02:21:27 GMT-7
Note:

changed:
-
LaTeX ... is the world standard for writing technical documents.  Authors in
science and engineering are probably already familiar with it (or should be).
If you've wrestled with and cursed at "equation editors", you will love LaTeX.

What is most relevant for this site is *math*.  Citations are also under
development (but this will be physics specific initially, for me), see my TODO.
The following is borrowed from Winston Chang's "Latex cheat
sheet":http://www.stdout.org/~winston/latex/.

Math mode:

  To use math mode in-line with text, surround the equation with \$, like
  this !$x^2$ to make: $ x^2 $, or !\( x^2 \) or use !\begin{math} ...  \end{math}.  <br/>
  To make a block equation use !\begin{equation} ...  \end{equation} like this:

  \begin{equation}
    \int{x^2 + y_3}{dx}
  \end{equation}

  To make a block equation that is not numbered, surround the equation with \$\$, like
  this !$$x^2$$, or !\[...\] or use::

    !\begin{equation*}
    ...
    \end{equation*}

  like this:

  \begin{equation*}
    x^2
  \end{equation*}

Basic constructs:

\begin{tabular}{@{}l@{\hspace{1em}}l@{\hspace{2em}}l@{\hspace{1em}}l@{}}
\verb!^{x}!             &  Superscript$^{x}$ &
\verb!_{x}!             &  Subscript$_{x}$ \\
\verb!\frac{x}{y}!      &  $\frac{x}{y}$ &
\verb!\sum_{k=1}^n!     &  $\sum_{k=1}^n$ \\
\verb!\sqrt[n]{x}!      &  $\sqrt[n]{x}$ &  \\
\end{tabular}

Math-mode symbols (this is a subset):

\begin{tabular}{@{}l@{\hspace{1em}}l@{\hspace{2em}}l@{\hspace{1em}}l@{\hspace{2em}}l@{\hspace{1em}}l@{}}
$\leq$          &  \verb!\leq!  &
$\geq$          &  \verb!\geq!  &
$\neq$          &  \verb!\neq!  \\
$\cdot$         &  \verb!\cdot!  &
$\times$        &  \verb!\times!  &
$\div$          &  \verb!\div!  \\
$\ast$          &  \verb!\ast!  &
$\circ$         &  \verb!\circ!  &
$\cdots$        &  \verb!\cdots!  \\
$\alpha$        &  \verb!\alpha!  &
$\beta$         &  \verb!\beta!  &
$\gamma$        &  \verb!\gamma!  \\
$\delta$        &  \verb!\delta!  &
$\epsilon$      &  \verb!\epsilon!  &
$\varepsilon$   &  \verb!\varepsilon!  \\
$\zeta$         &  \verb!\zeta!  &
$\eta$          &  \verb!\eta!  &
$\theta$        &  \verb!\theta!  \\
$\vartheta$     &  \verb!\vartheta!  &
$\iota$         &  \verb!\iota!  &
$\kappa$        &  \verb!\kappa!  \\
$\lambda$       &  \verb!\lambda!  &
$\mu$           &  \verb!\mu!  &
$\nu$           &  \verb!\nu!  \\
$\xi$           &  \verb!\xi!  &
$\pi$           &  \verb!\pi!  &
$\rho$          &  \verb!\rho!  \\
$\sigma$        &  \verb!\sigma!  &
$\tau$          &  \verb!\tau!  &
$\upsilon$      &  \verb!\upsilon!  \\
$\phi$          &  \verb!\phi!  &
$\chi$          &  \verb!\chi!  &
$\psi$          &  \verb!\psi!  \\
$\omega$        &  \verb!\omega!  &
$\Gamma$        &  \verb!\Gamma!  &
$\Delta$        &  \verb!\Delta!  \\
$\Theta$        &  \verb!\Theta!  &
$\Lambda$       &  \verb!\Lambda!  &
$\Xi$           &  \verb!\Xi!  \\
$\Pi$           &  \verb!\Pi!  &
$\Sigma$        &  \verb!\Sigma!  &
$\Upsilon$      &  \verb!\Upsilon!  \\
$\Phi$          &  \verb!\Phi!  &
$\Psi$          &  \verb!\Psi!  &
$\Omega$        &  \verb!\Omega!  \\
\end{tabular}

Any other LaTeX environments work as well including array, tabular (the above
is tabular), and will be presented in HTML as an un-numbered block.

jsMath

  http://www.math.union.edu/~dpvc/jsMath

jsMath might be a good alternative to graphics for the
display of LaTeX, Axiom and Reduce output on the MathAction
wiki.

See for example
"jsMathExperiment":http://page.axiom-developer.org/zope/mathaction/jsMathExperiment
which contains some output generated by Axiom.

This might also be a good alternative to use with a
stand-alone browser interface to Axiom.

The jsMath package provides a method of including mathematics
in HTML pages that works across multiple browsers for both
Windows and the Macintosh. It overcomes a number of the
shortcomings of the traditional method of using images to
represent mathematics: jsMath uses native fonts, so they
resize when you change the size of the text in your browser,
they print at the full resolution of your printer, and you don't
have to wait for dozens of images to be downloaded in order to
see the mathematics in a web page. There are also advantages
for web-page authors, as there is no need to preprocess your
web pages to generate any images, and the mathematics is
entered in TeX form, so it is easy to create and maintain your
web pages.

For example:

http://moodle.org/ Moodle (course management software) uses jsMath

http://webwork.math.rochester.edu/ WebWork (Twiki-based) uses jsMath


From MartinRubey Tue May 24 02:32:33 -0500 2005
From: Martin Rubey
Date: Tue, 24 May 2005 02:32:33 -0500
Subject: [LaTeX] 
Message-ID: <17042.55338.309811.971490@seam101.local>
In-Reply-To: <20050523133755-0500@page.axiom-developer.org>

It seems that jsMath doesn't work (i.e., display right) on Konqueror 3.1.4.

Martin

From unknown Tue May 24 12:55:06 -0500 2005
From: unknown
Date: Tue, 24 May 2005 12:55:06 -0500
Subject: Konqueror 3.3.1-4.8.FC3
Message-ID: <20050524125506-0500@page.axiom-developer.org>

On up-to-date Fedora Core 3 (x86-64) with the ttf math fonts
installed, Konqueror 3.3.1-4.3.FC3 displays the in-line
(&lt;span&gt;...&lt;/span&gt;) overlapped with the text. The display
of the axiom output in (&lt;div&gt;...&lt;div&gt;) is ok, but it is not
centered as it is with FireFox. Firefox 1.0.4 on both Windows
XP and linux displays this correctly. IE 6 sp2 on Windows XP
also works fine.

From BobMcElrath Tue May 24 13:56:21 -0500 2005
From: Bob McElrath
Date: Tue, 24 May 2005 13:56:21 -0500
Subject: jsMath
Message-ID: <20050524185625.GC6646@mcelrath.org>
In-Reply-To: <17042.55338.309811.971490@seam101.local>

This guy is way better at javascript and tex than me...

Couple comments on jsMath: http://www.math.union.edu/~dpvc/jsMath/

You are correct it doesn't work in Konqueror.

I gotta say I like this solution.  Putting the tex font metrics into the
javascript is very clever.  However he has the same problem I had in
identifying the font from javascript (i.e. you can't).  He looks at the
cmex10 font and checks if it is much taller than it is wide.  (This font
contains large parenthesis, for example)  Not 100% reliable, but
workable.  However using tex fonts one really needs to crank the font
size up so that the characters come out correctly.  For instance, $f(z)$
looks like $f(\approx)$ using their default font size.  Of course this
is easy to do on one's site.

Also since the rendering is done in javascript it is slow compared to
the native mozilla rendering speed.  I wonder if there is a way to get
it to render everything first, to prevent excessive reflows of the
document as it renders piece-by-piece.

The only drawback I can see other than speed is that it is not "true"
latex...for example he's got a \color extension, but no \usepackage...
or preamble of any kind.  So it's not appropriate for en masse
translation of an existing tex document.

But maybe very appropriate for a wiki...



From BobMcElrath Tue May 24 14:06:06 -0500 2005
From: Bob McElrath
Date: Tue, 24 May 2005 14:06:06 -0500
Subject: Konqueror 3.3.1-4.8.FC3
Message-ID: <20050524190605.GE6646@mcelrath.org>
In-Reply-To: <20050524125506-0500@page.axiom-developer.org>

With jsMath & Konqueror 3.3.2 (debian):

1. equations are not centered horizontally

2. certain characters are not appearing correctly (e.g. $x$ and the
    large left square bracket).  Both appear as a dot above the center
    line.

Other than that the output is almost correct.



From BillPage Tue May 24 21:27:27 -0500 2005
From: Bill Page
Date: Tue, 24 May 2005 21:27:27 -0500
Subject: Epiphany 1.4.4
Message-ID: <20050524212727-0500@page.axiom-developer.org>

Seems to work perfectly using Epiphany 1.4.4 on Fedora Core 3.

From BillPage Tue May 24 21:30:48 -0500 2005
From: Bill Page
Date: Tue, 24 May 2005 21:30:48 -0500
Subject: way to get it to render everything first
Message-ID: <20050524213048-0500@page.axiom-developer.org>

http://www.math.union.edu/~dpvc/jsMath/authors/welcome.html says to use:

&lt;disabled SCRIPT&gt; jsMath.ProcessBeforeShowing() &lt;disabled /SCRIPT&gt; 

which will prevent the page from being displayed until all
the mathematics has been processed. One reason to use this
is when the "flickering" involved in processing the mathematics
would be a distraction.

From unknown Tue Nov 29 06:12:59 -0600 2005
From: unknown
Date: Tue, 29 Nov 2005 06:12:59 -0600
Subject: 
Message-ID: <20051129061259-0600@page.axiom-developer.org>

\begin{axiom}
solve([x+y=a,x-y=b],[x,y])
\end{axiom}


From unknown Wed Jun 7 09:59:17 -0500 2006
From: unknown
Date: Wed, 07 Jun 2006 09:59:17 -0500
Subject: 
Message-ID: <20060607095917-0500@wiki.axiom-developer.org>

\begin{axiom}
5*7
\end{axiom}


LaTeX? ... is the world standard for writing technical documents. Authors in science and engineering are probably already familiar with it (or should be). If you've wrestled with and cursed at "equation editors", you will love LaTeX?.

What is most relevant for this site is math. Citations are also under development (but this will be physics specific initially, for me), see my TODO. The following is borrowed from Winston Chang's "Latex cheat sheet":http://www.stdout.org/~winston/latex/.

Math mode:

To use math mode in-line with text, surround the equation with $, like this !$x^2$ to make: $ x^2 $, or !( x^2 ) or use !begin{math} ... end{math}. <br/> To make a block equation use !begin{equation} ... end{equation} like this:

begin{equation}
int{x^2 + y_3}{dx}

end{equation}

To make a block equation that is not numbered, surround the equation with $$, like this !$$x^2$$, or [...] or use:

!\begin{equation*}
...
\end{equation*}

like this:

begin{equation*}
x^2

end{equation*}

Basic constructs:

begin{tabular}{@{}l@{hspace{1em}}l@{hspace{2em}}l@{hspace{1em}}l@{}} verb!^{x}! & Superscript$^{x}$ & verb!_{x}! & Subscript$_{x}$ \ verb!frac{x}{y}! & $frac{x}{y}$ & verb!sum_{k=1}^n! & $sum_{k=1}^n$ \ verb!sqrt[n]?{x}! & $sqrt[n]?{x}$ & \ end{tabular}

Math-mode symbols (this is a subset):

begin{tabular}{@{}l@{hspace{1em}}l@{hspace{2em}}l@{hspace{1em}}l@{hspace{2em}}l@{hspace{1em}}l@{}} $leq$ & verb!leq! & $geq$ & verb!geq! & $neq$ & verb!neq! \ $cdot$ & verb!cdot! & $times$ & verb!times! & $div$ & verb!div! \ $ast$ & verb!ast! & $circ$ & verb!circ! & $cdots$ & verb!cdots! \ $alpha$ & verb!alpha! & $beta$ & verb!beta! & $gamma$ & verb!gamma! \ $delta$ & verb!delta! & $epsilon$ & verb!epsilon! & $varepsilon$ & verb!varepsilon! \ $zeta$ & verb!zeta! & $eta$ & verb!eta! & $theta$ & verb!theta! \ $vartheta$ & verb!vartheta! & $iota$ & verb!iota! & $kappa$ & verb!kappa! \ $lambda$ & verb!lambda! & $mu$ & verb!mu! & $nu$ & verb!nu! \ $xi$ & verb!xi! & $pi$ & verb!pi! & $rho$ & verb!rho! \ $sigma$ & verb!sigma! & $tau$ & verb!tau! & $upsilon$ & verb!upsilon! \ $phi$ & verb!phi! & $chi$ & verb!chi! & $psi$ & verb!psi! \ $omega$ & verb!omega! & $Gamma$ & verb!Gamma! & $Delta$ & verb!Delta! \ $Theta$ & verb!Theta! & $Lambda$ & verb!Lambda! & $Xi$ & verb!Xi! \ $Pi$ & verb!Pi! & $Sigma$ & verb!Sigma! & $Upsilon$ & verb!Upsilon! \ $Phi$ & verb!Phi! & $Psi$ & verb!Psi! & $Omega$ & verb!Omega! \ end{tabular}

Any other LaTeX? environments work as well including array, tabular (the above is tabular), and will be presented in HTML as an un-numbered block.

jsMath

http://www.math.union.edu/~dpvc/jsMath

jsMath might be a good alternative to graphics for the display of LaTeX?, Axiom and Reduce output on the MathAction? wiki.

See for example "jsMathExperiment":http://page.axiom-developer.org/zope/mathaction/jsMathExperiment which contains some output generated by Axiom.

This might also be a good alternative to use with a stand-alone browser interface to Axiom.

The jsMath package provides a method of including mathematics in HTML pages that works across multiple browsers for both Windows and the Macintosh. It overcomes a number of the shortcomings of the traditional method of using images to represent mathematics: jsMath uses native fonts, so they resize when you change the size of the text in your browser, they print at the full resolution of your printer, and you don't have to wait for dozens of images to be downloaded in order to see the mathematics in a web page. There are also advantages for web-page authors, as there is no need to preprocess your web pages to generate any images, and the mathematics is entered in TeX? form, so it is easy to create and maintain your web pages.

For example:

http://moodle.org/ Moodle (course management software) uses jsMath

http://webwork.math.rochester.edu/ WebWork? (Twiki-based) uses jsMath

**[LaTeX]? ** --Martin Rubey, Tue, 24 May 2005 02:32:33 -0500 reply

It seems that jsMath doesn't work (i.e., display right) on Konqueror 3.1.4.

Martin

Konqueror 3.3.1-4.8.FC3 --unknown, Tue, 24 May 2005 12:55:06 -0500 reply

On up-to-date Fedora Core 3 (x86-64) with the ttf math fonts installed, Konqueror 3.3.1-4.3.FC3 displays the in-line (&lt;span&gt;...&lt;/span&gt;) overlapped with the text. The display of the axiom output in (&lt;div&gt;...&lt;div&gt;) is ok, but it is not centered as it is with FireFox?. Firefox 1.0.4 on both Windows XP and linux displays this correctly. IE 6 sp2 on Windows XP also works fine.

jsMath --Bob McElrath?, Tue, 24 May 2005 13:56:21 -0500 reply

This guy is way better at javascript and tex than me...

Couple comments on jsMath: http://www.math.union.edu/~dpvc/jsMath/

You are correct it doesn't work in Konqueror.

I gotta say I like this solution. Putting the tex font metrics into the javascript is very clever. However he has the same problem I had in identifying the font from javascript (i.e. you can't). He looks at the cmex10 font and checks if it is much taller than it is wide. (This font contains large parenthesis, for example) Not 100% reliable, but workable. However using tex fonts one really needs to crank the font size up so that the characters come out correctly. For instance, $f(z)$ looks like $f(approx)$ using their default font size. Of course this is easy to do on one's site.

Also since the rendering is done in javascript it is slow compared to the native mozilla rendering speed. I wonder if there is a way to get it to render everything first, to prevent excessive reflows of the document as it renders piece-by-piece.

The only drawback I can see other than speed is that it is not "true" latex...for example he's got a color extension, but no usepackage... or preamble of any kind. So it's not appropriate for en masse translation of an existing tex document.

But maybe very appropriate for a wiki...

Konqueror 3.3.1-4.8.FC3 --Bob McElrath?, Tue, 24 May 2005 14:06:06 -0500 reply

With jsMath & Konqueror 3.3.2 (debian):

  1. equations are not centered horizontally

  2. certain characters are not appearing correctly (e.g. $x$ and the

    large left square bracket). Both appear as a dot above the center line.

Other than that the output is almost correct.

Epiphany 1.4.4 --Bill Page, Tue, 24 May 2005 21:27:27 -0500 reply

Seems to work perfectly using Epiphany 1.4.4 on Fedora Core 3.

way to get it to render everything first --Bill Page, Tue, 24 May 2005 21:30:48 -0500 reply

http://www.math.union.edu/~dpvc/jsMath/authors/welcome.html says to use:

&lt;disabled SCRIPT&gt; jsMath.ProcessBeforeShowing?() &lt;disabled /SCRIPT&gt;

which will prevent the page from being displayed until all the mathematics has been processed. One reason to use this is when the "flickering" involved in processing the mathematics would be a distraction.

... --unknown, Tue, 29 Nov 2005 06:12:59 -0600 reply

begin{axiom} solve([x+y=a,x-y=b]?,[x,y]?) end{axiom}

... --unknown, Wed, 07 Jun 2006 09:59:17 -0500 reply

begin{axiom} 5*7 end{axiom}