From 6af9f6bb534f121d9acce6f49cf7acd18973ccde Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 2 Feb 2016 19:14:43 +0100 Subject: Extended tex & math support --- provider/templates/math.tex | 9 --------- provider/templates/preamble.tex | 18 ++++++++++++++++++ provider/templates/preview.tex | 7 +++++++ 3 files changed, 25 insertions(+), 9 deletions(-) delete mode 100644 provider/templates/math.tex create mode 100644 provider/templates/preamble.tex create mode 100644 provider/templates/preview.tex (limited to 'provider/templates') diff --git a/provider/templates/math.tex b/provider/templates/math.tex deleted file mode 100644 index 23774bf..0000000 --- a/provider/templates/math.tex +++ /dev/null @@ -1,9 +0,0 @@ -\documentclass[14pt,preview,border=1pt,class=extarticle]{standalone} -\include{preamble} -\begin{document} -\begin{preview} -\( -$body$ -\) -\end{preview} -\end{document} diff --git a/provider/templates/preamble.tex b/provider/templates/preamble.tex new file mode 100644 index 0000000..129eba8 --- /dev/null +++ b/provider/templates/preamble.tex @@ -0,0 +1,18 @@ +\usepackage[utf8]{inputenc} + +\usepackage{amssymb} +\usepackage{amsmath} +\usepackage{mathrsfs} + +\usepackage{tikz} + +\usetikzlibrary{cd} + +\newcommand*{\ca}[1]{\ensuremath{\mathbf{#1}}} +\newcommand*{\idarr}[1]{\ensuremath{\mathrm{id}_{#1}}} + +\newcommand{\id}{\ensuremath{\mathrm{id}}} +\renewcommand{\implies}{\rightarrow} + +\newcommand{\N}{\ensuremath{\mathbb{N}}} +\newcommand{\arr}[3]{\ensuremath{\begin{tikzcd}[ampersand replacement=\&]{#1} \rar{#2} \& {#3}\end{tikzcd}}} diff --git a/provider/templates/preview.tex b/provider/templates/preview.tex new file mode 100644 index 0000000..da3c585 --- /dev/null +++ b/provider/templates/preview.tex @@ -0,0 +1,7 @@ +\documentclass[14pt,preview,border=1pt,class=extarticle]{standalone} +$partial("templates/preamble.tex")$ +\begin{document} +\begin{preview} +$body$ +\end{preview} +\end{document} -- cgit v1.2.3