summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/xelatex/langsci/documentation/langsci-doc.tex
blob: fb56271f88bd6611357357ed64f2a1d8ca6ecc97 (plain)
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
\documentclass[%
output=guidelines]{../langscibook}
\author{Sebastian Nordhoff}
\title{The \texttt{langscibook} {\LaTeX} class}
\subtitle{}
\renewcommand{\lsSeries}{guidelines}
\renewcommand{\lsSeriesNumber}{~}
% \renewcommand{\lsAdvertisement}{}
% \BackTitle{}
% \BackBody{}
% \dedication{}
% \typesetter{}
% \proofreader{}
% \renewcommand{\lsISBNdigital}{000-0-000000-00-0}
% \renewcommand{\lsISBNhardcover}{000-0-000000-00-0}
% \renewcommand{\lsISBNsoftcover}{000-0-000000-00-0}
% \renewcommand{\lsISBNsoftcoverus}{000-0-000000-00-0}
% \BookDOI{}
% \renewcommand{\lsURL}{http://langsci-press.org/catalog/book/000}

% \bibliography{localbibliography}

\newcommand{\option}[3]{\subsection{\texttt{#1}}{#2}\\Default value: {\texttt{#3}}}
\begin{document}
\maketitle

\frontmatter
\currentpdfbookmark{Contents}{name} % adds a PDF bookmark
\tableofcontents
% \include{chapters/preface}
% \include{chapters/acknowledgments}
% \include{chapters/abbreviations}

\mainmatter
\chapter{Introduction}
This document describes the {\LaTeX} class langscibook.cls. This class is used for typesetting books with Language Science Press. Language Science Press publish open access monographs and edited volumes in linguistics.


\chapter{The class}
The class is loaded via \verb+\documentclass{langscibook}+. The standard use case is the creation of a book. If used without an \texttt{output=} option, the option \texttt{output=book} is loaded. The class can also be used to create dust jackets for books with different measurements via the output option values
\texttt{covercreatespace} (for \url{http://www.createspace.com}) and
\texttt{coverbodsc/coverbodhc} (for \url{http://www.bod.de}).

The class provides for the following:
\begin{itemize}
 \item front cover
 \item frontispiece
 \item inside title
 \item colophon
 \item table of contents
 \item chapters
 \item list of references (per chapter or global)
 \item name index, subject index, language index
 \item back title
 \item ISBN
 \item DOI (per book and per chapter)
\end{itemize}

When used to create dust jackets, the class will produce a large pdf with a collation of backcover, spine and frontcover, from left to right, surrounded by bleed.


\chapter{Requirements}
\section{Fonts}
The class uses the fonts Libertinus, Arimo and Dejavu. These have to be present on the system.

\section{Styles}
A couple of additional style files come with the class. Documents using this class will compile without them, but in order to typeset books for Language Science Press, these packages should be loaded as well. These packages are

\begin{itemize}
 \item \texttt{langsci-basic.sty}: Commands used in all Language Science Press books
 \item \texttt{langsci-bidi.sty}: Package for typesetting right-to-left text
 \item \texttt{langsci-optional.sty}: Further commands useful for some typical books
 \item \texttt{langsci-cgloss.sty}: Helper package for \texttt{langsci-gb4e}
 \item \texttt{langsci-gb4e.sty}: Package for linguistic examples
 \item \texttt{langsci-forest-setup.sty}: Set up the forest package for linguistic trees
%  \item \texttt{langsci-lgr.sty}:
 \item \texttt{langsci-tbls.sty}: Package for the textbook series Textbooks in Language Sciences
%  \item \texttt{langsci-glyphs.sty}: some shortcuts for font workarounds
 \item \texttt{langsci-subparts.sty}: adds an additional sectioning level between part and chapter

\end{itemize}

\section{Series definitions}
The metadata for LangSci book series are stored in   \texttt{langsci-series.def}.  For new series, the ISSN field of \texttt{langsci-series.def} might have to be updated.

\chapter{Creating a book}
The easiest way to start a book is to download the skeletons from \url{http://langsci-press.org/templatesAndTools}. Sample documents for monographs, edited volumes and chapters in edited volumes are provided in the folder \texttt{examples/} as well.

\section{Creating a monograph}
Load the class. Make sure the following metadata values are set with the metadata commands listed in \sectref{sec:metadatacommands}:

\begin{itemize}
 \item author
 \item title
\end{itemize}

Provide the following additional information if necessary:
\begin{itemize}
 \item series
 \item series number
 \item all ISBNs
 \item BookDOI
 \item ID
 \item blurb (back body)
 \item subtitle
 \item backtitle
 \item spine title
 \item spine author
 \item dedication
 \item list of proofreaders
 \item list of typesetters
 \item list of illustrators
 \item license other than CC-BY
 \item list of additional fonts
\end{itemize}


\section{Creating an edited volume}
Proceed as for a monograph, but use the option \texttt{collection}. Use \verb+\author+ for the editor(s). Use the option \texttt{multiauthors} if there is more than one editor. You may want to use the further options \texttt{collectionchapter} and \texttt{collectiontoclong}. Chapters are included via \verb+\includepaper{}+. Set the bibliography resource for all papers in the main file.


\section{Creating a paper for an edited volume}
Use the output option \texttt{paper}. Provide the following metadata in the preamble:
\begin{itemize}
 \item \verb+\author+ (with \verb+\affiliation+)
 \item \verb+\title+
 \item \verb+\abstract+ (optional)
\end{itemize}

You might want to use \verb+\shorttitlerunninghead+ for chapters with very long titles.

Papers can be compiled standalone. You can use the command \verb+\papernote+ in the preamble of the paper to adjust the text displayed in the footer.  This can be embedded in a conditional as follows (assuming your chapter source file is in a subfolder of the folder containing your main file):
\begin{verbatim}
\IfFileExists{../samplevolume.tex}{%adjust to name of your master file
  \papernote{\scriptsize\normalfont
    To appear in:
    Change Volume Editor.
    Change volume title.
    Berlin: Language Science Press. [preliminary page numbering]
  }
  \pagenumbering{roman}
  \setcounter{chapter}{23}%adjust the chapter number
  \addtocounter{chapter}{-1}
}{}
\end{verbatim}

This will set your chapter number to 23 when compiled standalone (rather than 1) and will display text in the chapter footer.



\chapter{Creating a dust jacket}
Use the option \texttt{coverbodhc}, \texttt{coverbodsc} or \texttt{covercreatespace} and set the option \texttt{spinewidth}. Run {\XeLaTeX} twice. Upload to the respective websites to see whether the lengths were chosen correctly.

\chapter{Options}
The class has flag options to toggle certain behaviour and string options to set metadata values.

\section{Flag options}
% \option{blackandwhite}
% Remove all colors}
% {false
% \option{smallfont}
% use 10pt as fontsize
% {false
% \option{noindex}
% remove index}
% {false
% \option{biblatex}{Use Bib\LaTeX}{true}
% \option{bibtex}{Use Bibtex}{false}
\option{collection}{Make the book an edited volume}{false}
\option{collectionchapter}{Add numeric chapter prefix to each contribution.}{false}
% \option{collectiontoclong}{More detailed table of content in edited volumes}{false}
\option{draftmode}{Switch to draft mode (adds: draft stamp, indication of overlong lines, date)}{false}
\option{openreview}{Switch to open review mode}{false}
% \option{modfonts}{Use modified fonts provided by Language Science Press}{false}
\option{multiauthors}{Set editor suffix to eds. instead of ed.}{false}
\option{minimal}{Load a very bare class optimized for compilation speed}{false}
% \option{newtxmath}{Switch math fonts to newtxmath}{false}
\option{nobabel}{Do not use the Babel package in the class}{false}
% \option{nonflat}{Use elaborate directory structure. If set to true, fonts, packages etc will be loaded from subfolders. If set to false, they will be loaded from the working directory}{false}
\option{showindex}{Show indexed terms in margin}{false}
\option{smallfont}{Use a smaller font for books above 500 pages}{false}
% \option{undecapitalize}{Do not decapitalize titles in the list of references}{false}
\option{chinesefont}{Load fonts for Chinese and update font info in colophon}{false}
\option{japanesefont}{Load fonts for Japanese and update font info in colophon}{false}
\option{hebrewfont}{Load fonts for Hebrew and update font info in colophon}{false}
\option{arabicfont}{Load fonts for Arabic and update font info in colophon}{false}
\option{syriacfont}{Load fonts for Syriac and update font info in colophon}{false}

\section{String options}
\option{output}{Different output formats}{book}
\begin{itemize}
\item \texttt{book}: The book with frontcover and backcover
% \item \texttt{inprep}: Mark manuscript as in preparation
\item \texttt{paper}: Contribution to edited volume
\item \texttt{minimal}: Optimise for speed. Some features might not work. Useful for drafts.
\item \texttt{guidelines}: Choose color grey; condense frontmatter
\item \texttt{coverbodhc}: Create a two-page wide cover  (back-spine-front) for use with BoD hardcover books
\item \texttt{coverbodsc}: Create a two-page wide cover  (back-spine-front) for use with BoD softcover books
\item \texttt{covercreatespace}: Create a two-page wide cover  (back-spine-front) for use with CreateSpace
\end{itemize}

\option{spinewidth}{The width of the spine (for cover creation)}{20mm}
\option{booklanguage}{Load babel for the specified language and change the custom headers for list of references and indexes}{english}
\option{copyright}{The license chosen}{"CC-BY"}
% \option{biblatexbackend}{The backend of BibLaTeX}{"biber"}
% Alternative: \texttt{biber}



\section{Metadata commands}\label{sec:metadatacommands}
The following commands are used to indicated metadata.

\option{{\textbackslash}BackBody}{Text to be printed on the back cover}{Europan lingues es membres del sam familie. Lor separat existentie es un
myth. Por scientie, musica, sport etc, litot Europa usa li sam vocabular. Li lingues differe solmen in li grammatica, li pronunciation e li plu commun vocabules. Omnicos directe al desirabilite de un nov lingua franca: On refusa continuar payar custosi traductores.}
\option{{\textbackslash}BackTitle}{Title on back cover}{\textrm{same as on front cover}}
\option{{\textbackslash}BookDOI}{DOI for the book}{??}
\option{{\textbackslash}ChapterDOI}{DOI for a chapter}{??}
\option{{\textbackslash}dedication}{A dedication}{\textrm{void}}
\option{{\textbackslash}lsISBNdigital}{ISBN for the digital version}{000-0-000000-00-0}
\option{{\textbackslash}lsISBNhardcover}{ISBN for the hardcover version}{000-0-000000-00-0}
\option{{\textbackslash}lsISBNsoftcover}{ISBN for the softcover version}{000-0-000000-00-0}
% \option{{\textbackslash}lsISBNsoftcoverus}{ISBN for the softcover version (US distribution)}{000-0-000000-00-0}
\option{{\textbackslash}lsSeries}{The series this book appears in. Use the acronyms found in \texttt{langsci-series.def}}{eotms}
\option{{\textbackslash}lsSeriesNumber}{Position of the book in its series}{??}
\option{{\textbackslash}lsID}{The numerical LangSci ID, used for various URLs}{000}



\section{Overrides}
The following commands allow to override further default settings:

\option{{\textbackslash}SpineAuthor}{Custom author on spine. Useful for long lists of authors/editors}{\textrm{same as on cover}}
\option{{\textbackslash}SpineTitle}{Custom title on spine. Useful for long titles}{\textrm{same as on cover}}
\option{{\textbackslash}lsImpressionCitationAuthor}{How the author name should be displayed in the impressum}{\rmfamily Automatically inferred from \texttt{{\textbackslash}author\{\}}, but sometimes things go wrong}
\option{{\textbackslash}lsImpressionCitationText}{Customize the full citation as displayed in the colophon. Useful for second editions}{\rmfamily Automatically inferred from \texttt{{\textbackslash}author\{\}} and \texttt{{\textbackslash}title\{\}}}
\option{{\textbackslash}papernote}{Text displayed in the footer of chapters}{\rmfamily Automatically inferred from volume and chapter metadata}
\option{{\textbackslash}lsChapterFooterSize}{Font size for chapter footers}{\texttt{{\textbackslash}small}}

\option{{\textbackslash}includespinelogo}{The logo to be put on the spine}{void}
\option{{\textbackslash}includestoragelogo}{The logo of the archiving institution}{void}
\option{{\textbackslash}includepublisherlogo}{The publisher's logo in the impressum}{void}
\option{{\textbackslash}includechapterfooterlogo}{The logo to be used in chapter footers}{void}

\option{{\textbackslash}publisherstreetaddress}{the physical address of the publisher}{LangSci Berlin address}
\option{{\textbackslash}publisherurl}{The web address of the publisher}{\textbackslash href\{http://langsci-press.org\}\{langsci-press.org\}}
\option{{\textbackslash}storageinstitution}{Where the book is archive}{FU Berlin}
\option{{\textbackslash}githubtext}{Where the tex code of the book can be found}{Source code available from\newline {\textbackslash}href\{https://www.github.com/langsci/{\textbackslash}lsID\}\{www.github.com/langsci/{\textbackslash}lsID\}}
\option{{\textbackslash}paperhivetext}{Where the book can be found on PaperHive}{Collaborative~reading:\newline{\textbackslash}href\{https://paperhive.org/documents/remote?type=langsci\&id={\textbackslash}lsID\}\%\newline\{paperhive.org/documents/remote?type=langsci\&id={\textbackslash}lsID\}}


\section{Command redefinitions}
Redefine the following commands to further alter the appearance:

\option{{\textbackslash}CoverTitleSizes}{Set custom fontsize \#1 and baselineskip \#2 for title on cover}{52pt, 16.75mm}
\option{{\textbackslash}lsBackBodyFont}{Font used for text on back cover}{\textrm{main font}}
\option{{\textbackslash}lsBackTitleFont}{Font used for title on back cover}{{\textbackslash}sffamily{\textbackslash}addfontfeatures{Scale=MatchUppercase}\\{\textbackslash}fontsize\{25pt\}\{10mm\}{\textbackslash}selectfont}
\option{{\textbackslash}lsCopyright}{Choice of licence}{CC-BY}
\option{{\textbackslash}lsCoverAuthorFont}{Font for author/editor on cover}{{\textbackslash}fontsize\{25pt\}\{12.5mm\}{\textbackslash}selectfont}
\option{{\textbackslash}lsCoverSubTitleFont}{Font for the subtitle}{{\textbackslash}sffamily{\textbackslash}addfontfeatures\{Scale=MatchUppercase\}\\ {\textbackslash}fontsize\{25pt\}\{10mm\}{\textbackslash}selectfont}
\option{{\textbackslash}lsCoverTitleFont}{Font for the title}{{\textbackslash}sffamily{\textbackslash}addfontfeatures{Scale=MatchUppercase}\\ {\textbackslash}fontsize{52pt}{17.25mm}{\textbackslash}selectfont}
\option{{\textbackslash}lsEditorPrefix}{How editors are indicated on title page. Useful for localization.}{{{\textbackslash}LARGE Edited by{\textbackslash}{\textbackslash}}}
\option{{\textbackslash}lsEditorSuffix}{How editors are indicated in the colophon}{(ed.)/(eds.)\rmfamily, depending on the value of the option \texttt{multiauthors}}
\option{{\textbackslash}lsFontsize}{size of main font}{11pt}
\option{{\textbackslash}lsImpressumCitationText}{custom citation text, useful for including notes etc.}{\textrm{computed from author and title fields}}
\option{{\textbackslash}lsISSN}{ISSN of the series}{??}

\option{{\textbackslash}lsLanguageIndexTitle}{The title of the language index. Change this for non-English works}{Language index}
\option{{\textbackslash}lsNameIndexTitle}{The title of the name index. Change this for non-English works}{Name index}
\option{{\textbackslash}lsSpineAuthorFont}{Font for the author on the spine}{{\textbackslash}fontsize\{16pt\}\{14pt\}{\textbackslash}selectfont}
\option{{\textbackslash}lsSpineTitleFont}{Font for the title on the spine}{{\textbackslash}sffamily{\textbackslash}fontsize\{18pt\}\{14pt\}{\textbackslash}selectfont}
\option{{\textbackslash}lsSubjectIndexTitle}{The title of the subject index. Change this for non-English works}{Subject index}
\option{{\textbackslash}lsYear}{Year of publication}{{\textbackslash}the{\textbackslash}year}
\section{Additions}
\option{{\textbackslash}lsAdditionalFontsImprint}{Add additional fonts to the list of fonts in the colophon}{\textrm{void}}
\option{{\textbackslash}lsImpressumExtra}{for legal notes required for revised theses ("... in fulfillment of ... ")}{void}


\end{document}