latex-wochenende/slides/chapter-06.en.md

3.6 KiB
Raw Blame History

@slide(layout=chapter-slide)

@number 6

@title Text Markup

@slide(layout=content-and-preview)

@title Emphases

@content The easiest way of emphasising in continuous text is the semantic command \emph{} that can also be nested:

\emph{If you have a whole bunch of 
important text with some \emph{even more 
important Text} hidden inside it, 
you can use nested emphases.}

@preview

@slide(layout=content-and-preview)

@title Optical highlighting

@content specifies exactly how to format the text:

NameBefehl
Bold (bold face)`\textbf{important}`
Italics (italics)`\textit{important}`
Small caps`\textsc{important}`
non-proportional (teletype)`\texttt{important}`
slanted`\textsl{important}`
underlined`\underline{important}`
subscript`\textsubscript{…}`
superscript`\textsuperscript{…}`

@preview

@slide(layout=content-and-preview)

@title Nesting emphases

@content Possible if the font contains the exact font style:

\textbf{Very
    \textit{Important
        \textsc{Stuff}
    }
}

@preview

@slide(layout=content-only)

@title Better Call LaTeX!

@content

**Some well-meaning advice**

You want the entire document to look consistent?

Trust LaTeXs defaults (font sizes of title, paragraphs, footnotes, etc.)!

This conversely means: Avoid fiddling around with font sizes manually.

@slide(layout=content-only)

@title Font size

@content

normalsize

  • used for continuous text paragraphs
  • default: 10pt
  • can be modified in the preamble:
\documentclass[12pt]{article}

@slide(layout=content-and-preview)

@title Font size

@content

Preset font sizes

{\<fontsize> some text}

Font sizes relative to normalsize:

{\tiny         If}
{\footnotesize you}
{\small        can}
{\normalsize   read}
{\large        this,}
{\Large        you}
{\LARGE        dont}
{\huge         need}
{\Huge         glasses.}

@preview {.thin-padding}

@slide(layout=content-and-preview)

@title Font size

@content

Manual configuration possible

\fontsize{<fontsize>}{<lineheight>}
\selectfont

This is text in normal font size.

\fontsize{1cm}{0.9cm}\selectfont
This is a ginormous passage.

\normalsize
Back to normal.

@preview {.thin-padding}

@slide(layout=content-and-preview)

@title URLs

@content The hyperref package provides an \url{} command that reproduces URLs

  • letter by letter
  • using line breaks without hyphens
  • using a font with well-distinguishable characters
  • as a clickable link in the PDF
\url{https://www.latex-project.org/}

@preview

@slide(layout=task)

@task-number 6

@title Emphasising text

@content

  • Emphasise the words Recursion and recursive in exercises/text-markup/markup.tex using \emph{…}.
  • Make the URL in the text clickable.
  • Of course, you can also experiment with the other text markup possibilities. However, remove them afterwards, if you want to have a clean document.