blob: 4728d89ee561e15900ef0f2d63e5361ff9e33e38 (
plain)
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
|
#!/bin/bash
if [[ -z $STEX_CONTENT_HOME ]]
then
echo "STEX_CONTENT_HOME is not set; please set it in your ~/.bashrc"
exit 1
fi
LIB="$STEX_CONTENT_HOME/slides/lib"
cat <<'EOF'
% this file is automatically generated by allgen
% Note: This hack is needed to make mikoslides and problems work together.
\PassOptionsToPackage{solutions,notes,pts,min}{problems}
EOF
sed -e '/\\begin{document}/ i\
\\usepackage{problems}
' $LIB/pre.tex | \
grep -v '^\\def\\snippets'
cat <<'EOF'
EOF
for file in *.tex
do
prefix=${file%.tex} # file name without .tex suffix
[[ $prefix != "all" ]] && echo -e "\\subsection{${prefix//_/\\\\_}} \n \\input{$prefix}" # in subsection replace "_" by "\_"
done
cat $LIB/post.tex
|