-->

Wednesday, October 24, 2012

latex pills





# nice pie-chart in tikz

use http://code.google.com/p/pgf-pie/
                                                                                                                                
\usepackage{pgf-pie}                                                                                                            
\usetikzlibrary{shadows}                                                                                                        
                             

\begin{tikzpicture}                                                                                                   
            \pie{25/Semantic,17/Theme,16/Concept,15/Technique,11/Other,6/Free,4/Emotion,3/Colors,3/Patterns}                    

\end{tikzpicture}                                                                                                  
   




# multiple figures 

\begin{figure}[c]
  \centering
\renewcommand{\thesubfigure}{\arabic{subfigure}}
\subfigure[]{\includegraphics[width=\linewidth]{mosaic_too_dark.jpg}}
\subfigure[]{\includegraphics[width=\linewidth]{mosaic_too_blurry.jpg}}
\subfigure[]{\includegraphics[width=\linewidth]{mosaic_not_seeing.jpg}}
\label{fig:neg_attributes}
\caption{(a) images associated with label}
\end{figure}

use \renewcommand if you want 1 2 3 instead of (a) (b) (c)


# figure and text in the same table:

\usepackage{array}


\newcolumntype{x}[1]{%
>{\raggedleft\hspace{0pt}}p{#1}}%

The argument is the width of the column.
Now simply use “x{2cm}” instead of “p{2cm}”, for columns which align text on the right. By changing \raggedleft to \centering, you can align text in the centre.

Example:

\begin{table}\centering
\begin{tabular}{|l|x{4.5cm}|x{4.5cm}|}\hline
Nb. & Advantage & Disadvantage\tabularnewline\hline
1 & a & b \tabularnewline\hline
2 & b & a \tabularnewline\hline
\end{tabular}
\end{table}



More info in here

No comments:

Post a Comment