Here I provide my USTC-themed LaTeX slides template for beamer slides. It is loosely based on the corporate design of the University of Science and Technology of China (USTC) [中国科学技术大学]. Here you can see how these slides look compiled to PDF.
- download the template
- edit
slides.tex
- in order to produce a pdf of your slides, under Linux run
./scripts/latex.sh slides evince
if you are usingeps
figures./scripts/pdflatex.sh slides evince
if you are usingpdf
figures./scripts/xelatex.sh slides evince
if you have Chinese text (also: produces smaller output thanpdflatex
)./scripts/lualatex.sh slides evince
if the above commands fail (LuaLaTeX is slightly better in dealing with memory allocation and stuff)
The following structural commands should be used in exactly this order (while \appendices
and \printSectionOutlines
are optional).
\startPresentation{optional}
start the presentation and put theoptional
content on the outline slides, if any. After this, your slides should come.\printSectionOutlines
optional: a section outline should be printed at the beginning of each section\endPresentation
ends the presentation by putting a goodbye screen and the references\appendices{optional}
starts appendix sections and prints the contents ofoptional
on the start slide. Maybe you want to have some more slides in store if someone asks questions. Can be left away if there are no appendices.\appendix{title}
start an appendix section with the giventitle
.
Sometimes we want to locate stuff at specific positions on a slide. For this purpose, the following commands are used, which all operate on a x-y
coordinate system where x=0, y=0
is the top-left corner of the slide and x=1, y=1
is the bottom-right corner.
\locate{when}{what}{x}{y}
position the content (what
) at the specifiedx-y
coordinates. Ifwhen
is not empty, wrap everything in an\only<when>{...}
, i.e., only display something at the specified sub-slide id range. You may put an\includegraphics
as contents.\locateWithCaption{when}{what}{caption}{x}{y}{width}
locate the content ofwhat
at the specifiedx-y
coordinates. Put afigure
-likecaption
below it. Reserve the givenwidth
(between0
and1
, relative to slide width) for everything. Thewidth
is reserved to know how to break the caption if it is longer than the contents (what
).\locateGraphic[ref]{when}{arg}{path}{x}{y}
locate an\includegraphics[arg]{path}
vialocate{when}{\includegraphics[arg]{path}}{x}{y}
. The optional argument[ref]
can be a citation (\citep
) or text describing the image source. It is printed with tiny, gray text in the bottom-left corner of the image (overlapping with the image). Arguments are passed forward as indicated.\locateFramedGraphic{when}{arg}{path}{x}{y}
same as\locateGraphic
, but puts a frame around the graphic.\locateFramedBox{when}{width}{what}{x}{y}{background}{foreground}
locate a framed box of the givenwidth
(relative to the slide width) at coordinatesx-y
at sub-slideswhen
(or always, ifwhen
is empty). The contents of the box arewhat
. The box will usebackground
as fill color (or white, ifbackground
is empty). The frame will be in colorforeground
(or blueish, ifforeground
is empty).\begin{lobateBox}{when}{x}{y}...\end{locateBox}
locate the contents of the environment at the specifiedx-y
coordinates. Ifwhen
is not empty, only display at the specified sub-slides.\begin{scaledBox}{width}{height} ... \end{scaledBox}
an environment which scales its contents to the givenwidth
andheight
. Ifwidth==!
, then we scale proportionally according toheight
. Ifheight=!
, then we scale proportionally towidth
.
- You can use all the normal commands from package
listings
. \begin{listingBlock}[width]{caption}...\end{listingBlock}
place a block with the specifiedcaption
which is supposed to contain a listing. Thewidth
can be specified relative to the paper width, if omitted, we use0.95\paperwidth
as block width.\codeil[format]{text}
formatstext
as source code (with the optionalformat
, which can be any format support bylistings
, such asJava
,XML
,C
, ...)
\citep{ref}
cite referenceref
by number\scitep{ref}
cite referenceref
by number, pre-pend non-breakable space. For use in text, likebla bla blablabla\scitep{ref}
\citet{ref}
cite referenceref
by author names followed by number\Citet{ref}
cite referenceref
by author names followed by number at beginning of sections (make first character uppercase)\citete{authorRef}{refs}
cite referencesrefs
by number, but pre-pend the author names of referenceauthorRef
. This is useful if a group of authors has produced several works, but the author order changes in these works.\Citete{authorRef}{refs}
like\citete{authorRef}{refs}
, but capitalize first character.
Include Chinese text with the command \zh{chinese text}
. You then need to use the XeLaTeX script for compiling. \zhb{chinese text}
puts the text into an \mbox{...}
, which prevents line breaks. This makes sense when using Chinese words like university names or other things that should not be broken across lines in an otherwise English text, for instance.