Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
texlive-specs-n
latexdiff_perl.dif
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File latexdiff_perl.dif of Package texlive-specs-n
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 | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) --- texmf-dist/scripts/latexdiff/latexdiff.pl +++ texmf-dist/scripts/latexdiff/latexdiff.pl 2019-01-08 13:58:58.569965613 +0000 @@ -1168,7 +1168,7 @@ if ($graphicsmarkup != NONE ) { # (A more elegant solution would be to suppress the redefinitions of the \DIFaddbeginFL etc commands, but for this narrow use case # I currently don't see this as an efficient use of time) foreach my $cmd ( "DIFaddbegin","DIFaddend","DIFdelbegin","DIFdelend" ) { - @matches=( $latexdiffpreamble =~ m/command{\\DIFaddbeginFL}{($pat_n)}/sg ) ; + @matches=( $latexdiffpreamble =~ m/command\{\\DIFaddbeginFL}\{($pat_n)}/sg ) ; # we look at the last one of the list to take into account possible redefinition but almost always matches should have exactly one elemen if ( $matches[$#matches] =~ m/\\DIFaddbegin/ ) { die "Cannot combine graphics markup with float styles defining \\DIFaddbeginFL in terms of \\DIFaddbegin. Use --graphics-markup=none option or choose a different float style."; @@ -1553,7 +1553,7 @@ sub flatten { print STDERR "DEBUG: includeonly $includeonly\n" if $debug; # recursively replace \\input and \\include files - 1 while $text=~s/(^(?:[^%\n]|\\%)*)\\input{(.*?)}|\\include{(${includeonly}(?:\.tex)?)}/{ + 1 while $text=~s/(^(?:[^%\n]|\\%)*)\\input\{(.*?)\}|\\include\{(${includeonly}(?:\.tex)?)\}/{ $begline=(defined($1)? $1 : "") ; $fname = $2 if defined($2) ; $fname = $3 if defined($3) ; @@ -2255,15 +2255,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 @@ -2277,18 +2277,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; } } @@ -2351,16 +2351,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" @@ -2646,15 +2646,15 @@ 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 s/\\begin\{MATHMODE\}(.*?)\\end\{MATHMODE\}/\\begin{$MATHARRREPL}$1\\end{$MATHARRREPL}/sg; # now look for AUXCMD math-mode pairs which have only comments (or empty lines between them), and remove the added commands - s/\\begin{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET)}$AUXCMD\n((?:\s*%.[^\n]*\n)*)\\end{\1}$AUXCMD\n/$2/sg; + s/\\begin\{((?:$MATHENV)|(?:$MATHARRENV)|SQUAREBRACKET)}$AUXCMD\n((?:\s*%.[^\n]*\n)*)\\end{\1}$AUXCMD\n/$2/sg; } else { # math modes OFF,WHOLE,COARSE: Convert \MATHBLOCKmath{..} commands back to environments s/\\MATHBLOCK($MATHENV|$MATHARRENV|SQUAREBRACKET)\{($pat_n)\}/\\begin{$1}$2\\end{$1}/sg; @@ -4430,7 +4430,7 @@ institute \providecommand{\DIFaddend}{\protect\marginpar{]}} \providecommand{\DIFdelbegin}{\protect\marginpar{d[}} \providecommand{\DIFdelend}{\protect\marginpar{]}} -%DIF END BRACKET PREAMBLE +%DIF END MARGIN PREAMBLE %DIF DVIPSCOL PREAMBLE %Note: only works with dvips converter
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor