Now that you know how to compile, let us format the text: section headings, bold and italic. In LaTeX, you do not click a "bold" button: you write a command, and LaTeX takes care of the layout.
Compile Compile this example. Notice how
\section creates a numbered heading, and how \textbf / \textit set text in bold and italic.The basic commands
\section{Title}: a section heading (numbered automatically). A finer variant:\subsection{...}.\textbf{...}: sets the text in bold.\textit{...}: sets the text in italic.- A paragraph break is made with a blank line (not with
\\).
Modify Your turn: add a subsection with
\subsection{...} and set at least one word in bold. Compile to check.Show the solution
\documentclass{article}
\begin{document}
\section{My section}
This is \textbf{important}.
\subsection{A detail}
An addition in a subsection.
\end{document}Complete Complete the code so that the word "important" appears in bold in the PDF.
Show the solution
\documentclass{article}
\begin{document}
This word must be in bold: \textbf{important}.
\end{document} Key point: in LaTeX, formatting = commands (
\\textbf, \\textit, \\section), and you separate paragraphs with a blank line.