On this page:
1 Simple formulas
2 Multiline formulas
3 Fun with Unicode
4 Color in formulas
5 Some technical details

Basic syntax

You might want to read basic Scribble documentation, But it should not be necessary, because the syntax should be clear from the source file of these pages. More examples can be found here.

    1 Simple formulas

    2 Multiline formulas

    3 Fun with Unicode

    4 Color in formulas

    5 Some technical details

1 Simple formulas

To insert formula , type:
@f{x^2/y^2}
Curly brackets inside are usually not a problem: for just type
@f{y_{ij}}
it works. If however something goes wrong, you might want to use better protection:
@f|{y_{ij}}| or even @f|-{y_{ij}}-|

Whether you need to use @f|-{...}-|, or @f{...} is enough, depends on the structure of parentheses inside your formula. If parentheses are well-balanced then @f{...} is enough. If not, then better protection is needed. For example, if the formula is: , then you absolutely need to use @f|-{...}-|, since the is unbalanced

There is also the display-style @e{...} which allows formula labeling using @e[#:tag "FormulaName"]{...}.

It is also possible to manually align the formulas, for example @f+4{x^2} produces and @f-7{x^2} gives . There is also zoomed @f+0+7{x^2} which gives and zoom with align @f-5+7{x^2} which gives .

The command @fsize[20] changes the formula size to 20pt, the command @fsize[] or equivalently @fsize=[] returns back to the previous size (but you can not nest them, there is not stack of sizes). Actually I recommend to use instead the command @fsize+[5] which changes the size relatively to the base size. This will scale better if you will have to suddenly change the resolution 3 minutes before your talk. To decrease the size, use @fsize+[@-[5]] or equivalently @(fsize+ (- 5)). Both @fsize[] and @fsize+[] have an optional second argument, which modifies the vertical base alignment.

2 Multiline formulas

Example:
@align[r.l
 @list[
@f{{2\over 1 - x^2} = }  @f{1+x+x^2 + \ldots +}
]@list[
"" @f{1-x+x^2- \ldots}
]
]
produces:

The only problem is, there is a small alignment defect. To fix it, do this:
@align[r.l
 @list[
@f{{2\over 1 - x^2} = }  @v+[3 @f{1+x+x^2 + \ldots +}]
]@list[
"" @f{1-x+x^2- \ldots}
]
]

Notice that in the first line stands the symbol "r.l" which defines the alignment (right, then left). The "v+" is a padding, it serves for vertical adjustment, see the manual page.

The numbered version of the same formula will be
@align[r.l.n
 @list[
@f{{2\over 1 - x^2} = }  @v+[3 @f{1+x+x^2 + \ldots +}] ""
]@list[
"" @f{1-x+x^2- \ldots} @label{SumOfGeometricProgressions}
]
]

(3)

Notice that the alignment symbol is now r.l.n, we added letter n for the number. The function @label[] is defined in the slides’ header.

3 Fun with Unicode

To get just type: @f{A⊗B}. In other words, we can use the Unicode symbol ⊗ instead of \otimes in formulas.

4 Color in formulas

@bystro-bg[255 200 200] @bystro-fg[0 0 250]
@f{\; l^2 = a^2 + b^2}
@bystro-bg[255 255 255] @bystro-fg[0 0 0]

gives

5 Some technical details

We use JLaTeXMath to produce svg (or png) files. We had some problems with large size integral signs: and large size brackets: . As you can see, they come out a bit weird. It seems that this is caused by a general bug in OpenJDK (which is the default implementation of Java on Debian). The situation is discussed here. If this becomes a problem, use Sun JDK instead of OpenJDK. (The page you are reading now was prepared using OpenJDK.)

This slide is very tall and will probably go below the bottom of the display area, so you need to scroll down to read it. This is intentional. Sometimes you have to show a long list of formulas. Scrolling is easier on the audience than jumping from page to page.