Showing posts with label LaTEX. Show all posts
Showing posts with label LaTEX. Show all posts

Monday, 13 April 2009

LaTeX Introduction 4: Simple Math 2

This tutorial is still on simple mathematical expression. Processing document using Latex is very different from using proprietary word processing software which is based on GUI (Graphical User Interface). Using Latex, what you see in winEdt is not the final result you will get. Always compile the document after you make make any change and see the result.

Try this template first and after that do make exploration by yourself.


\documentclass[11pt]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{latexsym}

\setlength{\textwidth}{16cm}
\setlength{\hoffset}{-2cm}
\setlength{\textheight}{24.5cm}
\setlength{\voffset}{-2cm}

\setlength{\parindent}{0cm}
\addtolength{\parskip}{2mm}

\newcommand{\R}{\mathbb{R}} % What is this ?

\pagestyle{empty}

\begin{document}

\leftline{{\bf Demo 4 \hfill LEARNING \LaTeX{}}} % Header for first page different way with demo 3

\medskip % This is for medium skip

\leftline{{\bf 2008 -- 2009}}

\bigskip

\centerline{\bf Demo \LaTeX{} 4}

\bigskip

\subsection*{Some common mistakes}

\begin{itemize}
\item Always put numerals in math mode. Thus, do $27.3$, not 27.3.
\emph{When you have numerals like 27.3 in emphasized text, you usually want them in roman,
like $27.3$, not emphasized.} Also, a negative number, -273, will look wrong if left in
text mode. In math mode you get a proper minus sign $-273$.

When giving a range, $200-300$ will look like a subtraction. Here you can do
$200$-$300$ if you prefer. Notice the difference in the various dashes:
one dash is $200$-$300$, two dashes is $200$--$300$, three dashes is
$200$---$300$.

For numerals with units you can do $42\text{km}^2$.

\item Avoid blank lines around displays. Thus do not do
\begin{verbatim} % Hurufnya verbatim dan menampilkan apa adanya tanpa mengeksekusi perintah
For $W_1 = \{(q_1,\,0,\,0,\,0)\st q_1\in\R\}$ we have

$$
W_1^\perp = \{(q_1,\,q_2,\,0,\,p_2)\st q_1, q_2, p_2\in\R\}.
$$

For $W_2 = \{(q_1,\,q_2,\,0,\,0)\st q_1,q_2\in\R\}$ we have
% baris kosong tidak boleh
$$
W_2^\perp = \{(q_1,\,q_2,\,0,\,0)\st q_1, q_2 \in\R\} = W_2.
$$
\end{verbatim}
If you want to `set off' displays in your tex file, do this:
\begin{verbatim}
For $W_1 = \{(q_1,\,0,\,0,\,0)\st q_1\in\R\}$ we have
% % Untuk menampilkan spasi kosong hendaknya pakai % saja jangan dibiarkan kosong
$$
W_1^\perp = \{(q_1,\,q_2,\,0,\,p_2)\st q_1, q_2, p_2\in\R\}.
$$
%
For $W_2 = \{(q_1,\,q_2,\,0,\,0)\st q_1,q_2\in\R\}$ we have
%
$$
W_2^\perp = \{(q_1,\,q_2,\,0,\,0)\st q_1, q_2 \in\R\} = W_2.
$$
\end{verbatim}
\end{itemize}


\end{document}

Sunday, 12 April 2009

LaTEX Introduction 3: Section and subsection

It is relatively easy to handle structure of document in LaTEX especially on section and sub section management. Try the following template and do make self experiment.

\documentclass[11pt]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{latexsym}

\setlength{\textwidth}{16cm}
\setlength{\hoffset}{-2cm}
\setlength{\textheight}{24.5cm}
\setlength{\voffset}{-2cm}

\setlength{\parindent}{0cm}
\addtolength{\parskip}{2mm}

\begin{document}
\leftline{\textbf{Demo LaTEX 3}\hfill \textbf{2008 -- 2009}} % print the left and right text

\begin{center}
\Large\textbf{Demonstration 3: Sections and Sub Sections}
\end{center}

\bigskip

% \section*{Introduction}

\section{Basic definitions and examples}
One more advantage of LaTEX is in section and subsection handling. This is section 1. You do not need to print number of chapter and LaTEX will set it automatically.


\section{First results}
This is section 2.

\subsection{The situation in the 20th century}
This subsection 2.1

\subsection{Recent developments}
This is subsection 2.2

\section{More results}

This is section 3

\section{Concluding Remarks}
This is section 4
% \tableofcontents


\end{document}

Saturday, 11 April 2009

LaTEX Introduction 2: Simple Math

LaTEX is like a programming language. When you make document with LaTEX it is like you make a program. One of adavantages of LaTEX compared to other word processing softwares (especially a proprietary word processor) is its flexibility in mathematics formula writing. Of course, it is not trivial for beginners. In my experience, I need about 3 hours to make a very simple document with very basic mathematical expression.

There are a lot of sources on LaTEX in the internet. Just type a keyword on LaTEX in your search engine and then you will find abundance materials. If you just started and enjoy an example-based study, try this template and then do make an experiment by yourself.


% PREAMBLE (APPLIES TO WHOLE DOCUMENT) :
\documentclass[11pt]{article}

\usepackage{amsmath} % THESE THREE LINES SHOULD
\usepackage{amssymb} % BE KEPT IN EVERY DOCUMENT
\usepackage{latexsym} % YOU WRITE DURING THIS COURSE

\setlength{\textwidth}{16cm}
\setlength{\hoffset}{-2cm}
\setlength{\textheight}{24.5cm}
\setlength{\voffset}{-2cm}

\setlength{\parindent}{0cm}
\addtolength{\parskip}{2mm}

% END OF PREAMBLE

\begin{document}

\begin{center}
\textbf{Demonstration 2: Simple maths, 2008 -- 09}\\[3mm]
\today
\end{center}

\bigskip
% $ $ is for mathematical function
% ----- is for membuat tanda garis atau
% $-$ adalah tanda minus
% emph is for cetak miring
% int is for integral function
% | | is for absolute
% $$ for function

In the peptide identification using PMF, first of all, the sample was seeded in the Mass Spectrometry (MS) and then its mass spectrometric data was processed. The general processing steps are baseline (background) substraction, noise removal, peak picking, peak clustering, and de-isotoping. The data output of those steps is a peptide candidate list. This candidate list then will be compared to the database. The main key of the protein identification is the accuracy to produce peptide candidate list and time spent in database comparison. This report will use new approach. The theoretical spectrometric data will be developed based on the true peptide list after that is compared to real spectra data gotten from experiment. By using this approach the data processing which will be applied to experimental spectra data is only baseline (background) substraction.

The probability of isotope's position can be estimated by using Poisson distribution. The first peak is always assumed as monoisotope peak and then the adjacent peak with distance 1+error will be member of the group. This method also has been implemented in programmable computer systems, Field Programmable Gate Array, based.
$$
E(i,m_p)=\frac{a_p\,F(m_p)^i}{i!}; i=1,2,3,\ldots; E(i,m_p)>0, % Poisson Distribution for peptide
$$
and
$$
F(m_p)=0.000594\,m_p-0.03091,
$$
where $F(m_p)$ is maaping function of $m_p$, $E(i,m_p)$ is intensity of $i$-th, $m_p$ is monoisiotopic mass, $a_p$ is a monoisiotopic intensity at $m_p$,and $i$ is number of isotope in one cluster.

\end{document}

Monday, 30 March 2009

Word Processing: LaTEX Introduction (1)

LaTEX is one of open-source word processing which is very powerful and very convenient. Like with other new softwares, if we use for the first time, we need time to learn and accustomized with it. However, once we have use it, it will be much easier and give us independence of our document processing.

For the beginning just try this template. Offcourse you need LaTEX compiler software and winEdt for editing it.

% START OF PREAMBLE
\documentclass[11pt]{article}

\usepackage{amsmath} % These three rows should be kept
\usepackage{amssymb} % in every document
\usepackage{latexsym} % To use latex symbol font.

\setlength{\textwidth}{16cm} % original: 16, this is width of txt
\setlength{\hoffset}{-2cm} % Horizontal offset: distance of text from tepi kertas
\setlength{\textheight}{24.5cm} % original: 24.5
\setlength{\voffset}{-2cm} % Vertical offset: Jarak antara tulisan dengan tepi kertas

\setlength{\parindent}{0cm}
\addtolength{\parskip}{2mm} % Line spacing for new pharagraph

% END OF PREAMBLE


\begin{document} % Begin for whole Document

\begin{center} % Begin for judul: center means ditengah
Demonstration 1: Text, Graduate Year 2008 -- 09
\end{center} % End for judul

Since Mass Spectrometry replaced 2 Dimensional Electrophoresis (2DE) method, the development of proteomics research is much more rapid. The main aims of proteomics are protein identification and quantification. Initially research in proteomics was limited only for peptide identification. Further steps, the research also include protein profiling and its quantitation. Quantitative proteomics is a powerful tool to study the relative change of the same peptide which was treated in different condition. The current emerging of Mass Spectrometry (MS) technology especially on its resolution, accuracy, and speed, has been made quantitative proteomics more powerful to be used in wide proteome analysis. However the outcome data of MS is only spectra, not directly quantitative.



\end{document} % End for whole document