Content of the lesson:
Our task is to create a one-sided document in LaTeX which will contain several mathematical symbols. The final document can be seen in the following image.
We will realize this task using the webpage TeXonWeb which allows us to use LaTeX without the need to install anything (you have to be able to access the Internet of course). To write our document you can use any text editor (like PSPad or NotePad, etc.).
Take a look at the first paragraph. There are several words of common text and several special symbols:
Create a new file matematicky-text.tex and open it using any text editor. Write the common text and stop before the first mathematical symbol. The system LaTeX offers you a set of symbols which can be used to write special mathematical symbols. These commands usually start with the character \. Try to search the string "latex symbols" using Google and you can find this page for example: http://omega.albany.edu:8008/Symbols.html of this pdf file: The Comprehensive Latex Symbol List on CTAN.
You can search the links and find that an arrow above letter (mark for vectors) can be created using the command \vec followed by braces. The text below the arrow has to be inserted inside the braces. It is important to know that mathematical text has to be marked (you can see a different font is used for mathematical symbols - why?). Mr. Knuth decided to use the symbol $ for mathematical formulas because typesetting of mathematical books was so expensive. You have to put the $ symbol before and after every mathematical text. The first sentence should look like the following example:
Z fyziky víme, že velikost síly $\vec{F}$ vypočteme vztahem $F=m\cdot a$, kde $m$ je hmotnost tělesa a $a$ je zrychlení.
Insert this line inside the marks \begin{document} and \end{document} inside the form at TeXonWeb.
\documentclass{article}
\usepackage{czech}
\begin{document}
Z fyziky víme, že velikost síly $\vec{F}$ vypočteme vztahem $F=m\cdot a$, kde $m$ je hmotnost tělesa a $a$ je zrychlení.
\end{document}
Now you can click on PDF button. In case you have a PDF viewer you can open the final PDF file with the requested text.
You can finish the paragraph after finding out that a power can be written by the notation ^{-2}. In other words, the symbol ^ will convert the content of braces {} to the upper index. Letters inside the last formula are not written in italics because they do not represent variables.
Jednotkou síly je 1 N, jehož fyzikální rozměr odvodíme z předchozího vztahu: N = kg$\cdot$m$\cdot$s$^{-2}$.
The next step is writing longer formulas. In case you want to highlight a formula and place it on a new line, you should use two dollars instead of one (typesetting of such formulas is even more expensive :)).
You will face two problems:
The final situation inside our browser:
\documentclass{article}
\usepackage{czech}
\begin{document}
Z fyziky víme, že velikost síly $\vec{F}$ vypočteme vztahem $F=m\cdot a$, kde $m$ je hmotnost tělesa a $a$ je zrychlení.
Vztahy pro povrch a objem koule jsou:
$$S=4\pi r^2, \qquad V=\frac{4}{3}\pi r^3,$$
po dosazení pro $r=5,9$ dostáváme výsledky: $S\doteq 437,435$ a $V \doteq 860,29$.
\end{document}
To insert a larger space inside formulas, you can find an appropriate command (\qquad). The symbol for rounded value is also available in the Internet - \doteq.
You have to solve two more problems here:
The final situation inside our browser:
\documentclass{article}
\usepackage{czech}
\begin{document}
Z fyziky víme, že velikost síly $\vec{F}$ vypočteme vztahem $F=m\cdot a$, kde $m$ je hmotnost tělesa a $a$ je zrychlení.
Vztahy pro povrch a objem koule jsou:
$$S=4\pi r^2, \qquad V=\frac{4}{3}\pi r^3,$$
po dosazení pro $r=5,9$ dostáváme výsledky: $S\doteq 437,435$ a $V \doteq 860,29$.
Takzvaná \emph{goniometrická jednička} $\sin^2\alpha + \cos^2\alpha =1$ nám pomáhá při řešení rovnic.
\end{document}
You can see that special commands \sin and \cos are used to get sine and cosine symbols - these commands will use the correct (noncursive) typesetting of these functions.
You have to solve the problem of limits in this paragraph.
Limity typu $\frac{0}{0}$ a $\frac{\infty}{\infty}$ počítáme L´Hospitalovým pravidlem, například
\begin{equation}
\lim_{n\to \infty}\frac{x^2 -4x}{2x^2 +3x -1} = \lim_{n\to \infty}\frac{2x -4}{4x +3}
\end{equation}
a odsud další derivací dostáváme
\begin{equation}
\lim_{n\to \infty}\frac{2x -4}{4x +3}=\frac{1}{2}.
\end{equation}
derivace je principiálně popsána vztahem 3.
We used the command equation for enabling an environment used to create equations. Every environment begins after the command \begin{name_of_environment} and ends before the command \end{name_of_environment}. A standard property of every equation environment is adding numbers for every equation inside. Thanks to this you will get numbers at the right side of every equation.
Typesetting of the more difficult part of text will be explained in the following lesson.