1
+ % !TeX program = xelatex
2
+ % !BIB program = bibtex
1
3
% Options for packages loaded elsewhere
2
4
\PassOptionsToPackage {unicode}{hyperref}
3
5
\PassOptionsToPackage {hyphens}{url}
9
11
BCOR = 0 pt,
10
12
singlespacing = true]{scrbook}
11
13
\usepackage {amsmath,amssymb }
12
- \usepackage {lmodern }
13
- \usepackage {iftex }
14
+ \usepackage {iftex }h
14
15
\ifPDFTeX
15
16
\usepackage [T1 ]{fontenc }
16
17
\usepackage [utf8 ]{inputenc }
17
18
\usepackage {textcomp } % provide euro and other symbols
18
19
\else % if luatex or xetex
19
- \usepackage {unicode-math }
20
+ \usepackage {unicode-math } % this also loads fontspec
20
21
\defaultfontfeatures {Scale=MatchLowercase}
21
22
\defaultfontfeatures [\rmfamily ]{Ligatures=TeX,Scale=1}
23
+ \fi
24
+ \usepackage {lmodern }
25
+ \ifPDFTeX \else
26
+ % xetex/luatex font selection
22
27
\setmainfont [Path=fonts/,Extension=.otf,UprightFont=*-regular,BoldFont=*-bold,ItalicFont=*-italic,BoldItalicFont=*-BoldItalic]{texgyretermes}
23
28
\fi
24
29
% Use upquote if available, for straight quotes in verbatim environments
38
43
\KOMAoptions {parskip=half}}
39
44
\makeatother
40
45
\usepackage {xcolor }
41
- \IfFileExists {xurl.sty}{\usepackage {xurl }}{} % add URL line breaks if available
42
- \IfFileExists {bookmark.sty}{\usepackage {bookmark }}{\usepackage {hyperref }}
43
- \hypersetup {
44
- pdflang={en},
45
- hidelinks,
46
- pdfcreator={LaTeX via pandoc}}
47
- \urlstyle {same} % disable monospaced font for URLs
48
46
\usepackage [top=1in, left=1.5in, right=1in, bottom=1in, truedimen,
49
47
twoside=false, bindingoffset=0pt, nohead]{geometry}
50
48
\usepackage {listings }
84
82
\usepackage [bidi=default ]{babel }
85
83
\fi
86
84
\babelprovide [main,import]{english}
85
+ \ifPDFTeX
86
+ \else
87
+ \babelfont [english]{rm}{texgyretermes}
88
+ \fi
87
89
% get rid of language-specific shorthands (see #6817):
88
90
\let\LanguageShortHands\languageshorthands
89
91
\def\languageshorthands #1{}
257
259
% Meta-data %
258
260
% %%%%%%%%%%%%
259
261
260
- \hypersetup {
261
- pdftitle={\yourtitle },
262
- pdfauthor={\yourname },
263
- pdflang={en},
264
- pdfkeywords={\yourkeywords },
265
- pdfauthor={\yourname }
262
+ \AtEndPreamble {
263
+ \hypersetup {
264
+ pdftitle={\yourtitle },
265
+ pdfauthor={\yourname },
266
+ pdflang={en},
267
+ pdfkeywords={\yourkeywords },
268
+ pdfauthor={\yourname }
269
+ }
266
270
}
267
271
268
272
498
502
\makeatother
499
503
500
504
% Setup new colors
501
- \hypersetup {
502
- linkcolor=augustagrey,
503
- citecolor=augustagrey,
504
- filecolor=augustablue,
505
- urlcolor=augustablue,
506
- menucolor=augustagrey,
507
- runcolor=augustablue,
508
- linkbordercolor=augustagrey,
509
- citebordercolor=augustagrey,
510
- filebordercolor=augustablue,
511
- urlbordercolor=augustablue,
512
- menubordercolor=augustagrey,
513
- runbordercolor=augustablue,
514
- footnotecolor=augustagrey,
505
+ \AtEndPreamble {
506
+ \hypersetup {
507
+ linkcolor=augustagrey,
508
+ citecolor=augustagrey,
509
+ filecolor=augustablue,
510
+ urlcolor=augustablue,
511
+ menucolor=augustagrey,
512
+ runcolor=augustablue,
513
+ linkbordercolor=augustagrey,
514
+ citebordercolor=augustagrey,
515
+ filebordercolor=augustablue,
516
+ urlbordercolor=augustablue,
517
+ menubordercolor=augustagrey,
518
+ runbordercolor=augustablue,
519
+ footnotecolor=augustagrey,
520
+ }
515
521
}
516
522
517
- \makeatletter
518
- \Hy@AtBeginDocument {%
519
- \def\@pdfborder {0 0 0} % Overrides border definition set with colorlinks=true
520
- \def\@pdfborderstyle {/S/U/W 1} % Overrides border style set with colorlinks=true
521
- % Hyperlink border style will be underline of width 1pt
522
- }
523
- \makeatother
524
523
525
524
526
525
% For sideways figures and landscape pages.
709
708
\fi
710
709
\usepackage [backend=biber ]{biblatex }
711
710
\addbibresource {./references/references.bib}
711
+ \IfFileExists {bookmark.sty}{\usepackage {bookmark }}{\usepackage {hyperref }}
712
+ \IfFileExists {xurl.sty}{\usepackage {xurl }}{} % add URL line breaks if available
713
+ \urlstyle {same}
714
+ \hypersetup {
715
+ pdflang={en},
716
+ hidelinks,
717
+ pdfcreator={LaTeX via pandoc}}
712
718
713
719
\title {\yourtitle }
714
720
\usepackage {etoolbox }
@@ -1015,46 +1021,48 @@ \section{Tables}\label{tables}}
1015
1021
>{\centering\arraybackslash }p{(\columnwidth - 4\tabcolsep ) * \real {0.1667}}
1016
1022
>{\raggedleft\arraybackslash }p{(\columnwidth - 4\tabcolsep ) * \real {0.1667}}@{}}
1017
1023
\caption {The price of categories \label {tbl:demo1 }}\tabularnewline
1018
- \toprule
1024
+ \toprule\noalign {}
1019
1025
\begin {minipage }[b]{\linewidth }\raggedright
1020
1026
Column A
1021
1027
\end {minipage } & \begin {minipage }[b]{\linewidth }\centering
1022
1028
Column B
1023
1029
\end {minipage } & \begin {minipage }[b]{\linewidth }\raggedleft
1024
1030
Column C
1025
1031
\end {minipage } \\
1026
- \midrule
1032
+ \midrule\noalign {}
1027
1033
\endfirsthead
1028
- \toprule
1034
+ \toprule\noalign {}
1029
1035
\begin {minipage }[b]{\linewidth }\raggedright
1030
1036
Column A
1031
1037
\end {minipage } & \begin {minipage }[b]{\linewidth }\centering
1032
1038
Column B
1033
1039
\end {minipage } & \begin {minipage }[b]{\linewidth }\raggedleft
1034
1040
Column C
1035
1041
\end {minipage } \\
1036
- \midrule
1042
+ \midrule\noalign {}
1037
1043
\endhead
1044
+ \bottomrule\noalign {}
1045
+ \endlastfoot
1038
1046
Category 1 High & High 95.00 & 100.00 \\
1039
1047
Category 2 High & High 82.50 & 80.50 \\
1040
- \bottomrule
1041
1048
\end {longtable }
1042
1049
1043
1050
\begin {longtable }[]{@{}llcr@{}}
1044
1051
\caption {Illustrating how to align entries in a table
1045
1052
\label {tbl:demo2 }}\tabularnewline
1046
- \toprule
1053
+ \toprule\noalign {}
1047
1054
Default & Left & Center & Right \\
1048
- \midrule
1055
+ \midrule\noalign {}
1049
1056
\endfirsthead
1050
- \toprule
1057
+ \toprule\noalign {}
1051
1058
Default & Left & Center & Right \\
1052
- \midrule
1059
+ \midrule\noalign {}
1053
1060
\endhead
1061
+ \bottomrule\noalign {}
1062
+ \endlastfoot
1054
1063
High & Cat 1 & A & 100.00 \\
1055
1064
High & Cat 2 & B & 85.50 \\
1056
1065
Low & Cat 3 & C & 80.00 \\
1057
- \bottomrule
1058
1066
\end {longtable }
1059
1067
1060
1068
\begin {longtable }[]{@{}
@@ -1063,26 +1071,28 @@ \section{Tables}\label{tables}}
1063
1071
>{\raggedright\arraybackslash }p{(\columnwidth - 4\tabcolsep ) * \real {0.2917}}@{}}
1064
1072
\caption {The price and advantages of fruits
1065
1073
\label {tbl:demo3 }}\tabularnewline
1066
- \toprule
1074
+ \toprule\noalign {}
1067
1075
\begin {minipage }[b]{\linewidth }\raggedright
1068
1076
Fruit
1069
1077
\end {minipage } & \begin {minipage }[b]{\linewidth }\raggedright
1070
1078
Price
1071
1079
\end {minipage } & \begin {minipage }[b]{\linewidth }\raggedright
1072
1080
Advantages
1073
1081
\end {minipage } \\
1074
- \midrule
1082
+ \midrule\noalign {}
1075
1083
\endfirsthead
1076
- \toprule
1084
+ \toprule\noalign {}
1077
1085
\begin {minipage }[b]{\linewidth }\raggedright
1078
1086
Fruit
1079
1087
\end {minipage } & \begin {minipage }[b]{\linewidth }\raggedright
1080
1088
Price
1081
1089
\end {minipage } & \begin {minipage }[b]{\linewidth }\raggedright
1082
1090
Advantages
1083
1091
\end {minipage } \\
1084
- \midrule
1092
+ \midrule\noalign {}
1085
1093
\endhead
1094
+ \bottomrule\noalign {}
1095
+ \endlastfoot
1086
1096
Bananas & \$ 1.34 & \begin {minipage }[t]{\linewidth }\raggedright
1087
1097
\begin {itemize }
1088
1098
\tightlist
@@ -1101,7 +1111,6 @@ \section{Tables}\label{tables}}
1101
1111
tasty
1102
1112
\end {itemize }
1103
1113
\end {minipage } \\
1104
- \bottomrule
1105
1114
\end {longtable }
1106
1115
1107
1116
\hypertarget {code-listings}{%
@@ -1205,7 +1214,7 @@ \section{Fonts}\label{fonts}}
1205
1214
when needed to the appropriate size (particularly in the cover page,
1206
1215
where most attributes need to be set at 16pts).
1207
1216
1208
- The `` usual'' correspondance between points and \LaTeX commands is as
1217
+ The `` usual'' correspondence between points and \LaTeX commands is as
1209
1218
follows:
1210
1219
1211
1220
\getfontsize
0 commit comments