4.1 Structure of LaTeX file

Preamble \documentclass[option]{style}
definitions
\begin{document}
Body...
\end{document}

4.2 Commands and Environment


4.3 Special Characters

There are 10 special characters in LaTeX, common special characters are
          #  $ ~ _ ^ % { } 
If they are to be printed as text, type
       \#   \$   \~   \_   \^   \{   \}

Work Example

Word file, LaTeX file, Modified LaTeX file done on 1/12/2012, Inserted graphics on 1/12/2012
  1. Paragraphing and sectioning
               \section{title}
               \subsection{title}
    
  2. Basic formatting of word: making bold, italic, underline, etc.
           {\bf Bold Text} and {\it Italic Text}
           {\em Emphasis} and {\rm Roman}
    
  3. adding lists such as item and enumerated list
           \begin{itemize} ... \end{itemize}
           \begin{enumerate} ... \end{enumerate}
           \begin{description} ... \end{description}
           \begin{verbatim} ... \end{verbatim}
    
    Individual list begins with \item.
  4. adding tables
    Examples :
           \begin{tabular}{|c|l|c|r|}
           Item & Description &  Quantity & Costs \\
           1    & toothbrush  &  1 & HKD5.00 \\
           2    & towel       &  2 & HKD20.00 \\
           \end{tabular}
    
  5. inserting mathematical formula
    inline formula embraced with a pair of $ s or \( and \).
    long equation are displayed using a pair of $$ or \[, \].
  6. inserting postscript file
    postscript figure can be inserted into the document using the package graphicx.
    use the package 'graphicx' in Preamble and insert the figure file in any graphics format with \includegraphics.
           \documentclass{article}
           \usepackage{graphicx}
           \begin{document}
             ...
             ...
           \includegraphics[scale=0.5,angle=90]{sample.jpg}
             ...
    
           \end{document}
    
  7. adding title, author and abstract
          \title{This is my title}
          \author{Mr. Morris Law}
          \date{\today}
          \begin{document}
          \maketitle
          \tableofcontents
    
  8. reference
      \label{labelname}  
      \ref{labelname}
      \pageref{labelname} to refer to the page where your reference resided.
    
  9. bibliography
       \begin{thebibliography}{99}
       \bibitem{lamport} Leslie Lamport. 
       ...
       \bibitem{knuth}Donald E Knuth.
       \end{thebibliography}
    
    The citation in the text can be made by
       \cite{key}
    

Back