From 5cb2fd4ae65b37929a867fe9c2ffbdfc28baa109 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Fri, 14 Feb 2014 11:44:14 +0100
Subject: [PATCH] reporting: compile with synctex option

---
 .gitignore                       | 3 +++
 matlab/reports/@report/compile.m | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index f699af2fcf..823aea5f34 100644
--- a/.gitignore
+++ b/.gitignore
@@ -192,3 +192,6 @@ mex/build/matlab/run_m2html.m
 /contrib/ms-sbvar/*.dat
 /contrib/ms-sbvar/sbvar_commandline
 /contrib/ms-sbvar/sbvar_init_file
+
+# Reporting
+*synctex.gz
\ No newline at end of file
diff --git a/matlab/reports/@report/compile.m b/matlab/reports/@report/compile.m
index 6388ba7dd3..bf416be69f 100644
--- a/matlab/reports/@report/compile.m
+++ b/matlab/reports/@report/compile.m
@@ -47,6 +47,7 @@ if ~exist(o.filename, 'file')
 end
 
 middle = ' ./';
+options = '-synctex=1';
 if isoctave
     echo = 1;
 else
@@ -71,7 +72,7 @@ if isempty(compiler)
     o.compiler = compiler;
 end
 
-status = system([compiler middle o.filename], echo);
+status = system([compiler ' ' options middle o.filename], echo);
 [junk, rfn, junk] = fileparts(o.filename);
 
 if status ~= 0
-- 
GitLab