Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ftilmann/latexdiff
Browse files Browse the repository at this point in the history
  • Loading branch information
ftilmann committed Jul 20, 2024
2 parents d63eb4d + 3ecfc17 commit e50940e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
14 changes: 12 additions & 2 deletions latexdiff
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
# - add more mboxsafecmd and safecmd commands for SIunitx to stay compatible with newer versionsof SIunitx (PR #283, fixing issue #282, contributed by github user joe6302413)
# - File added via --preamble option is no longer assumed to be ASCII, but read either with encoding as defined by --encoding option or using the encoding of the LOCALE (fixes issue #285 )
# - multicolumn argument is now treated as text
# - when tikz-dependency package is used, \& is no longer a safe command as it has special meaning inside dependency environment. The fix is a little of a hack as really it should only be considered unsafe within dependency environment (fixes (mostly) issue #303 )
# - listings package had trouble with non-ASCII chars. The encoding is now set (thanks to github user anka-213 for finding this). Fixes #304
#
# Version 1.3.3:
# New features:
Expand Down Expand Up @@ -923,7 +925,7 @@ if (defined($labels[1])) {
$encoding=guess_encoding($newfile) unless defined($encoding);

$encoding = "utf8" if $encoding =~ m/^utf8/i ;
###print STDERR "Encoding $encoding\n" if $verbose;
print STDERR "Encoding $encoding\n" if $verbose;
if (lc($encoding) eq "utf8" ) {
binmode(STDOUT, ":utf8");
binmode(STDERR, ":utf8");
Expand Down Expand Up @@ -1172,7 +1174,7 @@ if ( defined($packages{"listings"}) or `kpsewhich listings.sty` ne "" ) {
}
my @listingDIFcode=();
my $replaced;
# note that in case user supplies preamblefile the type might not reflect well the
# note that in case user supplies preamblefile the type might not reflect well the actual markup style
@listingDIFcode=extrapream("-nofail","DIFCODE_" . $type) unless defined($preamblefile);
if (!(@listingDIFcode)) {
# if listingDIFcode is empty try to guess a suitable one from the preamble
Expand All @@ -1186,6 +1188,10 @@ if ( defined($packages{"listings"}) or `kpsewhich listings.sty` ne "" ) {
@listingDIFcode=extrapream("DIFCODE_BOLD");
}
}
# add configuration so that listings work with utf-8
push @listingpreamble, '\lstset{extendedchars=\true,inputencoding='.$encoding."}\n";


# now splice it in
$replaced=0;
###print STDERR "DEBUG: listingDIFcode: ",join("\n",@listingDIFcode),"|||\n" if $debug;
Expand Down Expand Up @@ -1334,6 +1340,10 @@ if (defined $packages{"mhchem"} ) {
# push(@MATHTEXTCMDLIST,'cee');
}

if ( defined $packages{"tikz-dependency"} ) {
init_regex_arr_ext(\@SAFECMDEXCL, 'AMPERSAND');
}


my ( $citpat);

Expand Down
15 changes: 15 additions & 0 deletions testsuite/tikz-dependency-test-new.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz-dependency}
\begin{document}
\begin{dependency}
\begin{deptext}[column sep=0.4cm]
the\_Det : Det \& black\_A : A \& cat\_N : N \\
\& PositA black\_A : AP \& \\
\end{deptext}
\depedge{3}{1}{det}
\depedge{3}{2}{amod}
\deproot{3}{root}
\end{dependency}
\end{document}

7 changes: 7 additions & 0 deletions testsuite/tikz-dependency-test-old.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz-dependency}
\begin{document}
No content
\end{document}

2 changes: 1 addition & 1 deletion testsuite/verify
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ set testroots=( test rapine_et_al island_obs2004 texdiffsample gershwin12 "gersh
delequ latin9 pollack move-equation nomarkup subscript doubledollar intertext \
DIFDELCMDBUG eqnarray eqnarray2 subscriptm delequ2 schneider gennady umesh underwood endfloat endfloat2 outerrise \
delequ3 delequ4 "simplefrac --allow-spaces" "master --flatten" "subfile --flatten" "import --flatten" titlediffTest2 exampleDiff bornd2 split \
"rolla --math-markup=2" mini "complex-maths --math-markup=1" margalit oubmath circonflex mwe-comment "apacite-test --flatten" quoteddollarunderscore units complicated-math move-equation2 lists "figures --graphics-markup=both" alignat "safecmd --append-safecmd=remark" verbatim verbatim2-is143 embedded-math-array "verbatim-input --flatten" anchordemo 'customdiffcmdtest --add-to-config "CUSTOMDIFCMD=blindtext;mypar;donothing;cmd"' description frac_w_space_comments multicolumn \
"rolla --math-markup=2" mini "complex-maths --math-markup=1" margalit oubmath circonflex mwe-comment "apacite-test --flatten" quoteddollarunderscore units complicated-math move-equation2 lists "figures --graphics-markup=both" alignat "safecmd --append-safecmd=remark" verbatim verbatim2-is143 embedded-math-array "verbatim-input --flatten" anchordemo 'customdiffcmdtest --add-to-config "CUSTOMDIFCMD=blindtext;mypar;donothing;cmd"' description frac_w_space_comments multicolumn tikz-dependency-test.tex
"href-in-bibliography --append-safecmd=path" revtex-bibliography biblatex 'txtcmd-with-multiple-arguments --append-textcmd=cmd' \
"no-del --no-del" \
) # siunitx
Expand Down

0 comments on commit e50940e

Please sign in to comment.