forked from pibook/styles
-
Notifications
You must be signed in to change notification settings - Fork 4
/
typography.sty
55 lines (45 loc) · 1.44 KB
/
typography.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
% fonts
\usepackage{polyglossia}
\setmainlanguage[variant=mono]{greek}
\PolyglossiaSetup{greek}{indentfirst=false}
\setotherlanguage[variant=us]{english}
\setmainfont[Ligatures=TeX]{GFS Neohellenic}
\setsansfont[Ligatures=TeX]{GFS Elpis}
% hyphenate two languages
\usepackage[Greek,Latin]{ucharclasses}
\makeatletter
\setTransitionsForLatin{\begingroup\hyphenrules{english}\endgroup}
\makeatother
% add hyph rules or replace compbound words with \hyp{}
\usepackage{hyphenat}
\hyphenation{αν-θρώ-που-υπο-λο-γι-στή}
% reduce widows and orphans
\usepackage[all]{nowidow}
% default figure size fits line width
\usepackage{graphicx}
\usepackage{keyval}
\setkeys{Gin}{width=\textwidth,height=0.4\textheight,keepaspectratio}
% captions
\usepackage[labelformat=empty,font={footnotesize,sf},width=.8\textwidth,centerlast]{caption}
% lists
\usepackage[shortlabels]{enumitem}
\setlist{noitemsep,font=\sffamily}
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\usepackage{emptypage}
\usepackage[protrusion=true,final]{microtype}
\usepackage{hyperref}
% Appendix label
\renewcommand{\appendixtocname}{Παράρτημα}
\renewcommand{\appendixpagename}{Παράρτημα}
% epigraphs
\usepackage{epigraph}
\newcommand{\newchap}[5]{%
\dropchapter{#1}%
\chapter{#2}%
\epigraphhead[#3]{\epigraph{#4}{\textsc{#5}}}%
\undodrop%
}%
\renewcommand{\textflush}{flushright}
\setlength{\epigraphwidth}{0.5\textwidth}
\endinput