LaTeX code files, was written in my learning process.
LaTeX is a document preparation system for high-quality typesetting. It is most often used for medium-to-large technical or scientific documents but it can be used for almost any from of publishing.
LaTeX encourages authors not to worry too much about the apprearance of their documents but not concertrante on getting the right content.
What it is, not How it looks.
Typesetting
% this is comment
\\
\quad
or \qquad
\%
, \{
, ... (use anti-slash before special character)\textbf{value}
\textit{value}
\underline{value}
\dots
\href{url}{description}
Math
$ value $
\alpha
, \beta
, \omega
, ...X_2
X^2
x^{2x + 3}
or x_{2x + 3}
(use brackets)\sum_{k=1}^n
d=\frac{5x}{y}
\begin{equation}
\omega = \sum_{i=1}^{n}w_ix % content of equation
\end{equation}
\begin{equation}
\label{omega eq} % name of equation used to refered
\omega = \sum_{i=1}^{n}w_ix
\end{equation}
\ref{omega eq}
Lists
\begin{itemize} % Unordered list
\item Stackoverflow
\item GitHub
\end{itemize}
\begin{itemize} % Unordered list
\item Stackoverflow
\item GitHub
\end{itemize}
\begin{enumerate} % Ordered list
\item HTML
\item CSS
\end{enumerate}
\begin{enumerate} % list inside list
\item HTML
\begin{enumerate}
\item HTML4
\item HTML5
\end{enumerate}
\item CSS
\item PHP
\item JS framework
\begin{itemize}
\item Angular
\item React
\item Vue
\end{itemize}
\end{enumerate}
Sections
\section{Introduction}
\label{intro section}
This is the first section
\section{Problematic}
This section based on section \ref{intro section}
\subsection{Problem of access}
Just simple Text
\subsubsection{Title here}
Multi columns page
\documentclass[twocolumn]{article}
Packages
\documentclass{article}
\usepackage{package_name} % add package
\begin{document}
Hello!
\end{document}
Package > amsmath
\documentclass{article}
\usepackage{amsmath} % use package (LaTeX will install package if not exist in your computer)
\begin{document}
\begin{equation*} % *: don't add number of equation
\sum
\end{equation*}
\begin{align*} % align equation..
(X+1)^3&=(X+1)(X+1)(X+1)\\
&=(X+1)(X^2 + 2X + 1)\\
&=X^3+3X^2+3X+1
\end{align*}
\end{document}
\begin{equation} % for add single number of equation
\begin{align*}
(X+1)^3&=(X+1)(X+1)(X+1)\\
&=(X+1)(X^2 + 2X + 1)\\
&=X^3+3X^2+3X+1
\end{align*}
\end{equation}
Pictures
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\includegraphics{img_url}
\end{figure}
\end{document}
\begin{figure}
\centering % make image in the center
\includegraphics{images/Blue.png}
\end{figure}
\begin{figure}[!t] % make image in the (t:top, b:bottom, h:here, !:force[optional])
\includegraphics{images/Blue.png}
\end{figure}
\begin{figure}
% change image width: 0.5\textwidth = 50% of the text width, 0.9\columnwidth = 90% of the column width
\includegraphics[width=0.5\textwidth]{images/Blue.png}
\end{figure}
\begin{figure}
\caption{value} % name of photo (caption)
\includegraphics{images/Blue.png}
\end{figure}
mentioned in Fig. \ref{img_ref}
\begin{figure}
\caption{\label{img_ref}value}
\includegraphics{images/Blue.png}
\end{figure}
\graphicspath{{images/}} % pictures path (folder)
\begin{document}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\begin{document}
\begin{figure*} % figure take all page with (in case we use twocolumn)
\centering
\begin{subfigure}[b]{0.45\columnwidth}
\includegraphics[width=\textwidth]{images/Red.png}
\caption{}
\label{fig:red_logo}
\end{subfigure}
~ % ~: beside, <new line (blank)>: bottom to
\begin{subfigure}[b]{0.45\columnwidth}
\includegraphics[width=\textwidth]{images/Blue.png}
\caption{}
\label{fig:blue_logo}
\end{subfigure}
\caption{(a) Logo Red. (b) Logo Blue.}
\label{fig:app_logo}
\end{figure*}
\end{document}
Tables
\usepackage{tabularx}
\begin{document}
\begin{table}[!h]
\begin{tabular}{|l|c|r|} % alignment of columns (l: left, r: right, c: center), |: columns separator (vertical ligne)
\hline % make ligne (separator)
Item & Qty & Unit \\ % row one
\hline
Widget & 1 & 199.99 \\
\hline
Gadget & 2 & 399.99 \\
\hline
\end{tabular}
\end{table}
\end{document}