forked from APEXCalculus/APEXCalculus_Source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
slurm-alone.sh
110 lines (80 loc) · 3.23 KB
/
slurm-alone.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/bin/bash -l
#-----------------------------------
# David Apostal
# UND Computational Research Center
#
# Timothy Prescott
# UND Math Dept
#
# Submit:
# sbatch this-file.sh
#
# Check status:
# squeue | grep [userid]
# squeue -u $USER
# squeue -j [jobid]
#-----------------------------------
# use
# git pull origin master
# to make sure the code is up to date
#SBATCH --job-name=latexml
#SBATCH --partition=talon
# Sets the maximum time the job can run (hh:mm:ss).
#SBATCH --time=1:00:00
# Specifies nodes for the job.
#SBATCH --nodes=1
# Sets the output file name. %x = job-name, %j = job-id
#SBATCH --output=./%x.%j.out.txt
#SBATCH --error=./%x.%j.err.txt
# Job events (mail-type): begin, end, fail, all.
#SBATCH --mail-type=all
#SBATCH --mail-user=timothy.prescott@und.edu
# load required modules here
module load apptainer
# print the loaded modules
#module list
echo ""
echo "Job started at $(date)"
echo ""
export LATEXML_KPSEWHICH=$HOME/.tex/texlive/2021/bin/x86_64-linux/kpsewhich
base="standalone"
latexmlscripts="$HOME/git/LaTeXML/blib/script"
#latexmlscripts="$HOME/.cpan/sources/authors/id/B/BR/BRMILLER/LaTeXML-0.8.6/blib/script"
singularitydir="$HOME/latexml"
printf '\\newcommand{\\thetitle}{Calculus}\n\\printincolor\n\\usethreeDgraphics\n\\renewcommand{\\monthYear}{June 2023}\n' > options.tex
singularity exec $singularitydir/latexml.sif $latexmlscripts/latexml --destination=lab/moverMunder/moverMunder.xml --nocomments lab/moverMunder/moverMunder
singularity exec $singularitydir/latexml.sif $latexmlscripts/latexmlc --destination=lab/moverMunder/moverMunderC.xhtml --nocomments lab/moverMunder/moverMunder
singularity exec $singularitydir/latexml.sif $latexmlscripts/latexmlpost --destination=lab/moverMunder/moverMunder.html lab/moverMunder/moverMunder.xml
singularity exec $singularitydir/latexml.sif $latexmlscripts/latexmlpost --destination=lab/moverMunder/moverMunder.xhtml lab/moverMunder/moverMunder.xml
singularity exec $singularitydir/latexml.sif $latexmlscripts/latexmlpost --destination=lab/moverMunder/moverMunderS.xhtml --stylesheet=apexepub.xsl lab/moverMunder/moverMunder.xml
#singularity exec $singularitydir/latexml.sif $latexmlscripts/latexmlpost --destination=lab/moverMunder/moverMunder.epub lab/moverMunder/moverMunder.xml
exit 0
singularity exec $singularitydir/latexml.sif $latexmlscripts/latexml --destination=$base.xml --nocomments $base
exit_code=$?
echo ""
echo "latexml finished at $(date)"
echo ""
if [ "$exit_code" -ne "0" ]; then
echo "latexml failed"
exit "$exit_code"
fi
singularity exec $singularitydir/latexml.sif $latexmlscripts/latexmlpost --split --destination=standaloneweb/index.html --javascript=LaTeXML-maybeMathJax.js $base.xml
# --javascript=LaTeXML-maybeMathJax.js
exit_code=$?
echo ""
echo "latexmlpost finished at $(date)"
echo ""
if [ "$exit_code" -ne "0" ]; then
echo "latexmlpost failed"
exit "$exit_code"
fi
singularity exec $singularitydir/latexml.sif $latexmlscripts/latexmlpost --split --destination=standaloneweb/epub.xhtml --stylesheet=apexepub.xsl $base.xml
exit_code=$?
echo ""
echo "latexmlpost epub finished at $(date)"
echo ""
if [ "$exit_code" -ne "0" ]; then
echo "latexmlpost epub failed"
exit "$exit_code"
fi
tar czf standaloneweb.tar.gz standaloneweb/