Lihuen
RSSRSS AtomAtom

Latex

Acentos y eñes

Poner todo un documento en español lleva varios pasos:

\usepackage[spanish,es-tabla,es-noquoting]{babel} % Idioma y codificación del texto
\usepackage[utf8x]{inputenc} % Codificación del archivo
 
%% La tipografía tiene que soportar tildes, no todas lo hacen %%
\usepackage{courier}    % Courier para tipografía monoespaciada
\usepackage[T1]{fontenc}
 
%% Si se usa hyperref + utf8x para establecer el título, autor, etc... %%
\PrerenderUnicode{á}
\PrerenderUnicode{é}
\PrerenderUnicode{í}
\PrerenderUnicode{ó}
\PrerenderUnicode{ú}
\PrerenderUnicode}
 
%% Los listings precisan parámetros especiales, sino puede fallar la generación del PDF %%
\lstset{
     extendedchars=true, 
     inputencoding=utf8x,
     literate={á}{{\'a}}1
           {é}{{\'e}}1
           {í}{{\'i}}1
           {ó}{{\'o}}1
           {ú}{{\'u}}1
           {ñ}{{\~n}}1
}

Figuras

http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions

\begin{figure}
    \centering
    \begin{framed} % Si queremos un recuadro
        \includegraphics[width=\textwidth]{chick}
    \end{framed}
    \caption{Ejemplos}
    \label{fig:ejemplos}
\end{figure}

Subfiguras con el paquete subcaption

Existen 3 paquetes para hacer subfiguras, el más moderno es subcaption (no confundir con subfig y subfigure que usan environments muy parecidos):

\usepackage{caption}
\usepackage{subcaption}
% ...
\begin{figure}
    \centering
    \begin{framed}
        \begin{subfigure}[b]{0.45\textwidth}
            \begin{lstlisting}[language=bash]
./programa.bin "3 2 5 + *"
            \end{lstlisting}
            \subcaption{}
        \end{subfigure}\rule{.1pt}{35pt} % Línea vertical
        \begin{subfigure}[b]{0.45\textwidth}
            \begin{lstlisting}[language=bash]
./programa.bin "2 5 *" "4 5 +"
            \end{lstlisting}
            \subcaption{}
        \end{subfigure}\\
        \rule{1\textwidth}{.1pt} % Línea horizontal
        \begin{subfigure}[b]{1\textwidth} % Subfigura al 100% de ancho
            \begin{lstlisting}[language=bash]
./programa.bin
            \end{lstlisting}
            Imprime:\\
            \texttt{Uso: ./programa.bin expresión\_en\_npi [expresión\_en\_npi [...]]}
            \subcaption{}
        \end{subfigure}
    \end{framed}
    \caption{Ejemplos}
    \label{fig:ejemplos}
\end{figure}

Eso genera la figura:

Latex Subfiguras.png

Gráficos

http://en.wikibooks.org/wiki/LaTeX/Importing_Graphics

Lo mejor es generar PDFs a partir de SVGs y usar esos gráficos:

inkscape -z -f imagen.svg --export-pdf=imagen.pdf

Makefiles

Si tenemos un proyecto con la estructura:

+ presentacion
|- Makefile
|- documentos.tex
|-+ styles
|  |- imagen.svg
|  |- Makefile
|
|-+ images
   |- logo.svg
   |- Makefile