Re: [心得] 利用git, git-latexdiff 輔助latex

看板LaTeX作者 (JLee)時間7年前 (2017/02/12 13:48), 編輯推噓1(102)
留言3則, 2人參與, 最新討論串2/3 (看更多)
大家好 最近在做論文最後的修飾,老闆要看不同版本的差別 所以找到了這個script,但一直不成功 我是用mac TexLive 2016, 用sublime text 3編輯與compile,用git管理 git-latexdiff是用homebrew安裝的,v1.1.4 ST3 compile的指令: latexmk -xelatex -f -cd -interaction=nonstopmode thesis.tex 是可以成功compile的 但用git-latexdiff時 git-latexdiff --main thesis.tex --ignore-makefile --latexmk --latexopt "-xelatex -f -interaction=nonstopmode" -o thesis.diff.pdf db0f915 一直跑不出來 Error code (partial): This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode Latexmk: Log file says no output from latex Latexmk: For rule 'pdflatex', no output was made Failure to make 'thesis.pdf' Collected error summary (may duplicate other messages): pdflatex: Command for 'pdflatex' gave return code 256 No PDF file generated. PDF file generated is empty. Error during compilation. Please examine and cleanup if needed: Directory: /tmp/git-latexdiff.69107/new/. File: thesis.tex 看起來好像不是用xelatex跑會是失敗的原因嗎? 另外我的結構是由一個thesis.tex去include各個chapter的.tex 會是git-latexdiff不支援這樣的結構嗎? ※ 引述《sppmg (sppmg)》之銘言: : 主要的內容整理到下面網址了。 : http://www.slideshare.net/sppmg/latex-with-git : 簡單的說就是利用下面一行指令 : git latexdiff --latexmk --latexopt "-xelatex" : --main main.tex master dev : 就可以生成兩個版本的pdf差異檔。 : 細節以及安裝請見投影片囉! : (我用Debian,windows可能要試一下。 : 除git,latex外的工具中,git-latexdiff 是bash script,其餘是perl) -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 122.147.24.165 ※ 文章網址: https://www.ptt.cc/bbs/LaTeX/M.1486878490.A.2FE.html

02/12 20:54, , 1F
確定一下列表的軟體是不是都裝了。latexdiff, latexpand ..
02/12 20:54, 1F

02/12 20:57, , 2F
還有,我不建議用 xelatex -f ,常常產生錯漏pdf
02/12 20:57, 2F

02/13 01:15, , 3F
列表的軟體都有在path裡也可以執行
02/13 01:15, 3F
文章代碼(AID): #1Od_SQB- (LaTeX)
討論串 (同標題文章)
文章代碼(AID): #1Od_SQB- (LaTeX)