Oppdaterte kurs for 2025

This commit is contained in:
2025-03-04 16:26:58 +01:00
parent ad37f50c33
commit d5385911bb
11 changed files with 30 additions and 14 deletions

View File

@@ -1,13 +1,13 @@
# latex-course
Presentation and content for the latex course I have held and maybe will hold for PVV.
This LaTeX course was originally created by Bjørnar Kaarevik (Bjornoka) and is now being held by Torstein (Torsteno) for PVV.
## Compiling example document
Document found in `example-document/main.tex` can be compiled with the command:
```bash
latexmk -xelatex main.tex
latexmk -lualatex main.tex
```
## Compiling presentation

BIN
example-document.zip Normal file

Binary file not shown.

View File

@@ -6,7 +6,7 @@ I can also cite \cite{dirac}. % The only citation of dirac, if we remove it, di
% If you're quoting larger passages from your sources, consider putting them in the
% "quote" environment
\begin{quote}
This is a quote which cites %\cite{einstein}
This is a quote which cites \cite{einstein}
\end{quote}
% Small phrases may be quoted inline with "enquote"

BIN
example-document/main.pdf Normal file

Binary file not shown.

View File

@@ -1,6 +1,6 @@
% Input encoding, ensures compatibility with UTF-8
\usepackage[utf8]{inputenc} % Only necessary if using pdfLaTeX
% XeLaTeX is a more modern compiler which supports utf8 by default
% XeLaTeX or LuaLaTeX are more modern compilers which supports utf8 by default
% Localization
\usepackage[english]{babel} % Babel renews "hardcoded" strings to reflect the given language
@@ -49,5 +49,3 @@
%%% Custom Commands %%%
% Unit commands, ensures math to exponentiate and un-italicises text
\newcommand{\un}[1]{\ensuremath{\, \mathrm{#1}}}

View File

@@ -1,10 +1,27 @@
# Introductory Course to \LaTeX
## About this course
- Created by Bjørnar Kaarevik
- Updated by Torstein Nordgård-Hansen in 2025
Slides available on [git.pvv.ntnu.no/Kurs/latex-course](https://git.pvv.ntnu.no/Kurs/latex-course)
## Get \LaTeX
- Linux: `sudo apt install texlive-full`
- Mac: `brew install mactex`
- BSD: `texlive?`
- Windows: `choco install texlive`
- Online: `overleaf.com`
Recommended etidors: TeXstudio, Emacs, VSCode
## What even is \LaTeX?
- 1978: Donald Knuth gets fed up by typographical errors in his documents and creates \TeX
- 1984: Leslie Lamport gets fed up with having to write bonkers \TeX\ -commands and piles on a bunch of macros
- 2025: We're here, still stuck with this ancient crap
- 2025: We're here, still stuck with this ancient mess
But actually, it is a pretty good **document preparation system**.
@@ -163,7 +180,7 @@ $$
## Referencing
- `\usepackage{biblatex}`
- `\usepackage[backend=biber, style=ieee]{biblatex}`
- Reference list styling
- Many other options
- Needs a file containing available sources
@@ -228,7 +245,7 @@ better choices than you.
## Figures and tables
- Width, height and angle:
- `[width=\textwidth, height=100mm, angle=45]`
- `[width=0.8\linewidth, height=100mm, angle=45]`
- `[!htbp]`
- Here, top, bottom and "special page"
- Floats
@@ -252,6 +269,7 @@ Some examples:
- Everything on Overleaf.com
- Documentation for packages on CTAN
- StackExchange
- LLMs (sometimes)
\vspace{2em}

Binary file not shown.