Benutzer-Werkzeuge

Webseiten-Werkzeuge


public_v6:latex_beamer

Latex-Beamer Tipps

Text hervorheben

\setbeamercolor{alerted text}{fg=blue}
\alert{}

Text nicht komplett unsichtbar:

?

Latex Escape-Characters

& % $ # _ { } ~ ^ \

\documentclass{article}
\begin{document}
 
  \& \% \$ \# \_ \{ \}
  \textasciitilde
  \textasciicircum
  \textbackslash
 
\end{document}
\hbox{\hspace{-0.5em} \includegraphics{xxx}}

Vertikaler Abstand zwischen Items (Spacing)

http://blog.nguyenvq.com/2011/05/01/spacing-between-items-in-itemize-or-enumerate-environments-lists/

Abstände für eine Aufzählung anpassen:

\begin{itemize}\addtolength{\itemsep}{0.5\baselineskip}
\item one
\item two
\end{itemize}

Animationen

Lange Listen automatisch animieren:

\begin{itemize}[<+->]
\item 1
\item 2
\end{itemize}

Hintergrundbild auf Folien

%Global Background must be put in preamble
\usebackgroundtemplate%
{%
    \includegraphics[width=\paperwidth,height=\paperheight]{newton.jpg}%
}
 
% Local background must be enclosed by curly braces for grouping.
{
\usebackgroundtemplate{\includegraphics[width=\paperwidth]{kitten.jpg}}%
\begin{frame}{Kitten}
...
\end{frame}
}

http://tex.stackexchange.com/questions/18447/how-to-make-a-block-transparent-for-a-background-image

2-spaltige Folien mit Bild auf der rechten Seite

http://tex.stackexchange.com/questions/17121/beamer-in-columns-exposing-picture-in-one-column-before-and-after-text-in-othe?rq=1

You can add overlay specifications to many environments and macros—column and \item in particular—in beamer (such commands/environments are called overlay specification aware). This eliminates the need for many \onslide macros. So Gonzalo's code can be be trimmed down a tiny bit:

\documentclass[draft]{beamer}
\begin{document}
\begin{frame}
\frametitle{Prva probna valna funkcija}
Varijacionu metodu započinjemo sljedećom probnom valnom funkcijom
\begin{columns}
    \begin{column}{0.5\textwidth}
    \begin{itemize}
    \item<2->\begin{equation*}
    \varphi_1(x)=\left(\frac{b}{\sqrt{\pi}}\right)^{1/2}e^{-\frac{b^2}{2}x^2}
    \end{equation*}
    \item<4-> Očekivana vrijednost energije
    \uncover<5->{\begin{equation*}
    E(b)=\langle\varphi_1|\hat{H}|\varphi_1\rangle,
    \end{equation*}}
    \end{itemize}
    \end{column}
    \begin{column}<3->{0.5\textwidth}
    \centerline{\includegraphics[width=0.9\textwidth]{valfun1.eps}}
    \end{column}
\end{columns}
\end{frame}
\end{document}

(The draft option makes it compile without the graphics file.)

The specification <n→ means „show this stuff from slide n onwards.“ The only case I couldn't attach it to a command or environment was the equation* environment you wanted to uncover. So I used \uncover.

You can also use incremental overlay specifications where <+→ means „add one to the slide count, then show this stuff from slide n onwards“. I kind of like this because it means you can insert stuff and you don't have to change all then umbers. If you just put these everywhere you had <n→ above you'd back at the original problem, however: stuff gets uncovered in the order it's coded, not the order you want. But a number in parentheses after the + means to add that much more (or less) if the number is negative, to the slide count. So you can also do it this way:

\documentclass[draft]{beamer}
\begin{document}
\begin{frame}
\frametitle{Prva probna valna funkcija}
Varijacionu metodu započinjemo sljedećom probnom valnom funkcijom
\begin{columns}
    \begin{column}<+->{0.5\textwidth}
    \begin{itemize}
    \item<+->\begin{equation*}
    \varphi_1(x)=\left(\frac{b}{\sqrt{\pi}}\right)^{1/2}e^{-\frac{b^2}{2}x^2}
    \end{equation*}
    \item<+(1)-> Očekivana vrijednost energije
    \uncover<+(1)->{\begin{equation*}
    E(b)=\langle\varphi_1|\hat{H}|\varphi_1\rangle,
    \end{equation*}}
    \end{itemize}
    \end{column}
    \begin{column}<+(-2)->{0.5\textwidth}
    \centerline{\includegraphics[width=0.9\textwidth]{valfun1.eps}}
    \end{column}
\end{columns}
\end{frame}
\end{document}

To figure out how this works, first put in <+→ everywhere. I put in a dummy one at the first column because I need to increment the slide count from zero. We want to move the picture up two steps in the sequence—before the second \item and the \uncovered equation*. So we subtract two from the default slide count there. But we also need to shift the second \item and the \uncovered equation* down to make room for the picture (otherwise the graphic and the second \item come out at the same time.) So we add one in addition to the increment there.

The advantage is that if I insert stuff later one before the shifted graphic or after the last \uncovered equation* I don't have to adjust the overlay specifications. But something in between those would require adjustment.

(Read Chapter 9 of the 3.10 beamer manual for this. You might have to read it several times, actually. \smiley)

Grafiken selbst erstellen mit TikZ

Time-Sequence Diagramm mit TikZ erstellen (letztes Beispiel):

http://tex.stackexchange.com/questions/155401/connection-handshake-diagram-with-tikz?rq=1

Text in Nodes umbrechen lassen und rechts- oder linksbündig formatieren:

http://tex.stackexchange.com/questions/123671/manual-automatic-line-breaks-and-text-alignment-in-tikz-nodes?rq=1

public_v6/latex_beamer.txt · Zuletzt geändert: 2018/12/05 05:49 von admin