For your information. In case you missed it. Attached patches: http://www.lyx.org/trac/attachment/ticket/10068/0001-Templates-remove-parbreak-and-latexpar-separators.patch http://www.lyx.org/trac/attachment/ticket/10068/0002-Examples-remove-parbreak-and-latexpar-separators.patch
Le 12/04/2016 23:15, LyX Ticket Tracker a écrit :
#10068: Files distributed with lyx should not contain parbreak and latexpar separators ---------------------+------------------------ Reporter: gadmm | Owner: lasgouttes Type: defect | Status: new Priority: normal | Milestone: 2.2.x Component: general | Version: 2.2.0dev Severity: normal | Keywords: ---------------------+------------------------ LyX files distributed with 2.2 feature the parbreak and latexpar separators as obtained via conversion from 2.1. A file written in normal ways in 2.2 would only contain the plain separator. This is especially important for templates and examples which are meant to show state-of-art. The following script replaces parbreak separators with plain separators, and deletes the latexpar separators. In addition (and that's the main point) it displays a diff the resulting pdfs so that the difference can be checked by hand. {{{ #!/bin/bash LYX=../../build/src/lyx $LYX -E pdf2 $1.old.pdf $1 sed -i "s/^\\\\begin_inset Separator parbreak$/\\\\begin_inset Separator plain/" $1 sed -i "/^\\\\begin_inset Separator latexpar$/ { N; d; }" $1 $LYX -e lyx $1 $LYX -E pdf2 $1.pdf $1 diffpdf $1.old.pdf $1.pdf }}} In the attached patches, I applied the above script to lib/examples and lib/templates. The PDF diffs showed three possiblities * The pdfs were identical, * Or the spacing changed (was improved) around nested environments, * In addition (only with {{{examples/beamer.lyx}}}, {{{examples/de/beamer.lyx}}} and {{{examples/fr/beamer.lyx}}}): there are three occurrences where a line break appeared or disappeared because of the new semantics. After thinking about it I concluded that it's better in any case not to keep a strange latexpar separator and to show the real behaviour. Following the checks by hand, I am happy to recommend that these patches be applied in master. Not all examples and templates were converted because I did not always have the files necessary for checking the resulting pdf (especially japanese because ptex refuses to install on my system). Somebody else should take care of this. See the commit logs of the patches below for the list of files that have been left unconverted. In addition, lib/docs should be treated in the same way but there are many more bigger files to check and the gains in vertical spacing seem to result in page relayouts, so somebody brave should go through all the pdf diffs. Because the changes have been tested one-by-one with diffpdf, I think these two patches are safe for 2.2.0, if somebody wants that (I have no strong opinion).