diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/stex/bin/allgen')
-rwxr-xr-x | Master/texmf-dist/source/latex/stex/bin/allgen | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/stex/bin/allgen b/Master/texmf-dist/source/latex/stex/bin/allgen new file mode 100755 index 00000000000..4728d89ee56 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/allgen @@ -0,0 +1,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 |