🏠 | 💻 IT | LaTeX |

LaTeX Manual

𝌆𝌆𝌆 General design of the document
📈📊 Images in LaTeX
📰📰 Adding LaTeX Tables
ABC Highlighting text in LaTeX
📏📐 Text alignment in LaTeX
∜⅘ A set of formulas in LaTeX
AB Colored text in LaTeX
💻💻 How to compile LaTeX
∏∑ LaTeX Mathematical Symbols
ΨΩ Greek characters in LaTeX
comments in LaTeX
№№ LaTeX page numbering
Converting LaTeX to Word
Examples
📚📖 LaTeX Literature
LaTeX Manuals
FAQ: Problem Solving
📱🎥 LaTeX Video Tutorials
🖽🖽 Converting LaTeX to HTML

First steps in LateX

Download and install WinEdt + MikTex or install Texmaker

General design of the document

Each document begins with the declaration of the document type (for example, article), font size and other attributes.

\documentclass[12pt,cmcyralt]{article}

Next, you need to connect various packages , without them, little can be done.

If you are reading this article from your smartphone, keep in mind that you do not need to make any transfers. Write all teams are merged.

Basic LaTeX tags
\usepackage
[utf8]{inputenc}
Sets utf-8 encoding
\usepackage
[cp1251]{inputenc}
Sets the cp1251 encoding (if utf-8 is not suitable for you)
\usepackage
[english, russian
]{babel}
Connects languages
\usepackage
{amsmath}
Connects the math package
\usepackage
{amsfonts}
Mathematical Fonts
\usepackage
{graphicx}
For graphics
\usepackage
{color}
For color text
\usepackage
{alltt}
Allows you to write text that is interpreted literally, including several spaces in a row.
\def\be{
\begin
{equation}}
Defines a new function - instead of always writing \begin{equation} it is enough to write \be
\def\ee{
\end
{equation}}
Similarly for closing the tag \be
\inputencoding
{cp1251}
Encoding
\begin
{document}
We begin the document.
\input titlepage Insert the title page. I advise you to write it separately so as not to knock down the page numbering. You need to store the file titlepage.texin the same folder.

In the inserted sheets, you do not need to write documentclass and so on separately, logically, it's simple a piece of text, that is inserted into the final page.
\tableofcontents Inserts an automatically generated table of contents. (every time, when the tag \section or \subsection or \subsubsection a new chapter is introduced LaTeX remembers this and then creates the table of contents itself)
\section
{Introduction}
The first chapter will be called «Introduction»
\subsection
{The state of nuclear power in the world}
Subparagraph of the first chapter
\end{document} Finishing the document

Tables and images have properties to appear not where you want them to be placed, but where LaTeX places them. Theoretically, this can be dealt with using one of the parameters:

[h], [h!], [H]

Parameters [h], [h!], [ H] will be more and more insistent recommend Latex to place the object exactly where it stands.

But [H] is perceived by me as a mistake and the rest have almost no effect. Therefore, after some drawings, you have to insert the tag

\clearpage

- - which is perceived by Latex as the end of the area where objects entered in the code above can be inserted.

Tag

\newpage

has no such action.

How to insert a LaTeX image

Minimum required knowledge

The images must first be converted to the .eps format.

This means that .jpg, gif, .png and other formats will not work. You can convert to eps using GIMP ,online converters, for example, of this and others in ways

Adding images to LaTeX
\usepackage
{graphicx}
Do not forget to connect the graphics package at the beginning of the file
\begin
{figure}[h!]
We insert the image. [h!] - says that we want a picture in this place (works extremely peculiar, I advise you to insert the \clearpage tag after the pictures)

In the section LaTeX Manuals you can find links to the detailed description of managing floating objects (images, tables)
\centering Align in the center
\includegraphics [width=1
\textwidth]
{pic1}\\
Actually insert the graph (the image file is in the same folder and is called pic1.eps , but you don't need to write eps.

Don't forget to convert images.
\caption
{Image name number one.\cite{L1}} \label{fig:pic1}
The name of the graph and a link to it.

To refer to this graph somewhere, you will need to write \ref{fig:pic1} ;\cite{L1} is a link to the first book from the list of references
\ref{fig:pic1} Link to the picture pic1

Additional information

For convenience, images can be stored in separate directories. For example, by a separate directory on every chapter of the diploma. All directories need to be listed in order for LaTeX to be able to find them.

\graphicspath{{images-introduction\}{images-chapter-one\}{images-chapter-two\}{images-chapter-three\}}

Two images in a row

\documentclass{article} \usepackage{lipsum} \usepackage{mwe} \begin{document} Два изображения в ряд: \lipsum \begin{figure} \centering \begin{minipage}{0.45\textwidth} \centering \includegraphics[width=0.9\textwidth]{example-image-a} % первое изображениие \caption{first figure} \end{minipage}\hfill \begin{minipage}{0.45\textwidth} \centering \includegraphics[width=0.9\textwidth]{example-image-b} % второе изображение \caption{second figure} \end{minipage} \end{figure} \lipsum[3] \end{document}

How to insert a LaTeX table

I found the most adequate description of this operation in the book by A.I. Rozhenko "The Art of layout in LaTeXe"

Adding tables to LaTeX
\begin{table} - this tag starts the table
\caption
{Table name
\cite{L1}}
- the name of the table and the link to the source
\label{tab:5-4} - a label that can then be referenced
\begin{tabular}
{|c|c|c|} \begin{tabular}{|c|c|c|}
- the table itself will start after this tag; three columns aligned in the center
\hline - draws a horizontal line
Country & Number& Power (MW (el)) \\ \ hline - first line
Argentina & 1 & 692 \\ \ hline - second line
\end{tabular} - finishes the table
\end{table} - finishes the table

A table that is set using

\begin{tabular}{|c|c|c|c|c|c|c|}

May take up too much space and not fit in width, in order to avoid this, instead of a simple alignment, you can fix the width of the columns

\begin{tabular}{|p{2cm}|p{2cm}|p{2cm}|p{2cm}|p{2cm}|p{2cm}|}

Now too wide text will automatically be moved to the next row inside the column.

In WinEdt 6.0 there is a button with which you can quickly insert tables of the desired size.

However, you need to use tags first

\begin{table}\caption{Table name}\label{tab:1}

and

\end{table}

To merge columns, you can use the tag

\multicolumn{2}{|c|}

- where {2} - this is the number of columns that need to be combined {|c|} - center alignment

Working with text

Underline

Text underlining is done with the command

\underline

Example

\underline{www.heihei.ru}

Result

www.heihei.ru

Italics

Italicizing text

\emph

or

\em

Example

\em{www.TopBicycle.ru}

Result

www.TopBicycle.ru

Bold font

Bold text

\textbf

Example

\textbf{www.eth1.ru}

www.eth1.ru

How to align text in LaTeX

If you need to align the text in a special way in the title page, or somewhere else, and you can't find how to do it in books, you can try tags

\begin{alltt} \end{alltt}

Inside these tags, the text will look something like how you write it, i.e. spaces will not be ignored.

\begin{alltt}         Supervisor       Ph.D.-M.N. Bor O.N. Reviewer       Ph.D.-M.N. Basov N.G. \end{alltt}

A set of formulas in LaTeX

There are two standard environments for entering formulas: The First and the Second

If you are not going to refer to the formula in the future, then it is enough to put two dollar signs $ $, and write a formula between them, for example:

$ A = 3B$

Such a simple formula could be written without an environment, but already for the use of environment indexes is necessary.

To LaTeX gave the formula a number (it does this automatically) need an environment

\begin{equation} Your formula \end{equation}

In this environment, you can also use \label{} to put labels.

If your formula will really take up several lines, the environment should be replaced with:

\begin{multline} Your formula \end{multline}

Instead of the words "Your formula", you need to write the necessary equation.

You can learn how to write the equation correctly from the paragraph: Basic mathematical operations and LaTeX symbols

How to compile LaTeX

We write the file in WinEdt and look for the TeX item in the top menu and there we select LaTeX (or press Ctrl + Shift + L)

We get .dvi file and if we need to convert it to .pdf - click dvi - pdf

Alternatively, you can immediately compile to .pdf using the button PDF LaTeX , but I don't consider this method as the main one.

Basic mathematical operations and LaTeX symbols

Here are the operations and symbols that I used when writing the diploma.

List of special characters available in LaTeX
^ Superscript
^2 2 This is a square
U^{235} U235 Indexes of two or more characters should be enclosed in curly brackets
_ Subscript
H_2 H2 For example, hydrogen
O_{16} O16 Oxygen molecule
\frac{dX_i}{dt} Division: in the first brackets the numerator, in the second brackets the denominator
\ldotsEllipsis
\longrightarrowLong arrow from left to right
\barThe upper line above the symbol
\dotDot above the symbol
\sumLarge sum sign
\prod\prod The big sign of the work
\\ Whitespace
\cdot \cdot The multiplication sign in the form of a dot
\times \times × The multiplication sign is a cross
\int_{lower}^{upper}

\int_{0}^{Q} \int_{lower}^{upper}

\int_{0}^{Q}
Q

0
Integral
More LaTeX characters here

If it is not clear how to put a space - study this example

In order to create a PDF file, you need to click the dvi pdf button. Before that, it is advisable to compile a couple of times in a row so that everything the links were placed correctly.

You can find more symbols in the article LaTeX Characters

Greek Alphabet в LaTeX

Writing Greek letters in LaTeX is quite logical. In English, it generally almost coincides with the usual spelling. But just in case, it is useful to have a source for self-checking.

Greek Alphabet in LaTeX writing
Russian name
name
LaTeX line code
noi
View LaTeX code is written
noi
View
альфа\alpha α \Alpha Α
бета (вита)\beta β \Beta Β
гамма \gamma γ \Gamma Γ
дельта \delta δ \Delta Δ
эпсилон \epsilon ε \Epsilon Ε
дзета (зита) \zeta ζ \Zeta Ζ
эта (ита) \eta η \Eta Η
тета (фита) \theta θ \Theta Θ
йота \iota ι \Iota Ι
каппа \kappa κ \Kappa Κ
лямбда (лямда) \lambda λ \Lambda Λ
мю (ми) \mu μ \Mu Μ
ню (ни) \nu ν \NU Ν
кси \xi ξ \Xi Ξ
омикрон \omicron ο \Omicron Ο
пи \pi π \Pi Π
ро \rho ρ \Rho Ρ
сигма \sigma σ \Sigma Σ
тау (тав) \tau τ \Tau Τ
ипсилон \upsilon υ \Upsilon Υ
фи \phi φ \Phi Φ
хи \chi χ \Chi Χ
пси \psi ψ \Psi Ψ
омега \omeg ω \Omega Ω
\varepsilon\Varepsilon
\vartheta\Vartheta
\varpi\Varpi
\varrho\Varrho
\varsigma\Varsigma
\varphi\Varphi

Epsilon, theta, pi, rho, sigma, phi have two spellings: normal and var, which is obtained by adding a prefix var to the regular writing code. For example \Epsilon \Varepsilon

Comment on the LaTeX code

A method that can be used to comment code in LaTeX it depends both on your preferences and on the installed packages.

List of different ways to comment code in LaTeX
% The line after the percent symbol will not be compiled compile
\begin{comment}

This text will not be displayed

\end{comment}
If you have the package verbatim or comment installed
\iffalse

This text will not be displayed

\fi
If you really want to, you can use the conditions, but you need to carefully monitor how this is consistent with other conditions. I've never done that myself.
Ctrl + T comment Comment in the program Texmaker
Ctrl + U Edit Uncomment in the program Texmaker

Page numbering in LaTeX

If you are not satisfied with the default numbering, you can set the page number using the command

\setcounter{page}{n}

Where n is the page number you want to set.

In the case when the display of the page number is undesirable, for example page number "0") you can use the command

\thispagestyle{empty}

Colored text in LaTeX

To be able to change the color of the text, you need to import the package xcolor

\usepackage{xcolor}

\color{blue} After this blue text there should be a red asterisk \color{red} ^*

Result

After this blue text there should be a red asterisk*

How to convert LaTeX to Word

Read about a large number of ways. I have tried many. I'll tell you as usual, about the one that earned me.

First we convert .tex file in .pdf

Download and install SolidConverter (don't forget to pay for it)

Convert .pdf to .docx

I did it in Windows 7 and a rather crooked Office 10.

In Windows XP and crooked Office 2007, it also turned out, but with formulas worse. Need to check in XP and 10m Office.

Way Maxim Nikolaevich (my pictures didn't transfer)

1) I installed Word (I have 2007)
2) I have installed Mathtype
3) I have installed GrindEq
4. To use crack, I copy the corresponding files from the downloaded folder) to the folder with the installed components. (required purchase a licensed version - do not use the Maxim method)
5) I open a document in the tex word that I want to convert.
6) The conversion itself takes place.

Examples of LaTeX files

Example of a title page for a diploma Watch

Download example, unfortunately, the version is not final.

Examples of the set of formulas are given on the page LaTeX in HTML to avoid downloading this one.

LaTeX Literature:

There are quite a lot of books on Latech, including in Russian. On the consistent development of the layout in Latech according to the textbook, you need to allocate a lot of time, it is also worth bearing in mind that various topics they are covered in textbooks with varying degrees of accessibility, and there is no perfect textbook yet.

I honestly wanted to write it, but I haven't mastered it yet.

List of books about LaTeX
Author Title Link to the distribution
1) Роженко А.И. Искусство верстки в LaTeX rutracker.org
2) Львовский С.М. Набор и вестка в LaTeX rutracker.org
3) Балдин Е.М.Компью- терная Компьютерная типография LaTeX rutracker.org
4) Беляков Н.С. Тех для всех rutracker.org

LaTeX Manuals:

Wiki English Russian

Excellent symbol reference

Good articles on mydebianblog:
Tables
Review of Editors
Control of floating objects

Install LaTeX in Linux

  • We connect to the Internet.
  • Go to the console.
  • Installing texlive is a latex distribution, an analogue of miktex in windows.
  • The command in the console (installs the complete package with all applications):

sudo apt-get install texlive-full

  • Install the editor - textmaker - an analogue of winedt under windows.
  • Command in the console:

sudo apt-get install texmaker

  • Go to texmaker
  • Create a new file, save it under an arbitrary name.
  • Writing LaTeX code
  • Compilation - press the F1 button.
  • We get a ready pdf document.

LaTeX FAQ: possible problems and ways to solve them

LaTeX does not recognize images.eps

Most likely after compilation in LaTeX (Shift + Ctrl + L) you click instead buttons dvi-pdf button PDF LaTeX - press the correct button =) because PDF LaTeX is another way of compiling, it's just like that .eps it won't recognize it - you need to install it separately epstopdf package.

LaTeX Video Tutorials

To speed up the loading of this page, all video lessons have been moved here

Converting LaTeX to HTML

About the new release of the utility for converting LaTeX documents to HTML code , you can read here

LaTeX Logo
Share in social media: