Download TeXdown 0.2, and Markdown * TeXdown 0.1.2 * See source of this file
Markdown is a simple textual (i.e. human readable) markup that can be translated to html.
is a pre-filter for Markdown. It introduces two new
syntax elements:
display LaTeX code
This is also in math mode by default. To be precise it is in an
{align} block from amsmath, but a \begin as the
first command in the first line of the LaTeX block switches this off.
Inline math is enclosed in a pair of backticks and percent signs, whereas display math is signalled by a sequence of lines containing two percent signs preceded by at least five (!) spaces or a tab. (So you can escape a math block for both TeXdown and Markdown by preceding it with only four spaces.)
Ooh, that was complicated!
See what your source looks like: `%inline latex code%` for
inline code and
%% block
%% of
%% latex
%% commands
for display mode, where the %% signs are preceded by at least
five spaces or a tab.
texdownrc-dist to your home directory, rename into .texdownrc,
change settings according to your needs.
(The defaults should be reasonable -- you can safely skip this step.)TeXdown.pl, Markdown.pl where your shell can find them.TeXdown.pl TeXdown-Readme.text | Markdown.pl > TeXdown-Readme.htmllibgdFreeType2 or T1lib (optional, improves processing)libpng and libzkpathsea (you'll have it if you have latex)texinfo (for building the docs)Keep in mind that TeXdown actually breaks the ideas of Markdown.
If you really need much mathematics, write a LaTeX file and convert it
with LaTeX2html.
But if you just want to embed some equations in an email, for example, this might be what you have been looking for.
The idea of this syntax is that the source remains a valid Markdown document where the TeX code is simply taken as an arbitrary code block. So if you do not have TeXdown, you can still translate the text file to an HTML file but instead of a cool image, the tex code will be displayed.
See this file processed by Markdown alone.
"v1.0" will be the name of the first stable version. But v0.2 already works pretty good. (I.e. it will not crunch your files and should reliably output nice images unless you start to do dirty TeX tricks.)
decided to use latex and dvipng for image generation.
Estimated speedup: factor 10 to 100. Please test it! This page's translation took less than a second. It might even be fast enough for translation on-the-fly.
The real strength is of course simple inline
equations.
But to show off, here are some pretty examples from latexrender a very nice PHP interface to LaTeX.
The following code
%% \sum_{\substack{0<i<n \\ 1<j<m}} P(i,j) =
%% \sum_{i,j} Q(i,j)
creates

Entering the same command again yields:

{align} EnvironmentWow, a table:

If for whatever reasons you want to leave math mode, but cannot start with a "\begin", simply insert it as a comment:
%% %\begin
%% \setlength{\unitlength}{1mm}
%% \begin{picture}(60,40)
%% \put(30,20){\vector(1,0){30}}
%% \put(30,20){\vector(4,1){20}}
%% \put(30,20){\vector(3,1){25}}
%% \put(30,20){\vector(2,1){30}}
%% \put(30,20){\vector(1,2){10}}
%% \thicklines
%% \put(30,20){\vector(-4,1){30}}
%% \put(30,20){\vector(-1,4){5}}
%% \thinlines
%% \put(30,20){\vector(-1,-1){5}}
%% \put(30,20){\vector(-1,-4){5}}
%% \end{picture}
which yields:

If you do not like the auto-numbering:
%% \sum_{\substack{0<i<n \\ 1<j<m}} P(i,j) =
%% \sum_{i,j} Q(i,j)
%% \tag{**}
yields

And \notag produces

Short form: It's free. Long form: see below.
TeXdown.pl TeXdown-Readme.txt (this file or this file's source)texdownrc-distviewdownCopyright (c) 2005 Johannes Große jgrosse@physik.hu-berlin.de
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Hope you had fun reading the legal stuff.