2015-04-23 14:54:52 +03:00
|
|
|
|
---
|
|
|
|
|
language: latex
|
|
|
|
|
contributors:
|
|
|
|
|
- ["Chaitanya Krishna Ande", "http://icymist.github.io"]
|
2021-02-01 00:25:39 +03:00
|
|
|
|
- ["Colton Kohnke", "https://github.com/voltnor"]
|
2015-10-09 18:00:57 +03:00
|
|
|
|
- ["Sricharan Chiruvolu", "http://sricharan.xyz"]
|
2015-11-11 09:26:17 +03:00
|
|
|
|
- ["Ramanan Balakrishnan", "https://github.com/ramananbalakrishnan"]
|
2016-09-27 17:41:45 +03:00
|
|
|
|
- ["Svetlana Golubeva", "https://attillax.github.io/"]
|
2018-10-24 23:06:22 +03:00
|
|
|
|
- ["Oliver Kopp", "http://orcid.org/0000-0001-6962-4290"]
|
2015-04-23 14:54:52 +03:00
|
|
|
|
filename: learn-latex.tex
|
|
|
|
|
---
|
2015-10-17 19:13:47 +03:00
|
|
|
|
|
|
|
|
|
```tex
|
2015-04-23 14:54:52 +03:00
|
|
|
|
% All comment lines start with %
|
|
|
|
|
% There are no multi-line comments
|
|
|
|
|
|
2015-10-09 22:29:01 +03:00
|
|
|
|
% LaTeX is NOT a "What You See Is What You Get" word processing software like
|
2015-04-23 14:54:52 +03:00
|
|
|
|
% MS Word, or OpenOffice Writer
|
|
|
|
|
|
2015-10-15 01:05:18 +03:00
|
|
|
|
% Every LaTeX command starts with a backslash (\)
|
2015-10-09 22:29:01 +03:00
|
|
|
|
|
2015-10-09 00:07:05 +03:00
|
|
|
|
% LaTeX documents start with a defining the type of document it's compiling
|
2015-10-09 22:29:01 +03:00
|
|
|
|
% Other document types include book, report, presentations, etc.
|
|
|
|
|
% The options for the document appear in the [] brackets. In this case
|
|
|
|
|
% it specifies we want to use 12pt font.
|
2015-10-09 00:07:05 +03:00
|
|
|
|
\documentclass[12pt]{article}
|
|
|
|
|
|
|
|
|
|
% Next we define the packages the document uses.
|
2015-10-09 22:29:01 +03:00
|
|
|
|
% If you want to include graphics, colored text, or
|
2018-10-11 18:59:15 +03:00
|
|
|
|
% source code from another language file into your document,
|
|
|
|
|
% you need to enhance the capabilities of LaTeX. This is done by adding packages.
|
2016-09-27 17:41:45 +03:00
|
|
|
|
% I'm going to include the float and caption packages for figures
|
|
|
|
|
% and hyperref package for hyperlinks
|
2015-10-09 00:07:05 +03:00
|
|
|
|
\usepackage{caption}
|
|
|
|
|
\usepackage{float}
|
2016-09-27 17:41:45 +03:00
|
|
|
|
\usepackage{hyperref}
|
2015-10-09 00:07:05 +03:00
|
|
|
|
|
|
|
|
|
% We can define some other document properties too!
|
2016-09-27 17:41:45 +03:00
|
|
|
|
\author{Chaitanya Krishna Ande, Colton Kohnke, Sricharan Chiruvolu \& \\
|
|
|
|
|
Svetlana Golubeva}
|
2015-10-09 00:07:05 +03:00
|
|
|
|
\date{\today}
|
2018-10-24 23:06:22 +03:00
|
|
|
|
\title{Learn \LaTeX{} in Y Minutes!}
|
2015-10-09 00:07:05 +03:00
|
|
|
|
|
|
|
|
|
% Now we're ready to begin the document
|
|
|
|
|
% Everything before this line is called "The Preamble"
|
2018-10-11 18:59:15 +03:00
|
|
|
|
\begin{document}
|
|
|
|
|
% if we set the author, date, title fields, we can have LaTeX
|
2015-10-09 22:29:01 +03:00
|
|
|
|
% create a title page for us.
|
2015-04-23 14:54:52 +03:00
|
|
|
|
\maketitle
|
|
|
|
|
|
2016-09-27 17:41:45 +03:00
|
|
|
|
% If we have sections, we can create table of contents. We have to compile our
|
|
|
|
|
% document twice to make it appear in right order.
|
2018-10-11 18:59:15 +03:00
|
|
|
|
% It is a good practice to separate the table of contents form the body of the
|
2016-09-27 17:41:45 +03:00
|
|
|
|
% document. To do so we use \newpage command
|
|
|
|
|
\newpage
|
|
|
|
|
\tableofcontents
|
|
|
|
|
|
|
|
|
|
\newpage
|
|
|
|
|
|
2015-10-09 18:00:57 +03:00
|
|
|
|
% Most research papers have abstract, you can use the predefined commands for this.
|
|
|
|
|
% This should appear in its logical order, therefore, after the top matter,
|
2018-10-11 18:59:15 +03:00
|
|
|
|
% but before the main sections of the body.
|
2015-10-09 22:29:01 +03:00
|
|
|
|
% This command is available in the document classes article and report.
|
2015-10-09 18:00:57 +03:00
|
|
|
|
\begin{abstract}
|
2018-10-24 23:06:22 +03:00
|
|
|
|
\LaTeX{} documentation written as \LaTeX! How novel and totally not
|
2016-09-27 17:41:45 +03:00
|
|
|
|
my idea!
|
2015-10-09 18:00:57 +03:00
|
|
|
|
\end{abstract}
|
|
|
|
|
|
2018-10-11 18:59:15 +03:00
|
|
|
|
% Section commands are intuitive.
|
2015-10-09 18:00:57 +03:00
|
|
|
|
% All the titles of the sections are added automatically to the table of contents.
|
2015-04-23 14:54:52 +03:00
|
|
|
|
\section{Introduction}
|
2016-09-27 17:41:45 +03:00
|
|
|
|
Hello, my name is Colton and together we're going to explore \LaTeX!
|
2015-04-23 14:54:52 +03:00
|
|
|
|
|
|
|
|
|
\section{Another section}
|
2015-10-09 00:07:05 +03:00
|
|
|
|
This is the text for another section. I think it needs a subsection.
|
|
|
|
|
|
2015-10-09 22:29:01 +03:00
|
|
|
|
\subsection{This is a subsection} % Subsections are also intuitive.
|
2018-10-24 23:06:22 +03:00
|
|
|
|
I think we need another one.
|
2015-10-09 00:07:05 +03:00
|
|
|
|
|
|
|
|
|
\subsubsection{Pythagoras}
|
|
|
|
|
Much better now.
|
2015-04-23 14:54:52 +03:00
|
|
|
|
\label{subsec:pythagoras}
|
|
|
|
|
|
2015-10-15 01:05:18 +03:00
|
|
|
|
% By using the asterisk we can suppress LaTeX's inbuilt numbering.
|
2018-10-11 18:59:15 +03:00
|
|
|
|
% This works for other LaTeX commands as well.
|
|
|
|
|
\section*{This is an unnumbered section}
|
2015-10-09 00:07:05 +03:00
|
|
|
|
However not all sections have to be numbered!
|
2015-04-23 14:54:52 +03:00
|
|
|
|
|
2015-10-09 00:07:05 +03:00
|
|
|
|
\section{Some Text notes}
|
2016-09-27 17:41:45 +03:00
|
|
|
|
%\section{Spacing} % Need to add more information about space intervals
|
2018-10-24 23:06:22 +03:00
|
|
|
|
\LaTeX{} is generally pretty good about placing text where it should
|
2018-10-11 18:59:15 +03:00
|
|
|
|
go. If
|
2018-10-24 23:06:22 +03:00
|
|
|
|
a line \\ needs \\ to \\ break \\ you add \textbackslash\textbackslash{}
|
|
|
|
|
to the source code.
|
|
|
|
|
|
|
|
|
|
Separate paragraphs by empty lines.
|
|
|
|
|
|
2022-01-03 18:52:43 +03:00
|
|
|
|
You need to add a tilde after abbreviations (if not followed by a comma) for a
|
|
|
|
|
non-breaking space, because otherwise the spacing after the dot is too large:
|
|
|
|
|
E.g., i.e., etc.~are are such abbreviations.
|
2015-10-09 22:29:01 +03:00
|
|
|
|
|
|
|
|
|
\section{Lists}
|
2016-09-27 17:41:45 +03:00
|
|
|
|
Lists are one of the easiest things to create in \LaTeX! I need to go shopping
|
2015-10-09 22:29:01 +03:00
|
|
|
|
tomorrow, so let's make a grocery list.
|
|
|
|
|
\begin{enumerate} % This creates an "enumerate" environment.
|
|
|
|
|
% \item tells the enumerate to increment
|
|
|
|
|
\item Salad.
|
|
|
|
|
\item 27 watermelon.
|
|
|
|
|
\item A single jackrabbit.
|
|
|
|
|
% we can even override the item number by using []
|
|
|
|
|
\item[how many?] Medium sized squirt guns.
|
|
|
|
|
|
|
|
|
|
Not a list item, but still part of the enumerate.
|
|
|
|
|
|
|
|
|
|
\end{enumerate} % All environments must have an end.
|
2015-10-09 00:07:05 +03:00
|
|
|
|
|
|
|
|
|
\section{Math}
|
|
|
|
|
|
2018-10-24 23:06:22 +03:00
|
|
|
|
One of the primary uses for \LaTeX{} is to produce academic articles
|
2018-10-11 18:59:15 +03:00
|
|
|
|
or technical papers. Usually in the realm of math and science. As such,
|
2018-10-24 23:06:22 +03:00
|
|
|
|
we need to be able to add special symbols to our paper!
|
2015-10-09 00:07:05 +03:00
|
|
|
|
|
2015-10-09 22:29:01 +03:00
|
|
|
|
Math has many symbols, far beyond what you can find on a keyboard;
|
2018-10-24 23:06:22 +03:00
|
|
|
|
Set and relation symbols, arrows, operators, and Greek letters to name a few.
|
2015-10-09 18:00:57 +03:00
|
|
|
|
|
|
|
|
|
Sets and relations play a vital role in many mathematical research papers.
|
2020-09-13 06:52:37 +03:00
|
|
|
|
Here's how you state all x that belong to X, $\forall x \in X$.
|
2018-10-11 18:59:15 +03:00
|
|
|
|
% Notice how I needed to add $ signs before and after the symbols. This is
|
|
|
|
|
% because when writing, we are in text-mode.
|
|
|
|
|
% However, the math symbols only exist in math-mode.
|
2015-10-09 22:29:01 +03:00
|
|
|
|
% We can enter math-mode from text mode with the $ signs.
|
|
|
|
|
% The opposite also holds true. Variable can also be rendered in math-mode.
|
2015-10-25 22:55:44 +03:00
|
|
|
|
% We can also enter math mode with \[\]
|
|
|
|
|
|
|
|
|
|
\[a^2 + b^2 = c^2 \]
|
2015-10-09 00:07:05 +03:00
|
|
|
|
|
2015-10-09 18:00:57 +03:00
|
|
|
|
My favorite Greek letter is $\xi$. I also like $\beta$, $\gamma$ and $\sigma$.
|
2018-10-24 23:06:22 +03:00
|
|
|
|
I haven't found a Greek letter yet that \LaTeX{} doesn't know
|
|
|
|
|
about!
|
2015-10-09 18:00:57 +03:00
|
|
|
|
|
2018-10-11 18:59:15 +03:00
|
|
|
|
Operators are essential parts of a mathematical document:
|
|
|
|
|
trigonometric functions ($\sin$, $\cos$, $\tan$),
|
|
|
|
|
logarithms and exponentials ($\log$, $\exp$),
|
2022-01-03 18:52:43 +03:00
|
|
|
|
limits ($\lim$), etc.~have pre-defined LaTeX commands.
|
2018-10-11 18:59:15 +03:00
|
|
|
|
Let's write an equation to see how it's done:
|
2018-10-24 23:06:22 +03:00
|
|
|
|
$\cos(2\theta) = \cos^{2}(\theta) - \sin^{2}(\theta)$
|
2015-10-09 18:00:57 +03:00
|
|
|
|
|
2016-09-27 17:41:45 +03:00
|
|
|
|
Fractions (Numerator-denominators) can be written in these forms:
|
2015-10-09 18:00:57 +03:00
|
|
|
|
|
|
|
|
|
% 10 / 7
|
2016-09-27 17:41:45 +03:00
|
|
|
|
$$ ^{10}/_{7} $$
|
2015-10-09 18:00:57 +03:00
|
|
|
|
|
|
|
|
|
% Relatively complex fractions can be written as
|
|
|
|
|
% \frac{numerator}{denominator}
|
2018-10-24 23:06:22 +03:00
|
|
|
|
$$ \frac{n!}{k!(n - k)!} $$
|
2015-10-09 22:29:01 +03:00
|
|
|
|
|
2016-10-21 23:34:23 +03:00
|
|
|
|
We can also insert equations in an ``equation environment''.
|
2015-10-09 18:00:57 +03:00
|
|
|
|
|
2015-04-23 14:54:52 +03:00
|
|
|
|
% Display math with the equation 'environment'
|
2015-10-09 00:07:05 +03:00
|
|
|
|
\begin{equation} % enters math-mode
|
2015-04-23 14:54:52 +03:00
|
|
|
|
c^2 = a^2 + b^2.
|
2015-10-09 22:29:01 +03:00
|
|
|
|
\label{eq:pythagoras} % for referencing
|
|
|
|
|
\end{equation} % all \begin statements must have an end statement
|
2015-04-23 14:54:52 +03:00
|
|
|
|
|
2018-10-11 18:59:15 +03:00
|
|
|
|
We can then reference our new equation!
|
2015-04-23 14:54:52 +03:00
|
|
|
|
Eqn.~\ref{eq:pythagoras} is also known as the Pythagoras Theorem which is also
|
2018-10-11 18:59:15 +03:00
|
|
|
|
the subject of Sec.~\ref{subsec:pythagoras}. A lot of things can be labeled:
|
2015-10-09 22:29:01 +03:00
|
|
|
|
figures, equations, sections, etc.
|
2015-04-23 14:54:52 +03:00
|
|
|
|
|
2015-10-09 18:00:57 +03:00
|
|
|
|
Summations and Integrals are written with sum and int commands:
|
|
|
|
|
|
2015-10-15 01:05:18 +03:00
|
|
|
|
% Some LaTeX compilers will complain if there are blank lines
|
2015-10-09 22:29:01 +03:00
|
|
|
|
% In an equation environment.
|
2018-10-11 18:59:15 +03:00
|
|
|
|
\begin{equation}
|
2015-10-09 22:29:01 +03:00
|
|
|
|
\sum_{i=0}^{5} f_{i}
|
2018-10-11 18:59:15 +03:00
|
|
|
|
\end{equation}
|
|
|
|
|
\begin{equation}
|
2015-10-09 22:29:01 +03:00
|
|
|
|
\int_{0}^{\infty} \mathrm{e}^{-x} \mathrm{d}x
|
2018-10-11 18:59:15 +03:00
|
|
|
|
\end{equation}
|
2015-04-23 14:54:52 +03:00
|
|
|
|
|
2015-10-09 00:07:05 +03:00
|
|
|
|
\section{Figures}
|
|
|
|
|
|
2018-10-24 23:06:22 +03:00
|
|
|
|
Let's insert a figure. Figure placement can get a little tricky.
|
2021-01-28 20:31:42 +03:00
|
|
|
|
Basic options are [t] for top, [b] for bottom, [h] for here (approximately).
|
2015-10-09 18:00:57 +03:00
|
|
|
|
I definitely have to lookup the placement options each time.
|
2021-01-28 20:31:42 +03:00
|
|
|
|
% See https://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions for more details
|
2015-10-09 00:07:05 +03:00
|
|
|
|
|
2018-10-11 18:59:15 +03:00
|
|
|
|
\begin{figure}[H] % H here denoted the placement option.
|
2015-10-09 22:29:01 +03:00
|
|
|
|
\centering % centers the figure on the page
|
|
|
|
|
% Inserts a figure scaled to 0.8 the width of the page.
|
2018-10-11 18:59:15 +03:00
|
|
|
|
%\includegraphics[width=0.8\linewidth]{right-triangle.png}
|
2015-10-09 22:29:01 +03:00
|
|
|
|
% Commented out for compilation purposes. Please use your imagination.
|
2015-10-09 00:07:05 +03:00
|
|
|
|
\caption{Right triangle with sides $a$, $b$, $c$}
|
2015-04-23 14:54:52 +03:00
|
|
|
|
\label{fig:right-triangle}
|
|
|
|
|
\end{figure}
|
|
|
|
|
|
2015-10-09 00:07:05 +03:00
|
|
|
|
\subsection{Table}
|
2015-10-09 22:29:01 +03:00
|
|
|
|
We can also insert Tables in the same way as figures.
|
2015-04-23 14:54:52 +03:00
|
|
|
|
|
2015-10-09 00:07:05 +03:00
|
|
|
|
\begin{table}[H]
|
|
|
|
|
\caption{Caption for the Table.}
|
2015-10-09 22:29:01 +03:00
|
|
|
|
% the {} arguments below describe how each row of the table is drawn.
|
2022-01-03 18:52:43 +03:00
|
|
|
|
% The basics are simple: one letter for each column, to control alignment:
|
2021-01-28 20:31:42 +03:00
|
|
|
|
% basic options are: c, l, r and p for centered, left, right and paragraph
|
2022-01-03 18:52:43 +03:00
|
|
|
|
% optionally, you can add a | for a vertical line
|
2021-01-28 20:31:42 +03:00
|
|
|
|
% See https://en.wikibooks.org/wiki/LaTeX/Tables for more details
|
|
|
|
|
\begin{tabular}{c|cc} % here it means "centered | vertical line, centered centered"
|
2022-01-03 18:52:43 +03:00
|
|
|
|
Number & First Name & Last Name \\ % Column rows are separated by &
|
2015-10-09 22:29:01 +03:00
|
|
|
|
\hline % a horizontal line
|
2015-10-09 00:07:05 +03:00
|
|
|
|
1 & Biggus & Dickus \\
|
|
|
|
|
2 & Monty & Python
|
|
|
|
|
\end{tabular}
|
2021-01-28 20:31:42 +03:00
|
|
|
|
% it will approximately be displayed like this
|
2022-01-03 18:52:43 +03:00
|
|
|
|
% Number | First Name Last Name
|
2021-01-28 20:31:42 +03:00
|
|
|
|
% -------|--------------------------- % because of \hline
|
|
|
|
|
% 1 | Biggus Dickus
|
|
|
|
|
% 2 | Monty Python
|
2015-04-23 14:54:52 +03:00
|
|
|
|
\end{table}
|
|
|
|
|
|
2022-01-03 18:52:43 +03:00
|
|
|
|
\section{Getting \LaTeX{} to not compile something (i.e.~Source Code)}
|
2018-10-24 23:06:22 +03:00
|
|
|
|
Let's say we want to include some code into our \LaTeX{} document,
|
|
|
|
|
we would then need \LaTeX{} to not try and interpret that text and
|
2018-10-11 18:59:15 +03:00
|
|
|
|
instead just print it to the document. We do this with a verbatim
|
|
|
|
|
environment.
|
2015-10-09 22:29:01 +03:00
|
|
|
|
|
|
|
|
|
% There are other packages that exist (i.e. minty, lstlisting, etc.)
|
|
|
|
|
% but verbatim is the bare-bones basic one.
|
2018-10-11 18:59:15 +03:00
|
|
|
|
\begin{verbatim}
|
2015-10-09 22:29:01 +03:00
|
|
|
|
print("Hello World!")
|
2018-10-11 18:59:15 +03:00
|
|
|
|
a%b; % look! We can use % signs in verbatim.
|
2021-01-28 20:31:42 +03:00
|
|
|
|
random = 4; #decided by fair random dice roll, https://www.xkcd.com/221/
|
|
|
|
|
See https://www.explainxkcd.com/wiki/index.php/221:_Random_Number
|
2015-10-09 22:29:01 +03:00
|
|
|
|
\end{verbatim}
|
2015-10-09 00:07:05 +03:00
|
|
|
|
|
2018-10-11 18:59:15 +03:00
|
|
|
|
\section{Compiling}
|
2015-10-09 00:07:05 +03:00
|
|
|
|
|
2018-10-11 18:59:15 +03:00
|
|
|
|
By now you're probably wondering how to compile this fabulous document
|
2018-10-24 23:06:22 +03:00
|
|
|
|
and look at the glorious glory that is a \LaTeX{} pdf.
|
2022-01-03 18:52:43 +03:00
|
|
|
|
(Yes, this document actually does compile).
|
2018-10-24 23:06:22 +03:00
|
|
|
|
|
|
|
|
|
Getting to the final document using \LaTeX{} consists of the following
|
2016-09-27 17:41:45 +03:00
|
|
|
|
steps:
|
2015-10-09 22:29:01 +03:00
|
|
|
|
\begin{enumerate}
|
2016-10-21 23:34:23 +03:00
|
|
|
|
\item Write the document in plain text (the ``source code'').
|
2018-10-11 18:59:15 +03:00
|
|
|
|
\item Compile source code to produce a pdf.
|
2016-09-27 17:41:45 +03:00
|
|
|
|
The compilation step looks like this (in Linux): \\
|
2018-10-11 18:59:15 +03:00
|
|
|
|
\begin{verbatim}
|
2016-09-27 17:41:45 +03:00
|
|
|
|
> pdflatex learn-latex.tex
|
2015-10-09 00:07:05 +03:00
|
|
|
|
\end{verbatim}
|
|
|
|
|
\end{enumerate}
|
|
|
|
|
|
2018-10-24 23:06:22 +03:00
|
|
|
|
A number of \LaTeX{} editors combine both Step 1 and Step 2 in the
|
2016-09-27 17:41:45 +03:00
|
|
|
|
same piece of software. So, you get to see Step 1, but not Step 2 completely.
|
2016-10-21 23:34:23 +03:00
|
|
|
|
Step 2 is still happening behind the scenes\footnote{In cases, where you use
|
|
|
|
|
references (like Eqn.~\ref{eq:pythagoras}), you may need to run Step 2
|
|
|
|
|
multiple times, to generate an intermediary *.aux file.}.
|
|
|
|
|
% Also, this is how you add footnotes to your document!
|
2021-01-28 20:31:42 +03:00
|
|
|
|
% with a simple \footnote{...} command. They are numbered ¹, ², ... by default.
|
2015-10-09 00:07:05 +03:00
|
|
|
|
|
|
|
|
|
You write all your formatting information in plain text in Step 1.
|
|
|
|
|
The compilation part in Step 2 takes care of producing the document in the
|
|
|
|
|
format you defined in Step 1.
|
|
|
|
|
|
2016-09-27 17:41:45 +03:00
|
|
|
|
\section{Hyperlinks}
|
|
|
|
|
We can also insert hyperlinks in our document. To do so we need to include the
|
|
|
|
|
package hyperref into preamble with the command:
|
2018-10-11 18:59:15 +03:00
|
|
|
|
\begin{verbatim}
|
2016-09-27 17:41:45 +03:00
|
|
|
|
\usepackage{hyperref}
|
|
|
|
|
\end{verbatim}
|
|
|
|
|
|
|
|
|
|
There exists two main types of links: visible URL \\
|
2018-10-11 18:59:15 +03:00
|
|
|
|
\url{https://learnxinyminutes.com/docs/latex/}, or
|
2016-09-27 17:41:45 +03:00
|
|
|
|
\href{https://learnxinyminutes.com/docs/latex/}{shadowed by text}
|
2018-10-11 18:59:15 +03:00
|
|
|
|
% You can not add extra-spaces or special symbols into shadowing text since it
|
2016-09-27 17:41:45 +03:00
|
|
|
|
% will cause mistakes during the compilation
|
|
|
|
|
|
2022-01-03 18:52:43 +03:00
|
|
|
|
This package also produces list of thumbnails in the output PDF document and
|
2016-09-27 17:41:45 +03:00
|
|
|
|
active links in the table of contents.
|
|
|
|
|
|
2021-01-28 20:31:42 +03:00
|
|
|
|
\section{Writing in ASCII or other encodings}
|
|
|
|
|
|
2021-02-01 00:25:39 +03:00
|
|
|
|
By default, historically LaTeX accepts inputs which are pure ASCII (128),
|
2022-01-03 18:52:43 +03:00
|
|
|
|
but not extended ASCII, meaning without accents (à, è etc.) and non-Latin symbols.
|
2021-01-28 20:31:42 +03:00
|
|
|
|
|
2021-02-01 00:23:34 +03:00
|
|
|
|
It is easy to insert accents and basic Latin symbols, with backslash shortcuts
|
2021-01-28 20:31:42 +03:00
|
|
|
|
Like \,c, \'e, \`A, \ae and \oe etc. % for ç, é, À, etc
|
|
|
|
|
% See https://en.wikibooks.org/wiki/LaTeX/Special_Characters#Escaped_codes for more
|
|
|
|
|
|
|
|
|
|
To write directly in UTF-8, when compiling with pdflatex, use
|
|
|
|
|
\begin{verbatim}
|
|
|
|
|
\usepackage[utf8]{inputenc}
|
|
|
|
|
\end{verbatim}
|
|
|
|
|
The selected font has to support the glyphs used for your document, you have to add
|
|
|
|
|
\begin{verbatim}
|
|
|
|
|
\usepackage[T1]{fontenc}
|
|
|
|
|
\end{verbatim}
|
|
|
|
|
|
2022-01-03 18:52:43 +03:00
|
|
|
|
Since LuaTeX and XeLaTeX were designed with built-in support for UTF-8, making
|
|
|
|
|
life easier for writing in non-Latin alphabets.
|
2021-01-28 20:31:42 +03:00
|
|
|
|
|
2015-10-09 00:07:05 +03:00
|
|
|
|
\section{End}
|
|
|
|
|
|
|
|
|
|
That's all for now!
|
|
|
|
|
|
2015-11-01 09:35:20 +03:00
|
|
|
|
% Most often, you would want to have a references section in your document.
|
|
|
|
|
% The easiest way to set this up would be by using the bibliography section
|
|
|
|
|
\begin{thebibliography}{1}
|
|
|
|
|
% similar to other lists, the \bibitem command can be used to list items
|
|
|
|
|
% each entry can then be cited directly in the body of the text
|
2018-10-24 23:06:22 +03:00
|
|
|
|
\bibitem{latexwiki} The amazing \LaTeX{} wikibook: \emph{https://en.wikibooks.org/wiki/LaTeX}
|
|
|
|
|
\bibitem{latextutorial} An actual tutorial: \emph{http://www.latex-tutorial.com}
|
2015-11-01 09:35:20 +03:00
|
|
|
|
\end{thebibliography}
|
|
|
|
|
|
2015-04-23 14:54:52 +03:00
|
|
|
|
% end the document
|
|
|
|
|
\end{document}
|
|
|
|
|
```
|
2015-10-17 19:13:47 +03:00
|
|
|
|
|
2015-10-09 00:07:05 +03:00
|
|
|
|
## More on LaTeX
|
|
|
|
|
|
2022-01-03 18:52:43 +03:00
|
|
|
|
* The amazing LaTeX Wikibook: [https://en.wikibooks.org/wiki/LaTeX](https://en.wikibooks.org/wiki/LaTeX)
|
2015-10-15 01:11:05 +03:00
|
|
|
|
* An actual tutorial: [http://www.latex-tutorial.com/](http://www.latex-tutorial.com/)
|
2018-10-11 18:59:15 +03:00
|
|
|
|
* A quick guide for learning LaTeX: [Learn LaTeX in 30 minutes](https://www.overleaf.com/learn/latex/Learn_LaTeX_in_30_minutes)
|