forked from copyninja/fontbook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfontbook.sty
69 lines (57 loc) · 1.71 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
\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}
% Use Malayalam Hyphenation with Polyglossia
\setdefaultlanguage{english}
\setotherlanguage{malayalam}
\setmainfont[Script=Malayalam,HyphenChar="200C]{Rachana}
\newfontfamily\malayalamfonttt{Liberation Mono} %Suppress error with \url fixed width fonts
\newfontfamily\englishfont{URW Palladio L}
%--- Sections without numbering
\newcommand{\secstar}[1]{\thispagestyle{empty}\clearpage\phantomsection\section*{\addcontentsline{toc}{section}{#1}\centering #1}}
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\bfseries\filcenter}
{\LARGE\thechapter}
{1ex}
{\titlerule[2pt]
\vspace{2ex}%
\LARGE}
[\vspace{1ex}%
{\titlerule[2pt]}]
% Hindi/Devanagari styles
% TODO: Add more language specific styles - mainly reference fonts
% Malayalam styles
\def\meera{\fontspec[Script=Malayalam]{Meera}}
\def\rachana{\fontspec[Script=Malayalam]{Rachana}}
\def\lohitmalayalam{\fontspec[Script=Malayalam]{LohitMalayalam}}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\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}
\endinput