summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh')
-rwxr-xr-xMaster/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh b/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh
index 8ec15ebf452..d7e6c1013ea 100755
--- a/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh
+++ b/Master/texmf-dist/doc/latex/photobook/scripts/cls2tex.sh
@@ -31,7 +31,7 @@ printhelp(){
echo " - %% >> code -> \\begin{verbatim}code\\end{verbatim}"
echo " - write the result to OUTPUT"
echo
- echo "If no OUTPUT is given $SCRIPT_NAME will read stdout. If no INPUT"
+ echo "If no OUTPUT is given $SCRIPT_NAME will write to stdout. If no INPUT"
echo "is given $SCRIPT_NAME will read stdin."
echo
echo "PREFIX can replace the second \"%\" in the above patterns to make it"
@@ -132,11 +132,12 @@ if [ -z $STRIP_DOC ] ; then
> "$OUTPUT"
cat "$INPUT" \
| egrep '(^%'$PREFIX'|^\\edef\\'$MODULE'@[A-Z][A-Z]+)' \
- | sed 's/^\(\\edef\\\)'$MODULE'@/%'$PREFIX'\1/' \
- | sed 's/%'$PREFIX'%%%% \(.*\)/%'$PREFIX'\\subsubsection{\1}\\label{subsubsec:\1}/' \
- | sed 's/%'$PREFIX'%%% \(.*\)/%'$PREFIX'\\subsection{\1}\\label{subsec:\1}/' \
- | sed 's/%'$PREFIX'%% \(.*\)/%'$PREFIX'\\section{\1}\\label{sec:\1}/' \
- | sed 's/%'$PREFIX'\s\+>>\s\+\(.*\)/%'$PREFIX'\\begin{verbatim} \1 \\end{verbatim}/' \
+ | sed \
+ -e 's/^\(\\edef\\\)'$MODULE'@/%'$PREFIX'\1/' \
+ -e 's/%'$PREFIX'%%%% \(.*\)/%'$PREFIX'\\subsubsection{\1}\\label{subsubsec:\1}/' \
+ -e 's/%'$PREFIX'%%% \(.*\)/%'$PREFIX'\\subsection{\1}\\label{subsec:\1}/' \
+ -e 's/%'$PREFIX'%% \(.*\)/%'$PREFIX'\\section{\1}\\label{sec:\1}/' \
+ -e 's/%'$PREFIX'\s\+>>\s\+\(.*\)/%'$PREFIX'\\begin{verbatim} \1 \\end{verbatim}/' \
| cut -c 3- - \
>> "$OUTPUT"
@@ -153,4 +154,4 @@ fi
#----------------------------------------------------------------------
-# vim:set ts=4 sw=4 nowrap :
+# vim:set ts=4 sw=4 nowrap :