Dr. Werner Fink 2016-12-07 11:40:24 +00:00 committed by Git OBS Bridge
parent fecf87e046
commit 59e2aa07c1
3 changed files with 7 additions and 91 deletions

View File

@ -1,90 +0,0 @@
From cfe445c4bff997cdc59979a89da8362cbf403e75 Mon Sep 17 00:00:00 2001
From: Frederik Tilmann <ftilmann@zedat.fu-berlin.de>
Date: Sat, 17 Sep 2016 22:21:08 +0200
Subject: [PATCH] Removed some more unescaped left braces (which triggered
depracation warnings)
From a83d9cb865fd0d8ba83ae97ce567035d96b015c7 Mon Sep 17 00:00:00 2001
From: Frederik Tilmann <ftilmann@zedat.fu-berlin.de>
Date: Tue, 11 Oct 2016 01:01:46 +0200
Subject: [PATCH] Fix further unescaped left brace warnings; fixes issue #61
---
texmf-dist/scripts/latexdiff/latexdiff.pl | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
--- texmf-dist/scripts/latexdiff/latexdiff.pl
+++ texmf-dist/scripts/latexdiff/latexdiff.pl 2016-12-07 11:16:48.279887909 +0000
@@ -2175,15 +2175,15 @@ sub marktags {
sub take_comments_and_enter_from_frac() {
###*************take the \n and % between frac and {}***********
###notice all of the substitution are made none global
- while( m/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)}(.*?)\\frac(([\s]*%[^\n]*?)*[\r\n|\r|\n])+\{(.*?)\\end{\1}/s ) {
+ while( m/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)}(.*?)\\frac(([\s]*%[^\n]*?)*[\r\n|\r|\n])+\{(.*?)\\end\{\1}/s ) {
### if there isn't any % or \n in the pattern $2 then there should be an \\end{...} in $2
- if( $2 !~ m/\\end{$1}/s ) {
+ if( $2 !~ m/\\end\{$1}/s ) {
### take out % and \n from the next match only (none global)
- s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)}(.*?)\\frac(([\s]*%[^\n]*?)*[\r\n|\r|\n])+\{(.*?)\\end{\1}/\\begin{$1}$2\\frac{$5\\end{$1}/s;
+ s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)}(.*?)\\frac(([\s]*%[^\n]*?)*[\r\n|\r|\n])+\{(.*?)\\end\{\1}/\\begin{$1}$2\\frac{$5\\end{$1}/s;
}
else{
###there are no more % and \n in $2, we want to find the next one so we clear the begin-end from the pattern
- s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)}(.*?)\\end{\1}/MATHBLOCK$1$2MATHBLOCKEND/s;
+ s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)}(.*?)\\end\{\1}/MATHBLOCK$1$2MATHBLOCKEND/s;
}
}
###cleaning up
@@ -2197,18 +2197,18 @@ sub take_comments_and_enter_from_frac()
### from now on CURRFRAC is the frac we are looking at
s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)\}(.*?)\\frac\{(.*?)\\end\{\1\}/\\begin\{$1\}$2CURRFRAC\{$3\\end\{$1\}/s;
while( m/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)\}(.*?)CURRFRAC\{(.*?)\\end\{\1\}/s ) {
- if( m/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)\}(.*?)CURRFRAC\{($pat_n)\}([\s]*(%[^\n]*?)*[\r\n|\r|\n])+[\s]*\{(.*?)\\end{\1}/s ) {
+ if( m/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)\}(.*?)CURRFRAC\{($pat_n)\}([\s]*(%[^\n]*?)*[\r\n|\r|\n])+[\s]*\{(.*?)\\end\{\1}/s ) {
s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)\}(.*?)CURRFRAC\{($pat_n)\}([\s]*(%[^\n]*?)*[\r\n|\r|\n])+[\s]*\{(.*?)\\end\{\1\}/\\begin\{$1\}$2CURRFRAC\{$3\}\{$6\\end\{$1\}/s;
}
else { # there is no comment or \n between the two brackets {}{}
### change CURRFRAC to FRACSTART so we can change them all back to //frac{ when we finish
- s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)}(.*?)CURRFRAC\{(.*?)\\end{\1}/\\begin{$1}$2FRACSTART\{$3\\end{$1}/s;
+ s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)}(.*?)CURRFRAC\{(.*?)\\end\{\1}/\\begin{$1}$2FRACSTART\{$3\\end{$1}/s;
}
}
}
else{
###there are no more frac in $2, we want to find the next one so we clear the begin-end from the pattern
- s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)}(.*?)\\end{\1}/MATHBLOCK$1$2MATHBLOCKEND/s;
+ s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)}(.*?)\\end\{\1}/MATHBLOCK$1$2MATHBLOCKEND/s;
}
}
@@ -2271,16 +2271,16 @@ sub preprocess {
s/(?<!\\)\\\[/\\begin{SQUAREBRACKET}/sg;
s/\\\]/\\end{SQUAREBRACKET}/sg;
# Convert all picture environmentent (\begin{PICTUREENV} .. \end{PICTUREENV} \PICTUREBLOCKenv
- s/\\begin\{($PICTUREENV)}(.*?)\\end{\1}/\\PICTUREBLOCK$1\{$2\}/sg;
+ s/\\begin\{($PICTUREENV)}(.*?)\\end\{\1}/\\PICTUREBLOCK$1\{$2\}/sg;
# For --block-math-markup option -convert all \begin{MATH} .. \end{MATH}
# into \MATHBLOCKMATH{...} commands, where MATH is any valid math environment
# Also convert all array environments into ARRAYBLOCK environments
if ( $mathmarkup != FINE ) {
- s/\\begin\{($ARRENV)}(.*?)\\end{\1}/\\ARRAYBLOCK$1\{$2\}/sg;
+ s/\\begin\{($ARRENV)}(.*?)\\end\{\1}/\\ARRAYBLOCK$1\{$2\}/sg;
take_comments_and_enter_from_frac();
- s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)}(.*?)\\end{\1}/\\MATHBLOCK$1\{$2\}/sg;
+ s/\\begin\{($MATHENV|$MATHARRENV|SQUAREBRACKET)}(.*?)\\end\{\1}/\\MATHBLOCK$1\{$2\}/sg;
}
# add final token " STOP"
$_ .= " STOP"
@@ -2566,8 +2566,8 @@ sub postprocess {
# environments) are between the \begin{$MATHENV} and \end{MATHMODE} commands. This is necessary as the minimal matching
# is not globally minimal but only 'locally' (matching is beginning from the left side of the string)
if ( $mathmarkup == FINE ) {
- 1 while s/\\begin\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET)}((?:.(?!(?:\\end{(?:(?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET)}|\\begin\{MATHMODE})))*?)\\end{MATHMODE}/\\begin{$1}$2\\end{$1}/s;
- 1 while s/\\begin\{MATHMODE}((?:.(?!\\end{MATHMODE}))*?)\\end{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET)}/\\begin{$2}$1\\end{$2}/s;
+ 1 while s/\\begin\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET)}((?:.(?!(?:\\end\{(?:(?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET)}|\\begin\{MATHMODE})))*?)\\end\{MATHMODE}/\\begin{$1}$2\\end{$1}/s;
+ 1 while s/\\begin\{MATHMODE}((?:.(?!\\end\{MATHMODE}))*?)\\end\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET)}/\\begin{$2}$1\\end{$2}/s;
# convert remaining \begin{MATHMODE} \end{MATHMODE} (and not containing & or \\ )into MATHREPL environments
s/\\begin{MATHMODE}((?:(.(?!(?<!\\)\&|\\\\))*)?)\\end{MATHMODE}/\\begin{$MATHREPL}$1\\end{$MATHREPL}/sg;
# others into MATHARRREPL

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Dec 7 11:21:18 UTC 2016 - werner@suse.de
- Add patch latexdiff_perl.dif which includes the upstream commits
cfe445c and a83d9c to fix boo#1013904
-------------------------------------------------------------------
Mon Nov 14 01:39:22 UTC 2016 - toddrme2178@gmail.com

View File

@ -19,7 +19,7 @@
%define texlive_version 2016
%define texlive_previous 2015
%define texlive_release 20160523
%define texlive_noarch 112
%define texlive_noarch 113
#!BuildIgnore: texlive