68 lines
1.5 KiB
Markdown
68 lines
1.5 KiB
Markdown
@slide(layout=chapter-slide)
|
|
|
|
@title
|
|
Formatting paragraphs
|
|
|
|
@slide(layout=content-and-preview)
|
|
|
|
@title
|
|
Ragged alignment
|
|
|
|
@content
|
|
By default, LaTeX sets text in full justification, but it is possible to activate ragged alignment.
|
|
|
|
``` {.lang-tex .hljs}
|
|
\raggedright … \raggedleft …
|
|
\centering …
|
|
```
|
|
|
|
Alternatively, we can use dedicated environments:
|
|
|
|
``` {.lang-tex .hljs}
|
|
\begin{flushleft} Text \end{flushleft}
|
|
\begin{flushright} Text \end{flushright}
|
|
\begin{center} Text \end{center}
|
|
```
|
|
|
|
<p data-category="Caution!">Proper ragged alignment is even more difficult than good justification, so better avoid it.</p>
|
|
|
|
@preview
|
|

|
|
|
|
|
|
@slide(layout=content-and-preview)
|
|
|
|
@title
|
|
Indentation and spacing
|
|
|
|
@content
|
|
* paragraphs are usually indicated by first-line indentation (`\parindent`)
|
|
* we can decide to use paragraph spacing (`\parskip`) instead (!)
|
|
* both parameters are customisable:
|
|
|
|
``` {.lang-tex .hljs}
|
|
\setlength{\parindent}{0pt}
|
|
\setlength{\parskip}{1em
|
|
plus .5em % permitted stretch
|
|
minus .5em % permitted compression
|
|
}
|
|
```
|
|
|
|
* `\noindent` allows us to disable first-line indentation for a given paragraph
|
|
|
|
@preview
|
|

|
|
|
|
@slide(layout=task)
|
|
|
|
@task-number
|
|
6
|
|
|
|
@title
|
|
Formatting paragraphs
|
|
|
|
@content
|
|
* ++ Examine how **indentation and spacing** are used on the titlepage.
|
|
* ++ Tinker around with the available settings and see what they change.
|
|
* ++ Make use of the undo button if you get lost. ;)
|