From 48dfa9fbc2b7ecf10b9fddec986dff78fbb3d8fc Mon Sep 17 00:00:00 2001 From: j8takagi Date: Sun, 8 Dec 2013 13:26:32 +0900 Subject: [PATCH] =?utf8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E7=99=BA=E7=94=9F?= =?utf8?q?=E6=99=82=E3=80=81=E3=83=AD=E3=82=B0=E3=81=AE=E3=82=A8=E3=83=A9?= =?utf8?q?=E3=83=BC=E9=83=A8=E5=88=86=E3=82=92=E8=A1=8C=E9=A0=AD=E3=81=AB?= =?utf8?q?=E3=80=8C::=E3=80=8D=E3=82=92=E4=BB=98?= =?utf8?q?=E3=81=91=E3=81=A6=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- latex_mk/latex.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/latex_mk/latex.mk b/latex_mk/latex.mk index f0e7cd3..b09960f 100644 --- a/latex_mk/latex.mk +++ b/latex_mk/latex.mk @@ -88,9 +88,13 @@ BASE = $(basename $<) # LaTeX処理(コンパイル) LATEXCMD = $(LATEX) -interaction=batchmode $(LATEXFLAG) $(BASE).tex +# エラー発生時、ログのエラー部分を行頭に「:<行番号>:」を付けて表示する COMPILE.tex = \ $(ECHO) $(LATEXCMD); $(LATEXCMD) >/dev/null 2>&1 || \ - ($(SED) -n -e '/^!/,/^$$/p' $(BASE).log | $(SED) -e 's/.* line \([0-9]*\) .*/$(BASE).tex:\1: &/g'; exit 1) + ( \ + $(SED) -n -e '/^!/,/^$$/p' $(BASE).log | \ + $(SED) -e 's/.*\s*l\(ine \|\.\)\([0-9]*\) .*/$(BASE).tex:\2: &/'; \ + exit 1) # 相互参照未定義の警告 WARN_UNDEFREF := There were undefined references. -- 2.18.0