2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-25 06:18:05 +02:00

Karteikarten

This commit is contained in:
Martin Thoma 2014-02-06 16:01:29 +01:00
parent a3888a96a6
commit ff24e6c3a1
6 changed files with 71 additions and 51 deletions

View file

@ -63,3 +63,4 @@ in dem Erstellen dieses Skripts steckt:
|04.02.2014 | 18:15 - 19:30 | Verbesserungen von Marco eingefügt (Danke!); Beispiel 3.2 erstellt |04.02.2014 | 18:15 - 19:30 | Verbesserungen von Marco eingefügt (Danke!); Beispiel 3.2 erstellt
|05.02.2014 | 08:15 - 08:30 | Verbesserungen von Jérôme eingefügt (Danke!) |05.02.2014 | 08:15 - 08:30 | Verbesserungen von Jérôme eingefügt (Danke!)
|06.02.2014 | 08:15 - 08:30 | Verbesserungen |06.02.2014 | 08:15 - 08:30 | Verbesserungen
|06.02.2014 | 15:45 - 16:00 | Karteikarten

View file

@ -70,7 +70,7 @@ $\gamma_1 * \gamma_2\;\;\;$ Zusammenhängen von Wegen\\
\section*{Zahlenmengen} \section*{Zahlenmengen}
$\mdn = \Set{1, 2, 3, \dots} \;\;\;$ Natürliche Zahlen\\ $\mdn = \Set{1, 2, 3, \dots} \;\;\;$ Natürliche Zahlen\\
$\mdz = \mdn \cup \Set{0, -1, -2, \dots} \;\;\;$ Ganze Zahlen\\ $\mdz = \mdn \cup \Set{0, -1, -2, \dots} \;\;\;$ Ganze Zahlen\\
$\mdq = \mdz \cup \Set{\frac{1}{2}, \frac{1}{3}, \frac{2}{3}} = \Set{\frac{a}{b} \text{ mit } a \in \mdz \text{ und } b \in \mdz \setminus \Set{0}} \;\;\;$ Rationale Zahlen\\ $\mdq = \mdz \cup \Set{\frac{1}{2}, \frac{1}{3}, \frac{2}{3}} = \Set{\frac{z}{n} \text{ mit } z \in \mdz \text{ und } n \in \mdz \setminus \Set{0}} \;\;\;$ Rationale Zahlen\\
$\mdr = \mdq \cup \Set{\sqrt{2}, -\sqrt[3]{3}, \dots}\;\;\;$ Reele Zahlen\\ $\mdr = \mdq \cup \Set{\sqrt{2}, -\sqrt[3]{3}, \dots}\;\;\;$ Reele Zahlen\\
$\mdr^+\;$ Echt positive reele Zahlen\\ $\mdr^+\;$ Echt positive reele Zahlen\\
$\mdr^\times = \mdr \setminus \Set{0} \;$ Einheitengruppe von $\mdr$\\ $\mdr^\times = \mdr \setminus \Set{0} \;$ Einheitengruppe von $\mdr$\\

View file

@ -1,49 +1,61 @@
\documentclass[mycards,frame]{flashcards} \documentclass[mycards,frame]{flashcards}
\usepackage{etoolbox}
\usepackage{amsmath,amssymb}% math symbols / fonts \usepackage{amsmath,amssymb}% math symbols / fonts
\usepackage{mathtools} % \xRightarrow
\usepackage{nicefrac} % \nicefrac
\usepackage[utf8]{inputenc} % this is needed for umlauts \usepackage[utf8]{inputenc} % this is needed for umlauts
\usepackage[ngerman]{babel} % this is needed for umlauts \usepackage[ngerman]{babel} % this is needed for umlauts
\usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf \usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
\usepackage{ntheorem} \usepackage[framed,amsmath,thmmarks,hyperref]{ntheorem}
\newcommand{\thmfoot}{} \usepackage{framed}
\theoremstyle{break} \usepackage{marvosym}
\setlength\theoremindent{0.7cm} \usepackage{makeidx} % for automatically generation of an index
\theoremheaderfont{\kern-0.7cm\normalfont\bfseries} \usepackage{xcolor}
\theorembodyfont{\normalfont} % nicht mehr kursiv \usepackage[bookmarks,bookmarksnumbered,hypertexnames=false,pdfpagelayout=OneColumn,colorlinks,hyperindex=false]{hyperref} % has to be after makeidx
\theoremseparator{\thmfoot} \usepackage{enumitem} % Better than \usepackage{enumerate}, because it allows to set references
\newtheorem{definition}{Definition} \usepackage{tabto}
\usepackage{braket} % needed for \Set
\usepackage{csquotes} % \enquote{}
\usepackage{subfig} % multiple figures in one
\usepackage{parskip} % nicer paragraphs
\usepackage{xifthen} % \isempty
\usepackage{changepage} % for the adjustwidth environment
\usepackage{pst-solides3d}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{pgfplots}
\pgfplotsset{compat=1.7}
\usepackage[arrow, matrix, curve]{xy}
\usepackage{caption} % get newlines within captions
\usepackage{tikz} % draw
\usepackage{tikz-3dplot} % draw
\usepackage{tkz-fct} % draw
\usepackage{tkz-euclide} % draw
\usetkzobj{all} % tkz-euclide
\usetikzlibrary{3d,calc,intersections,er,arrows,positioning,shapes.misc,patterns,fadings,decorations.pathreplacing}
\usepackage{tqft}
\usepackage{xspace} % for new commands; decides weather I want to insert a space after the command
\usepackage[german,nameinlink]{cleveref} % has to be after hyperref, ntheorem, amsthm
%%
\newcounter{chapter}
\newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
%%
\usepackage{../shortcuts}
\hypersetup{
pdfauthor = {Martin Thoma},
pdfkeywords = {Geometrie und Topologie},
pdftitle = {Geometrie und Topologie - Definitionen}
}
\allowdisplaybreaks
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Begin document %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document} \begin{document}
%CONTENT%
\begin{flashcard}{Jordankurve}
\begin{definition}
Sei $X$ ein topologischer Raum. Eine (geschlossene)
\textbf{Jordankurve} in $X$ ist ein Homöomorphismus
$\gamma: [0, 1] \rightarrow C \subseteq X$
($\gamma: S^1 \rightarrow C \subseteq X$)
\end{definition}
\end{flashcard}
\begin{flashcard}{Knoten}
\begin{definition}
Eine geschlossene Jordankurve in $r^3$ heißt \textbf{Knoten}.
\end{definition}
\end{flashcard}
\begin{flashcard}{äquivalente Knoten}
\begin{definition}
Zwei Knoten $\gamma_1, \gamma_2: S^1 \rightarrow r^3$ heißen
\textbf{äquivalent}, wenn es eine stetige Abbildung
\[H: S^1 \times [0,1] \Rightarrow r^3\]
gibt mit
\begin{align*}
H(z,0) &= \gamma_1(z)\\
H(z,1) &= \gamma_2(z)
\end{align*}
und für jedes
feste $t \in [0,1]$ ist
\[H_z: S^1 \rightarrow r^2, z \mapsto H(z,t)\]
ein Knoten. Die Abbildung $H$ heißt \textbf{Isotopie} zwischen
$\gamma_1$ und $\gamma_2$.
\end{definition}
\end{flashcard}
\end{document} \end{document}

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import re, glob import re, glob
@ -7,10 +7,17 @@ def get_definitions(filename):
with open(filename) as f: with open(filename) as f:
content = f.read() content = f.read()
pattern = re.compile(r"\\begin{definition}.*?\\end{definition}", re.DOTALL) pattern = re.compile(r"\\begin{definition}.*?\\end{definition}", re.DOTALL | re.UNICODE)
m = re.findall(pattern, content) index_pattern = re.compile(r"\\xindex{(?:.*?@)?(.*?)(?:\|.*?)?}", re.UNICODE)
return "\n\n".join('\\vspace*{{\\fill}}\n{0}\n\\vspace*{{\\fill}}\\clearpage'.format(definition) for definition in m) definitions = re.findall(pattern, content)
#return "\n\n".join('\\begin{{flashcard}}{{a}}\n{0}\n\\end{{flashcard}}'.format(definition) for definition in m) def_dict_list = []
for definition in definitions:
names = re.findall(index_pattern, definition)
names = map(lambda s: s.replace("!", ", "), names)
name = "\\\\".join(names)
def_dict_list.append({"name":name, "definition":definition})
#return "\n\n".join('\\vspace*{{\\fill}}\n{0}\n\\vspace*{{\\fill}}\\clearpage'.format(definition["definition"]) for definition in def_dict_list)
return "\n\n".join('\\begin{{flashcard}}{{ {1} }}\n{{ {0} }}\n\\end{{flashcard}}'.format(definition["definition"], definition["name"]) for definition in def_dict_list)
def write_definitions_to_template(definitions, template="mathe-vorlage.tex", target="definitionen.tex"): def write_definitions_to_template(definitions, template="mathe-vorlage.tex", target="definitionen.tex"):
with open(template) as f: with open(template) as f:
@ -24,4 +31,4 @@ if __name__ == "__main__":
definitions = [] definitions = []
for texsource in sorted(glob.glob("../Kapitel*.tex")): for texsource in sorted(glob.glob("../Kapitel*.tex")):
definitions.append(get_definitions(texsource)) definitions.append(get_definitions(texsource))
write_definitions_to_template("\n\n\n".join(definitions)) write_definitions_to_template("\n\n\n".join(definitions), "flashcards-try.tex")

View file

@ -6,7 +6,7 @@
\newcommand{\cardcolumns}{2} \newcommand{\cardcolumns}{2}
\setlength{\cardheight}{70mm} \setlength{\cardheight}{70mm}
\setlength{\cardwidth}{100mm} \setlength{\cardwidth}{100mm}
\setlength{\topoffset}{0mm} \setlength{\topoffset}{2mm}
\setlength{\oddoffset}{0mm} \setlength{\oddoffset}{5mm}
\setlength{\evenoffset}{0mm} \setlength{\evenoffset}{5mm}
\endinput \endinput