From 121581b23717391aa19d29ca75b3d316520caf85 Mon Sep 17 00:00:00 2001 From: Florian Knoch Date: Fri, 19 Aug 2022 14:39:52 +0200 Subject: [PATCH] Remove content on absolute file paths --- slides/chapter-04.de.md | 47 ++---- slides/chapter-04.en.md | 57 ++----- svg/chapter-04/absolute-path-crop.svg | 152 ------------------ svg/chapter-04/absolute-path-english-crop.svg | 148 ----------------- svg/chapter-04/absolute-path-english-orig.svg | 148 ----------------- svg/chapter-04/absolute-path-english.tex | 33 ---- svg/chapter-04/absolute-path-orig.svg | 152 ------------------ svg/chapter-04/absolute-path.tex | 33 ---- 8 files changed, 23 insertions(+), 747 deletions(-) delete mode 100644 svg/chapter-04/absolute-path-crop.svg delete mode 100644 svg/chapter-04/absolute-path-english-crop.svg delete mode 100644 svg/chapter-04/absolute-path-english-orig.svg delete mode 100644 svg/chapter-04/absolute-path-english.tex delete mode 100644 svg/chapter-04/absolute-path-orig.svg delete mode 100644 svg/chapter-04/absolute-path.tex diff --git a/slides/chapter-04.de.md b/slides/chapter-04.de.md index 0457fdc..f4a6ac0 100644 --- a/slides/chapter-04.de.md +++ b/slides/chapter-04.de.md @@ -90,6 +90,9 @@ Dateipfade angeben 👣 @content * wichtig für `\input{}` sowie später für das Einbinden von Bildern und anderen Medien * Datei- und Ordnerstruktur = Baumstruktur 🌳 +* bei `\input{}` kann der Pfad zu einer Unterdatei relativ zur Hauptdatei angeben werden + +

Bei LaTeX muss stets die **Unix-Syntax** für Pfadangaben verwendet werden. Pfadelemente werden durch einen Schrägstrich getrennt: `pfad/zur/datei`. Deshalb werden wir im Folgenden diese Schreibweise verwenden.

@preview ![](svg/chapter-04/tree-crop.svg) @@ -104,41 +107,9 @@ Exkurs Dateipfade angeben 👣 @content -### Absolute Dateipfade -* Pfad von der Wurzel des Ordnerbaums bis zur jeweiligen Datei -* die verschiedenen Ebenen des Baums werden dabei durch folgende Zeichen getrennt: - * Unter Unix: »`/`« - * Unter Windows: »`\`« - -

Absoluter Pfad zu `main.tex`

- -* Unix: `/home/knut/docs/latex/main.tex` -* Windows: `C:\knut\docs\latex\main.tex` - -

Bei LaTeX muss stets die **Unix-Syntax** für Pfadangaben verwendet werden. Deshalb werden wir im Folgenden diese verwerden.

- -@preview -![](svg/chapter-04/absolute-path-crop.svg) - - -@slide(layout=content-and-preview-with-category) - -@category -Exkurs - -@title -Dateipfade angeben 👣 - -@content -### Relative Dateipfade -* Pfad von einem bestimmten Ort irgendwo im Ordnerbaum bis zur jeweiligen Datei -* kürzer + weniger Schreibarbeit! ☺ -* bei `\input{}` kann der Pfad zu einer Unterdatei relativ zur Hauptdatei angeben werden +

`main.tex` → `part1.tex`

-

Relativer Pfad \ -von `main.tex` zu `part1.tex`

- `./part1.tex` Der **einfache Punkt »`.`«** bezieht sich bei relativen Pfaden auf den aktuellen Ordner (hier: `latex`). Er ist optional, es könnte also auch nur `part1.tex` geschrieben werden. @@ -157,10 +128,11 @@ Exkurs Dateipfade angeben 👣 @content -### Relative Dateipfade -

Relativer Pfad von `main.tex` zu `part1.tex` in Unterordner

+

`main.tex` → `part1.tex` (in einem Unterordner)

+
`./sections/part1.tex` +
@preview ![](svg/chapter-04/relative-path-subdir-crop.svg) @@ -175,12 +147,13 @@ Exkurs Dateipfade angeben 👣 @content -### Relative Dateipfade -

Relativer Pfad von `main.tex` in eigenem Unterordner zu `part1.tex` in anderem Unterordner

+

`main.tex` → `part1.tex` (aus einem Unterordner in einen anderen)

+
`../sections/part1.tex` **Zwei Punkte »`..`«** bezeichnen den Elternordner des aktuellen Ordners (hier: `latex`, den Elternordner des Ordners `main`). +
@preview ![](svg/chapter-04/relative-path-superdir-crop.svg) diff --git a/slides/chapter-04.en.md b/slides/chapter-04.en.md index 6ec88ed..2a7c14f 100644 --- a/slides/chapter-04.en.md +++ b/slides/chapter-04.en.md @@ -89,39 +89,14 @@ Specifying file paths 👣 @content * important for `\input{}`, but later also for other media types * file and folder structure = tree structure 🌳 +* with `\input{}`, you can specify the path relative to the main file + +

In **LaTeX,** you have to use UNIX-style paths. They are separated by a forward slash: `path/to/file`. We will use those from here on.

@preview ![](svg/chapter-04/tree-english-crop.svg) -@slide(layout=content-and-preview-with-category) - -@category -Excursion - -@title -Specifying file paths 👣 - -@content -### Absolute paths -* path from the root directory to a file -* the direcories are separated by special characters: - * under UNIX: `/` - * under Windows: `\` - -
-

absolute path for `main.tex`

- -* UNIX: `/home/knut/docs/latex/main.tex` -* Windows: `C:\knut\docs\latex\main.tex` - -

In **LaTeX,** you have to use UNIX-style paths. Therefore, we will use those from here on.

-
- -@preview -![](svg/chapter-04/absolute-path-english-crop.svg) - - @slide(layout=content-and-preview-with-category) @category @@ -131,18 +106,12 @@ Excursion Specifying file paths 👣 @content -### Relative paths -* path from somewhere in the tree to a certain file -* shorter + less typing! ☺ -* with `\input{}`, you can specify the path relative to the main file +

`main.tex` → `part1.tex`

-

Relative path \ -from `main.tex` to `part1.tex`

- `./part1.tex` -A **single dot ‘`.`’** in a relative path represents the current folder (in this case: `latex`). It is optional, you could also write `part1.tex` here. +A **single dot ‘`.`’** represents the current folder (in this case: `latex`). It is optional, you could also write `part1.tex` here.
@preview @@ -155,13 +124,12 @@ A **single dot ‘`.`’** in a relative path represents the current folder (in Excursion @title -Specifying paths 👣 +Specifying file paths 👣 @content -### Relative paths -

Relative path from `main.tex` to `part1.tex` in subfolder

+

`main.tex` → `part1.tex` (in a subfolder)

-`./sections/part1.tex` +
./sections/part1.tex
@preview ![](svg/chapter-04/relative-path-subdir-english-crop.svg) @@ -173,15 +141,16 @@ Specifying paths 👣 Excursion @title -Specifying paths 👣 +Specifying file paths 👣 @content -### Relative paths -

Relative path from `main.tex` in its own subfolder to `part1.tex` in another subfolder

+

`main.tex` → `part1.tex` (from one subfolder into a different subfolder)

-`../sections/part1.tex` +
+
../sections/part1.tex
**Two dots ‘`..`’** represent the parent folder of the current folder (in this case: `latex`, parent of `main`). +
@preview ![](svg/chapter-04/relative-path-superdir-english-crop.svg) diff --git a/svg/chapter-04/absolute-path-crop.svg b/svg/chapter-04/absolute-path-crop.svg deleted file mode 100644 index 9c1a797..0000000 --- a/svg/chapter-04/absolute-path-crop.svg +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svg/chapter-04/absolute-path-english-crop.svg b/svg/chapter-04/absolute-path-english-crop.svg deleted file mode 100644 index bb70b59..0000000 --- a/svg/chapter-04/absolute-path-english-crop.svg +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svg/chapter-04/absolute-path-english-orig.svg b/svg/chapter-04/absolute-path-english-orig.svg deleted file mode 100644 index a63c32e..0000000 --- a/svg/chapter-04/absolute-path-english-orig.svg +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svg/chapter-04/absolute-path-english.tex b/svg/chapter-04/absolute-path-english.tex deleted file mode 100644 index 09aa158..0000000 --- a/svg/chapter-04/absolute-path-english.tex +++ /dev/null @@ -1,33 +0,0 @@ -\documentclass{article} -\usepackage[ngerman]{babel} -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} -\usepackage{tikz} -\usetikzlibrary{trees} -\usepackage{verbatimbox} -\usepackage[active,tightpage]{preview} -\PreviewEnvironment{tikzpicture} -\setlength\PreviewBorder{5pt} -\begin{document} - \tikzstyle{every node}=[draw=black,thick,anchor=west] - \tikzstyle{selected}=[draw=red,fill=red!30] - \tikzstyle{foot}=[fill=gray!50] - \tikzstyle{rel}=[fill=blue!70] - \tikzstyle{partition}=[draw=white] - - \begin{tikzpicture}[% - grow via three points={one child at (0.5,-0.7) and - two children at (0.5,-0.7) and (0.5,-1.4)}, - edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}] - \node [foot] {/ or C:} - child { node [foot] {home} - child { node [foot] {knut} - child { node {pictures}} - child { node [foot] {docs} - child { node [foot] {latex} - child { node [selected] { main.tex}}} - } - } - }; - \end{tikzpicture} -\end{document} \ No newline at end of file diff --git a/svg/chapter-04/absolute-path-orig.svg b/svg/chapter-04/absolute-path-orig.svg deleted file mode 100644 index f450f9d..0000000 --- a/svg/chapter-04/absolute-path-orig.svg +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svg/chapter-04/absolute-path.tex b/svg/chapter-04/absolute-path.tex deleted file mode 100644 index 4b4dcce..0000000 --- a/svg/chapter-04/absolute-path.tex +++ /dev/null @@ -1,33 +0,0 @@ -\documentclass{article} -\usepackage[ngerman]{babel} -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} -\usepackage{tikz} -\usetikzlibrary{trees} -\usepackage{verbatimbox} -\usepackage[active,tightpage]{preview} -\PreviewEnvironment{tikzpicture} -\setlength\PreviewBorder{5pt} -\begin{document} - \tikzstyle{every node}=[draw=black,thick,anchor=west] - \tikzstyle{selected}=[draw=red,fill=red!30] - \tikzstyle{foot}=[fill=gray!50] - \tikzstyle{rel}=[fill=blue!70] - \tikzstyle{partition}=[draw=white] - - \begin{tikzpicture}[% - grow via three points={one child at (0.5,-0.7) and - two children at (0.5,-0.7) and (0.5,-1.4)}, - edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}] - \node [foot] {/ oder C:} - child { node [foot] {home} - child { node [foot] {knut} - child { node {pictures}} - child { node [foot] {docs} - child { node [foot] {latex} - child { node [selected] { main.tex}}} - } - } - }; - \end{tikzpicture} -\end{document} \ No newline at end of file