#lang scribble/doc @(require scribble/manual (for-label racket scribble/core scribble/base scribble/html-properties scribble/decode scriblib/render-cond "common.rkt" "slides.rkt")) @title{BystroTeX} 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 @hyperlink["http://andreimikhailov.com/slides/bystroTeX/slides-manual/index.html"]{here}, and also study the sample file @tt{slides-manual.scrbl}, which is in the samples directory. This sample file can be used as a template for creating new presentations. @defmodule[(planet amkhlv/bystroTeX/slides)] @defproc[ (bystro-titlepage-init) element? ]{ Installs the titlepage style } @defproc[ (bystro-slide [x content?] [#:tag tg (or/c symbol? string? #f) #f] [#:showtitle sttl boolean? #f] [#:rest xs (listof pre-flow?)] ) part? ]{ A basic slide. The title of the slide is @racket[x], and the contents are @racket[xs]. I recommend providing a nice tag @racket[tg], which will serve as a filename for the html. Otherwize, @racket[x] will be used as a filename, which may lead to awkward effects. } @defproc[ (bystro-afterpause [#:tag tg (or/c symbol? string? #f) #f] [#:rest xs (listof pre-flow?)] ) part?]{ The continuation of the slide to be shown after pause. } @defproc[(bystro-remove) void?]{ Removes the most recently shown part of the slide } @defproc[ (bystro-initialize-formula-collection) db?]{ This is to initialize the formula collection. } @defproc[ (bystro-number-for-formula [x string?] ) string?]{ Like @literal|{\label{...}}| in @tt{LaTeX}, the label is @racket[x]. } @defproc[ (bystro-ref-formula [x string?] ) string?]{ Like @literal|{\ref{...}}| in @tt{LaTeX}, reference to the label @racket[x]. } @defproc[ (bystro-command-to-typeset-formula [comm path-string?] [tex string?] [n number?] [fn string?] ) string?]{ This should not be directly called by the user. Just for reference, @racket[comm] is the path to an executable, which has the following properties. That executable should take 3 arguments: a @tt{LaTeX} string @racket[tex] representing a formula, a number @racket[n] which is the intended fontsize of the formula, and a string @racket[fn] which is the filename, which should have extension @tt{.png}. The executable, upon success, should return a number representing the vertical offset. (Because e.g. letters x and y have different vertical offset.) } @defproc[ (bystro-formula [#:database x db? ] [#:formulas-in-dir y string? ] [#:shell-command z path? #f ] [#:size n natural-number/c ] [#:align m (or/c (integer-in (- 99) 99) #f) ] [#:use-depth ud boolean? ] [#:aa-adjust aa-adj (integer-in (- 99) 99) ] [#:rest tex (listof string?)]) element?]{ The user probably will not want to call this procedure directly, because there are various auto-generated shortcuts. } @defproc[ (bystro-equation [tex (listof string?)] [#:size n natural-number/c] [#:label l (or/c string? #f) #f] ) nested-flow?]{ Display-style formula. But it should not be called directly, because there is a shortcut defined in the headers of the slide file. } @defproc[ (bystro-toc) delayed-block?]{ Insert the list of slides. This is for use on the title-slide. } @defmodule[(planet amkhlv/bystroTeX/common)] @defproc[(bystro-js [x string?]) traverse-element? ]{Javascript injection} @defproc[(bystro-js-url [url string?]) traverse-element? ]{Insert Javascript from URL} @defproc[ (bystro-path-to-link [x string?]) string? ]{Returns the string representing a file URL for the UNIX path represented by @racket[x]} @defproc[ (bystro-elemstyle [x (or/c #f string?)] [#:rest otherprops (listof any/c)]) style? ]{Style selector for element. Example of use: @racket[@element[@bystro-elemstyle{vertical-align:middle} @image{flowers-on-the-wall.png}]] The @racket[otherprops] are as described in the manual of @racket[element] } @defproc[ (bystro-rectangular-table? [l any]) boolean? ]{Verifies if @racket[l] is a list of lists representing a rectangular table} @defproc[ (bystro-table [rows bystro-rectangular-table?] [#:orient dirn (or/c 'hor 'vert #f)]) table? ]{ To insert a table } @defproc[ (bystro-verb [x string?] [#:indent i exact-nonnegative-integer?] [#:rest xs (listof string?)]) block? ]{ Like @racket[(verbatim x #:indent i xs)] but modified so that copy-past does not introduce extra linebreaks } @defproc[ (bystro-clr [colorname string?] [#:rest xs (listof pre-content?)]) element? ]{ Colored text.} @defproc[ (bystro-longtable [ bss (listof (listof block?))] [#:styless stylepropsss (listof (listof (listof (or/c 'left 'right 'center 'top 'baseline 'bottom 'vcenter))))] [#:width w (integer-in 1 100)]) nested-flow?]{ Produces a tabular structure of width @racket[w] with cell content @racket[bss] and cell styles @racket[stylepropsss]. } @defproc[ (bystro-dir-contains-scrbl? [p path?]) boolean?]{ Returns @racket[#t] if the directory @racket[p] contains a scribble-file } @defproc[ (bystro-list-scrbls [p path?] [#:exclude-same-name x boolean? #t]) (listof path?)]{ Return the list of paths to scribble files in the dir @racket[p]; if @racket[x] is @racket[#t], then exclude the file which has the same name as the source file } @defproc[ (bystro-list-scrbls-in-dir [p path?] [#:background-color clr (listof integer?) '(251 206 177)] ) element?]{ A nicely formatted list of links to scribble files in the folder @racket[p] } @defproc[ (boldred [#:rest x (listof pre-content?)]) element?]{ Text in bold red } @defproc[ (bystro-set-url [x string?]) void?]{ This is for putting pages on my website. Sets the URL of my website. } @defproc[ (bystro-www-ribbon) table? ]{ This is for putting pages on my website. Formatted list of all the @tt{.scrbl} files in the current directory, with the URL of my website prepended. } @defproc[ (bystro-www-prepend-root [x string?]) string?]{ This is for putting pages on my website. Example of use: @tt|-{ @hyperlink[@bystro-www-prepend-root{writeup.html}]{Link to some writeup} }-| }