Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am a LaTeX beginner and new to Scripting. I try to implement this interesting solution for latexdiff and multiple files found in this question-answer before I begin writing my phd thesis. However using...

  • Win7 (64-bit)
  • GitHub (Sourcetree, Git version 1.8.0msysgit.0)
  • MikTex 2.9
  • ActivePerl version 5.16.2.1602
  • cygwin

and after researching I do not know how to execute the script and the documentation on the site linked above is "sparsely". Here is what I did so far:

  • Latexdiff is installed and successfully tested
  • 'latexbatchdiff.sh' is placed in C:\Users\USER\Dropbox\Github (added to PATH)
  • Repository Path: C:\Users\USER\Dropbox\Github\Testlab

My C:\Users\USER\Dropbox\Github\Testlab\.git\config-file looks like this:

[core]
    bare = false
    repositoryformatversion = 0
    filemode = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
[remote "origin"]
    url = https://github.com/MYGITHUBACCOUNT/Testlab.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[difftool.latex]
    cmd = latexdiff "$LOCAL" "$REMOTE"
[difftool]
    prompt = false
[alias]
    ldiff = difftool -t latex

There is also an 'install.sh' which is not documented at all, so I tried...

trying install.sh and failing

So, how does one execute this script on windows? Do I use the Windows CMD or the Cygwin Terminal? I would be really grateful for a beginner-friendly example.

thats how far I got using cygwin

share|improve this question
    
the \r means that your install.sh has windows/dos line endings and cygwin wants unix style line endings in the scripts, you can use dos2unix install.sh to get it to have the right endings. –  David Carlisle Mar 26 '13 at 21:28
    
Yes, this helped. Now this is what I get: USER@PC /cygdrive/c/Users/USER/Dropbox/Github/Testlab $ latexdiff-git -bash: latexdiff-git: Kommando nicht gefunden. or USER@PC /cygdrive/c/Users/USER/Dropbox/Github/Testlab $ latexbatchdiff.sh /cygdrive/c/Users/USER/Dropbox/Github/latexbatchdiff.sh: Zeile 5: ldiff: Kommando nicht gefunden. /cygdrive/c/Users/USER/Dropbox/Github/latexbatchdiff.sh: Zeile 21: ldiff: Kommando nicht gefunden. You need to setup the script with a diff command. Please see the README file that came with this script. –  FLW Mar 26 '13 at 21:46
    
er pass I have never actually used latexdiff, but perhaps someone who has could pick it up from here... –  David Carlisle Mar 26 '13 at 22:06
    
ok, so far I couldn't figure it out. Answers still welcome. –  FLW Mar 29 '13 at 17:37
add comment

1 Answer

The error here is that you want to use MiKTeX with Cygwin. But you must decide:

Either you use MiKTeX in usual Windows mode or you use Cygwin as Unix wrapper and have then to use TeX Live for Unix (i.e. not the Windows version of TL). With TeX Live you do not neede to install a separate Perl distribution (at least not for Tex use), because it comes with an own rudimentary Perl interpreter.

share|improve this answer
    
@HarishKumar: Yepp. –  Speravir Mar 2 at 1:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.