Add repl config

This commit is contained in:
fischerq
2023-06-03 17:03:27 +00:00
parent 7c1b74c25d
commit 18afb488c0
5 changed files with 68 additions and 0 deletions

14
.replit Normal file
View File

@@ -0,0 +1,14 @@
compile = ["sh", "compile.sh"]
#compile = ["pdflatex", "-halt-on-error", "book/book.tex"]
run = ["sh", "runner.sh"]
hidden = ["*.aux", "*.log", "index.html", "runner.sh", "nohup.out"]
[languages.latex]
pattern = "**/*.tex"
[languages.latex.languageServer]
start = "texlab"
[nix]
channel = "stable-21_11"

11
compile.sh Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -x
cd book
#ls
#cat makefile
#make -f makefile make_pdf
pdflatex -halt-on-error book.tex
biber
pdflatex -halt-on-error book.tex

28
index.html Normal file
View File

@@ -0,0 +1,28 @@
<html>
<head>
<style type="text/css">
body {
margin: 0;
overflow: hidden;
}
iframe {
width: 100%;
height: 100%;
}
.footer {
position: absolute;
width: 100%;
bottom: 0;
}
</style>
</head>
<body>
<div class="footer">
<button><a href="book/book.pdf" download="book.pdf">Download</a></button>
</div>
<iframe src="book/book.pdf"></iframe>
</body>
</html>

8
replit.nix Normal file
View File

@@ -0,0 +1,8 @@
{ pkgs }: {
deps = [
pkgs.texlive.combined.scheme-full
pkgs.httplz
pkgs.texlab
pkgs.biber
];
}

7
runner.sh Normal file
View File

@@ -0,0 +1,7 @@
PID_FILE=/tmp/httplz.pid
kill $(cat $PID_FILE)
sleep 0.1
nohup httplz -l . &
sleep 0.1
echo $! > $PID_FILE