-
Notifications
You must be signed in to change notification settings - Fork 0
/
preamble-dynamic.tex
35 lines (30 loc) · 1.26 KB
/
preamble-dynamic.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
\def\encodingdefault{TU}\normalfont
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
% \usepackage{unicode-math}
% \defaultfontfeatures{Scale=MatchLowercase}
% \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
% \DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}
% \let\mathbb\relax % remove the definition by unicode-math
% \DeclareMathAlphabet{\mathbb}{U}{msb}{m}{n}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{TeX Gyre Pagella}
\fi
\usetikzlibrary{cd, external}
\tikzset{external/system call={xelatex -fmt=../preamble.fmt \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}} % path is relative to file that includes preamble
\tikzexternalize
\providetoggle{DontSetTitleAuthorDate}
\nottoggle{DontSetTitleAuthorDate}{
\hypersetup{
pdftitle={Part \npart\ - \ncourse},
pdfsubject={Cambridge Maths Notes: Part \npart\ - \ncourse},
pdfkeywords={Cambridge Mathematics Maths Math \npart\ \nterm\ \nyear\ \ncourse}
}
\author{Based on lectures by \nlecturer}
\date{\nterm\ \nyear}
\title{Part \npart\ --- \ncourse}
}{}
\tikzsetexternalprefix{figtemp/}