summaryrefslogtreecommitdiff
path: root/learninglahu.sty
diff options
context:
space:
mode:
Diffstat (limited to 'learninglahu.sty')
-rw-r--r--learninglahu.sty61
1 files changed, 61 insertions, 0 deletions
diff --git a/learninglahu.sty b/learninglahu.sty
new file mode 100644
index 0000000..c524869
--- /dev/null
+++ b/learninglahu.sty
@@ -0,0 +1,61 @@
+\ProvidesPackage{learninglahu}
+
+\usepackage{fontspec} % for easy xetex font selection
+\usepackage{xltxtra} % some extras for xetex
+\usepackage{xunicode}
+\usepackage{tipa} % for phonetic characters
+\usepackage{covington} % for examples
+\usepackage{multicol} % multiple columns
+%\usepackage{lastpage} % used by fancyheader
+\usepackage{bbding} % for pencil symbol
+\usepackage{appendix} % appendices
+\usepackage{float} % for floating exercises etc
+\usepackage{tabularx} % for the custom column widths
+\usepackage{marginnote} % for margin notes
+\usepackage{eqlist} % for definition lists
+\usepackage{parallel} % parallel text
+%\usepackage{microtype} % for margin kerning
+\usepackage{makeidx} % create an index
+
+% float config
+
+\floatstyle{ruled}
+\newfloat{float-exercise}{hbt}{loq}[section] % exercises go at the bottom of a page
+\floatname{float-exercise}{\PencilLeftDown~Exercise}
+\newfloat{float-vocab}{ht}{loq}[chapter] % exercises go at the bottom of a page
+\floatname{float-vocab}{\HandRight~Vocabulary}
+
+\newenvironment{lahu-ex}[1]{\begin{float-exercise}\caption{#1}\bigskip}{\end{float-exercise}}
+
+% make definition labels bold
+
+\renewcommand{\eqlistlabel}[1]{\textbf{#1}}
+\newenvironment{lahu-vocab}[1]%
+{\begin{float-vocab}\caption{#1}\medskip%
+ \begin{multicols}{2}\begin{eqlist*}%
+}%
+{\end{eqlist*}\end{multicols}%
+\end{float-vocab}}
+
+% margins
+
+\renewcommand*{\raggedleftmarginnote}{}
+\renewcommand*{\raggedrightmarginnote}{\centering}
+
+% fonts
+
+% this is need for smart-quotes etc
+\defaultfontfeatures{Mapping=tex-text}
+
+\setmainfont{Charis SIL}
+%\setromanfont[BoldFont=Charis SIL Bold, ItalicFont=Charis SIL Italic]{Charis SIL:mapping=tex-text}
+\setsansfont{Bitstream Vera Sans}
+\setmonofont{Bitstream Vera Sans Mono}
+\font\T="Loma" at 12pt\T
+\frenchspacing
+
+\newcommand{\thai}[1]{\Large\T#1\normalsize}
+\renewcommand*{\marginfont}{\sffamily\footnotesize}
+
+\usepackage[dvipdfm]{hyperref}
+\hypersetup{colorlinks,pdfauthor={Felix McCoey},pdftitle={Learning Lahu}}