From 1a550a31af498d8090b1d57ca8c2135d72d08fc3 Mon Sep 17 00:00:00 2001 From: "Br. Samuel Springuel" Date: Fri, 14 Apr 2017 16:11:48 -0400 Subject: [PATCH 1/3] TeXShop engine modifications MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TeXShop 3.77 has a new feature (by my request) that allows one to add an additional parameter to TeX files which can then be exploited by the engine files. For these engines I’ve used the parameter to add a folder (specified by the parameter) to the input paths. I’ve also added a Plain TeX version of the engine. --- contrib/TeXShop/LuaLaTeX+se.engine | 7 +++++-- contrib/TeXShop/LuaTeX+se.engine | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 contrib/TeXShop/LuaTeX+se.engine diff --git a/contrib/TeXShop/LuaLaTeX+se.engine b/contrib/TeXShop/LuaLaTeX+se.engine index a1fb7c72d..1cc1411b3 100755 --- a/contrib/TeXShop/LuaLaTeX+se.engine +++ b/contrib/TeXShop/LuaLaTeX+se.engine @@ -1,4 +1,7 @@ -#!/bin/tcsh +#!/bin/bash -set path= ($path /usr/texbin /usr/local/bin) +if [ -z ${2+x} ]; then + export TEXINPUTS="$2//:" + export LUAINPUTS="$2//:" +fi lualatex --shell-escape -file-line-error -synctex=1 "$1" diff --git a/contrib/TeXShop/LuaTeX+se.engine b/contrib/TeXShop/LuaTeX+se.engine new file mode 100755 index 000000000..5398daf37 --- /dev/null +++ b/contrib/TeXShop/LuaTeX+se.engine @@ -0,0 +1,7 @@ +#!/bin/bash + +if [ -z ${2+x} ]; then + export TEXINPUTS="$2//:" + export LUAINPUTS="$2//:" +fi +luatex --shell-escape -file-line-error -synctex=1 "$1" From b73376e55c5661617dcf99ec9b45e2c692d81860 Mon Sep 17 00:00:00 2001 From: "Br. Samuel Springuel" Date: Fri, 14 Apr 2017 19:02:24 -0400 Subject: [PATCH 2/3] Fix test When I added the test, I accidentally added it backwards, so the variables were not being exported properly. Fixed that. --- contrib/TeXShop/LuaLaTeX+se.engine | 3 ++- contrib/TeXShop/LuaTeX+se.engine | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/contrib/TeXShop/LuaLaTeX+se.engine b/contrib/TeXShop/LuaLaTeX+se.engine index 1cc1411b3..2c2642dd8 100755 --- a/contrib/TeXShop/LuaLaTeX+se.engine +++ b/contrib/TeXShop/LuaLaTeX+se.engine @@ -1,6 +1,7 @@ #!/bin/bash -if [ -z ${2+x} ]; then +if [[ -n ${2:+x} ]]; then + echo "I will add $2 to the input path" export TEXINPUTS="$2//:" export LUAINPUTS="$2//:" fi diff --git a/contrib/TeXShop/LuaTeX+se.engine b/contrib/TeXShop/LuaTeX+se.engine index 5398daf37..6da782ed7 100755 --- a/contrib/TeXShop/LuaTeX+se.engine +++ b/contrib/TeXShop/LuaTeX+se.engine @@ -1,6 +1,7 @@ #!/bin/bash -if [ -z ${2+x} ]; then +if [[ -n ${2:+x} ]]; then + echo "I will add $2 to the input path" export TEXINPUTS="$2//:" export LUAINPUTS="$2//:" fi From 2f01dda449742a5e61ac436b17294f363893dfeb Mon Sep 17 00:00:00 2001 From: "Br. Samuel Springuel" Date: Fri, 14 Apr 2017 20:35:06 -0400 Subject: [PATCH 3/3] Distribution additions --- contrib/TeXShop/Makefile.am | 2 +- contrib/TeXShop/auto-configure.command | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/contrib/TeXShop/Makefile.am b/contrib/TeXShop/Makefile.am index 9ca1bdb5f..60a7212ad 100644 --- a/contrib/TeXShop/Makefile.am +++ b/contrib/TeXShop/Makefile.am @@ -15,4 +15,4 @@ # You should have received a copy of the GNU General Public License # along with Gregorio. If not, see . -EXTRA_DIST = auto-configure.command LuaLaTeX+se.engine +EXTRA_DIST = auto-configure.command LuaLaTeX+se.engine LuaTeX+se.engine diff --git a/contrib/TeXShop/auto-configure.command b/contrib/TeXShop/auto-configure.command index 758b3d010..065871932 100755 --- a/contrib/TeXShop/auto-configure.command +++ b/contrib/TeXShop/auto-configure.command @@ -29,6 +29,15 @@ else echo "Please try running the Gregorio intaller again" exit 1 fi +SOURCE="/Users/Shared/Gregorio/contrib/TeXShop/LuaTeX+se.engine" +if [ -e "$SOURCE" ]; then + echo "Copying LuaTeX+se.engine into TeXShop configuration" + cp "$SOURCE" "$ENGINEDIR" +else + echo "Cannot find LuaTeX+se.engine" + echo "Please try running the Gregorio intaller again" + exit 1 +fi echo "Configuration complete" exit 0