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. That 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 Some general tricks
To load a stylesheet from a file filename.css:
@(element (make-style #f (list (make-css-addition (string->path "filename.css")))) '()) |
Example of nesting things:
@nested[ #:style @(make-style "comment" '()) @verb|{ |
This is some text which I want to be show verbatim |
}| |
] |
3 Functions for manipulating slides
(require (planet amkhlv/bystroTeX/slides)) | |
package: base |
struct
(struct bystro ( formula-processor formula-database-name formula-dir-name formula-size formula-bg-color formula-fg-color autoalign-adjust manual-base-alignment) #:extra-constructor-name make-bystro) formula-processor : path? formula-database-name : string? formula-dir-name : string? formula-size : integer? formula-bg-color : (listof integer?) formula-fg-color : (listof integer?) autoalign-adjust : integer? manual-base-alignment : integer?
procedure
(bystro-titlepage-init) → element?
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?)
procedure
(after-pause [#:tag tg] #:rest xs) → part?
tg : (or/c symbol? string? #f) = #f xs : (listof pre-flow?)
procedure
(remove-slide) → void?
procedure
(number-for-formula x) → collect-element?
x : string?
procedure
(ref-formula x) → delayed-element?
x : string?
procedure
(bystro-formula #:database x #:formulas-in-dir y [ #:shell-command z] #:size n #:bg-color bg-color #:fg-color fg-color #:align m #:use-depth ud #:aa-adjust aa-adj #:rest tex) → element? x : db? y : string? z : path? = #f n : natural-number/c bg-color : (listof natural-number/c) fg-color : (listof natural-number/c) m : (or/c (integer-in (- 99) 99) #f) ud : boolean? aa-adj : (integer-in (- 99) 99) tex : (listof string?)
procedure
(bystro-equation tex #:size n [ #:label l #:bg-color bg-color #:fg-color fg-color]) → nested-flow? tex : (listof string?) n : natural-number/c l : (or/c string? #f) = #f
bg-color : (listof natural-number/c) = (bystro-formula-bg-color configuration)
fg-color : (listof natural-number/c) = (bystro-formula-fg-color configuration)
procedure
(bystro-toc) → delayed-block?
4 Miscellaneous functions
(require (planet amkhlv/bystroTeX/common)) | |
package: base |
@span[attn]{remember to pay the phone bill!}.
.attn { |
color: red; |
font-weight: bold; |
} |
<div class="someword">content</div>
The difference is that div can extend over several paragraphs.
@tg[ol]{ |
@tg[li]{The union of open sets is an open set.} |
@tg[li]{The finite intersection of open sets is an open set.} |
@tg[li]{@f{X} and the empty set @f{\emptyset} are open sets.} |
} |
@(require racket/dict) |
@(init-counter exercise) |
@(define (ex-num label) |
(elemtag label (exercise-next label))) |
@(define (ex-ref label) |
(elemref label (list "Exercise " (exercise-number label)))) |
@bold{Exercise @ex-num{ProvePositivityOfE}:} Show that the energy is always greater thatn zero |
As you should have proven in @ex-ref{ProvePositivityOfE}, ... |
procedure
(tbl rows #:orient dirn) → table?
rows : bystro-rectangular-table? dirn : (or/c 'hor 'vert #f)
@align[r.l |
@list[ |
@f{{2\over 1 - x^2} = } @f{1+x+x^2 + \ldots +} |
]@list[ |
"" @f{1-x+x^2- \ldots} |
] |
] |
@align[r.l |
@list[ |
@f{{2\over 1 - x^2} = } @v+[2 @f{1+x+x^2 + \ldots +}] |
]@list[ |
"" @f{1-x+x^2- \ldots} |
] |
] |
@align[r.l.n |
@list[ |
@f{{2\over 1 - x^2} = } @v+[2 @f{1+x+x^2 + \ldots +}] "" |
]@list[ |
"" @f{1-x+x^2- \ldots} @label{SumOfGeometricProgressions} |
] |
] |
procedure
(v+ n #:rest xs) → table?
n : exact-nonnegative-integer? xs : (listof pre-content?)
procedure
(v- n #:rest xs) → table?
n : exact-nonnegative-integer? xs : (listof pre-content?)
procedure
(h+ n #:rest xs) → table?
n : exact-nonnegative-integer? xs : (listof pre-content?)
procedure
(h- n #:rest xs) → table?
n : exact-nonnegative-integer? xs : (listof pre-content?)
procedure
(bystro-bg r g b) → void?
r : exact-nonnegative-integer? g : exact-nonnegative-integer? b : exact-nonnegative-integer?
procedure
(bystro-fg r g b) → void?
r : exact-nonnegative-integer? g : exact-nonnegative-integer? b : exact-nonnegative-integer?
procedure
(verb x #:indent i #:rest xs) → block?
x : string? i : exact-nonnegative-integer? xs : (listof string?)
procedure
(clr colorname #:rest xs) → element?
colorname : string? xs : (listof pre-content?)
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)
procedure
(boldred #:rest x) → element?
x : (listof pre-content?)
procedure
(bystro-js x) → traverse-element?
x : string?
procedure
(bystro-js-url url) → traverse-element?
url : string?
procedure
(bystro-elemstyle x #:rest otherprops) → style?
x : (or/c #f string?) otherprops : (listof any/c)
(element (bystro-elemstyle "vertical-align:middle") (image "flowers-on-the-wall.png"))
The otherprops are as described in the manual of element
procedure
(bystro-list-scrbls p [ #:exclude-same-name x]) → (listof path?) p : path? x : boolean? = #t
procedure
(bystro-list-scrbls-in-dir p [ #:background-color clr]) → element? p : path? clr : (listof integer?) = '(251 206 177)
procedure
(bystro-ribbon) → table?
procedure
(bystro-shell-dump command [ #:stdin stdin #:style style #:indent indent] #:rest arguments) → block? command : string? stdin : (or/c (and/c input-port? file-stream-port?) #f) = #f style : (or/c style? #f) = #f indent : exact-nonnegative-integer? = 0 arguments : (listof string?)
@bystro-shell-dump|{sqlite3 -line base.sqlite |
select capital,population from countries where continent like '%asia%'}| |
Note how we use the at-syntax instead of quotation marks in the SQL query |
5 Legal
Copyright 2012,2013,2014 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/>.