-
Notifications
You must be signed in to change notification settings - Fork 0
/
chess.latex
135 lines (116 loc) · 3.29 KB
/
chess.latex
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
\documentclass[10pt,twocolumn]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{xskak}
\usepackage{chessboard}
\usepackage{float}
\usepackage{lipsum}
\usepackage{multicol}
\usepackage{caption}
\usepackage{xcolor}
\usepackage[english]{babel}
\usepackage{fancyhdr}
\usepackage{enumitem}
\usepackage{xstring}
\usepackage{fontspec}
\usepackage{epigraph}
\usepackage[LSB,LSBC4,T1]{fontenc}
\usepackage[autostyle, english = american]{csquotes}
\MakeOuterQuote{"}
\usepackage{hyperref}
\hypersetup{
$if(title-meta)$
pdftitle={$title-meta$},
$endif$
$if(author-meta)$
pdfauthor={$author-meta$},
$endif$
$if(keywords)$
pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
$endif$
$if(colorlinks)$
colorlinks=true,
linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
$else$
pdfborder={0 0 0},
$endif$
breaklinks=true}
\urlstyle{same}
$for(fontfamilies)$
\newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$}
$endfor$
$if(mainfont)$
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
$endif$
$if(sansfont)$
\setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
$endif$
$if(monofont)$
\setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$}
$endif$
% Page geometry
$if(geometry)$
\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
$else$
\usepackage[a4paper, margin=2cm]{geometry}
$endif$
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist
\setlength{\columnsep}{0.5cm}
% tightlist for pandoc
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
% Highlighting fixing Shaded issues
$if(highlighting-macros)$
$highlighting-macros$
$endif$
% Header and Footer
\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{$title$}
\fancyhead[R]{\thepage}
\fancyfoot[C]{\textit{$title$}}
\title{$title$}
\author{$author$}
$if(date)$
\date{$date$}
$else$
\date{\today}
$endif$
\begin{document}
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
\renewcommand{\abstractname}{$abstract$}
\twocolumn[
\begin{@twocolumnfalse}
\maketitle
$if(quote)$
\epigraph{$quote$}{\textit{$quote-author$}}
$endif$
$if(abstract)$
\begin{changemargin}{3.5cm}{3.5cm}
\begin{abstract}
\begin{center}
\noindent $abstract-text$
\end{center}
\end{abstract}
\vspace{1cm}
\end{changemargin}
$endif$
\end{@twocolumnfalse}
]
\settextfiglanguage{english}
\usetextfig
\setboardfontcolors{
blackfieldmask=gray!35}
\storechessboardstyle{myboard}{%
borderwidth=0.3mm,
boardfontencoding=LSBC4,
boardfontfamily=alphadia,
moverstyle=triangle,
showmover}
\setchessboard{style=myboard}
$body$
\end{document}