Concept¶
In this class you will learn how to use LaTeX, a markup language used to create high quality scientific and technical documents. Through examples and hands-on exercises, you will discover how to use LaTeX to create well-structured documents with a professional appearance and high typographical accuracy.
You will learn how to use various LaTeX tools and commands to format text, insert figures and create tables. In addition, you will also learn how to use additional packages that will allow you to further customize your documents.
linux installation¶
# use latexmk
# use zathura
# use texlive-full
# add the configurations
xdg-mime query default application/pdf
xdg-mime default zathura.desktop application/pdf
# create configuration file
mkdir ~/.config/latexmk
touch ~/.config/latexmk/latexmkrc
# the file content
$pdf_previewer = "zathura";
# create symbolic link for root
ln -s -f /home/user/.config/latexmk/latexmkrc latexmkrc
# create a document.tex
# compile and show
latexmk -pdf document.tex -pvc
# can to show in the browser
file:///directory/document.pdf
Code¶
\documentclas[a4paper]{article} % document style
\usepackage[utf8]{inputenc} % special characters
\usepackage[spanish]{babel} % spanish characters
\usepackage{graphicx} % insert images
\useopackage{xcolor} % insert color
\usepackage[hidelinks]{hyperref} % gestion de hipervinculos
\usepackage[margin=2cm, top=2cm, includefoot]{geometry}
\usepackage[hidelinks]{hyperref}
\usepackage{setspace}
% global variables
\newcommand{\startLOGO}{Images/image} % new variable
% page stype
\addto\captionsspanish{\renewcommand{\contentsname}{Tabla de contenidos}} % change a command
\fancyhf{} % style
\setstretch{1,2}
\renewcommand{\headrule}{\hbox to\headwidth{\color{stylecolor}\leaders\hrule height \headrulewidth\hfill}}
% colors definitions
\definecolor{redcolor}{146c8a} % redcolor-->name, 146c8a-->the color in HEX
\begin{document} % start document
\begin{titlepage}
\centering
\includegraphics[with=0.5\textwith]{Images/image} % include images
\includegraphics[with=0.5\textwith]{\startLOGO}
{\scshape\LARGE Technique Information} \par\vspace{1cm} % add 1cm after the text
{\textcolor{redcolor} This is a line in color}
\vfill % for modify the shape of the part of document
\end{titlepage}
% --------------------------------------------------------------------------------new page
\clearpage
\tableofcontents
\clearpage
%-------------------------------------------------------------------------------- development 1
\section{Introduction}
\centering % centering
\justifying % quit the centering
\href{https://google.com}{\textbf{\color{redcolor}Google}} % crear un hipervinculo
\begin{itemize}
\item item1 % create items
\end{itemize}
% -------------------------------------------------------------- for images on pages
\begin{figure[h]}
\centering
\includegraphics[with=0.5\textwith]{Images/image}
\caption
\label
\end{figure}
\ref{fig:imageLabel}
\pageref{fig:imageLabel}
%---------------------------------------------------------------------tabulars
\begin{tabular}{ c | c | c }
\textbf{Technology} & \textbf{Version}
\hline
php & 5.2.34
Apache & 4.6.75
\end{tabular}
% ----------------------------------------------------------------others
\quad % un espacio entre lineas
\qquad % un doble espacio entre lineas
\end{document} % finish document
sheets¶
## bibliography
\usepackage{cite}
\usepackage{url}
\usepackage{hidelinks}{hyperref}
\usepacake{apacite} % for style APA
\cite{forReference1}
\cite{nolinkurl{forReference1}} % for problems with hyperref
\bibliographystyle{ieeetran}
\bibliographystyle{apacite}
\bibliography{bibliografia} % document with bibliogaphy
@book{forReference1,
author = {},
author = {surname, name and surname1, name1}
title = {},
journal = {},
volumen = {},
number = {},
pages = {},
publisher = {},
doi = {},
url = {},
year = {},
}
# items
\usepackage{enumitem} % more styles
\begin{itemize}
\begin{enumerate}[i.]
\begin{enumerate}[I.]
\begin{enumerate}[a.]
\begin{itemize}[label=$\rightarrow$]
\item item1
\item item2
\end{enumerate}
# letters style
\textbf{blod}
\textit{italic}
\underline{underline text}
\begin{center}
centering text
\end{center}
# tables
\begin{table}
\caption{caption of table}
\label{table name for reference}
\begin{tabular}{|c|c|c|}
\hline
column6 & column1 \\\hline
column2 & column2 \\\hline
\hline
\end{tabular}
\end{table}
# figures
\package{graphicx}
\begin{figure}
\centering
\caption{}
\label{}
\includegraphics{}
\end{figure}
# href
\usepackage{hyperreff}
\hypersetup{
colorlinks=true,
linkcolor = red,
urlcolor = blue,
}