bfhlecture

Download

bfhlecture.tgz

How to use this template

This is a template for creating lecture presentations based on the bfh-ci package using the bfhbeamer class. It helps to get started quickly. Problems and improvements can be reported via our issue tracker. Any kind of improvement is welcome, also other templates that cover a use case based on BFH classes.

Installing the dependencies

Install a recent LaTeX distribution and the latest version of the LaTeX package bfh-ci. How to do this is described in detail in the online manual. Follow the instructions for your operating system.

  • https://latex.ti.bfh.ch

Information about the structure

The “*.tex” is a LaTeX document with a preamble and a LaTeX body with placeholder text. We recommend that you use this example as a quick introduction to writing short reports, such as a lab report. For an example of how to insert citations to online articles, books, etc., we recommend using biblatex. The bibliography database is stored in a “.bib” file. The content of such a file follows the definitions described in the biblatex user manual. Use the sample.bib file to get started.

Parameterization

There is a local latexmk configuration file called “.latexmkrc”. This file contains some pre-configurations like the name of the output directory (“_build”) and the default latex compiler (“lualatex”). Modify or delete this file.

Note

We recommend using Git for version control. If you are using Git, create a gitignore file with a good set of ignore patterns. For a quick start, we recommend the following patterns.

  • Get a general set of ignore patterns

    • https://www.toptal.com/developers/gitignore?templates=latex,windows,linux,vim,emacs,osx

curl -L -o .gitignore https://www.toptal.com/developers/gitignore/api/latex,windows,linux,vim,emacs,osx
  • Ignore all directories that start with an underscore ‘_*/’

echo '_*/' >> .gitignore

Compiling

To compile the LaTeX document, use your favorite LaTeX editor together with the TeX compiler (xelatex and lualatex are supported). Thre is no support for pdflatex compiler.

If you use latexmk on the command line, the following command will do the compilation.

Running Latexmk

  • In the simplest case you just have to type

latexmk -lualatex

This runs LaTeX on all .tex files in the current directory using the output format specified by the configuration files.

  • If you want to make sure to get a .pdf file as output, just mention it:

latexmk -pdflua
  • If you want to compile only one specific .tex file in the current directory, just provide the file name:

latexmk -lualatex myfile.tex
  • If you want to preview the resulting output file(s), just use

latexmk -pv -lualatex
  • And now the killer feature: If you want LaTeXmk to continuously check all input files for changes and re-compile the whole thing if needed and always display the result, type

latexmk -pvc -lualatex -interaction=nonstopmode

Then, whenever you change something in any of your source files and save your changes, the preview is automatically updated. But: This doesn’t work with all viewers, especially not with Adobe Reader. See the section about configuration files below for setting a suitable viewer application.

  • Of course, options can be combined, e.g.

latexmk -outdir=_build -pdf -pv myfile.tex

Cleanup

  • After running LaTeX, the current directory is contaminated with a myriad of temporary files; you can get rid of them with

latexmk -c
  • Previous command doesn’t delete the final .pdf/.ps/.dvi files. If you want to delete those too, use

latexmk -C

Extra properties to controll the build process

  • Build beamer presentation mode (slides) of FILE.tex. If there is no *.tex file passed to the command all tex files will be processed.

 latexmk -lualatex -pv -usepretex="\PassOptionsToClass{final}{bfhbeamer}" -jobname="%A-slides" FILE.tex
  • Build beamer handout mode (optimized for tablet use) of FILE.tex. If there is no *.tex file passed to the command all tex files will be processed.

 latexmk -lualatex -pv -usepretex="\PassOptionsToClass{tabletNotes}{bfhbeamer}" -jobname="%A-tablet" FILE.tex
  • Build beamer handout mode (optimized for printout use) of FILE.tex. If there is no *.tex file passed to the command all tex files will be processed.

 latexmk -lualatex -pv -usepretex="\PassOptionsToClass{paperNotes}{bfhbeamer}" -jobname="%A-print" FILE.tex
  • Build beamer handout with notes – include the content of the note environment within a frame or outside a frame environment. If there is no *.tex file passed to the command all tex files will be processed.

latexmk -lualatex -CF -usepretex="\PassOptionsToClass{printNotes}{bfhbeamer}" -jobname="%A-notes"
  • Build beamer in article mode (optimized as a reader) of FILE.tex. If there is no *.tex file passed to the command all tex files will be processed.

 latexmk -lualatex -pv -usepretex="\PassOptionsToClass{type=beamerarticle}{bfhbeamer}" -jobname="%A-reader" FILE.tex

Preview