HTML scrolling presentation for math classes, with syntax mildly inspired by Markdown
Press j, J, n, or Enter to see what comes next (j is best here) ...
You saw you press j, J, n, or Enter to see what comes next, but there are some differences in scrolling.
New paragraphs are entered just by leaving an empty line.
So this is a new paragraph. But this line is still in the second paragraph, even though we put a linebreak. Just not an empty line.
This is a new paragraph so there is some empty space. To simply break lines without any added space, put a backslash on a separate line:
a) this is good for faking short lists
b) or whatnot.
Note that a few special characters have some meaning when starting a line. But only if the first character on a line. So you can usually get around them having a special meaning by adding a space before.
Math is done with MathJax. For display math use the double dollar signs: $$ \int_0^1 x^2 \, dx $$
Or the backslash square bracket notation
\[ \sum_{n=1}^\infty \frac{1}{n} . \]
We left an empty line for more space.
You don't want to start new lines in an equation with *, _, !, #, (, backslash, as those may have special meaning and this script does not really track if you are in a math environment or not. This is especially true for *. You can put an empty space in front and it will work: \[ 1 * 3 \]
Or you can do inline math with $x^2$ or \(\sqrt{2}\), that is, dollar signs or the backslash round bracket.
Due to the inline math using the dollar sign you need to escape it with a slash, \$ (in the presentation you just see a dollar sign), if you actually want a dollar sign. Due to this you'll actually need to enter a backslash as two backslashes: \\. (But see below about two backslashes on a separate line)
If you want to hide the next chuck, put a >>> on a separate line. Probably want to add an empty line, but really it is a new html division, so it will always include a new paragraph. So >>> cannot really split up paragraphs or displayed math. If you want to do that you have to just do separate displayed math. So you can't split aligned, etc., but we don't want to get too fancy here.
You can really just include html: foo or foo. But you probably shouldn't get too crazy. Links, images, etc. it should all work. Though there is a quick way to do centered nice images.
Easiest is to just stick quickpres.pl into the directory where your content is. Then run (if on Linux) ./quickpres.pl, which will compile pres.prs into pres.html. You could also just put it in your path if you want to.
You can specify the files by: ./quickpres.pl in.prs out.html.
If you run: ./quickpres.pl file.prs, the output will be in file.html (it will replace the extension with html).
Adding -A, that is ./quickpres.pl -A in.prs out.html or ./quickpres.pl -A will just show all the blocks all at once initially. It is like typing A right after loading the file. All the keyboard shortcuts still work so you can type B to hide them.
Adding -a, that is ./quickpres.pl -a in.prs out.html or ./quickpres.pl -a will just show all the blocks all at once and also not include the javascript to show/hide them or any of the keyboard navigation.
The option -h will make the new line uncovered with j and covered with k appear at 80% instead of 90%.
The option -H will make the new line uncovered with j and covered with k appear at 70% instead of 90%.
Use # for first level headers, ## for second level and ### for third level:
The first first-level heading is used as the title for the HTML page.
This line will be separate.
*The asterisk must be followed by a space otherwise it is not a bullet. Note that asterisks are also used for italics, see below.
Beware of bullets in the middle of the paragraph
If you need to add an asterisk and it is at the beginning of a line, you can just add a space before it * this is not a bullet.
Stars are also used for italics, see below.
On a new line add !(img.png) to insert img.png, you can add alt text with 
And now with alt text:
The above takes at most 90% of the textwidth (but does not scale up if the image is smaller). This is usually fine, but sometimes you want to restrict the maximum size to a smaller width. Using !!(img.png) will restrict to 50% of the text width and !!!(img.png) will restrict to 25% of the text width.
Quick links can be added on a separate line as (http://link)
Or if you want to have some text instead of the url then [text](http://link) text Also notice there is less space around this link since we didn't leave an empty line around it.
Just do --- on an separate line
This is between rules.
You can use underscores to bold a piece of text, but it must appear on a separate line (unlike markdown) _this_ doesn't do it, but this does. It can be, as you can see in the middle of a paragraph, but it has to be a separate line. Other text can come after the second underscore like this as long as there are no more underscores. This is useful for putting punctuation after bold, or whenever you don't want to leave a space right after bold.
Similarly you can use asterisks to make something italic although you cannot combine italics and bold like this (though you can just use html then). Again, *it has to be at the beginning of a line* otherwise it does not work.
Make sure to not add a space after the asterisk:
And again, to use a leading * in mathematics say, just don't make it the first character on a line: \[ 3 *5* \text{ok even if there are two asterisks on a line}. \]
You can add a bit of empty space (for perhaps drawing or something) with ___ (three underscores) on an separate line
see ... there's empty space.
Putting a line of text inside inverted brackets will center it:
this is centered
If the first line of the file is "!!!DRAFT!!!" (without the quotes of course), then the -a mode will be turned on. A big "DRAFT" watermark will appear in the beginning of your presentation. Useful for editing so that you don't have to step through the steps, useful if you have some sort of a script to run quickpres.pl. You could also use the -a option if you don't want the watermark.
You can also add command line options on the first line of the file with an exclamation point. For example making the first line "!-A -H" (without the quotes) will set the -A and -H options.
If a line starts with "!\newcommand" or "!\renewcommand", then this is added to a special invisible math environment at the beginning of the file to set up macros. For example to use the common \R macro for \mathbb{R} use !\newcommand{\R}{\mathbb{R}} and use it like this: $\R$. Note: The macro will be defined for the whole file, no matter where you put it though, they are all collected and stuffed up front.
If a line begins with % then we ignore it (there should be no whitespace before it). This is similar to how LaTeX works, but in the middle of a line, % does nothing special.
There's always a chunk of empty space added behind the presentation so that you can scroll your ending to the middle easily.