diff --git a/README.md b/README.md index 50faff3..64e27ae 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/example-document.zip b/example-document.zip new file mode 100644 index 0000000..f85469e Binary files /dev/null and b/example-document.zip differ diff --git a/example-document/doc/appendix.tex b/example-document/doc/appendix.tex index 0222dfe..866ebd6 100644 --- a/example-document/doc/appendix.tex +++ b/example-document/doc/appendix.tex @@ -1,3 +1,3 @@ \section{The Appendix} -\lipsum[1] \ No newline at end of file +\lipsum[1] diff --git a/example-document/doc/math.tex b/example-document/doc/math.tex index a5a7c4a..002c7aa 100644 --- a/example-document/doc/math.tex +++ b/example-document/doc/math.tex @@ -129,4 +129,4 @@ Matrices (and vectors) % Works like a charm \begin{gather*} \myvec{x_1\\x_2\\x_3} \leftarrow \text{My vector command} -\end{gather*} \ No newline at end of file +\end{gather*} diff --git a/example-document/doc/referencing.tex b/example-document/doc/referencing.tex index 6206a55..6ffb1b1 100644 --- a/example-document/doc/referencing.tex +++ b/example-document/doc/referencing.tex @@ -6,8 +6,8 @@ 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" -I may also \enquote{quote} my sources \cite{einstein}. \ No newline at end of file +I may also \enquote{quote} my sources \cite{einstein}. diff --git a/example-document/doc/text.tex b/example-document/doc/text.tex index 3f6bb2a..e1be931 100644 --- a/example-document/doc/text.tex +++ b/example-document/doc/text.tex @@ -42,4 +42,4 @@ If you wish to write an entire paragraph, you may write everything on one line. \item[*] Do \item[$\rightarrow$] This \end{itemize} -\end{enumerate} \ No newline at end of file +\end{enumerate} diff --git a/example-document/main.pdf b/example-document/main.pdf new file mode 100644 index 0000000..890537c Binary files /dev/null and b/example-document/main.pdf differ diff --git a/example-document/preamble.tex b/example-document/preamble.tex index e215542..4178626 100644 --- a/example-document/preamble.tex +++ b/example-document/preamble.tex @@ -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}}} - - diff --git a/example-document/readme.md b/example-document/readme.md index 7d0144f..a09155d 100644 --- a/example-document/readme.md +++ b/example-document/readme.md @@ -20,4 +20,4 @@ If you have `pandoc` you can write a markdown file (or many other document forma You can even integrate python code which is to be run and its output used as information for the source which is to be compiled to a pdf. Since everything is in plain text files, you may programatically alter any of these text files to do really complex things. -It is, however, way outside of the scope of this course. \ No newline at end of file +It is, however, way outside of the scope of this course. diff --git a/presentation/presentation.md b/presentation/presentation.md index 163c3c4..3d71146 100644 --- a/presentation/presentation.md +++ b/presentation/presentation.md @@ -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} diff --git a/presentation/presentation.pdf b/presentation/presentation.pdf new file mode 100644 index 0000000..5d424b4 Binary files /dev/null and b/presentation/presentation.pdf differ