我刚刚使用创建了一个 diff 文件LatexDiff
,但新创建的文件似乎与url
包有问题,可能是。我收到以下错误。
! Missing \endcsname inserted.
<to be read again>
\protect
l.35 \expandafter\ifx\ifcsname \DIFadd{url}
\endcsname\relax
第 35 行是
\expandafter\ifx\ifcsname \DIFadd{url}\endcsname\relax
有人能帮我解决这个问题吗?我也在下面粘贴了 MWE,
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{times}%
\PassOptionsToPackage{hyphens}{url}\usepackage[hidelinks]{hyperref}
\usepackage{algorithm}
\usepackage{algorithm,lipsum,etoolbox}
\makeatletter
\expandafter\patchcmd\csname\string\algorithmic\endcsname%
{\labelwidth 0.5em}{\labelwidth0pt\labelsep0pt}{}{}
\RequirePackage[normalem]{ulem} %DIF PREAMBLE
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE
\providecommand{\DIFaddtex}[1]{{\protect\color{blue}\uwave{#1}}} %DIF PREAMBLE
\providecommand{\DIFdeltex}[1]{{\protect\color{red}\sout{#1}}} %DIF PREAMBLE
%DIF SAFE PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddbegin}{} %DIF PREAMBLE
\providecommand{\DIFaddend}{} %DIF PREAMBLE
\providecommand{\DIFdelbegin}{} %DIF PREAMBLE
\providecommand{\DIFdelend}{} %DIF PREAMBLE
%DIF FLOATSAFE PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddFL}[1]{\DIFadd{#1}} %DIF PREAMBLE
\providecommand{\DIFdelFL}[1]{\DIFdel{#1}} %DIF PREAMBLE
\providecommand{\DIFaddbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFaddendFL}{} %DIF PREAMBLE
\providecommand{\DIFdelbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFdelendFL}{} %DIF PREAMBLE
\providecommand{\DIFadd}[1]{\texorpdfstring{\DIFaddtex{#1}}{#1}} %DIF PREAMBLE
\providecommand{\DIFdel}[1]{\texorpdfstring{\DIFdeltex{#1}}{}} %DIF PREAMBLE
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF
\begin{document}
\DIFdelbegin
\DIFdelend \DIFaddbegin \begin{thebibliography}{10}
\expandafter\ifx\ifcsname \DIFadd{url}\endcsname\relax
\def\url\DIFadd{#1}{\texttt{\DIFadd{#1}}}\fi
\expandafter\ifx\csname \DIFadd{urlprefix}\endcsname\relax\def\urlprefix{URL }\fi
\expandafter\ifx\csname \DIFadd{href}\endcsname\relax
\def\href\DIFadd{#1#2}{\DIFadd{#2}} \def\path\DIFadd{#1}{\DIFadd{#1}}\fi
\end{thebibliography}
\DIFaddend
\end{document}