-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathode-main.tex
132 lines (121 loc) · 3.41 KB
/
ode-main.tex
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
% [[- LaTeX prelude
\documentclass[12pt,letterpaper,oneside]{mybook}
\usepackage[no-math]{fontspec}
\usepackage{textcomp}
\setmainfont[Renderer=ICU,Mapping=tex-text,BoldFont={Gentium Basic Bold}]%
{Gentium Plus}
\usepackage[en]{metre}
\newcommand\spaced[1]{%
{\addfontfeature{LetterSpace=18}{#1}}
}
\usepackage{moredefs,lips}
\usepackage[noreledmac]{eledmac}
\linenumincrement{5}
\linenummargin{right}
\lemmaseparator{:}
\numberonlyfirstinline
% Move verse line numbers closer to the text of the poem.
\setlength{\linenumsep}{-6pc}
\footparagraph{A}
\beforeXnotes[A]{1.5em}
\afterXrule[A]{.5em}
\usepackage{etoolbox}
\newcommand{\chapterTitle}{}
\newcommand{\sectionTitle}{}
\makeatletter
\renewcommand\contentsname{Contents}
\let\oldChapter\chapter
\renewcommand*\chapter{%
\@ifstar{\starchapter}{\@dblarg\nostarchapter}
}
\newcommand*\starchapter[1]{%
\oldChapter*{{#1}}%
\if@mainmatter%
\renewcommand{\chapterTitle}{{#1}}%
\addcontentsline{toc}{chapter}{{#1}}%
\fi
}
\def\nostarchapter[#1]#2{\oldChapter[{#1}]{{#2}}}
\let\oldSection\section
\renewcommand*\section{%
\@ifstar{\starsection}{\@dblarg\nostarsection}
}
\newcommand*\starsection[1]{%
\oldSection*{{#1}}%
\if@mainmatter%
\renewcommand{\sectionTitle}{{#1}}%
% Remove this to include sections from the commentary in the ToC.
\expandafter\ifstrequal\chapterTitle{Introduction}%
{\addcontentsline{toc}{section}{{#1}}}%
{}%
\fi
}
\def\nostarsection[#1]#2{\oldSection[{#1}]{{#2}}}
\makeatother
% A wrapper for textual variants
\newcommand{\var}[3]{%
\edtext{{#1}}{\Afootnote{{#2} \textbf{{#3}}}}%
}
\newcommand{\vvar}[4]{%
\edtext{{#1}}{\lemma{{#1} \textbf{{#2}}}\Afootnote{{#3} \textbf{{#4}}}}%
}
% A wrapper for introducing new items into the commentary
\newcommand{\lem}[1]{\textbf{{#1}}}
\renewcommand\thesection{\arabic{section}}
\setcounter{secnumdepth}{0}
\usepackage{extramarks}
\newcommand{\comment}[2]{%
\edef\tempa{#1}\edef\tempb{#2}%
\subsection{{#1}\ifx\tempa\tempb\relax\else--{#2}\fi}
\markright{#1}
}
\newcommand{\intHeader}{%
{\chapterTitle}: {\sectionTitle}%
}
\newcommand{\comHeader}{%
\edef\tempa{\rightmark}\edef\tempb{\lastrightmark}%
{\MakeUppercase{\chapterTitle}}: %
\rightmark\ifx\tempa\tempb\relax\else--\lastrightmark\fi
}
\renewcommand{\mymarks}{%
\expandafter\ifstrequal\chapterTitle{Commentary}%
{\comHeader}%
{\expandafter\ifstrequal\chapterTitle{Introduction}%
{\MakeUppercase{\intHeader}}%
{\MakeUppercase{\chapterTitle}}%
}%
}
\newcommand{\abbrlabel}[1]{\makebox[3cm][l]{\textbf{#1}}}
\newenvironment{abbreviations}{%
\begin{list}{}{\renewcommand{\makelabel}{\abbrlabel}%
\setlength{\labelwidth}{3cm}\setlength{\leftmargin}{\labelwidth+\labelsep}%
\setlength{\itemsep}{0pt}}}{\end{list}}
\usepackage{natbib}
\usepackage{bibentry}
\nobibliography*
\renewcommand{\bibsection}{\chapter{Bibliography}}
\bibpunct{(}{)}{;}{a}{,}{,}
\usepackage{enumitem}
\setlist{noitemsep}
\usepackage{calc}
\usepackage{nth}
\pagestyle{myheadings}
% -]]
% [[- Document-
\begin{document}
\nocite{*}
\include{ode-titlepage}
\frontmatter
\include{ode-toc}
\include{ode-abbreviations}
\mainmatter
\pagenumbering{arabic}
\include{ode-introduction}
\include{ode-text}
\include{ode-commentary}
\include{ode-vocabulary}
\backmatter
\bibliographystyle{apa}
\bibliography{ode}
\end{document}
% -]]