-
Notifications
You must be signed in to change notification settings - Fork 10
/
fontbook.sty
88 lines (73 loc) · 2.24 KB
/
fontbook.sty
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
\usepackage{pdfpages}
\usepackage[
inner=2.4cm,
outer=2.5cm,
top=2.5cm,
bottom=2.5cm,
paperwidth=15.5cm,
paperheight=22.5cm,
headheight=0.70cm]{geometry}
\usepackage{fancyhdr}
\usepackage{framed}
\usepackage{url}
\usepackage{graphicx}
\usepackage{color}
\usepackage{fontbook}
\usepackage{fontspec}
\usepackage{xltxtra}
\usepackage{polyglossia}
\usepackage{xcolor}
\usepackage{sectsty}
\usepackage{parskip}
\usepackage{wrapfig}
\usepackage{epigraph}
\usepackage{float}
\setlength\epigraphwidth{8cm}
\usepackage{longtable}
%image path
\graphicspath{ {./Chapters/} }
% Use Malayalam Hyphenation with Polyglossia
\setdefaultlanguage{english}
\setotherlanguage{malayalam}
\setmainfont[Script=Malayalam,HyphenChar="0000]{Rachana}
\newfontfamily\malayalamfonttt{Droid Sans Mono} %Suppress error with \url fixed width fonts
\newfontfamily\englishfont{URW Palladio L}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\bfseries\filcenter\color{cyan}}
{\LARGE\thechapter}
{1ex}
{\titlerule[2pt]
\vspace{2ex}%
\LARGE}
[\vspace{1ex}%
{\titlerule[2pt]}]
\sectionfont{\color{cyan}} % sets colour of sections
\subsectionfont{\color{cyan}} % sets colour of sections
% Hindi/Devanagari styles
% TODO: Add more language specific styles - mainly reference fonts
% Malayalam styles
\def\malayalam{\fontspec[Script=Malayalam]{Meera}}
\def\meera{\fontspec[Script=Malayalam]{Meera}}
\def\rachana{\fontspec[Script=Malayalam]{Rachana}}
\def\lohitmalayalam{\fontspec[Script=Malayalam]{Lohit Malayalam}}
\def\raghumalayalam{\fontspec[Script=Malayalam]{RaghuMalayalam}}
\def\hindi{\fontspec[Script=Devanagari]{Lohit Devanagari}}
\def\gujarati{\fontspec[Script=Gujarati]{Lohit Gujarati}}
\def\lohitgujarati{\fontspec[Script=Gujarati]{Lohit Gujarati}}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\usepackage{setspace}
\newcommand\textexample{\@setfontsize\Huge{32}{48}}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\ProcessOptions\relax
%% Define a new 'leo' style for the package that will use a smaller font.(urls)
\makeatletter
\def\url@leostyle{%
\@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}}
\makeatother
%% Now actually use the newly defined style.
\urlstyle{leo}