Skip to Main Content

Preparing Scientific Documents with LaTeX

LaTex Codes

\documentclass{article}
\usepackage[utf8]{inputenc}

\title{Preparing Scientific Documents with LaTeX}
\author{Lewis Li}
\date{January 2024}

%My first LaTex file

\begin{document}
\maketitle

\section{Introduction}

\end{document}

\documentclass{article}
\usepackage[utf8]{inputenc}

%\usepackage{fontspec}
%\setmainfont{Times New Roman}

%Font Families
\renewcommand{\familydefault}{\sfdefault}

\title{Preparing Scientific Documents with LaTeX}
\author{Lewis Li}
\date{January 2024}

%My first LaTex file

\begin{document}
\maketitle

\section{Introduction}

%Font Sizes
{\Huge You} {\huge can} {\LARGE also} {\Large manually} {\large alter} {\normalsize the} {\small font} {\footnotesize size}

%Font Styles
Welcome to our {\LaTeX} \textbf{session} \underline{which} is held by \textbf{\textit{Library}}.

\end{document}

\documentclass{article}
\usepackage[utf8]{inputenc}

\title{Preparing Scientific Documents with LaTeX}
\author{Lewis Li}
\date{January 2024}

%My first LaTex file

\begin{document}
\maketitle

\section{Introduction}

%Font Sizes
{\Huge You} {\huge can} {\LARGE also} {\Large manually} {\large alter} {\normalsize the} {\small font} {\footnotesize size}

%Font Styles
Welcome to our {\LaTeX} \textbf{session} \underline{which} is held by \textbf{\textit{Library}}

%Footnote
Welcome to our LaTex session which is held by Library\footnote{CityU Library}! This workshop is part of the Digital Literacy Series\footnote{The Digital Literacy Series is the Library’s workshop for CityU students}.

\end{document}

\documentclass{article}
\usepackage[utf8]{inputenc}

%\usepackage{indentfirst}

\title{Preparing Scientific Documents with LaTeX}
\author{Lewis Li}
\date{January 2024}

%My first LaTex file

\begin{document}
\maketitle

\section{Introduction}

This is the introduction ...

%Font Sizes
{\Huge You} {\huge can} {\LARGE also} {\Large manually} {\large alter} {\normalsize the} {\small font} {\footnotesize size}

%Footnote
Welcome to our {\LaTeX} \textbf{session} \underline{which} is held by \textbf{\textit{Library}}\footnote{CityU Library}! This workshop is part of the Digital Literacy Series\footnote{The Digital Literacy Series is the Library’s workshop for CityU students}.

%Sections
\section{Literature Review}
\subsection{what is LaTex?}
\subsubsection{History of LaTex}
\paragraph{LaTex was developed by ...}

%Unordered List
\begin{itemize}
\item A document preparation system.
\item LaTeX is available as free software.
\end{itemize}

%Ordered List
\begin{enumerate}
\item A document preparation system.
\item LaTeX is available as free software.
\end{enumerate}

\end{document}

\documentclass{article}
\usepackage[utf8]{inputenc}

\title{Preparing Scientific Documents with LaTeX}
\author{Lewis Li}
\date{January 2024}

%My first LaTex file

\begin{document}
\maketitle

\section{Introduction}

%Font Sizes
{\Huge You} {\huge can} {\LARGE also} {\Large manually} {\large alter} {\normalsize the} {\small font} {\footnotesize size}

%Footnote
Welcome to our {\LaTeX} \textbf{session} \underline{which} is held by \textbf{\textit{Library}}\footnote{CityU Library}! This workshop is part of the Digital Literacy Series\footnote{The Digital Literacy Series is the Library’s workshop for CityU students}.

%Sections
\section{Literature Review}
\subsection{what is LaTex?}
\subsubsection{History of LaTex}
\paragraph{LaTex was developed by ...}

%Unordered List
\begin{itemize}
\item A document preparation system.
\item LaTeX is available as free software.
\end{itemize}

%Ordered List
\begin{enumerate}
\item A document preparation system.
\item LaTeX is available as free software.
\end{enumerate}

%Tables (No Border)
\begin{center} % Align the whole table in centre
\begin{tabular}{ c c c } % c: central alignment, r:right alignment, l: left alignment
cell1 & cell2 & cell3 \\ % &: to add separate column
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9
\end{tabular}
\end{center}

%Tables (With Border)
\begin{center}
\begin{tabular}{ |c|c|c| }
\hline
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline
\end{tabular}
\end{center}

\newpage
%Tables (With Caption)
\begin{table}[h!]
\centering
\begin{tabular}{ |c|c|c| }
\hline
Col1 & Col2 & Col3 \\
\hline
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline
\end{tabular}
\caption{This is a table caption}
\label{table:one}
\paragraph{}
Refer to table \ref{table:one} 
\end{table}

\end{document}

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{ {./images/} } 

\title{Preparing Scientific Documents with LaTeX}
\author{Lewis Li}
\date{January 2024}

%My first LaTex file

\begin{document}
\maketitle

\section{Introduction}

%Font Sizes
{\Huge You} {\huge can} {\LARGE also} {\Large manually} {\large alter} {\normalsize the} {\small font} {\footnotesize size}

%Footnote
Welcome to our {\LaTeX} \textbf{session} \underline{which} is held by \textbf{\textit{Library}}\footnote{CityU Library}! This workshop is part of the Digital Literacy Series\footnote{The Digital Literacy Series is the Library’s workshop for CityU students}.

%Sections
\section{Literature Review}
\subsection{what is LaTex?}
\subsubsection{History of LaTex}
\paragraph{LaTex was developed by ...}

%Unordered List
\begin{itemize}
\item A document preparation system.
\item LaTeX is available as free software.
\end{itemize}

%Ordered List
\begin{enumerate}
\item A document preparation system.
\item LaTeX is available as free software.
\end{enumerate}

%Tables (No Border)
\begin{center} % Align the whole table in centre
\begin{tabular}{ c c c } % c: central alignment, r:right alignment, l: left alignment
cell1 & cell2 & cell3 \\ % &: to add separate column
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9
\end{tabular}
\end{center}

%Tables (With Border)
\begin{center}
\begin{tabular}{ |c|c|c| }
\hline
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline
\end{tabular}
\end{center}

\newpage
%Tables (With Caption)
\begin{table}[h!]
\centering
\begin{tabular}{ |c|c|c| }
\hline
Col1 & Col2 & Col3 \\
\hline
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline
\end{tabular}
\caption{This is a table caption}
\label{table:one}
\paragraph{}
Refer to table \ref{table:one} 
\end{table}

\newpage
%Images
\begin{figure}[h]
\centering
\includegraphics[width=\textwidth]{dam}
\caption{A nice dam!}
\label{fig:damlabel}
\paragraph{}
Refer to figure \ref{fig:damlabel} 
\end{figure}

\end{document}

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[rightcaption]{sidecap}
\usepackage{graphicx}
\graphicspath{ {./images/} } 

\title{Preparing Scientific Documents with LaTeX}
\author{Lewis Li}
\date{January 2024}

%My first LaTex file

\begin{document}

\tableofcontents        %add “Table of contents”
\listoffigures            %add “List of figures”
\listoftables            %add “List of tables”

\maketitle

\section{Introduction}

%Font Sizes
{\Huge You} {\huge can} {\LARGE also} {\Large manually} {\large alter} {\normalsize the} {\small font} {\footnotesize size}

%Footnote
Welcome to our {\LaTeX} \textbf{session} \underline{which} is held by \textbf{\textit{Library}}\footnote{CityU Library}! This workshop is part of the Digital Literacy Series\footnote{The Digital Literacy Series is the Library’s workshop for CityU students}.

%Sections
\section{Literature Review}
\subsection{what is LaTex?}
\subsubsection{History of LaTex}
\paragraph{LaTex was developed by ...}

%Unordered List
\begin{itemize}
\item A document preparation system.
\item LaTeX is available as free software.
\end{itemize}

%Ordered List
\begin{enumerate}
\item A document preparation system.
\item LaTeX is available as free software.
\end{enumerate}

%Tables (No Border)
\begin{center} % Align the whole table in centre
\begin{tabular}{ c c c } % c: central alignment, r:right alignment, l: left alignment
cell1 & cell2 & cell3 \\ % &: to add separate column
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9
\end{tabular}
\end{center}

%Tables (With Border)
\begin{center}
\begin{tabular}{ |c|c|c| }
\hline
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline
\end{tabular}
\end{center}

\newpage
%Tables (With Caption)
\begin{table}[h!]
\centering
\begin{tabular}{ |c|c|c| }
\hline
Col1 & Col2 & Col3 \\
\hline
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline
\end{tabular}
\caption{This is a table caption}
\label{table:one}
\paragraph{}
Refer to table \ref{table:one} 
\end{table}

\newpage
%Images
\begin{figure}[h]
\centering
\includegraphics[width=\textwidth]{dam}
\caption{A nice dam by American Public Power Association}
\label{fig:dam1}
\paragraph{}
Refer to figure \ref{fig:dam1} 
\end{figure}

\end{document}

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[rightcaption]{sidecap}
\usepackage{graphicx}
\usepackage{amsmath}
\graphicspath{ {./images/} } 

\title{Preparing Scientific Documents with LaTeX}
\author{Lewis Li}
\date{January 2024}

%My first LaTex file

\begin{document}

\tableofcontents        %add “Table of contents”
\listoffigures            %add “List of figures”
\listoftables            %add “List of tables”

\maketitle

\section{Introduction}

%Font Sizes
{\Huge You} {\huge can} {\LARGE also} {\Large manually} {\large alter} {\normalsize the} {\small font} {\footnotesize size}

%Footnote
Welcome to our {\LaTeX} \textbf{session} \underline{which} is held by \textbf{\textit{Library}}\footnote{CityU Library}! This workshop is part of the Digital Literacy Series\footnote{The Digital Literacy Series is the Library’s workshop for CityU students}.

%Sections
\section{Literature Review}
\subsection{what is LaTex?}
\subsubsection{History of LaTex}
\paragraph{LaTex was developed by ...}

%Unordered List
\begin{itemize}
\item A document preparation system.
\item LaTeX is available as free software.
\end{itemize}

%Ordered List
\begin{enumerate}
\item A document preparation system.
\item LaTeX is available as free software.
\end{enumerate}

%Tables (No Border)
\begin{center} % Align the whole table in centre
\begin{tabular}{ c c c } % c: central alignment, r:right alignment, l: left alignment
cell1 & cell2 & cell3 \\ % &: to add separate column
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9
\end{tabular}
\end{center}

%Tables (With Border)
\begin{center}
\begin{tabular}{ |c|c|c| }
\hline
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline
\end{tabular}
\end{center}

\newpage
%Tables (With Caption)
\begin{table}[h!]
\centering
\begin{tabular}{ |c|c|c| }
\hline
Col1 & Col2 & Col3 \\
\hline
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline
\end{tabular}
\caption{This is a table caption}
\label{table:one}
\paragraph{}
Refer to table \ref{table:one} 
\end{table}

\newpage
%Images
\begin{figure}[h]
\centering
\includegraphics[width=\textwidth]{dam}
\caption{A nice dam by American Public Power Association}
\label{fig:dam1}
\paragraph{}
Refer to figure \ref{fig:dam1} 
\end{figure}

%Mathematical Expressions
\newpage
Example 1: \\
\paragraph{}
The well known Pythagorean theorem \(x^2 + y^2 = z^2\) was 
proved to be invalid for other exponents. 
Meaning the next equation has no integer solutions: \[ x^n + y^n = z^n \] \[ \Omega = \sum_{k=1}^{n} \omega_k \]

\paragraph{}
\paragraph{}
Example 2: \\
%\begin{subequations}
\begin{align} 
2x - 5y &=  8 \label{eqn:one} \\ 
3x + 9y &=  -12 \label{eqn:two} 
\end{align}
%\end{subequations}
Here are the equation (\ref{eqn:one}) and equation (\ref{eqn:two}).

\end{document}

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[rightcaption]{sidecap}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,      
    urlcolor=cyan,
    }

\graphicspath{ {./images/} } 

\title{Preparing Scientific Documents with LaTeX}
\author{Lewis Li}
\date{January 2024}

%My first LaTex file

\begin{document}

\tableofcontents        %add “Table of contents”
\listoffigures            %add “List of figures”
\listoftables            %add “List of tables”

\maketitle

\section{Introduction}

%Font Sizes
{\Huge You} {\huge can} {\LARGE also} {\Large manually} {\large alter} {\normalsize the} {\small font} {\footnotesize size}

%Footnote
Welcome to our {\LaTeX} \textbf{session} \underline{which} is held by \textbf{\textit{Library}}\footnote{CityU Library}! This workshop is part of the Digital Literacy Series\footnote{The Digital Literacy Series is the Library’s workshop for CityU students}.

%Sections
\section{Literature Review}
\subsection{what is LaTex?}
\subsubsection{History of LaTex}
\paragraph{LaTex was developed by ...}

%Unordered List
\begin{itemize}
\item A document preparation system.
\item LaTeX is available as free software.
\end{itemize}

%Ordered List
\begin{enumerate}
\item A document preparation system.
\item LaTeX is available as free software.
\end{enumerate}

%Tables (No Border)
\begin{center} % Align the whole table in centre
\begin{tabular}{ c c c } % c: central alignment, r:right alignment, l: left alignment
cell1 & cell2 & cell3 \\ % &: to add separate column
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9
\end{tabular}
\end{center}

%Tables (With Border)
\begin{center}
\begin{tabular}{ |c|c|c| }
\hline
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline
\end{tabular}
\end{center}

\newpage
%Tables (With Caption)
\begin{table}[h!]
\centering
\begin{tabular}{ |c|c|c| }
\hline
Col1 & Col2 & Col3 \\
\hline
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline
\end{tabular}
\caption{This is a table caption}
\label{table:one}
\paragraph{}
Refer to table \ref{table:one} 
\end{table}

\newpage
%Images
\begin{figure}[h]
\centering
\includegraphics[width=\textwidth]{dam}
\caption{A nice dam by American Public Power Association}
\label{fig:dam1}
\paragraph{}
Refer to figure \ref{fig:dam1} 
\end{figure}

%Mathematical Expressions
\newpage
Example 1: \\
\paragraph{}
The well known Pythagorean theorem \(x^2 + y^2 = z^2\) was 
proved to be invalid for other exponents. 
Meaning the next equation has no integer solutions: \[ x^n + y^n = z^n \] \[ \Omega = \sum_{k=1}^{n} \omega_k \]

\paragraph{}
\paragraph{}
Example 2: \\
%\begin{subequations}
\begin{align} 
2x - 5y &=  8 \label{eqn:one} \\ 
3x + 9y &=  -12 \label{eqn:two} 
\end{align}
%\end{subequations}
Here are the equation (\ref{eqn:one}) and equation (\ref{eqn:two}).

%Hyperlink
\newpage
\href{http://www.cityu.edu.hk/lib/}{CityU Library}

\end{document}

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[rightcaption]{sidecap}
\usepackage{graphicx}
\usepackage{amsmath}

\usepackage[
  backend=biber,
  style=apa,
]{biblatex}
\addbibresource{sample.bib}

\usepackage{hyperref}
\hypersetup{
    colorlinks=false,
    linkcolor=blue,
    filecolor=magenta,      
    urlcolor=cyan,
    }

\graphicspath{ {./images/} } 

\title{Preparing Scientific Documents with LaTeX}
\author{Lewis Li}
\date{January 2024}

%My first LaTex file

\begin{document}

\tableofcontents        %add “Table of contents”
\listoffigures            %add “List of figures”
\listoftables            %add “List of tables”

\maketitle

\section{Introduction}

%Font Sizes
{\Huge You} {\huge can} {\LARGE also} {\Large manually} {\large alter} {\normalsize the} {\small font} {\footnotesize size}

%Footnote
Welcome to our {\LaTeX} \textbf{session} \underline{which} is held by \textbf{\textit{Library}}\footnote{CityU Library}! This workshop is part of the Digital Literacy Series\footnote{The Digital Literacy Series is the Library’s workshop for CityU students}.

%Sections
\section{Literature Review}
\subsection{what is LaTex?}
\subsubsection{History of LaTex}
\paragraph{LaTex was developed by ...}

%Unordered List
\begin{itemize}
\item A document preparation system.
\item LaTeX is available as free software.
\end{itemize}

%Ordered List
\begin{enumerate}
\item A document preparation system.
\item LaTeX is available as free software.
\end{enumerate}

%Tables (No Border)
\begin{center} % Align the whole table in centre
\begin{tabular}{ c c c } % c: central alignment, r:right alignment, l: left alignment
cell1 & cell2 & cell3 \\ % &: to add separate column
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9
\end{tabular}
\end{center}

%Tables (With Border)
\begin{center}
\begin{tabular}{ |c|c|c| }
\hline
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline
\end{tabular}
\end{center}

\newpage
%Tables (With Caption)
\begin{table}[h!]
\centering
\begin{tabular}{ |c|c|c| }
\hline
Col1 & Col2 & Col3 \\
\hline
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9 \\
\hline
\end{tabular}
\caption{This is a table caption}
\label{table:one}
\paragraph{}
Refer to table \ref{table:one} 
\end{table}

\newpage
%Images
\begin{figure}[h]
\centering
\includegraphics[width=\textwidth]{dam}
\caption{A nice dam by American Public Power Association}
\label{fig:dam1}
\paragraph{}
Refer to figure \ref{fig:dam1} 
\end{figure}

%Mathematical Expressions
\newpage
Example 1: \\
\paragraph{}
The well known Pythagorean theorem \(x^2 + y^2 = z^2\) was 
proved to be invalid for other exponents. 
Meaning the next equation has no integer solutions: \[ x^n + y^n = z^n \] \[ \Omega = \sum_{k=1}^{n} \omega_k \]

\paragraph{}
\paragraph{}
Example 2: \\
%\begin{subequations}
\begin{align} 
2x - 5y &=  8 \label{eqn:one} \\ 
3x + 9y &=  -12 \label{eqn:two} 
\end{align}
%\end{subequations}
Here are the equation (\ref{eqn:one}) and equation (\ref{eqn:two}).

%Hyperlink
\newpage
\href{http://www.cityu.edu.hk/lib/}{CityU Library}

%Referencing
\newpage
Data science is a "concept to unify statistics, data analysis, informatics, and their related methods" to "understand and analyze actual phenomena" with data (\cite{alma991029351955503408}). It uses techniques and theories drawn from many fields within the context of mathematics, statistics, computer science, information science, and domain knowledge (\cite{alma991021238779703408}). However, data science is different from computer science and information science. Turing Award winner Jim Gray imagined data science as a "fourth paradigm" of science (empirical, theoretical, computational, and now data-driven) and asserted that "everything about science is changing because of the impact of information technology" and the data deluge (\cite{alma991029152253303408}).

\section{References}
\printbibliography[heading=none] 

\end{document}