#lang scribble/base @(require racket scribble/core scribble/base scribble/html-properties) @(require amkhlv/bystroTeX/slides amkhlv/bystroTeX/common) @(require (for-syntax amkhlv/bystroTeX/slides_for-syntax)) @; @(require (planet amkhlv/bystroTeX/common) (planet amkhlv/bystroTeX/slides)) @; @(require (for-syntax (planet amkhlv/bystroTeX/slides_for-syntax))) @(require (only-in (planet jaymccarthy/sqlite) close)) @; ------------- USER DEFINITIONS ------------------------------------- @(define formula-processor (find-executable-path "amkhlv-java-formula.sh")) @(unless formula-processor (error "*** could not find executable for formula processing ***")) @(define formula-database-name "formulas.sqlite") @(define formula-dir-name "formulas") @(define formula-size 30) @(define autoalign-adjust 1) @(define manual-base-alignment (- 20)) @(define slide amkhlv/slide) @(define after-pause amkhlv/afterpause) @(define remove-slide amkhlv/remove) @(define label amkhlv/number-for-formula) @(define (ref s) (elemref s (amkhlv/ref-formula s))) @(define-syntax (defineshiftedformula x) (amkhlv/formula-syntax #:autoalign-formula-prefix "f" #:manual-formula-prefix "ff" #:display-math-prefix "equation" #:size-change-notation "fsize" #:size-restore-notation "fsize=" x)) @; ------------- INITIALIZATION -------------------------------------- @(defineshiftedformula "formula-enormula-humongula!") @(define formula-database amkhlv/setupformuladatabase) @(amkhlv/titlepage-init) @; ------------- AND HOPEFULLY SOME CONTENT -------------------------- @title{Manual for bystroTeX} @tabular[@list[ @list[@hspace[4] @larger-2{mathematical slides}] @list["" @larger-2{using @hyperlink["http://docs.racket-lang.org/scribble/"]{@tt{scribble}} markup system}] @list["" @para{@linebreak[]}] @list["" "Andrei Mikhailov, IFT UNESP"] ]] @slide["Inserting mathematical formulas into html slides" #:tag "--MathFormulasInSlides" #:showtitle #t]{ The most common use is just to insert @f{x^2/y^2\;f(s)} as an inline formula. We can also do the display formula: @equation[#:label "GeneralizedEnergyMassRelation" ]{E = mc^{\alpha}} We can also insert @ff-5{x^2} shifted down, or insert a shifted up and rescaled formula: @ff+3+8{y^2}, if we ever need to do such an adjustment. @smaller-2{ @fsize[22] We can also temporarily change the default size of the formulas. For example, this paragraph is typeset using small font. The formula @f{yx^2} comes out smaller because we changed the default size. After we restore the default size @fsize[] @f{zx^2} is of the normal size. } } @after-pause{ @tabular[@list[@list[@para{ Besides the math-specific task of inserting formulas, many things can be done using the @hyperlink["http://docs.racket-lang.org/scribble/"]{well documented} @tt{scribble} environment. @linebreak[] For example, one can include pictures, as illustrated. Flying kite could be an allegory for slide presentations.} @smaller-2{@(image (string->path "snapshots/kite.png") #:scale 0.5) @hyperlink["http://openclipart.org/detail/67597/child-with-a-kite-by-laobc"]{openclipart.org}}]]] } @slide["Jumping to references" #:tag "--JumpingReferences" #:showtitle #t]{ Remember the formula (@ref{GeneralizedEnergyMassRelation})? Clicking on (@ref{GeneralizedEnergyMassRelation}) brings you to that formula. } @slide["Installation" #:tag "--Installation" #:showtitle #t]{ You should start with installing @hyperlink["http://racket-lang.org/"]{@tt{Racket}} on your computer. For example, on @tt{Debian} you should issue this command @bold{@amkhlv/clr["red"]{as root:}} @amkhlv/verb{ aptitude install racket } This command will install @tt{Racket} environment on your computer. Next you should install @tt{bystroTeX} using this command @bold{@amkhlv/clr["red"]{as normal user}} (i.e. @bold{@amkhlv/clr["red"]{not}} root): @amkhlv/verb{ racket -e '(require (planet "amkhlv/bystroTeX/slides_setup.rkt"))' } This command will talk back to you, asking some questions and giving further instructions. In particular, it will ask you to choose a folder where a sample slide presentation is stored. After the installation, go to that sample folder. } @slide["Sample presentation" #:tag "--SamplePresentation" #:showtitle #t]{ The sample folder should contain (at least) the following files: @amkhlv/table[#:orient 'hor @list[@list["Filename" "purpose"] @list[@tt{slides-manual.scrbl} "main source file"] @list[@tt{slide.css} "style of the regular slide"] @list[@tt{slide-title.css} "style of the title slide"] @list[@tt{misc.css} "various elements of style"] ]] The command to actually ``build'' the slideshow is: @amkhlv/verb|{ scribble --htmls slides-manual.scrbl }| This command may take some time when you run it for the first time. It will generate the @tt{html} files in the new folder called @tt{slides-manual}. Then you can view it in @tt{Firefox}: @amkhlv/verb|{ firefox slides-manual/index.html }| } @close[formula-database]