1 Introduction
2 Functions for manipulating slides
bystro-titlepage-init
slide
after-pause
remove-slide
bystro-initialize-formula-collection
number-for-formula
ref-formula
bystro-command-to-typeset-formula
bystro-formula
bystro-equation
bystro-toc
3 Miscellaneous functions
spn
div
tbl
verb
clr
longtbl
boldred
bystro-js
bystro-js-url
bystro-elemstyle
bystro-rectangular-table?
bystro-path-to-link
bystro-dir-contains-scrbl?
bystro-list-scrbls
bystro-list-scrbls-in-dir
bystro-set-url
bystro-www-ribbon
bystro-www-prepend-root
4 Legal

BystroTeX

1 Introduction

This manual is only partially useful, because many functions are auto-generated by macros. The beginner user should find the instructions in the form of a slide presentation here, and also study the sample file slides-manual.scrbl, which is in the samples directory. This sample file can be used as a template for creating new presentations.

As a general rule, those functions whose name starts with bystro-, are either for internal use or for use in the header. They are not meant to be used in slides by themselves, or at least not to be used frequently. (But this rule is not very strict.)

2 Functions for manipulating slides

 (require (planet amkhlv/bystroTeX/slides))

procedure

(bystro-titlepage-init)  element?

Installs the titlepage style

procedure

(slide x [#:tag tg #:showtitle sttl] #:rest xs)  part?

  x : content?
  tg : (or/c symbol? string? #f) = #f
  sttl : boolean? = #f
  xs : (listof pre-flow?)
A basic slide. The title of the slide is x, and the contents are xs. I recommend providing a nice tag tg, which will serve as a filename for the html. Otherwize, x will be used as a filename, which may lead to awkward effects.

procedure

(after-pause [#:tag tg] #:rest xs)  part?

  tg : (or/c symbol? string? #f) = #f
  xs : (listof pre-flow?)
The continuation of the slide to be shown after pause.

procedure

(remove-slide)  void?

Removes the most recently shown part of the slide

procedure

(bystro-initialize-formula-collection)  db?

This is to initialize the formula collection.

procedure

(number-for-formula x)  string?

  x : string?
Like \label{x} in LaTeX.

procedure

(ref-formula x)  string?

  x : string?
Like \ref{...} in LaTeX, reference to the label x.

procedure

(bystro-command-to-typeset-formula comm    
  tex    
  n    
  fn)  string?
  comm : path-string?
  tex : string?
  n : number?
  fn : string?
This should not be directly called by the user. Just for reference, comm is the path to an executable, which has the following properties. That executable should take 3 arguments: a LaTeX string tex representing a formula, a number n which is the intended fontsize of the formula, and a string fn which is the filename, which should have extension .png. The executable, upon success, should return a number representing the vertical offset. (Because e.g. letters x and y have different vertical offset.)

procedure

(bystro-formula #:database x    
  #:formulas-in-dir y    
  [#:shell-command z]    
  #:size n    
  #:align m    
  #:use-depth ud    
  #:aa-adjust aa-adj    
  #:rest tex)  element?
  x : db?
  y : string?
  z : path? = #f
  n : natural-number/c
  m : (or/c (integer-in (- 99) 99) #f)
  ud : boolean?
  aa-adj : (integer-in (- 99) 99)
  tex : (listof string?)
The user probably will not want to call this procedure directly, because there are various auto-generated shortcuts.

procedure

(bystro-equation tex #:size n [#:label l])  nested-flow?

  tex : (listof string?)
  n : natural-number/c
  l : (or/c string? #f) = #f
Display-style formula. But it should not be called directly, because there is a shortcut defined in the headers of the slide file.

procedure

(bystro-toc)  delayed-block?

Insert the list of slides. This is for use on the title-slide.

3 Miscellaneous functions

 (require (planet amkhlv/bystroTeX/common))

syntax

(spn someword content)

Returns <span class="someword">content</span>. For example:

@span[attn]{remember to pay the phone bill!}.

Notice the absence of quotation marks around attn in the first argument of @span. The corresponding CSS could be, for example:

.attn {

    color: red;

    font-weight: bold;

}

(that’s how it is currently defined in misc.css)

syntax

(div someword content)

Similar to spn but creates div instead of span:

<div class="someword">content</div>

The difference is that div can extend over several paragraphs.

procedure

(tbl rows #:orient dirn)  table?

  rows : bystro-rectangular-table?
  dirn : (or/c 'hor 'vert #f)
To insert a table

procedure

(verb x #:indent i #:rest xs)  block?

  x : string?
  i : exact-nonnegative-integer?
  xs : (listof string?)
Like (verbatim x #:indent i xs) but modified so that copy-past does not introduce extra linebreaks

procedure

(clr colorname #:rest xs)  element?

  colorname : string?
  xs : (listof pre-content?)
Colored text.

procedure

(longtbl bss    
  #:styless stylepropsss    
  #:width w)  nested-flow?
  bss : (listof (listof block?))
  stylepropsss : (listof (listof (listof (or/c 'left 'right 'center 'top 'baseline 'bottom 'vcenter))))
  w : (integer-in 1 100)
Produces a tabular structure of width w with cell content bss and cell styles stylepropsss.

procedure

(boldred #:rest x)  element?

  x : (listof pre-content?)
Text in bold red. Deprecated in favor of @spn[attn]{x}.

procedure

(bystro-js x)  traverse-element?

  x : string?
Javascript injection

procedure

(bystro-js-url url)  traverse-element?

  url : string?
Insert Javascript from URL

procedure

(bystro-elemstyle x #:rest otherprops)  style?

  x : (or/c #f string?)
  otherprops : (listof any/c)
Style selector for element. Example of use:

(element (bystro-elemstyle "vertical-align:middle") (image "flowers-on-the-wall.png"))

The otherprops are as described in the manual of element

procedure

(bystro-rectangular-table? l)  boolean?

  l : any
Verifies if l is a list of lists representing a rectangular table

procedure

(bystro-path-to-link x)  string?

  x : string?
Returns the string representing a file URL for the UNIX path represented by x

procedure

(bystro-dir-contains-scrbl? p)  boolean?

  p : path?
Returns #t if the directory p contains a scribble-file

procedure

(bystro-list-scrbls p    
  [#:exclude-same-name x])  (listof path?)
  p : path?
  x : boolean? = #t
Return the list of paths to scribble files in the dir p; if x is #t, then exclude the file which has the same name as the source file

procedure

(bystro-list-scrbls-in-dir p    
  [#:background-color clr])  element?
  p : path?
  clr : (listof integer?) = '(251 206 177)
A nicely formatted list of links to scribble files in the folder p

procedure

(bystro-set-url x)  void?

  x : string?
This is for putting pages on my website. Sets the URL of my website.

procedure

(bystro-www-ribbon)  table?

This is for putting pages on my website. Formatted list of all the .scrbl files in the current directory, with the URL of my website prepended.

procedure

(bystro-www-prepend-root x)  string?

  x : string?
This is for putting pages on my website. Example of use: @hyperlink[@bystro-www-prepend-root{writeup.html}]{Link to some writeup}

4 Legal

Copyright 2012,2013 Andrei Mikhailov

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.