summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/texplate
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-01-17 22:31:04 +0000
committerKarl Berry <karl@freefriends.org>2020-01-17 22:31:04 +0000
commit212508b1290d1456481d21d128b839d6d22d8f94 (patch)
treec39df881107e04ecfddf4895e2430758b73428c4 /Master/texmf-dist/scripts/texplate
parentd617d6d33cf75f9a3df502b0d4b527ed53ddee5a (diff)
texplate (17jan20)
git-svn-id: svn://tug.org/texlive/trunk@53444 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/texplate')
-rw-r--r--Master/texmf-dist/scripts/texplate/templates/texplate-article.toml54
-rw-r--r--Master/texmf-dist/scripts/texplate/templates/texplate-standalone.toml45
-rw-r--r--Master/texmf-dist/scripts/texplate/texplate.jarbin0 -> 2815236 bytes
-rw-r--r--Master/texmf-dist/scripts/texplate/texplate.sh17
4 files changed, 116 insertions, 0 deletions
diff --git a/Master/texmf-dist/scripts/texplate/templates/texplate-article.toml b/Master/texmf-dist/scripts/texplate/templates/texplate-article.toml
new file mode 100644
index 00000000000..53f7796762c
--- /dev/null
+++ b/Master/texmf-dist/scripts/texplate/templates/texplate-article.toml
@@ -0,0 +1,54 @@
+name = "article"
+description = """
+A simple template for the default article class, with support for new
+engines (with fontspec fallback), babel languages, geometry options,
+generic packages, and TikZ and corresponding libraries.
+"""
+authors = [ "Island of TeX" ]
+requirements = []
+document = '''
+\documentclass#if($options)[$options]#{end}{article}
+
+#if ($xetex || $luatex)
+\usepackage{fontspec}
+#else
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+#end
+#if ($geometry)
+
+\usepackage[$geometry]{geometry}
+#end
+#if ($babel)
+#if (!$geometry)
+
+#end
+\usepackage[$babel]{babel}
+#end
+#if ($packages)
+
+#foreach ($package in $packages)
+\usepackage{$package}
+#end
+#end
+#if ($tikz)
+
+\usepackage{tikz}
+#if ($libraries)
+#foreach ($library in $libraries)
+\usetikzlibrary{$library}
+#end
+#end
+#end
+
+\begin{document}
+
+\end{document}
+'''
+
+[handlers]
+xetex = "to-boolean"
+luatex = "to-boolean"
+tikz = "to-boolean"
+libraries = "to-csv-list"
+packages = "to-csv-list"
diff --git a/Master/texmf-dist/scripts/texplate/templates/texplate-standalone.toml b/Master/texmf-dist/scripts/texplate/templates/texplate-standalone.toml
new file mode 100644
index 00000000000..dd8daea65f5
--- /dev/null
+++ b/Master/texmf-dist/scripts/texplate/templates/texplate-standalone.toml
@@ -0,0 +1,45 @@
+name = "standalone"
+description = """
+A simple template for the standalone class, with support for
+class options, new engines (with fontspec fallback), list of
+packages, and TikZ and corresponding libraries.
+"""
+authors = [ "Island of TeX" ]
+requirements = []
+document = '''
+\documentclass#if($options)[$options]#{end}{standalone}
+
+#if ($xetex || $luatex)
+\usepackage{fontspec}
+#else
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+#end
+#if ($packages)
+
+#foreach ($package in $packages)
+\usepackage{$package}
+#end
+#end
+#if ($tikz)
+
+\usepackage{tikz}
+#if ($libraries)
+#foreach ($library in $libraries)
+\usetikzlibrary{$library}
+#end
+#end
+#end
+
+\begin{document}
+
+\end{document}
+'''
+
+[handlers]
+xetex = "to-boolean"
+luatex = "to-boolean"
+tikz = "to-boolean"
+libraries = "to-csv-list"
+packages = "to-csv-list"
+
diff --git a/Master/texmf-dist/scripts/texplate/texplate.jar b/Master/texmf-dist/scripts/texplate/texplate.jar
new file mode 100644
index 00000000000..2105a4c33c0
--- /dev/null
+++ b/Master/texmf-dist/scripts/texplate/texplate.jar
Binary files differ
diff --git a/Master/texmf-dist/scripts/texplate/texplate.sh b/Master/texmf-dist/scripts/texplate/texplate.sh
new file mode 100644
index 00000000000..da649780378
--- /dev/null
+++ b/Master/texmf-dist/scripts/texplate/texplate.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# Public domain. Originally written by Norbert Preining and Karl Berry, 2018.
+# Note from Paulo: this script provides better Cygwin support than our original
+# approach, so the team decided to use it as a proper wrapper for texplate as well.
+
+scriptname=`basename "$0"`
+jar="$scriptname.jar"
+jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"`
+
+kernel=`uname -s 2>/dev/null`
+if echo "$kernel" | grep CYGWIN >/dev/null; then
+ CYGWIN_ROOT=`cygpath -w /`
+ export CYGWIN_ROOT
+ jarpath=`cygpath -w "$jarpath"`
+fi
+
+exec java -jar "$jarpath" "$@" \ No newline at end of file