2020-12-11 把latex源文件中,所有汉字开头的行前,
2020-12-11 本文已影响0人
linuxScripter
cat zmother.tex | grep -B 100000 "begin.document" > z.tex
cat zmother.tex -n | grep -A 100000000 "begin.document" | sed '1d' \
| LANG=C sed 's/^ *\([0-9]*[ \t]*\)\([\x80-\xff]\)/\\marginpar{\\boxed{\1}}\2/g' | sed 's/^ *[0-9]*[ \t]*\\/\\/g' \
| sed 's/^ *[0-9]*[ \t]*//g' > 1
cat 1 >> z.tex