Skip to content

Commit

Permalink
Merge pull request #219 from gpelouze/master
Browse files Browse the repository at this point in the history
Fix issue #218 (\hspace{0pt} after \mbox{..} causes error with newer versions of LaTeX)
  • Loading branch information
ftilmann authored Feb 9, 2021
2 parents 262ad9d + 16ae374 commit 6105afc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion latexdiff
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
# - fix issue #206 affecting proper markup of text commands which are not safe cmd's at the same time and have multiple arguments
# - fix issue #210 by adding \eqref (amsmath package) to the list of safe commands
# - fix bug reported in issue #168 mangled verbatim line environment
# - fix bug reported in issue #218 by replacing \hspace{0pt} after \mbox{..} auxiliary commands with \hskip0pt.
#
# Version 1.3.1.1
# - remove spurious \n to fix error: Unknown regexp modifier "/n" at .../latexdiff line 1974, near "=~ " (see github issue #201)
Expand Down Expand Up @@ -2547,7 +2548,7 @@ sub marktags {
if ( $word =~ /^\\(?!\()(\\|[`'^"~=.]|[\w*@]+)(.*?)(\s*)$/s && iscmd($1,\@MBOXCMDLIST,\@MBOXCMDEXCL)) {
# $word is a safe command in MBOXCMDLIST
###print STDERR "DEBUG Mboxsafecmd detected:$word:\n" if $debug ;
push(@$retval,"\\mbox{$AUXCMD\n\\" . $1 . $2 . $3 ."}\\hspace{0pt}$AUXCMD\n" );
push(@$retval,"\\mbox{$AUXCMD\n\\" . $1 . $2 . $3 ."}\\hskip0pt$AUXCMD\n" );
} else {
# $word is a normal word or a safe command (not in MBOXCMDLIST)
push (@$retval,$word);
Expand Down

0 comments on commit 6105afc

Please sign in to comment.