Using with source-highlight
source-highlight's latexcolor
output uses colors that are not available in latex-beamer. Normally one would
have to include them with \usepackage[usenames,dvipsnames]{color}
, but under
latex-beamer it does not work.
One solution is to include the relevant colours from
/usr/share/texmf-tetex/tex/latex/graphics/dvipsnam.def
:
%% For source-highlight's output
% This unfortunately does not work
%\usepackage[usenames,dvipsnames]{color}
% Therefore, I will copy them from /usr/share/texmf-tetex/tex/latex/graphics/dvipsnam.def
\DefineNamedColor{named}{Blue} {cmyk}{1,1,0,0}
\DefineNamedColor{named}{BrickRed} {cmyk}{0,0.89,0.94,0.28}
\DefineNamedColor{named}{Brown} {cmyk}{0,0.81,1,0.60}
\DefineNamedColor{named}{ForestGreen} {cmyk}{0.91,0,0.88,0.12}
\DefineNamedColor{named}{Purple} {cmyk}{0.45,0.86,0,0}
\DefineNamedColor{named}{Red} {cmyk}{0,1,1,0}
\DefineNamedColor{named}{Black} {cmyk}{0,0,0,1}
\DefineNamedColor{named}{RoyalBlue} {cmyk}{1,0.50,0,0}
After this is done, including a source is just a matter of:
# In the shell
$ source-highlight -f latexcolor filename.ext
# In the latex-beamer frame
\input{filename.ext.tex}
Proportional columns
In the latex-beamer documentation I have only seen columns with fixed sizes.
\textwidth
luckily works:
\begin{frame}
\frametitle{Correzione dei compiti}
\framesubtitle{Il programmino da Fortran.}
\begin{columns}
\column{.5\textwidth}
{\tiny
\input{fortran/01-inizio.f77.tex}
}
\column{.5\textwidth}
{\tiny
\input{fortran/02-inizio.py.tex}
}
\end{columns}
\end{frame}