%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Dictionary
% LaTeX Template
% Version 1.0 (20/12/14)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Vel (vel@latextemplates.com) inspired by a template by Marc Lavaud
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%	PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[12pt,a4paper,twoside]{article} % 10pt font size, A4 paper and two-sided margins
% could use letter insted of a4paper in us context?

\usepackage[margin=2.5cm]{geometry} % Document margins and spacings

% \usepackage[utf8]{inputenc} % Required for inputting international characters
% \usepackage[T1]{fontenc} % Output font encoding for international characters

\usepackage{fontspec,xunicode}
	\defaultfontfeatures{Mapping=tex-text}
	\setmainfont[Mapping=tex-text]{Linux Libertine}
	%\renewcommand*{\rmdefault}{Linux Libertine}

\usepackage{datatool}
	\DTLsetseparator{,}
	\DTLloaddb{dic}{SMD-dictprint.csv}
	
\usepackage{tabulary}

% \usepackage{palatino} % Use the Palatino font

\usepackage{microtype} % Improves spacing

\usepackage{multicol} % Required for splitting text into multiple columns

\usepackage[bf,sf,center]{titlesec} % Required for modifying section titles - bold, sans-serif, centered

\usepackage{fancyhdr} % Required for modifying headers and footers
	\fancyhead[L]{\textsf{\rightmark}} % Top left header
	\fancyhead[R]{\textsf{\leftmark}} % Top right header
	\renewcommand{\headrulewidth}{1.4pt} % Rule under the header
	\fancyfoot[C]{\textbf{\textsf{\thepage}}} % Bottom center footer
	\renewcommand{\footrulewidth}{1.4pt} % Rule under the footer
	\pagestyle{fancy} % Use the custom headers and footers throughout the document

\newcommand{\entry}[4]{\markboth{#1}{#1}\textbf{#1}\hspace{0.2cm} \ {(\textsc{#2})}\hspace{0.5cm} \ $\bullet$\  \textit{#3}\hspace{0.5cm}\ $\bullet$\ \textit{#4}\vspace{0.2cm} #5}  % Defines the command to print each word on the page, \markboth{}{} prints the first word on the page in the top left header and the last word in the top right

\newcommand{\entryverb}[4]{\markboth{#1}{#1}\textbf{#1}\hspace{0.2cm} \ {(\textsc{#2})}\hspace{0.5cm} \ $\bullet$\  \textit{#3}\hspace{0.5cm}\ $\bullet$\ \textit{#4}\vspace{0.2cm} #5 \\
\textsc{cont.}\textit{#6}\ \textsc{comp.}\textit{#7} \ \textsc{pot.}\textit{#8}}  % Defines the command to print each verb on the page, \markboth{}{} prints the first word on the page in the top left header and the last word in the top right

%----------------------------------------------------------------------------------------

\title{ titulo en mixteco \\ Diccionario trilingüe: Mixteco de San Martín Duraznos -- Español -- Inglés \\ Trilingual dictionary: San Martín Duraznos Mixtec -- Spanish -- English}
\author{Carmen Hernández Martínez \& Sandra Auderset}
\date{}

%----------------------------------------------------------------------------------------

\begin{document}
	
	\thispagestyle{plain}
	
	\maketitle
	
	
	\newpage
	\thispagestyle{plain}
	
	primera edición
	copyright etc. 
	

	
\newpage
%----------------------------------------------------------------------------------------
%	Dictionary
%----------------------------------------------------------------------------------------



\DTLforeach{dic}{\mix=Mixteco, \spa=Spanish, \eng=English, \posspa=ClasePalabra, \poseng=WordClass}{%

\entry{\mix}{\posspa}{\spa}{\eng}{\loan} \\}

%------------------------------------------------
\end{document}