I am peer-reviewing a dispute in authorship order between two parties in our research group for a co-authored manuscript.

I suggested them to use the excellent latexdiff.pl to compare their individual separate drafts against the final manuscript to be submitted. Sure enough, there are highlighting and change-bars in the text as per the desired style and this works great.

But I am partially colour-blind and my eyes take a bit of stress to look at a document full of colours in the text (63 double-column pages in the manuscript for a very theoretical work). Even though the manual says "red" and "blue" as default, I still have an overall problem with colours, especially in body-copy text. (A one-off splash of colour such as in headings or figures works absolutely fine though.)

For a high-level overview of who contributed what fraction of the text (we already know that the intellectual contribution is roughly equal and that the figure generation task was split evenly among the authors), it is really helpful if an accessible solution of some metric like "a boxed value indicating the percentage change on the margin notes for each paragraph". is available.

It is not only for the authorship of the paper, it is also for the correct inclusion of the section where they contributed the most to the explanation of a concept, for reuse in their respective theses (contribution being defined as a combination of text, equations and figures). In these sections, the other party will be acknowledged throughout the text as the helper and vice-versa in their respective theses. This will help both to steer clear of plagiarism accusations by the other in the future.

Obviously, I could ask for a feature enhacement to latexdiff.pl .But given the number of pending issues in that github repository and the time it might take to implement this, I wonder if someone here could help to hack together some rudimentary form of accessibility-friendly metric per paragraph given two files old.tex and new.tex? Any pdftex or luatex solution will be much appreciated.

I think this could benefit the community as a whole, even non colour-blind people. A quick overview of changes between two documents can help, e.g. 1) a PhD supervisor looking through changes between drafts of a student, 2) even for those using version control systems can benefit (git and other unix diff tools use typically line-based diffs and don't do very well in prose contexts. Even if using the --color-words option, they are all source-based (and well, colour!)). Nothing simple exists on the typeset document side of things.

PS: I know there are other non-colourful styles possible in the output of latexdiff. But the word-by-word presentation is too dense, filling the whole document with meta-information and footnotes to the point of being unreadable. I am looking for something more simplistic, i.e. a single metric. This will help me to focus on those paragraphs with the highest number of changes and judge the merit of those changes and seems to be a better strategy from a time-effectiveness perspective.

PS: I just noticed the announcement on the TeX community's accessibility workshop on 20/July/2018 - the next day of this question being posted. What a coincidence!

| improve this question | | | | |
  • In spite of the long question I don't fully understand what you are asking, or rather there are two separate questions. I am the author of latexdiff and would be very sympathetic to requests improving the accessibility of the latexdiff output but would really need guidance on the desired look, as I have to confess to knowing very little about accessibility. This would be best to submit as a feature request (comment to be continued) – frederik Jul 19 '18 at 22:09
  • However, if I understand correctly you seem to want a different program altogether that instead of highlighting the differences gives a high level overview of how much is changed per paragraph. But I am unclear what exactly you have in mind - an example of desired output would help here. Only then is it possible to judge how hard it would be to implement this within or outside latexdiff, and whether there might be any 'hacks' approximating the desired outcome. – frederik Jul 19 '18 at 22:09
  • @frederik sorry about the confusing description. Since latexdiff already is able to mark the changes, all that is needed I hope is to simply compute the ratio of new words to overall words in each paragraph. Do you think this is feasible to implement? latexdiff script already has enough calculations to narrow down the changes. This new feature can maybe passed as an option to it in the command line. What do you think? – Krishna Jul 19 '18 at 22:53
  • latexdiff breaks up the text into tokens. These are usually words, but a punctuation mark or an in-line equation counts also as one token. Conversely, a command with all its arguments (in the first pass) also counts as one token, so a whole new section title or equation would count as much as a comma. If you move a sentence, it will be counted as new. So while a token-counting feature could be implemented with some moderate (but still non-trivial) effort, I don't think it would be helpful to your purpose. A detailed count is unsuitable for authorship attribution, IMHO. (tbc) – frederik Jul 20 '18 at 8:26
  • (cont from above). And if there is a huge imbalance in the contributed text, this should be obvious from the ratio of underlined and crossed-out text even for colour-blind person. If you use the --verbose option, you already get a count of added and deleted tokens (but not the overall amount of tokens) - to report this also would be trivial to implement, but again I don't think it would be useful for your use case. – frederik Jul 20 '18 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.