pdfman: fix --

This commit is contained in:
Ole Tange 2018-09-18 17:31:54 +02:00
parent ecea38a908
commit a31f7546f7

View file

@ -120,10 +120,20 @@ man -w "$@" |
# Convert ˆ to ^
# remove lines like: . ds ^ \&
perl -ne '/^\s*\.\s*ds\s+\S*\^/ or print' |
# replace ^ with \(ha
sed 's/\^/\\(ha/g' |
# Convert -- to - and '' to "
(echo '.tr \--'; perl -pe "s/''|\`\`/\"\"/g;") |
perl -pe '
# replace ^ with \(ha
s/\^/\\(ha/g;
# replace \*(-- with \-\-
s/\\\*\(--/\-\-/g;
# replace \*(L" or \*(R" with "
s/\\\*\([LR]"/"/g;
' |
# Todo ~
# Convert -- to -
(
echo '.tr \--';
cat -
) |
man -tl - |
perl -pe "s/'/\\\\010/g" |
ps2pdf - >$pdf && pdfviewer $pdf