erstmal ein frohes, neues Jahr 2012!
Ich hänge nun den ganzen Abend schon an meinem Java-Quellcode in der Beamerpräsentation. Leider will es mir nicht gelingen, Java-Quellcode links zu plazieren, rechts Erklärungen und passende Zeilen im Quellcode markieren. Solange alles den gleichen Hintergrund hat, geht alles glatt, aber sind es einzelne Zeilen.
Hier beginnt er durch das neue Listing natürlich immer neu zu Zählen, auch ist der Abstand der Blöcke viel zu groß:
\begin{frame}[fragile] \frametitle{Summen \"uber Software-Artefakte} \begin{columns}[totalwidth=\textwidth] \column{.5\textwidth} \begin{lstlisting} package U09; public abstract class A { abstract int a(); } class B extends A { // Does this...\end{lstlisting} \begin{lstlisting}[backgroundcolor=\color{green}] public void a() {...}\end{lstlisting} \begin{lstlisting}[backgroundcolor=\color{white}] // Does that...\end{lstlisting} \begin{lstlisting}[backgroundcolor=\color{green}] public void b() {...}\end{lstlisting} \begin{lstlisting}[backgroundcolor=\color{white}] } class C extends B {}\end{lstlisting} \begin{lstlisting}[backgroundcolor=\color{green}] public void c(int i) {...} } \end{lstlisting} \column{.45\textwidth}% \begin{block}{\footnotesize Lines of...}LOC = 16\\ ELCO = 3 \\ CLOC \\ NCLOC \end{block} \begin{block}{\footnotesize Number of..}NOC \\ NOM \\ NOP \end{block} \end{columns} \end{frame}
\begin{frame}[fragile] \frametitle{Summen \"uber Software-Artefakte} \begin{columns}[totalwidth=\textwidth] \column{.5\textwidth} \begin{lstlisting}[escapechar=!] package U09; public abstract class A { abstract int a(); } !\colorbox{green}{class B extends A}! // Does this... public void a() {...} // Does that... public void b() {...} } class C extends B {} public void c(int i) {...} } \end{lstlisting} \column{.45\textwidth}% \begin{block}{\footnotesize Lines of...}LOC = 16\\ ELCO = 3 \\ CLOC \\ NCLOC \end{block} \begin{block}{\footnotesize Number of..}NOC \\ NOM \\ NOP \end{block} \end{columns} \end{frame}