Browse Source

Initial commit.

Samuel Čavoj 3 years ago
commit
1cd1ea65f7
4 changed files with 24 additions and 0 deletions
  1. 3 0
      .gitignore
  2. 1 0
      equation.tex
  3. 11 0
      template.tex
  4. 9 0
      update.sh

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+public
+integrals
+build

+ 1 - 0
equation.tex

@@ -0,0 +1 @@
+\int x^2 dx

+ 11 - 0
template.tex

@@ -0,0 +1,11 @@
+\documentclass{minimal}
+\usepackage{amsmath}
+\usepackage{amssymb}
+
+\begin{document}
+
+\[
+    \input{equation.tex}
+\]
+
+\end{document}

+ 9 - 0
update.sh

@@ -0,0 +1,9 @@
+#!/bin/bash
+
+
+if [ ! -s "integrals/input" ]; then exit 1; fi
+tail -n1 "integrals/input" | tee "equation.tex" | tee -a "integrals/used"
+sed -i '$d' "integrals/input"
+latex -output-directory=build template.tex
+dvisvgm --no-fonts build/template.dvi
+mv template.svg public/int.svg