-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parsing preamble for included packages fails for multiline commands #13
Comments
As you say the solution posted in Stack Exchange worked for you, is there still an issue I should try to look at? If so please clarify. |
Well, It worked for me but I think this should be automatic.
with
Thus, yes, I think would be better to look at the problem. |
OK, I get your point and marked this as a feature request; might be a few weeks until fix due to other commitments. The solution will probably be to offer a special style UNDERLINE_HYPERREF (or similar) which you have to select with -t option, and print a warning to stderr if default style is combined with hyperref. |
Do you mean to use
Yep, waiting the -t option, it works. Thank you! |
Yes, exactly
|
I looked into this but actually this should already be fixed in 1.0.4. If latexdiff detects the hyperref package, it should redefine the \DIFadd and \DIFdel formats along the lines outlined in the Stack Exchange answer. |
I am trying to give a MWE, but it could be not the shortest one since I took it from the article I am writing. First file: \documentclass[a4paper, 11pt]{article}
\addtolength{\textwidth}{3.6cm}
\addtolength{\hoffset}{-1.8cm}
\addtolength{\voffset}{-1.8cm}
\addtolength{\textheight}{1.8cm}
\usepackage[pdftex]{graphicx}
\usepackage[square, comma, sort&compress]{natbib}
\usepackage[utf8x]{inputenc}
\usepackage{amssymb, amsmath, mathtools, mathrsfs}
\usepackage[english]{babel}
\usepackage{microtype, url}
\usepackage[bookmarks=true, hidelinks,
pdftitle={Title},
pdfauthor={Name Surname},
pdfkeywords={}]{hyperref}
\usepackage{hypernat}
\renewenvironment{abstract}[0]
{\noindent\normalfont\normalsize\itshape}{\par\vskip 9mm}
\renewcommand{\bibsection}{\section*{REFERENCES}}
\newcommand{\acknowledgements}{\section*{ACKNOWLEDGEMENTS}}
\newcommand{\appendices}{\section*{APPENDIX}}
\def\thesection {\Roman{section}}
\def\thesubsection {\Alph{subsection})}
\def\thesubsubsection {\arabic{subsubsection})}
\renewcommand{\cite}[1]{\citep{#1}}
\author{Name Surname}
\title{Title}
\begin{document}
\section{INTRODUCTION1}
test
\end{document} Second file: \documentclass[a4paper, 11pt]{article}
\addtolength{\textwidth}{3.6cm}
\addtolength{\hoffset}{-1.8cm}
\addtolength{\voffset}{-1.8cm}
\addtolength{\textheight}{1.8cm}
\usepackage[pdftex]{graphicx}
\usepackage[square, comma, sort&compress]{natbib}
\usepackage[utf8x]{inputenc}
\usepackage{amssymb, amsmath, mathtools, mathrsfs}
\usepackage[english]{babel}
\usepackage{microtype, url}
\usepackage[bookmarks=true, hidelinks,
pdftitle={Title},
pdfauthor={Name Surname},
pdfkeywords={}]{hyperref}
\usepackage{hypernat}
\renewenvironment{abstract}[0]
{\noindent\normalfont\normalsize\itshape}{\par\vskip 9mm}
\renewcommand{\bibsection}{\section*{REFERENCES}}
\newcommand{\acknowledgements}{\section*{ACKNOWLEDGEMENTS}}
\newcommand{\appendices}{\section*{APPENDIX}}
\def\thesection {\Roman{section}}
\def\thesubsection {\Alph{subsection})}
\def\thesubsubsection {\arabic{subsubsection})}
\renewcommand{\cite}[1]{\citep{#1}}
\author{Name Surname}
\title{Title}
\begin{document}
\section{INTRODUCTION2}
test
\end{document} Now: The errors should come out. Edit: |
The parser as it stands cannot cope with the |
Perfect. Will wait it. Thanks again, Alex. |
Fixed with commit a8eb8d9 |
Running latexdiff (LATEXDIFF 1.0.4 (Algorithm::Diff 1.1902, Perl v5.18.2)) with changes inside section or subsection I got:
I found that applying what advised in http://tex.stackexchange.com/questions/87536/problem-using-latexdiff-and-pdflatex-with-custom-command
solves the problem.
In particular:
Even --exclude-textcmd="section,subsection" works, but I lose the edits into the subsection.
Thanks, Alex
The text was updated successfully, but these errors were encountered: