diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/shdoc/shreformat.sh |
Initial commit
Diffstat (limited to 'macros/latex/contrib/shdoc/shreformat.sh')
-rwxr-xr-x | macros/latex/contrib/shdoc/shreformat.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/macros/latex/contrib/shdoc/shreformat.sh b/macros/latex/contrib/shdoc/shreformat.sh new file mode 100755 index 0000000000..c8a6a95773 --- /dev/null +++ b/macros/latex/contrib/shdoc/shreformat.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# experimental formatting script to pre-format shell output that is read by +# the LaTeX package 'shdoc' (see ctan.org/pkg/shdoc) + +# 1. read from shrun.tmp and substitute double tabs with two spaces +# 2. substitute single tabs with single spaces +# 3. remove all leading spaces and save the output to shrun-formatted.tmp +sed 's/\t\t/ /' <shrun.tmp | sed 's/\t/ /' | sed -e 's/^[ \t]*//' >shrun-formatted.tmp |