2024-02-13
I’ve stumbled across a method of composing programs that excites me very much.
In fact, my enthusiasm is so great that I must warn the reader to discount much of what I shall say as the ravings of a fanatic who thinks he has just seen a great light.
I chose the name WEB partly because it was one of the few three-letter words of English that hadn’t already been applied to computers.
Vorteile reiner Textfiles (plain text)
Sprache | Beispiel |
---|---|
HTML | <b>Fetter Text</b> |
LaTeX | \textbf{Fetter Text} |
Markdown | **Fetter Text** |
# A story of a fox
The *quick* brown fox **jumps** over the lazy [dog](https://en.wikipedia.org/wiki/Dog).

Ein guter Texteditor ist wichtig!! Empfehlungen:
If you need to convert files from one markup format into another, pandoc is your swiss-army knife. Pandoc can convert between the following formats
Installiert Pandoc von pandoc.org (MSI installer).
Öffnet ein Terminal im Folder, wo ihr das Markdown File erstellt habt
Konvertiert das eben erstellte Markdown File in html mit folgendem Command:
pandoc
ruft das Commandline Tool pandoc aufmarkdown.md
:
.md
= Markdown)html
herausgegeben-o output.html
:
.html
)Konvertiert euer mitgebrachtes docx File
Die Verwendung von Commandline-Programmen (cli) ist eine wichtige und nützliche Fähigkeit
cli Tools verfügen meist über eine eingebaute Hilfestellung (-h
/ --help
)
pandoc [OPTIONS] [FILES]
-f FORMAT, -r FORMAT --from=FORMAT, --read=FORMAT
-t FORMAT, -w FORMAT --to=FORMAT, --write=FORMAT
-o FILE --output=FILE
--data-dir=DIRECTORY
-M KEY[:VALUE] --metadata=KEY[:VALUE]
--metadata-file=FILE
-d FILE --defaults=FILE
--file-scope[=true|false]
--sandbox[=true|false]
-s[true|false] --standalone[=true|false]
--template=FILE
...
die Hilfestellungen sind etwas gewöhnungsbedürftig, dafür aber umfangreich
Der Umgang mit dem Terminal ist eine wichtige und nützliche Fähigkeit.
cd
kann man in Folders hinein navigieren (cd Documents
)cd ..
kann man aus Folders hinaus navigierenecho %cd%
pwd
mkdir
kann man ein Verzeichnis erstellen (mkdir verzeichnis
)html
: Books, Slides, Blogs…pdf
: Books, Slidesepub
: Booksword
: Bookspptx
: SlidesInstalliert quarto quarto.org
Öffnet ein Terminal im Folder, wo ihr mit Pandoc docx → md konvertiert habt
Konvertiert das Markdown File in html mit folgendem Command:
render
ist eine Funktion des Programms quarto
markdown.md
ein positionales Argumenttinytex
Vorteile
Nachteile
Diese Methode ist zwar sehr einfach, aber:
quarto publish netlify
CNAME
eigener Domain (siehe dxi.ai)Logged auch mit dem ZHAW Benutzername / Kürzel auf dem Server ein:
statistik-ide.zhaw.ch/rsconnect
Klickt auf eure Mailadresse rechts Oben und wählt “API Keys”
Erstellt einen neuen API Key und gibt ihm einen sinnvollen Namen (z.B. zhaw laptop
)
Kopiert den API Key in die Zwischenablage
Gebt im Terminal folgenden Befehl ein
Danach sollte ein Browserfenster mit eurem Inhalt erscheinen
YAML: YAML Ain’t a Markup Language
Eine maschinen- und menschenlesbare Art, strukturierte Daten zu speichern
Ein Beispiel:
In Quarto: Metadaten festhalten (z.B. Titel, Autor und Datum)
Wird zu Beginn des Dokuments eingefügt und mit ---
umschlossen
{#sec-}
number-sections: true
| fruit | price |
|:-------|--------:|
| apple | 2.05 |
| pear | 1.37 |
| orange | 30.09 |
: Eine "pipe" Tabelle {#tbl-pipe}
fruit | price |
---|---|
apple | 2.05 |
pear | 1.37 |
orange | 30.09 |
+-----------+-----------+--------------------+
| Fruit | Price | Advantages |
+===========+===========+====================+
| Bananas | $1.34 | - built-in wrapper |
| | | - bright color |
+-----------+-----------+--------------------+
| Oranges | $2.10 | - cures scurvy |
| | | - tasty |
+-----------+-----------+--------------------+
: Sample grid table.
@article{einstein1905,
title={Zur Elektrodynamik bewegter Körper},
author={Einstein, Albert},
journal={Annalen der physik},
volume={4},
year={1905}
}
Dieser Bibtex-Keys werden in einem File abgespeichert, z.B literatur.bib
Das Bibtex-File wird über den YAML Header ins Quartodokument eingebunden:
Über die ID kann der Eintrag nun Zitiert werden:
Folgender Eintrag:
Wird zu: Einstein (1905) postulierte…
Viele Formen stehen zur Verfügung. Siehe: quarto.org → Guide → Authoring → Scholarly Writing → Citations and Footnotes
Von einem File auf viele Files
Setup:
_quarto.yaml
index.qmd
(ohne YAML Header)_quarto.yaml
eingebunden werdenproject:
type: book
preview:
port: 5678
execute-dir: project
pre-render: pre-render.r
lang: de
format:
html:
theme:
dark: [darkly, custom-dark.scss]
light: [flatly, custom-light.scss]
css:
- custom.css
- theme-custom.scss
#- presenter-mode.css
bibliography: bibliography.bib
number-sections: false
code-tools:
source: false
include-in-header:
- script.html
execute:
freeze: true
error: false
message: false
warning: false
knitr:
opts_chunk:
collapse: true
#tidy: true
book:
title: "Research Methods HS23"
sidebar:
logo: images/zhaw_sw_neg.png
collapse-level: 1
style: floating
reader-mode: true
# globbing would be cool. Wait for
# https://github.com/quarto-dev/quarto-cli/issues/2120 or
# https://github.com/quarto-dev/quarto-cli/issues/1917 to be resolved
chapters:
- index.qmd
- part: PrePro.qmd
chapters:
- prepro/Prepro1_Vorbereitung.qmd
- --
- prepro/Prepro1_Demo.qmd
- prepro/Prepro1_Uebung.qmd
- --
- prepro/Prepro2_Demo.qmd
- prepro/Prepro2_Uebung_A.qmd
- prepro/Prepro2_Uebung_B.qmd
- --
- prepro/Prepro3_Demo.qmd
- prepro/Prepro3_Uebung.qmd
- part: InfoVis.qmd
chapters:
- infovis/Infovis1_Vorbereitung.qmd
- --
- infovis/Infovis1_Demo.qmd
- infovis/Infovis1_Uebung.qmd
- infovis/Infovis1_Script_eda.qmd
- --
- infovis/Infovis2_Uebung_A.qmd
- infovis/Infovis2_Uebung_B.qmd
- part: Stat1-4.qmd
chapters:
- stat1-4/Statistik1_Vorbereitung.qmd
- --
- stat1-4/Statistik1_Demo.qmd
- stat1-4/Statistik1_Novanimal.qmd
- stat1-4/Statistik1_Uebung.qmd
- stat1-4/Statistik1_Loesung.qmd
- --
- stat1-4/Statistik2_Demo.qmd
- stat1-4/Statistik2_Uebung.qmd
- stat1-4/Statistik2_Loesung_Beispiel.qmd
- stat1-4/Statistik2_Loesung_1.qmd
- stat1-4/Statistik2_Loesung_2223s.qmd
- stat1-4/Statistik2_Loesung_23n.qmd
- --
- stat1-4/Statistik3_Demo.qmd
- stat1-4/Statistik3_Uebung.qmd
- stat1-4/Statistik3_Loesung.qmd
- --
- stat1-4/Statistik4_Demo.qmd
- stat1-4/Statistik4_Uebung.qmd
- stat1-4/Statistik4_Loesung_1.qmd
- stat1-4/Statistik4_Loesung_2n.qmd
- stat1-4/Statistik4_Loesung_2s.qmd
- part: Stat5-8.qmd
chapters:
- stat5-8/Statistik5_Vorbereitung.qmd
- --
- stat5-8/Statistik5_Demo.qmd
- stat5-8/Statistik5_Uebung.qmd
- stat5-8/Statistik5_Loesung_1.qmd
- stat5-8/Statistik5_Loesung_2.qmd
- --
- stat5-8/Statistik6_Demo.qmd
- stat5-8/Statistik6_Uebung.qmd
- stat5-8/Statistik6_Loesung.qmd
- --
- stat5-8/Statistik7_Demo.qmd
- stat5-8/Statistik7_Uebung.qmd
- stat5-8/Statistik7_Loesung.qmd
- --
- stat5-8/Statistik8_Demo.qmd
- stat5-8/Statistik8_Uebung.qmd
- stat5-8/Statistik8_Loesung.qmd
- part: StatKons.qmd
chapters:
- statKons/StatKons0_Vorbereitung.qmd
- --
- statKons/StatKons1_Demo_assoziationen.qmd
- statKons/StatKons1_Demo_open_datasets.qmd
#- statKons/StatKons1_Demo_suggest_datasets.qmd
- --
- statKons/StatKons2_Demo_PCA.qmd
- --
- statKons/StatKons3_Demo_LM.qmd
- --
- statKons/StatKons4_Demo_GLM.qmd
- part: RaumAn.qmd
chapters:
- rauman/Rauman0_Vorbereitung.qmd
- --
- rauman/Rauman1_Uebung_A.qmd
- rauman/Rauman1_Uebung_B.qmd
- --
- rauman/Rauman2_Uebung_A.qmd
- rauman/Rauman2_Uebung_B.qmd
- --
- rauman/Rauman3_Uebung_A.qmd
- rauman/Rauman3_Uebung_B.qmd
- rauman/Rauman3_Uebung_C.qmd
- --
- rauman/Rauman4_Uebung_A.qmd
- --
- rauman/Rauman5_Uebung_A.qmd
- rauman/Rauman5_Uebung_B.qmd
- part: "Fallstudie S"
chapters:
- fallstudie_s/0_Vorbereitung.qmd
- --
- fallstudie_s/1_Einführung.qmd
- fallstudie_s/2_Besuchermonitoring.qmd
- --
- fallstudie_s/3_Aufgabenstellung_WPZ.qmd
- --
- fallstudie_s/4_Projektierung.qmd
- fallstudie_s/5_Datenverarbeitung.qmd
- fallstudie_s/6_Deskriptive_Analysen.qmd
- fallstudie_s/7_Multivariate_Modelle.qmd
- part: "Fallstudie N"
chapters:
- fallstudie_n/1_Vorbemerkung.qmd
- fallstudie_n/2_Datenverarbeitung.qmd
- fallstudie_n/3_Berechnung_Homeranges.qmd
- fallstudie_n/4_Multivariate_Modelle.qmd
- fallstudie_n/5_Variablenselektion.qmd
- fallstudie_n/6_Guete_und_Diagnostics.qmd
#- --
#- fallstudie_n/7_Modelle_mit_Nutzungsintensitaet.qmd
- "References.qmd"
Add
: Sammelt ÄnderungenCommit
: Speichert eine Version mit Änderungen.Push
: Hochladen von lokalen Commits ins Remote Repository.Pull
: Abrufen und Einpflegen von Änderungen aus dem Remote Repository.Pull Request
: Anfrage zur Überführung von Änderungen zwischen Branches.Merge Conflict
: Problem bei der automatischen Zusammenführung von Branches.Issue
: Verfolgung von Problemen, Vorschlägen oder Aufgaben in Projekten.Fork
t die Übungsunterlagen von Fit-mit-MarkdownCommit
et und Push
t die Änderungen