Archive for June, 2010
For Pictures or Organisation charts
\begin{picture}…\end{picture} defines a coordinate system of the height 10 and the width 15, P (0/0) is at the bottom in the left corner
\setlenght{\unitlength}{} tells LaTeX the unit of the values
\documentclass[a4paper, 12pt]{article} \usepackage{a4, german} \usepackage[ansinew]{inputenc} \usepackage{geometry} \usepackage{picture} \usepackage{setspace} \geometry{a4paper,left=25mm,right=25mm, top=25mm, bottom=25mm} \begin{document} \setlength{\unitlength}{1cm} \begin{picture}(15,10) % boxes \put(6,10){\framebox(2.5, 1){K A I S E R}} \put(6.25,8){\framebox(2, 1){Staatsrat}} \put(2.5,7.5){\framebox(2.5, 1){Kaiserliches}} \put(2.5,6.5){\framebox(2.5, 1){Haushaltsamt}} \put(5.75,6.75){\framebox(3, 1){Großsekretariat}} \put(6,4){\framebox(2.5, 1){Ministerien}} \put(5.5,2){\framebox(3.75, 1){Provinzgouverneure}} \put(6,0){\framebox(2.5, 1){Kreisbeamte}} \put(5.5,-2){\framebox(3.5, 1){Loyale Oberschicht}} \put(3.25,-3.25){\framebox(8.5, 1){Volk}} \put(0,9){\framebox(2, 1){Banner}} \put(12.5,9){\framebox(2.5, 1){Zensorat}} % lines \put(1,10.5){\line(1, 0){5}}\put(8.5,10.5){\line(1, 0){5.25}} \put(3,-0.5){\line(1, 0){9}}\put(7.25,9){\line(0, 1){1}} \put(7.25,5){\line(0, 1){1.75}}\put(1,10){\line(0, 1){0.5}} \put(13.75,10){\line(0, 1){0.5}}\put(7.25,7.75){\line(0, 1){.25}} \put(7.25,1){\line(0, 1){.2}} \put(7.25,1.4){\line(0, 1){.2}} \put(7.25,1.8){\line(0, 1){.2}}\put(10,3.5){\line(1, 0){0.25}} \put(3.75, 8.5){\line(0, 1){1.75}}\put(3.75,10.25){\line(1, 0){2.25}} \put(4,3.5){\line(1, 0){0.25}} \put(4.5,3.5){\line(1, 0){0.25}} \put(5,3.5){\line(1, 0){0.25}} \put(5.5,3.5){\line(1, 0){0.25}} \put(6,3.5){\line(1, 0){0.25}}\put(6.5,3.5){\line(1, 0){0.25}} \put(7,3.5){\line(1, 0){0.25}} \put(7.5,3.5){\line(1, 0){0.25}} \put(8,3.5){\line(1, 0){0.25}}\put(8.5,3.5){\line(1, 0){0.25}} \put(9,3.5){\line(1, 0){0.25}} \put(9.5,3.5){\line(1, 0){0.25}} \end{picture} \end{document} |
long tables in landscape (latex)
\usepackage{longtable, lscape} |
\begin{tiny} \begin{landscape} \begin{longtable}[p]{|l|l|l|l|l|l|l|l|} \caption{PCR primers for finemapping of linkage group~X in salix}% \label{tab:lgxprimers}\\% \hline \textbf{Gene name} & \textbf{Gene position} & \textbf{Best hit} & \textbf{Markername} & \textbf{Primer left=forward} & \textbf{Primer right=reverse} & \textbf{length of product [bp]}\\\hline \multicolumn{7}{r}{}\\[-5px]\hline \endfirsthead \caption{PCR primers for finemapping of linkage group~X in salix (cont.)}\\ \hline \textbf{Gene name} & \textbf{Gene position} & \textbf{Best hit} & \textbf{Markername} & \textbf{Primer left=forward} & \textbf{Primer right=reverse} & \textbf{length of product [bp]}\\\hline \multicolumn{7}{r}{}\\[-5px]\hline \endhead \hline \multicolumn{7}{r}{\emph{Continued on next page}} \endfoot \hline \endlastfoot data & data & data & data & data & data & data \\ \hline data & data & data & data & data & data & data \\ \hline data & data & data & data & data & data & data \\ \hline ... data & data & data & data & data & data & data \\ \hline data & data & data & data & data & data & data \\ \hline \end{longtable} \end{landscape} |
Sourcecode in Latex
Inserting sourcecode with syntax highlighting works very nice in latex with the listings package:
\usepackage{listings} \lstset{numbers=left, numberstyle=\tiny, numbersep=5pt, basicstyle=\footnotesize\ttfamily,tabsize=2, keywordstyle=\bf\color{blue}\ttfamily, showstringspaces=false, breaklines,stringstyle=\color{darkgreen}\ttfamily, commentstyle=\color{mgray}\it\ttfamily} |
in the header area and
\lstset{language=perl} \lstinputlisting[frame=single,label=listing:v1, caption=\textbf{v1.pl} Program for automatic primer selection for PCR amplification of intronic sequences in Salix\, based on the poplar genome.]{img/v1.pl} |
or
\lstset{language=bash} \begin{center} \begin{lstlisting}[label=listing:exv1, caption=\textbf{Example of invoking the program for automatic primer design.} Primers are searched on linkage group~II between position 7715092 and 14539479.] ./v1.pl LGII 7715092 14539479 # program_name linkage_group start end \end{lstlisting}\end{center} |
in the text area…
Movies in presentation…
yes, crazy… I know, but impressive and useful if you work with biologists…
ok, so you’ll need that in your header:
\usepackage{multimedia} |
and this is an example of how to use it:
\frame { \frametitle{A measure for the variance of the phases: circular variance} \begin{figure}[ht] \movie[width=5cm,height=5cm,poster,loop,borderwidth=0.6bp]{ }{RunningPhases.avi} \caption{SCN - phases} \end{figure} } |
Oh and I just tried it with pdflatex…
You are currently browsing the xaphirecipes blog archives for June, 2010.
