]> git.lyx.org Git - lyx.git/blob - development/attic/separator-convert.sh
inputenc only expects one option
[lyx.git] / development / attic / separator-convert.sh
1 #!/bin/bash
2 # Lyx files converted from 2.1 to 2.2 contain parbeak and latexpar separators
3 # that would not appear if the lyx file was written in 2.2 from scratch. The
4 # script removes latexpar separators and transforms parbreak separators into
5 # plain separators. Then it displays a diff of the resulting pdf files (requires
6 # diffpdf) for manual control. All lyx files shipped with lyx should be updated
7 # in this way. See #10068.
8 #
9 # example usage:
10 # cd lib/doc
11 # ../development/tools/separator-convert.sh Math.lyx
12 #
13 BUILD=../../build
14 LYX=$BUILD/src/lyx
15 cp $1 $1.old
16 $LYX -E pdf2 $1.old.pdf $1
17 sed -i "s/^\\\\begin_inset Separator parbreak$/\\\\begin_inset Separator plain/" $1
18 sed -i "/^\\\\begin_inset Separator latexpar$/ { N; d; }" $1
19 $LYX -e lyx $1
20 $LYX -E pdf2 $1.pdf $1
21 diffpdf $1.old.pdf $1.pdf