Commit ccc62db5 authored by Harry Fuchs's avatar Harry Fuchs
Browse files

add new compile script

parent 74ec9142
...@@ -3,3 +3,4 @@ ...@@ -3,3 +3,4 @@
*.aux *.aux
*.log *.log
gdim.tex gdim.tex
tmp.tex
# cp edit-this-file.tex tmp.tex
inotifywait -e close_write,moved_to,create -m . | inotifywait -e close_write,moved_to,create -m . |
while read -r directory events filename; do while read -r directory events filename; do
if [ "$filename" = "edit-this-file.tex" ]; then if [ "$filename" = "edit-this-file.tex" ]; then
pandoc -f org -t latex edit-this-file.tex -s -o gdim.tex --metadata-file meta.yaml cp edit-this-file.tex tmp.tex
python3 preprocessor.py
pandoc -f org -t latex tmp.tex -s -o gdim.tex --metadata-file meta.yaml
pdflatex gdim.tex --non-stop-mode pdflatex gdim.tex --non-stop-mode
echo "wait for next change..." echo "wait for next change..."
fi fi
done done
...@@ -46,20 +46,20 @@ Zitatinhalt ...@@ -46,20 +46,20 @@ Zitatinhalt
** Definition ** Definition
Sei $x\in \mathbb R$, dann: Sei $x\in \mathbb R$, dann:
\begin{equation*} $$=
x=\sqrt{b} x=\sqrt{b}
\end{equation*} $$=
für ein $b\in \mathbb C$. für ein $b\in \mathbb C$.
Beweis: Beweis:
- Als erstes $f\colon A \to B$ - Als erstes $f\colon A \to B$
- Nun noch - Nun noch
\begin{eqnarray*} $$
3 3
&=& 2 + 1 &=& 2 + 1
\\&=& 1 + 1 +1 \\&=& 1 + 1 +1
\end{eqnarray*} $$
** Satz von X ** Satz von X
...@@ -69,3 +69,4 @@ Beweis: ...@@ -69,3 +69,4 @@ Beweis:
* Siehe vorheriger Beweis * Siehe vorheriger Beweis
* dann erhalte nichts * dann erhalte nichts
#TODO Algorithmic efficiency
filename = "tmp.tex"
with open(filename, 'r') as file:
data = file.read()
copy = data
while True:
data = copy
copy = copy.replace("\n$$\n", '\n\\begin{eqnarray*}\n', 1)
copy = copy.replace("\n$$\n", '\n\\end{eqnarray*}\n', 1)
copy = copy.replace("\n$$=\n", '\n\\begin{equation*}\n', 1)
copy = copy.replace("\n$$=\n", '\n\\end{equation*}\n', 1)
print(data, copy)
if data == copy:
break
with open(filename, 'w') as file:
file.write(data)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment