summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/langsci/langscibook.cls
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-04-29 22:35:31 +0000
committerKarl Berry <karl@freefriends.org>2018-04-29 22:35:31 +0000
commit81e0ea0aefd06549bf9156ae575029f14f852154 (patch)
tree9cab4962f14e100b6cfdde5e7e72f2e93748db30 /Master/texmf-dist/tex/xelatex/langsci/langscibook.cls
parentc76f355c3545fe41d7bb10f49f35c133f6fa8fcb (diff)
langsci (27apr18)
git-svn-id: svn://tug.org/texlive/trunk@47487 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/langsci/langscibook.cls')
-rw-r--r--Master/texmf-dist/tex/xelatex/langsci/langscibook.cls1117
1 files changed, 741 insertions, 376 deletions
diff --git a/Master/texmf-dist/tex/xelatex/langsci/langscibook.cls b/Master/texmf-dist/tex/xelatex/langsci/langscibook.cls
index 14ed47d5119..587fc1fb0d9 100644
--- a/Master/texmf-dist/tex/xelatex/langsci/langscibook.cls
+++ b/Master/texmf-dist/tex/xelatex/langsci/langscibook.cls
@@ -1,8 +1,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% File: langscibook.cls
%% Author: Language Science Press (http://langsci-press.org)
-%% Date: 2017-04-28 11:11:11 UTC
-%% Purpose: This file defines the basic document class
+%% Date: Fri Apr 27 2018
+%% Purpose: This file defines the basic document class
%% for books published with Language Science Press.
%% Language: LaTeX
%% Copyright 2012- Language Science Press
@@ -15,9 +15,9 @@
%% version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status `maintained'.
-%%
+%%
%% The Current Maintainer of this work is Sebastian Nordhoff.
-%%
+%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -32,27 +32,28 @@
% \- print on demand macros
% \- Output types (book, draft, cover)
% \- Page geometry
-% \- Fonts
+% \- Fonts
% \- Colors
% \- Book cover
% \- Series history
% \- Imprint
% \- Dedication
% \- Header and footer
-% \- Sectioning
+% \- Sectioning
% \- Epigrams
% \- Footnotes
% \- Quotes
+% \- Languages
% \- Citations
% \- Floats
% \- Appendices
% \- Indexes
-% \- Hyperref
+% \- Hyperref
% \- Edited volumes (Collection)
% \_ Miscellaneous
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{langscibook}[2017/04/26 Language Science Press]
+\ProvidesClass{langscibook}[2018/01/15 Language Science Press]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -60,10 +61,13 @@
% Paths
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newcommand{\fontpath}{}
+\newcommand{\fontpath}{}
\newcommand{\logopath}{}
\newcommand{\seriesinfopath}{}
+\newcommand{\localepath}{}
\newcommand{\bstpath}{}
+\newcommand{\bbxpath}{}
+\newcommand{\cbxpath}{}
\newcommand{\stylepath}{}
% Paths can be overwritten with option "nonflat"
@@ -72,7 +76,7 @@
% Default values
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
+
\usepackage{xspace}
\newcommand{\lsp}{Language Science Press\xspace}
\newcommand{\lsSeriesNumber}{??}
@@ -83,22 +87,24 @@
\newcommand{\lsISBNsoftcoverus}{000-0-000000-00-0}
\newcommand{\lsBookDOI}{??}
\newcommand{\lsChapterDOI}{??}
-\newcommand{\lsURL}{http://langsci-press.org/catalog}
+\newcommand{\lsID}{000}
+\newcommand{\lsURL}{http://langsci-press.org/catalog/book/\lsID}
\newcommand{\lsSeries}{eotms}
-\newcommand{\lsSpineBreadth}{20mm}
+% \newcommand{\lsSpineBreadth}{20mm}
\newcommand{\lsOutput}{book} %"short" makes no sense if "long" is deprecated
+\newcommand{\lsBookLanguage}{english} %"short" makes no sense if "long" is deprecated
\newcommand{\lsFontsize}{11pt}
\newcommand{\lsChapterFooterSize}{\small} %footers in editedvolumes
\newcommand{\lsCopyright}{CC-BY}
\newcommand{\lsSpinewidth}{20mm}
-\newcommand{\lsBiblatexBackend}{bibtex}
+\newcommand{\lsBiblatexBackend}{biber}
\newcommand{\logotext}{{\color{red}no logo}}
\newcommand{\lsYear}{\the\year}
-\newcommand{\lsBackBody}{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.}
+\newcommand{\lsBackBody}{Set blurb on back with {\textbackslash}BackBody\{my blurb\}}
\newcommand{\lsBackTitle}{\@title}
\newcommand{\BackTitle}[1]{\renewcommand{\lsBackTitle}{#1}}
-\newcommand{\BackBody}[1]{\renewcommand{\lsBackBody}{#1}}
+\newcommand{\BackBody}[1]{\renewcommand{\lsBackBody}{#1}}
\newcommand{\newlineCover}{\\} % \newline only on cover
\newcommand{\newlineSpine}{\\} % \newline only on spine
@@ -107,7 +113,7 @@
\newcommand{\lsSpineTitle}{\@title}
\newcommand{\lsSpineAuthor}{\@author}
\newcommand{\SpineTitle}[1]{\renewcommand{\lsSpineTitle}{#1}}
-\newcommand{\SpineAuthor}[1]{\renewcommand{\lsSpineAuthor}{#1}}
+\newcommand{\SpineAuthor}[1]{\renewcommand{\lsSpineAuthor}{#1}}
@@ -125,11 +131,12 @@
\newif\iflsCollection \lsCollectionfalse
\newif\iflsCollectionChapter \lsCollectionChapterfalse
\newif\iflsCollectionTOCLong \lsCollectionTOCLongfalse
-\newif\iflsNewtxmath \lsNewtxmathtrue
+\newif\iflsNewtxmath \lsNewtxmathfalse
\newif\iflsCover \lsCoverfalse %output format is cover
\newif\iflsUscover \lsUscoverfalse
\newif\iflsModfonts \lsModfontsfalse
\newif\iflsNoBabel \lsNoBabelfalse
+\newif\iflsBabelShorthands \lsBabelShorthandsfalse
\newif\iflsMultiauthors \lsMultiauthorsfalse
@@ -146,57 +153,102 @@
\DeclareStringOption{output}[book]
\define@key{langscibook}{output}{%
\renewcommand{\lsOutput}{#1}}
+\DeclareStringOption{booklanguage}[english]
+ \define@key{langscibook}{booklanguage}{%
+ \renewcommand{\lsBookLanguage}{#1}}
\DeclareStringOption{copyright}[CC-BY]
\define@key{langscibook}{copyright}{%
\renewcommand{\lsCopyright}{#1}}
-\DeclareStringOption{biblatexbackend}[bibtex]
+\DeclareStringOption{biblatexbackend}[biber]
\define@key{langscibook}{biblatexbackend}{%
\renewcommand{\lsBiblatexBackend}{#1}}
\DeclareStringOption{spinewidth}[20mm]
\define@key{langscibook}{spinewidth}{%
- \renewcommand{\lsSpinewidth}{#1}}
-\DeclareVoidOption{smallfont}{
+ \renewcommand{\lsSpinewidth}{#1}}
+\DeclareVoidOption{smallfont}{
\renewcommand{\lsFontsize}{10pt}}
-\DeclareVoidOption{undecapitalize}{
- \lsUndecapitalizetrue }
-\DeclareVoidOption{draftmode}{ % 'draftmode' instead of 'draft' due to undesirable side efects
+\DeclareVoidOption{undecapitalize}{
+ \lsUndecapitalizetrue }
+\DeclareVoidOption{draftmode}{ % 'draftmode' instead of 'draft' due to undesirable side efects
\lsDrafttrue
\overfullrule=5pt } % to indicate overfull hboxes
\DeclareVoidOption{openreview}{
\lsOpenReviewtrue%
\AtBeginDocument{\renewcommand{\lsISBNdigital}{000-0-000000-00-0}}}
-\DeclareVoidOption{nonflat}{
- \renewcommand{\fontpath}{./langsci/fonts/}
+\DeclareVoidOption{nonflat}{
+ \renewcommand{\fontpath}{./langsci/fonts/}
\renewcommand{\logopath}{./langsci/graphics/}
\renewcommand{\seriesinfopath}{./langsci/seriesinfo/}
+ \renewcommand{\localepath}{./langsci/locale/}
\renewcommand{\bstpath}{./langsci/bst/}
- \renewcommand{\stylepath}{./langsci/styles/}
+ \renewcommand{\bbxpath}{\bstpath biblatex-langsci-unified/bbx/}
+ % \renewcommand{\bbxpath}{\bstpath}
+ \renewcommand{\cbxpath}{\bstpath biblatex-langsci-unified/cbx/}
+ % \renewcommand{\cbxpath}{\bstpath}
+ \renewcommand{\stylepath}{./langsci/styles/}
}
-\DeclareVoidOption{nobabel}{
- \lsNoBabeltrue}
-\DeclareVoidOption{modfonts}{
+\DeclareVoidOption{nobabel}{
+ \lsNoBabeltrue}
+\DeclareVoidOption{babelshorthands}{
+ \lsBabelShorthandstrue}
+\DeclareVoidOption{modfonts}{
\lsModfontstrue}
-\DeclareVoidOption{multiauthors}{
+\DeclareVoidOption{multiauthors}{
\lsMultiauthorstrue}
-\DeclareVoidOption{showindex}{
+\DeclareVoidOption{showindex}{
\lsShowIndextrue}
-\DeclareVoidOption{biblatex}{
+\DeclareVoidOption{biblatex}{
\lsBiblatextrue}
\DeclareVoidOption{bibtex}{
\ClassWarningNoLine{langscibook}{BibTeX frontend deprecated. Please use BibLaTeX in the final version}
\lsBiblatexfalse}
-\DeclareVoidOption{nonewtxmath}{
+\DeclareVoidOption{nonewtxmath}{
\lsNewtxmathfalse}
-\DeclareVoidOption{collection}{
+\DeclareVoidOption{newtxmath}{
+ \lsNewtxmathtrue}
+\DeclareVoidOption{collection}{
\lsCollectiontrue}
-\DeclareVoidOption{collectionchapter}{
+\DeclareVoidOption{collectionchapter}{
\lsCollectiontrue%
\lsCollectionChaptertrue}
-\DeclareVoidOption{collectiontoclong}{
+\DeclareVoidOption{collectiontoclong}{
\lsCollectiontrue%
- \lsCollectionTOCLongtrue}
+ \lsCollectionTOCLongtrue}
+\DeclareVoidOption{chinesefont}{
+ \newfontfamily\cn[Mapping=tex-text,Ligatures=Common,Scale=MatchUppercase]{AR PL UMing CN}
+% \newcommand{\zh}[1]{{\cn #1}}
+ \XeTeXlinebreaklocale 'zh'
+ \XeTeXlinebreakskip = 0pt plus 1pt
+ \AdditionalFontImprint{UMing}
+}
+\DeclareVoidOption{japanesefont}{
+ \newfontfamily\jpn[Mapping=tex-text,Ligatures=Common,Scale=MatchUppercase]{TakaoPGothic} %Japanese
+% \newcommand{\jp}[1]{{{\jpn #1}}}
+ \XeTeXlinebreaklocale 'ja'
+ \AdditionalFontImprint{TakaoPGothic}
+}
+% \DeclareVoidOption{koreanfont}{
+% \newfontfamily\hangul[Mapping=tex-text,Ligatures=Common,Scale=MatchUppercase]{./SourceHanSerifK.otf}
+% \newcommand{\kr}[1]{{\sffamily #1}}
+% \AdditionalFontImprint{Korean}}
+\DeclareVoidOption{arabicfont}{
+ \newfontfamily\arabicfont[Script=Arabic,ItalicFont=*,Scale=1.4]{arabtype.ttf}
+% \newcommand{\textarabic}[1]{{\arabicfont #1}}
+ \AdditionalFontImprint{Arabtype}
+}
+\DeclareVoidOption{hebrewfont}{
+ \newfontfamily\hebrewfont[Script=Hebrew,ItalicFont=*, Scale=0.9]{SBLHebrew.ttf}
+% \newcommand{\texthebrew}[1]{{\hebrewfont #1}}
+ \AdditionalFontImprint{SBLHebrew}
+}
+\DeclareVoidOption{syriacfont}{
+ \newfontfamily\syriacfont[Script=Syriac]{EstrangeloEdessa.ttf}
+% \newcommand{\textsyriac}[1]{{\syriacfont #1}}
+ \AdditionalFontImprint{Estrangelo Edessa}
+}
\ProcessKeyvalOptions{langscibook}
-
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Class
@@ -213,7 +265,7 @@
%chapterprefix=true,
%draft=yes,
%appendixprefix
- ]{scrbook}
+ ]{scrbook}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -224,9 +276,9 @@
\usepackage{morewrites} %more helper files to write to
\usepackage{etex}
\reserveinserts{18}
-\usepackage{xstring}
-\usepackage{graphicx}
-\usepackage{hyphenat}
+\usepackage{xstring}
+\usepackage{graphicx}
+\usepackage{hyphenat}
\usepackage{tikz} % Needed for covers and advert page
\usetikzlibrary{positioning}
@@ -236,9 +288,9 @@
\usepackage[hyphens]{url}
\urlstyle{same}
-
+
%% standard commands
-\usepackage{\stylepath langsci-basic}
+\usepackage{\stylepath langsci-basic} % FIXME: contains important commands for the index (\isi etc.) which should be defined in the class
%% useful commands for glossings:
% \usepackage{\stylepath langsci-lgr} #FIXME this should probably be replaced by \usepackage{leipzig}
\usepackage{todonotes}
@@ -255,19 +307,18 @@
\newcommand{\podsetup}{
\lsCovertrue
\renewcommand{\maketitle}{} %no need for this
- \StrLen{\@subtitle}[\subtitleStrLen] % Get the length of the subtitle. Later, we use this length to check if a subtitle exists.
\pagestyle{empty}
\pgfdeclarelayer{lspcls_bg} % Create a background layer that serves as the canvas for the coloured rectangles.
\pgfsetlayers{lspcls_bg,main} % Order the background layer behind the main layer of TikZ.
- \renewcommand{\and}{, }%
- \renewcommand{\lastand}{ \& }%
+ \renewcommand{\and}{, }%
+ \renewcommand{\lastand}{ \& }%
\renewcommand{\affiliation}[1]{}
}
% \usepackage[outline]{contour}
-% Content creation for the spine. Including Logo, author, title, and volume number on spine.
-\newcommand{\podspine}{
+% Content creation for the spine. Including Logo, author, title, and volume number on spine.
+\newcommand{\podspine}{
\renewcommand{\newlineCover}{}
\renewcommand{\and}{, }
\renewcommand{\lastand}{ \& }
@@ -280,17 +331,17 @@
% bottom leftaligned
% \node [below = -1mm of lspcls_spinelogo] (lspcls_splinenumber) {\color{\lsSeriesColor} \hspace*{4mm}{\parbox{.37cm}{\sffamily \large \lsSeriesNumber }}};
%
-\node [below = 0mm of CoverSpine.north, anchor=north] (lspcls_splinenumber) {\color{\lsSeriesColor}
+\node [below = 0mm of CoverSpine.north, anchor=north] (lspcls_splinenumber) {\color{\lsSeriesColor}
{\parbox{.47cm}{
\centering
- \sffamily
+ \sffamily
\huge
- \lsSeriesNumber
+ \lsSeriesNumber
}
}
};
- \node [font=\fontsize{18pt}{14pt}\selectfont, above left = 15mm and 4mm of lspcls_spinelogo.north, rotate=270] (lspcls_spinetitle) {\color{\lsSeriesColor} \lsSpineAuthorFont{\lsSpineAuthor\xspace\lsEditorSuffix} \hspace{13mm} \lsSpineTitleFont{\lsSpineTitle}};
+ \node [font=\fontsize{18pt}{14pt}\selectfont, above left = 15mm and 4mm of lspcls_spinelogo.north, rotate=270] (lspcls_spinetitle) {\color{\lsSeriesColor} \lsSpineAuthorFont{\lsSpineAuthor\xspace\lsEditorSuffix} \hspace{13mm} \lsSpineTitleFont{\lsSpineTitle}};
\renewcommand{\newlineCover}{\\}
}
@@ -301,38 +352,38 @@
\newcommand{\podgeometry}[3]{
\begin{pgfonlayer}{lspcls_bg} % Draw on the background layer
\node [ bg, % Draw the coloured background on the front cover
- left = #1 of current page.east,
- fill=\lsSeriesColor,
- minimum height=#2,
+ left = #1 of current page.east,
+ fill=\lsSeriesColor,
+ minimum height=#2,
minimum width=#3
] (CoverColouredRectangleFront) {}; % Die können wir noch dynamisch bestimmen % 7.5mm -> 10.675mm for bleed
- \node [ bg, % Draw the coloured background on the back cover
- right = #1 of current page.west,
- fill=\lsSeriesColor,
- minimum height=#2,
- minimum width=#3
- ] (CoverColouredRectangleBack) {};
+ \node [ bg, % Draw the coloured background on the back cover
+ right = #1 of current page.west,
+ fill=\lsSeriesColor,
+ minimum height=#2,
+ minimum width=#3
+ ] (CoverColouredRectangleBack) {};
\node at (current page.center) [ % Create a reference node for the spine
- bg,
- minimum height=#2,
+ bg,
+ minimum height=#2,
minimum width=\spinewidth,dashed
- ] (CoverSpine) {}; % add [draw] option for preview mode
- \end{pgfonlayer}
+ ] (CoverSpine) {}; % add [draw] option for preview mode
+ \end{pgfonlayer}
}
% Generates the content of the back cover
% Argument 1: Text width, corresponding to Argument 1 of \podfrontcovertoptext
\newcommand{\podbackcover}[1]{
- \node [ font=\fontsize{25pt}{10mm}\selectfont,
+ \node [ font=\fontsize{25pt}{10mm}\selectfont,
right,
- below right = 10mm and 7.5mm of CoverColouredRectangleBack.north west,
+ below right = 10mm and 7.5mm of CoverColouredRectangleBack.north west,
text width=#1
- ] (lspcls_backtitle) {\color{\lsCoverFontColour}\lsBackTitleFont{\raggedright\lsBackTitle\par}};
+ ] (lspcls_backtitle) {\color{white}\lsBackTitleFont{\raggedright\lsBackTitle\par}};
\node [ below = 10mm of lspcls_backtitle,
text width=#1,
align=justify
- ] {\color{\lsCoverFontColour}\lsBackBodyFont{\parindent=15pt\lsBackBody}};
- \node [ below right = 192.5mm and 97.5mm of CoverColouredRectangleBack.north west,
+ ] {\color{white}\lsBackBodyFont{\parindent=15pt\lsBackBody}};
+ \node [ below right = 192.5mm and 97.5mm of CoverColouredRectangleBack.north west,
text width=4cm] {%
\colorbox{white}{
\begin{pspicture}(0,0)(4.1,1in)
@@ -345,68 +396,69 @@
% Generates the content on the front cover, including title, author, subtitle. See below for remaining commands
% Argument 1: Text width on the front cover. Input: 12.34mm
% Argument 2: Font size on the front cover. Adjust to compensate varying text width. Input: 12.34pt
-\newcommand{\podfrontcovertoptext}[2]{
- \newcommand{\lsCoverFontColour}{white}
+\newcommand{\podfrontcovertoptext}[3][white]{
\renewcommand{\and}{\\}
\renewcommand{\lastand}{\\}
-
- \node [ execute at begin node={},
- font=\fontsize{#2}{17.25mm}\selectfont,
- below right = 10mm and 7.5mm of CoverColouredRectangleFront.north west,
- text width=#1,
+ \renewcommand{\newlineCover}{\\}
+
+ \node [ execute at begin node={},
+ font=\fontsize{#3}{17.25mm}\selectfont,
+ below right = 10mm and 7.5mm of CoverColouredRectangleFront.north west,
+ text width=#2,
align=left
- ] (lspcls_covertitle) {\color{\lsCoverFontColour}\lsCoverTitleFont{\raggedright\@title\par}};
-
- \ifnum\subtitleStrLen=0 % Is there a subtitle? If no, just print the author.
- \node [ font=\fontsize{25pt}{12.5mm}\selectfont,
- right,
- below = 11.2mm of lspcls_covertitle.south,
- text width=#1
- ] {\color{\lsCoverFontColour}\lsCoverAuthorFont\nohyphens{\lsEditorPrefix\@author\par}};
+ ] (lspcls_covertitle) {\color{#1}\lsCoverTitleFont{\raggedright\@title\par}};
+
+ \ifx\@subtitle\empty % Is there a subtitle? If no, just print the author.
+ \node [ font=\fontsize{25pt}{12.5mm}\selectfont,
+ right,
+ below = 11.2mm of lspcls_covertitle.south,
+ text width=#2
+ ] {\color{#1}\lsCoverAuthorFont\nohyphens{\lsEditorPrefix\@author\par}};
\else % If yes, create a node for subtitle and author
\node [ font=\fontsize{25pt}{10mm}\selectfont,
- below = 8mm of lspcls_covertitle.south,
- text width=#1
- ] (lspcls_coversubtitle) {\color{\lsCoverFontColour} \lsCoverSubTitleFont \nohyphens{\@subtitle}\par};
+ below = 8mm of lspcls_covertitle.south,
+ text width=#2,
+ align=left
+ ] (lspcls_coversubtitle) {\color{#1}\lsCoverSubTitleFont{\raggedright\@subtitle\par}};
\node [
- font=\fontsize{25pt}{12.5mm}\selectfont,
- right,
- below = 11.2mm of lspcls_coversubtitle.south,
- text width=#1
- ] {\color{\lsCoverFontColour}\lsCoverAuthorFont{\nohyphens{\lsEditorPrefix\@author\par}}};
+ font=\fontsize{25pt}{12.5mm}\selectfont,
+ right,
+ below = 11.2mm of lspcls_coversubtitle.south,
+ text width=#2
+ ] {\color{#1}\lsCoverAuthorFont{\nohyphens{\lsEditorPrefix\@author\par}}};
\fi
}
% Generates the bottom half of the front cover content: series, series number, logo.
-\newcommand{\podcoverbottomtext}{
- \node [ above right = 18.5mm and -.1mm of CoverColouredRectangleFront.south west,
- rectangle,
- fill=white,
+\newcommand{\podcoverbottomtext}[1][white]{
+ \node [ above right = 18.5mm and -.1mm of CoverColouredRectangleFront.south west,
+ rectangle,
+ fill=white,
minimum size=17pt] (lspcls_square) {}; % This is the white square at the bottom left of the front cover
- \node [ above left = 10mm and 7.5mm of CoverColouredRectangleFront.south east] {\color{\lsCoverFontColour}\includegraphics{\logopath langsci_logo_nocolor.pdf}}; % Print the Language Science press Logo
+ \node [ above left = 10mm and 7.5mm of CoverColouredRectangleFront.south east] {\color{#1}\includegraphics{\logopath langsci_logo_nocolor.pdf}}; % Print the Language Science press Logo
\path let \p1 = (lspcls_square.north east), % Calculate the exact coordinates for the Series Title to print.
- \p2 = (lspcls_covertitle.west)
+ \p2 = (lspcls_covertitle.west)
in node at (\x2,\y1) (lspcls_seriesinfo) [
font=\fontsize{17pt}{7.5mm}\selectfont,
right,
text width=95mm,
- anchor=north west]
- {\color{\lsCoverFontColour}\lsCoverSeriesFont{\lsSeriesTitle\par}};
+ anchor=north west]
+ {\color{#1}\lsCoverSeriesFont{\lsSeriesTitle\par}};
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Output types
+% Output types
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \newcommand{\lsOutputLong}{long}
-\newcommand{\lsOutputBook}{book} % standard book
+\newcommand{\lsOutputBook}{book} % standard book
\newcommand{\lsOutputInprep}{inprep} % marks manuscript as in preparation
\newcommand{\lsOutputPaper}{paper} % paper in edited volume
-\newcommand{\lsOutputGuidelines}{guidelines} % guidelines
-\newcommand{\lsOutputCoverBODsc}{coverbodsc} % cover with BoD measurements
-\newcommand{\lsOutputCoverBODhc}{coverbodhc} % cover with BoD measurements
+\newcommand{\lsOutputGuidelines}{guidelines} % guidelines
+\newcommand{\lsOutputCoverBODsc}{coverbodsc} % cover with BoD measurements
+\newcommand{\lsOutputCoverBODhc}{coverbodhc} % cover with BoD measurements
\newcommand{\lsOutputCoverCS}{covercreatespace} % cover with CreateSpace measurements
@@ -421,20 +473,17 @@
\else % only if output!=paper
\renewcommand{\maketitle}{
\begin{titlepage}
-\thispagestyle{empty}
-
-
+ \thispagestyle{empty}
\ifx\lsOutput\lsOutputBook % only if output=book
\setcounter{page}{-1}
%% First titlepage:
{\lsFrontPage}
%%%%%%%%%%%%%%%%%%%
- \newpage\thispagestyle{empty}
- \null\newpage\thispagestyle{empty}
+ \pagenumbering{roman}\clearpage\thispagestyle{empty} % We use roman pagenumbering here instead of \frontmatter because scrbook's frontmatter command issues a \clear(double)page, which is unnec. in digital publications.
%% Series information:
{\lsSeriesHistory}
%%%%%%%%%%%%%%%%%%%%%
- \newpage\thispagestyle{empty}
+ \clearpage%\thispagestyle{empty}
%% Schmutztitel:
{\renewcommand{\lsCoverBlockColor}{white}
\renewcommand{\lsCoverFontColor}{\lsSeriesColor}
@@ -450,14 +499,14 @@
{\lsBackPage}
\null\newpage\thispagestyle{empty}
}
-\fi
+\fi
\ifx\lsOutput\lsOutputInprep % only if output=inprep
{\renewcommand{\lsCoverBlockColor}{white}
\renewcommand{\lsCoverFontColor}{black}
\lsCoverBlock
\lsCoverTitleAuthor}
-\fi
+\fi
\ifx\lsOutput\lsOutputGuidelines % only if output=guidelines
{\setcounter{page}{-1}
@@ -468,68 +517,57 @@
\fi
-\ifx\lsOutput\lsOutputCoverBODhc % only if output=cover
- \podsetup
- \begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
+\ifx\lsOutput\lsOutputCoverBODhc % only if output=cover
+ \podsetup
+ \begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
\podgeometry{24.2mm}{23.1cm}{15.5cm}
- \podspine
- \podfrontcovertoptext{140mm}{51pt} % Due to different cover sizes, the text size was adjusted so that the difference in line breaks would be minimal between hard and softcover books.
+ \podspine
+ \podfrontcovertoptext{140mm}{51pt} % Due to different cover sizes, the text size was adjusted so that the difference in line breaks would be minimal between hard and softcover books.
\podcoverbottomtext
\newcommand{\lsISBNcover}{\lsISBNhardcover}
- \podbackcover{135.5mm}
- \end{tikzpicture}
+ \podbackcover{137mm}
+ \end{tikzpicture}
%exit the document right here
\end{titlepage}
- \end{document}
- \fi
-
+ \end{document}
+ \fi
+
-\ifx\lsOutput\lsOutputCoverBODsc % only if output=cover
- \podsetup
- \begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
+\ifx\lsOutput\lsOutputCoverBODsc % only if output=cover
+ \podsetup
+ \begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
\podgeometry{13.75mm}{23.1cm}{15.5cm}
- \podspine
- \podfrontcovertoptext{140mm}{51pt} % Due to different cover sizes, the text size was adjusted so that the difference in line breaks would be minimal between hard and softcover books.
+ \podspine
+ \podfrontcovertoptext{140mm}{51pt} % Due to different cover sizes, the text size was adjusted so that the difference in line breaks would be minimal between hard and softcover books.
\podcoverbottomtext
\newcommand{\lsISBNcover}{\lsISBNsoftcover}
- \podbackcover{135.5mm}
- \end{tikzpicture}
+ \podbackcover{137mm}
+ \end{tikzpicture}
%exit the document right here
\end{titlepage}
- \end{document}
- \fi
-
-
+ \end{document}
+ \fi
+
+
% ============================
-\ifx\lsOutput\lsOutputCoverCS % only if output=covercs
+\ifx\lsOutput\lsOutputCoverCS % only if output=covercs
\podsetup
\begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
\podgeometry{10.675mm}{22.5cm}{15.5cm}
\podspine
\podfrontcovertoptext{140mm}{52pt} % Due to different cover sizes, the text size was adjusted so that the difference in line breaks would be minimal between hard and softcover books.
\podcoverbottomtext
-% %unclear why this was different between BOD and CS
-% %-----------------------------
-% \node [above right = 18.5mm and -.1mm of CoverColouredRectangleFront.south west, rectangle, fill=white, minimum size=17pt] (lspcls_square) {}; % 2
-% \node [above left = 10mm and 7.5mm of CoverColouredRectangleFront.south east] {\color{\lsCoverFontColour}\includegraphics{\logopath langsci_logo_nocolor.pdf}};
-% % \node [below right = 197.5mm and 117.1mm of CoverColouredRectangleFront.north west] {\color{\lsCoverFontColour}\includegraphics{\logopath langsci_logo_nocolor.pdf}};
-% \path let \p1 = (lspcls_square.north east), \p2 = (lspcls_covertitle.west) in node at (\x2,\y1) (lspcls_seriesinfo) [font=\fontsize{17pt}{7.5mm}\selectfont, right, text width=95mm, anchor=north west] {\color{\lsCoverFontColour}\lsCoverSeriesFont{\lsSeriesTitle\par}};
-% %-----------------------------
\iflsUscover\newcommand{\lsISBNcover}{\lsISBNsoftcoverus}\else\newcommand{\lsISBNcover}{\lsISBNsoftcover}\fi
\podbackcover{140mm}
- \end{tikzpicture}
- %exit the document right here
+ \end{tikzpicture}
+ %exit the document right here
\end{titlepage}
- \end{document}
-\fi
-
+ \end{document}
+\fi
\end{titlepage}
-\frontmatter
-\renewcommand{\frontmatter}{}
-
-\null\newpage\thispagestyle{empty}
-\hypersetup{colorlinks=false, pdfborder={0 0 0}} % for hyperref
+% \null\newpage\thispagestyle{empty}
+\hypersetup{colorlinks=false, citecolor=brown, pdfborder={0 0 0}} % for hyperref
\color{black}
\lsInsideFont
@@ -542,12 +580,12 @@
\fi
%%%%%%%%%%%%%
-\null\newpage\thispagestyle{plain}
+% \null\newpage\thispagestyle{plain}
%\pagenumbering{roman} % or \frontmatter
%% Dedication:
\ifx\@dedication\empty{}
-\else{\lsDedication}
+\else{\newpage\lsDedication}
\fi
%%%%%%%%%%%%%%%%
@@ -559,31 +597,34 @@
\ifx\lsSeries\sidl
%\def\exfont{\normalsize\itshape}
\renewcommand{\eachwordone}{\itshape} % only \gll
-
+
\let\oldtable\table % footnotes in tables without horizontal line
\let\endoldtable\endtable
- \renewenvironment{table}{\setfootnoterule{0pt}\oldtable}{\endoldtable}
+ \renewenvironment{table}{\setfootnoterule{0pt}\oldtable}{\endoldtable}
\fi
\ifx\lsSeries\pmwe
- \renewcommand{\eachwordone}{\itshape}
+ \renewcommand{\eachwordone}{\itshape}
\fi
+\ifx\lsSeries\nc
+ \renewcommand{\eachwordone}{\itshape}
+\fi
-} %% \AtBeginDocument
+} %% \AtBeginDocument
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Geometry
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
% For output type cover
% \usepackage{catchfilebetweentags}
-\newlength{\csspine} % CS spine width algorithm, when page count is known: Total Page Number (excluding cover), usually (Total Page - 3) * 0.0572008 mm
+\newlength{\csspine} % CS spine width algorithm, when page count is known: Total Page Number (excluding cover), usually (Total Page - 3) * 0.0572008 mm
\newlength{\bodspine} % BoD spine width algorithm located at http://www.bod.de/hilfe/coverberechnung.html (German only, please contact LangSci for help)
\newlength{\bleed}
\newlength{\seitenbreite}
@@ -591,68 +632,65 @@
\newlength{\spinewidth}
\newlength{\totalwidth}
\newlength{\totalheight}
-% \IfFileExists{./localmetadata.tex}{\ExecuteMetaData[localmetadata.tex]{coverdimen}}{\typeout{No local meta data found, therefore default spline length was chosen}} % Get only the information between the tag "coverdimen" from localmetadata.tex
\setlength{\bleed}{3.175mm}
\setlength{\spinewidth}{\lsSpinewidth} % Create Space Version
\usepackage{calc}
-
- \ifx\lsOutput\lsOutputCoverCS % if output = cover; This is the CreateSpace Version
+
+ \ifx\lsOutput\lsOutputCoverCS % if output = cover; This is the CreateSpace Version
\lsCovertrue
\setlength{\bleed}{3.175mm}
\setlength{\seitenbreite}{169.9mm}
- \setlength{\seitenhoehe}{244.1mm}
-
-
+ \setlength{\seitenhoehe}{244.1mm}
\setlength{\totalwidth}{\spinewidth+\seitenbreite+\seitenbreite+\bleed+\bleed}
\setlength{\totalheight}{\seitenhoehe+\bleed+\bleed}
\usepackage[paperheight=\totalheight, paperwidth=\totalwidth]{geometry}
\hyphenpenalty 750
\fi
-
-\ifx\lsOutput\lsOutputCoverBODhc
- \lsCovertrue
+
+\ifx\lsOutput\lsOutputCoverBODhc
+ \lsCovertrue
\newlength{\bodfold}
\newlength{\totalspine}
\setlength{\bodfold}{8mm}
\setlength{\seitenbreite}{192mm}
\setlength{\seitenhoehe}{280mm} % For BOD: Hardcover, Runder Rücken, Kaschiert, papier 80g/m², weiß, Papier 17x24cm
-% \setlength{\spinewidth}{\bodspine}
+% \setlength{\spinewidth}{\bodspine}
% \setlength{\totalspine}{\spinewidth+\bodfold+\bodfold}
- \setlength{\totalspine}{\spinewidth}
+ \setlength{\totalspine}{\spinewidth}
\setlength{\totalwidth}{\spinewidth+\seitenbreite+\seitenbreite}
\setlength{\totalheight}{\seitenhoehe}
\usepackage[paperheight=\totalheight, paperwidth=\totalwidth]{geometry}
\hyphenpenalty 750
\fi
-
-
-\ifx\lsOutput\lsOutputCoverBODsc
+
+
+\ifx\lsOutput\lsOutputCoverBODsc
\lsCovertrue
\newlength{\totalspine}
\setlength{\seitenbreite}{170mm}
\setlength{\seitenhoehe}{240mm} % For BOD: Softcover, papier 80g/m², weiß, Papier 17x24cm
\setlength{\bleed}{5mm}
- \setlength{\totalspine}{\spinewidth}
+ \setlength{\totalspine}{\spinewidth}
\setlength{\totalwidth}{\spinewidth+\seitenbreite+\seitenbreite+\bleed+\bleed}
\setlength{\totalheight}{\seitenhoehe+\bleed+\bleed}
\usepackage[paperheight=\totalheight, paperwidth=\totalwidth]{geometry}
\hyphenpenalty 750
\fi
-
-%Page size and text area if not cover
+
+%Page size and text area if not cover
\iflsCover
%output types cover have already been handled
\else % output != cover
- \usepackage[
+ \usepackage[
papersize={170mm,240mm}
,top=27.4mm % TODO nachgemessen, nach Vermassung eigentlich 30mm-16pt = 25.8mm
- ,inner=20.5mm,
+ ,inner=20.5mm,
,outer=24.5mm
%,showframe,pass
,marginparwidth=50pt
]{geometry}
-\fi
+\fi
\usepackage[
absolute % for absolute positioning in titlepage
@@ -664,14 +702,51 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Fonts
+% Fonts
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{ifxetex}
-\ifxetex\else\ClassError{langsci/langscibook}{Please use XeLaTeX!}{}\fi
+\ifxetex\else\ClassError{langsci/langscibook}{Please use XeLaTeX!}{}\fi
+
+%% Typesetting of mathematical formulas
\usepackage{amssymb} % has to be loaded before other stuff
-\PassOptionsToPackage{no-math}{fontspec} % must appear before metalogo or any fontspec stuff; deactivates fontspec's math settings, which is necessary to let newtxmath do the job
+\usepackage{amsmath} % has to be loaded before mathspec/unicode-math
+
+\iflsNewtxmath\else
+%% There is a known problem in the interplay between \binom, unicode-math, and OTF
+%% https://tex.stackexchange.com/questions/269980/wrong-parentheses-size-in-binom-with-xelatex-and-unicode-math-in-displaystyle
+\ifx\Umathcode\@undefined\else
+
+\DeclareRobustCommand{\genfrac}[6]{%
+ \def\@tempa{#1#2}%
+ \edef\@tempb{\@nx\@genfrac\@mathstyle{#4}%
+ % just \over or \above never withdelims versions
+ \ifx @#3@\@@over\else\@@above\fi
+ }%
+ \ifx\@tempa\@empty \else
+ \bgroup % so mathord not mathinner
+ \left\ifx\relax#1\relax.\else#1\fi % assumes . is null delimiter
+ % otherwise add specified delimiter
+ \kern-\nulldelimiterspace % fractions add extra nulldelimiter space
+ \fi
+ \@tempb{#3}{\mathstrut{#5}}{\mathstrut{#6}}%
+ \ifx\@tempa\@empty \else
+ \kern-\nulldelimiterspace
+ \right\ifx\relax#2\relax.\else#2\fi
+ \egroup
+ \fi
+}
+\fi
+%% Provides \setmathfont
+\usepackage{unicode-math}
+\fi
+
+\iflsNewtxmath
+%% Deprecated:
+\PassOptionsToPackage{no-math}{fontspec} % must appear before metalogo or any fontspec stuff; deactivates fontspec's math settings, which is necessary to let newtxmath do the job
+\fi
+
\usepackage{metalogo}\newcommand{\xelatex}{\XeLaTeX\xspace}
\usepackage{dejavu}
\usepackage{libertine}
@@ -679,20 +754,23 @@
\setmonofont[
Ligatures={TeX},Scale=MatchLowercase,
BoldFont = DejaVuSansMono-Bold.ttf ,
- SlantedFont = DejaVuSansMono-Oblique.ttf ,
- BoldSlantedFont = DejaVuSansMono-BoldOblique.ttf
+ SlantedFont = DejaVuSansMono-Oblique.ttf ,
+ BoldSlantedFont = DejaVuSansMono-BoldOblique.ttf
]{DejaVuSansMono.ttf}
-\iflsModfonts{% use Langsci fonts
+\iflsNewtxmath\else
+\setmathfont[AutoFakeBold]{libertinusmath-regular.otf}
+\fi
+
+\iflsModfonts% use Langsci fonts
\setsansfont[
%Ligatures={TeX,Common}, % not supported by ttf
Scale=MatchLowercase,
Path=\fontpath,
BoldFont = Arimo-Bold_B.ttf ,
- ItalicFont = Arimo-Italic_B.ttf ,
- BoldItalicFont = Arimo-BoldItalic_B.ttf
+ ItalicFont = Arimo-Italic_B.ttf ,
+ BoldItalicFont = Arimo-BoldItalic_B.ttf
]{Arimo_B.ttf}
-
\setmainfont[
Ligatures={TeX,Common},
@@ -706,18 +784,17 @@
SlantedFont = LinLibertine_R_B.otf,
SlantedFeatures = {FakeSlant=0.25},
BoldSlantedFeatures = {FakeSlant=0.25},
- SmallCapsFeatures = {FakeSlant=0},
- ]{LinLibertine_R_B.otf}
+ SmallCapsFeatures = {FakeSlant=0,Numbers=OldStyle},
+ ]{LinLibertine_R_B.otf}
\else % use standard fonts
\setsansfont[
%Ligatures={TeX,Common}, % not supported by ttf
Scale=MatchLowercase,
Path=\fontpath,
BoldFont = Arimo-Bold.ttf ,
- ItalicFont = Arimo-Italic.ttf ,
- BoldItalicFont = Arimo-BoldItalic.ttf
+ ItalicFont = Arimo-Italic.ttf ,
+ BoldItalicFont = Arimo-BoldItalic.ttf
]{Arimo-Regular.ttf}
-
\setmainfont[
Ligatures={TeX,Common},
@@ -731,16 +808,18 @@
SlantedFont = LinLibertine_R.otf,
SlantedFeatures = {FakeSlant=0.25},
BoldSlantedFeatures = {FakeSlant=0.25},
- SmallCapsFeatures = {FakeSlant=0},
- ]{LinLibertine_R.otf}
+ SmallCapsFeatures = {FakeSlant=0,Numbers=OldStyle},
+ ]{LinLibertine_R.otf}
\fi
+%% Deprecated:
\iflsNewtxmath % some users have problems when installing newtxmath
-% \usepackage[libertine]{newtxmath}
+ \usepackage[libertine]{newtxmath}
%% following http://tex.stackexchange.com/questions/297328/xelatex-does-not-load-newtxmath-with-linuxlibertine-sometimes
- %% due to a bug in XeTeX; unfortunately this is NOT extensively tested!
+ %% due to a bug in XeTeX. This also seems to fix an issue with \url in footnotes.
+ %% Unfortunately, this is NOT extensively tested!
\usepackage{xpatch}
\xpretocmd{\textsuperscript}
{{\sbox0{$\textstyle x$}}}
@@ -748,14 +827,14 @@
\AtBeginDocument{%
\DeclareSymbolFont{operators}{\encodingdefault}{\familydefault}{m}{n}%
\SetSymbolFont{operators}{bold}{\encodingdefault}{\familydefault}{b}{n}%
- }
-\fi
+ }
+\fi
\let\oldtabular\tabular % number in tabulars
\let\endoldtabular\endtabular
\renewenvironment{tabular}{\normalfont\addfontfeatures{Numbers=Lining}\selectfont\oldtabular}{\endoldtabular}
-%\frenchspacing
+\frenchspacing %see https://en.wikipedia.org/wiki/Sentence_spacing#Typography
\usepackage[final]{microtype}
\newcommand{\lsCoverTitleFont}[1]{\sffamily\addfontfeatures{Scale=MatchUppercase}\fontsize{52pt}{17.25mm}\selectfont #1}
@@ -775,34 +854,34 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Colors:
+% Colors
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{xcolor}
\input{\seriesinfopath langsci-series.def} % \lsSeriesColor, \lsSeriesTitle, \lsISSN and colors are defined here
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Cover:
+% Cover
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\usepackage{pst-barcode} % for generating bar codes
+\usepackage{pst-barcode} % for generating bar codes
\newcommand{\lsCoverFontColor}{white}
-\newcommand{\lsCoverBlockColor}{\lsSeriesColor}
-
-
+\newcommand{\lsCoverBlockColor}{\lsSeriesColor}
+
\newcommand{\lsEditorPrefix}{}
\newcommand{\lsEditorSuffix}{}
\iflsCollection % for collections: set \lsEditorSuffix depending on \@author
\AtBeginDocument{
\renewcommand{\newlineCover}{}
- \renewcommand{\newlineSpine}{}
- \renewcommand{\lsEditorPrefix}{{\Large Edited by\\}}
+ \renewcommand{\newlineSpine}{}
+ \renewcommand{\lsEditorPrefix}{{\Large Edited by\\}}
\renewcommand{\lsEditorSuffix}{(ed.)}
\iflsMultiauthors
- \renewcommand{\lsEditorSuffix}{(eds.)}
+ \renewcommand{\lsEditorSuffix}{(eds.)}
\fi
}
\else
@@ -825,7 +904,7 @@
\fi
\iflsOpenReview
\iflsDraft
- \ClassError{langsci/langscibook}{Open review mode not compatible with draft mode. Please disable one of them}{}
+ \ClassError{langsci/langscibook}{Open review mode not compatible with draft mode. Please disable one of them}{}
\fi
\begin{textblock}{170}(-20,75)
\rotatebox{30}{
@@ -840,7 +919,7 @@
}
\end{textblock}
\fi
- \iflsUndecapitalize
+ \iflsUndecapitalize
\begin{textblock}{170}(-20,75)
\rotatebox{30}{
\colorbox{red}{
@@ -854,7 +933,7 @@
}
\end{textblock}
\fi
-
+
}
\newcommand{\lsCoverTitleAuthor}{
@@ -874,9 +953,9 @@
\fi
\vspace{11.2mm} % 20mm - 25pt
-
+
\raggedright
- {\lsCoverAuthorFont
+ {\lsCoverAuthorFont
\lsEditorPrefix\@author\\}
\end{textblock}}
@@ -885,25 +964,69 @@
\color{white}
\raggedright\rule{3.6mm}{3.5mm}
\color{\lsCoverFontColor}
- \hspace{3mm}\parbox[t]{85mm}{\raggedright\lsCoverSeriesFont
+ \hspace{3mm}\parbox[t]{85mm}{\raggedright\lsCoverSeriesFont
\lsSeriesTitle\\}
\end{textblock}}
-\newcommand{\lsCoverLogo}{
+\newcommand{\lsCoverLogo}{
\begin{textblock}{33}(124.6,205)
- \raggedright\IfFileExists{\logopath langsci_logo_nocolor.pdf}{\includegraphics{\logopath langsci_logo_nocolor.pdf}}{langsci logo}
+ \raggedright\IfFileExists{\logopath langsci_logo_nocolor.pdf}{\includegraphics{\logopath langsci_logo_nocolor.pdf}}{langsci logo}
\end{textblock}}
+ \pgfdeclarelayer{lspcls_bg} % Create a background layer that serves as the canvas for the coloured rectangles.
+ \pgfsetlayers{lspcls_bg,main} % Order the background layer behind the main layer of TikZ.
+
\newcommand{\lsFrontPage}{ % Front page
- \lsCoverBlock
- \lsCoverTitleAuthor
- \lsCoverSeries
- \lsCoverLogo}
+ \pgfdeclarelayer{lspcls_bg} % Create a background layer that serves as the canvas for the coloured rectangles.
+ \pgfsetlayers{lspcls_bg,main} % Order the background layer behind the main layer of TikZ.
+% % \lsCoverBlock
+% % \lsCoverTitleAuthor
+% % \lsCoverSeries
+% % \lsCoverLogo
+ \thispagestyle{empty}
+ \renewcommand{\and}{, }%
+ \renewcommand{\lastand}{ \& }%
+ \renewcommand{\affiliation}[1]{}
+\begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
+ \begin{pgfonlayer}{lspcls_bg}
+ \node [ bg,
+ left=7.5mm of current page.east,
+ fill=\lsSeriesColor,
+ minimum width=155mm,
+ minimum height=225mm
+ ] (CoverColouredRectangleFront) {};
+ \end{pgfonlayer}
+ \podfrontcovertoptext{140mm}{51pt}
+ \podcoverbottomtext
+ \iflsDraft \node [rotate=45,align=center,scale=3,color=white,text opacity=.75] at (current page.center) {\lsCoverTitleFont Draft\\of \today, \currenttime}; \fi
+ \iflsOpenReview \node [rotate=45,align=center,scale=1.5,color=white,text opacity=.75] at (current page.center) {\lsCoverTitleFont Open Review\\Version of \today, \currenttime}; \fi
+ \iflsUndecapitalize \node [rotate=45,scale=1.5,color=white,text opacity=.75] at (current page.center) {\lsCoverTitleFont Undecapitalized}; \fi
+\end{tikzpicture}
+}
-\newcommand{\lsSchmutztitel}{ % Schmutztitel
- \lsCoverBlock
- \lsCoverTitleAuthor
- \lsCoverLogo}
+\newcommand{\lsSchmutztitel}{% Schmutztitel
+ \pgfdeclarelayer{lspcls_bg} % Create a background layer that serves as the canvas for the coloured rectangles.
+ \pgfsetlayers{lspcls_bg,main} % Order the background layer behind the main layer of TikZ.
+% % \lsCoverBlock
+% % \lsCoverTitleAuthor
+% % \lsCoverLogo
+ \thispagestyle{empty}
+ \renewcommand{\and}{, }%
+ \renewcommand{\lastand}{ \& }%
+ \renewcommand{\affiliation}[1]{}%
+\begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
+ \begin{pgfonlayer}{lspcls_bg}
+ \node [ bg,
+ left=7.5mm of current page.east,
+ fill=white,
+ minimum width=155mm,
+ minimum height=225mm
+ ] (CoverColouredRectangleFront) {};
+ \end{pgfonlayer}
+ \podfrontcovertoptext[\lsSeriesColor]{140mm}{51pt}
+ \node [ above left = 10mm and 7.5mm of CoverColouredRectangleFront.south east] {\color{\lsSeriesColor}\includegraphics{\logopath langsci_logo_nocolor.pdf}}; % Print the Language Science press Logo
+\end{tikzpicture}
+}
%\usepackage{pdfpages}
\newcommand{\lsAdvertisement}{
@@ -911,33 +1034,52 @@
}
\newcommand{\lsBackPage}{ % Back page
- \lsCoverBlock
-
- \begin{textblock}{115}(15,24) % 30mm-6mm
- \color{white}
- {\raggedright
- \lsBackTitleFont
- \lsBackTitle \\ \null}
-
- \lsBackBodyFont
-
- \noindent
- \lsBackBody
- \end{textblock}
-
- \begin{textblock}{40}(105,200)
- \lsBackBodyFont\sffamily
- \colorbox{white}{%
- \begin{pspicture}(0,0)(4.1,1in)
- \psbarcode[transx=0.4,transy=0.3]{\lsISBNdigital}{includetext height=0.7}{isbn}
- \end{pspicture}
- }%
- \end{textblock}}
+% % \lsCoverBlock
+% %
+% % \begin{textblock}{140}(15,24) % 30mm-6mm
+% % \color{white}
+% % {\raggedright
+% % \lsBackTitleFont
+% % \lsBackTitle \\ \null}
+% %
+% % \lsBackBodyFont
+% %
+% % \noindent
+% % \lsBackBody
+% % \end{textblock}
+% %
+% % \begin{textblock}{40}(105,200)
+% % \lsBackBodyFont\sffamily
+% % \colorbox{white}{%
+% % \begin{pspicture}(0,0)(4.1,1in)
+% % \psbarcode[transx=0.4,transy=0.3]{\lsISBNdigital}{includetext height=0.7}{isbn}
+% % \end{pspicture}
+% % }%
+% % \end{textblock}
+ \pgfdeclarelayer{lspcls_bg} % Create a background layer that serves as the canvas for the coloured rectangles.
+ \pgfsetlayers{lspcls_bg,main} % Order the background layer behind the main layer of TikZ.
+ \pagestyle{empty}
+ \renewcommand{\and}{, }%
+ \renewcommand{\lastand}{ \& }%
+ \renewcommand{\affiliation}[1]{}
+ \newcommand{\lsISBNcover}{\lsISBNdigital}
+\begin{tikzpicture}[remember picture, overlay,bg/.style={outer sep=0}]
+ \begin{pgfonlayer}{lspcls_bg}
+ \node [ bg,
+ right=7.5mm of current page.west,
+ fill=\lsSeriesColor,
+ minimum width=155mm,
+ minimum height=225mm
+ ] (CoverColouredRectangleBack) {};
+ \end{pgfonlayer}
+ \podbackcover{137mm}
+ \end{tikzpicture}
+ }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Series history:
+% Series history
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -946,7 +1088,7 @@
\raggedright\lsCoverSeriesHistoryFont
\IfFileExists{\seriesinfopath \lsSeries-info.tex}{\input{\seriesinfopath\lsSeries-info}}{
- Series information: \seriesinfopath \lsSeries-info.tex not found!}
+ Series information: \seriesinfopath \lsSeries-info.tex not found!}
\IfStrEq{\lsISSN}{??} % \IfStrEq from xstring
{}
@@ -957,9 +1099,10 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Imprint:
+% Imprint
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
%% for imprint:
\def\translator#1{\gdef\@translator{#1}}
\translator{}
@@ -981,7 +1124,7 @@
\edef\fontstemp{\lsAdditionalFontsImprint}
\renewcommand{\lsAdditionalFontsImprint}{\fontstemp, #1}
}
-
+
%\def\@author{\@latex@warning@no@line{No \noexpand\author given}}
\newcommand{\ISBNdigital}[1]{\renewcommand{\lsISBNdigital}{#1}}
\newcommand{\ISBNsoftcover}[1]{\renewcommand{\lsISBNsoftcover}{#1}}
@@ -992,7 +1135,7 @@
\newcommand{\Series}[1]{\renewcommand{\lsSeries}{#1}}
\newcommand{\SeriesNumber}[1]{\renewcommand{\lsSeriesNumber}{#1}}
\newcommand{\BookDOI}[1]{\renewcommand{\lsBookDOI}{#1}}
-
+
\newcommand{\lsImpressumCitationText}{
\onlyAuthor
\renewcommand{\newlineCover}{}
@@ -1005,6 +1148,7 @@
}
\newcommand{\lsImpressum}{
+\thispagestyle{empty}
\raggedright
\lsImpressumCitationText
@@ -1016,33 +1160,36 @@ This title can be downloaded at:\\
© \lsYear, \iflsCollection the authors\else\@author\fi
-\newcommand{\ccby}{CC-BY}
-\ifx\lsCopyright\ccby
+\newcommand{\ccby}{CC-BY}
+\ifx\lsCopyright\ccby
Published under the Creative Commons Attribution 4.0 Licence (CC BY 4.0):
-http://creativecommons.org/licenses/by/4.0/
+http://creativecommons.org/licenses/by/4.0/
\else
Published under the Creative Commons Attribution-NoDerivatives 4.0 Licence (CC BY-ND 4.0):
-http://creativecommons.org/licenses/by-nd/4.0/
+http://creativecommons.org/licenses/by-nd/4.0/
\fi
-
+
\begin{tabular}{@{}l@{~}l}
-ISBN: &
-\IfStrEq{\lsISBNdigital}{000-0-000000-00-0}
-{\color{red}no digital ISBN}
-{\lsISBNdigital~(Digital)}
-\\
-&
-\IfStrEq{\lsISBNhardcover}{000-0-000000-00-0}
-{\color{red}no hardcover ISBN}
-{\lsISBNhardcover~(Hardcover)}
-\\&
-\IfStrEq{\lsISBNsoftcover}{000-0-000000-00-0}
-{\color{red}no softcover ISBN}
-{\lsISBNsoftcover~(Softcover)}
+ISBN: &
+\IfStrEq{\lsISBNdigital}{000-0-000000-00-0}{%no digital ISBN, issue warning
+ \color{red}no digital ISBN
+}{%digital ISBN present, write ISBN
+ \lsISBNdigital~(Digital)
+}
\\
-% & \lsISBNhardcover~(Hardcover)\\
-% & \lsISBNsoftcover~(Softcover)\\
-% & \lsISBNsoftcoverus~(Softcover US)\\
+\IfStrEq{\lsISBNhardcover}{000-0-000000-00-0}{ %hardcover ISBN not present
+}{%hardcover ISBN present, write ISBN
+ &\lsISBNhardcover~(Hardcover)\\
+}
+
+\IfStrEq{\lsISBNsoftcover}{000-0-000000-00-0}{ %softcover ISBN not present
+ \IfStrEq{\lsISBNhardcover}{000-0-000000-00-0}{ %neither hardcover nor softcover, issue warning
+ \color{red} no print ISBNs!
+ }{%hardcover present, no warning
+ }
+}{%only softcover present, write ISBN
+ &\lsISBNsoftcover~(Softcover)\\
+}
\end{tabular}
\IfStrEq{\lsISSN}{??} % \IfStrEq from xstring
@@ -1051,11 +1198,12 @@ ISBN: &
\IfStrEq{\lsBookDOI}{??} % \IfStrEq from xstring
{{\color{red} no DOI}}
- {\doi{\lsBookDOI}}
-
+ {\doi{\lsBookDOI}}\\
+Source code available from \href{https://www.github.com/langsci/\lsID}{www.github.com/langsci/\lsID} \\
+Collaborative~reading:~\href{https://paperhive.org/documents/remote?type=langsci&id=\lsID}{paperhive.org/documents/remote?type=langsci\&id=\lsID}
\bigskip
-
+
Cover and concept of design:
Ulrike Harbort \\
\if\@translator\empty\else
@@ -1078,7 +1226,7 @@ Proofreading:
Open reviewing:
\@openreviewer \\
\fi
-Fonts: Linux Libertine, Arimo, DejaVu Sans Mono\lsAdditionalFontsImprint\\
+Fonts: Linux Libertine, Libertinus Math, Arimo, DejaVu Sans Mono\lsAdditionalFontsImprint\\
Typesetting software: \XeLaTeX
\bigskip
@@ -1090,43 +1238,40 @@ Unter den Linden 6\\
\vfill
-Storage and cataloguing done by FU Berlin \\[3ex]
+Storage and cataloguing done by FU Berlin \\[3ex]
-\IfFileExists{\logopath logo.pdf}{\includegraphics[width=5cm]{\logopath logo.pdf}}{\logotext} \\[3ex]
+\IfFileExists{\logopath storagelogo.pdf}{\includegraphics[width=5cm]{\logopath storagelogo.pdf}}{\logotext} \\[3ex]
-\vfill
+% \vfill
-
-
-\noindent
-\lsp has no responsibility for the persistence or accuracy of URLs for
-external or third-party Internet websites referred to in this
-publication, and does not guarantee that any content on such websites
-is, or will remain, accurate or appropriate.
+% \noindent
+% \lsp has no responsibility for the persistence or accuracy of URLs for
+% external or third-party Internet websites referred to in this
+% publication, and does not guarantee that any content on such websites
+% is, or will remain, accurate or appropriate.
}
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Dedication:
+% Dedication
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\newcommand{\lsDedication}{
- \vspace*{.2\textheight}
+\newcommand{\lsDedication}{\thispagestyle{empty}
+ \vspace*{\fill}
\begin{center}
{\lsDedicationFont
- \@dedication }
+ \@dedication\par}
\end{center}
- \vfill
+ \vspace*{\fill}
\clearpage}
-
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Header and footer:
+% Header and footer
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1153,15 +1298,15 @@ is, or will remain, accurate or appropriate.
\renewcommand*{\partpagestyle}{empty}
\pagestyle{scrheadings}
-
-
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Sectioning
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\setcounter{secnumdepth}{4}
+\setcounter{secnumdepth}{4}
\def\subsubsubsection{\@startsection{paragraph}{3}{\z@}{-3.25ex plus
-1ex minus-.2ex}{1.5ex plus.2ex}{\reset@font\normalsize}}
@@ -1174,12 +1319,12 @@ is, or will remain, accurate or appropriate.
\let\subsubsubsubsectionmark\@gobble
%% needed for hyperref
-\def\toclevel@subsubsubsection{4}
+\def\toclevel@subsubsubsection{4}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Epigrams:
+% Epigrams
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1198,7 +1343,7 @@ is, or will remain, accurate or appropriate.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Footnotes:
+% Footnotes
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1219,8 +1364,8 @@ is, or will remain, accurate or appropriate.
\let\oldFootnote\footnote
\newcommand\nextToken\relax
-\renewcommand\footnote[1]{%
-\oldFootnote{\xspace#1}\futurelet\nextToken\isFootnote}
+% \renewcommand\footnote[1]{% breaks more footnotes than it fixes
+% \oldFootnote{\xspace#1}\futurelet\nextToken\isFootnote}
\newcommand\isFootnote{%
\ifx\footnote\nextToken\textsuperscript{,}\fi}
@@ -1228,7 +1373,7 @@ is, or will remain, accurate or appropriate.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Quotes:
+% Quotes
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1248,40 +1393,158 @@ is, or will remain, accurate or appropriate.
{\endlist}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% Language-specific settings
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Must apear before biblatex and hyperref.
+
+%% languages
+\newcommand{\lsBookLanguageEnglish}{english}
+\newcommand{\lsBookLanguageFrench}{french}
+\newcommand{\lsBookLanguagePortuguese}{portuguese}
+\newcommand{\lsBookLanguageGerman}{german}
+\newcommand{\lsBookLanguageChinese}{chinese}
+
+\iflsNoBabel
+ \else
+ \iflsBabelShorthands
+ \ifx\lsBookLanguage\lsBookLanguageEnglish
+ \usepackage[german,\lsBookLanguage]{babel}
+ \addto\extrasenglish{\languageshorthands{german}\useshorthands{"}}
+ \fi
+ \ifx\lsBookLanguage\lsBookLanguageFrench
+ \usepackage[german,\lsBookLanguage]{babel}
+ \addto\extrasfrench{\languageshorthands{german}\useshorthands{"}}
+ \fi
+ \ifx\lsBookLanguage\lsBookLanguageGerman
+ \usepackage[german]{babel}
+ \fi
+ \ifx\lsBookLanguage\lsBookLanguagePortuguese
+ \usepackage[german,\lsBookLanguage]{babel}
+ \addto\extrasportuges{\languageshorthands{german}\useshorthands{"}}
+ \fi
+ \else
+ \usepackage[\lsBookLanguage]{babel}
+ \fi
+\fi
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Citations:
+% Citations
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[
natbib=true,
- \iflsUndecapitalize
- style=\bstpath biblatex-langsci-unified-undecap,
- \else
- style=\bstpath biblatex-langsci-unified,
- \fi
- citestyle=\bstpath langsci-authoryear-comp,
+ % \iflsUndecapitalize
+ % style=\bstpath biblatex-langsci-unified-undecap,
+ % \else
+ % style=\bstpath biblatex-langsci-unified,
+ % \fi
+ style=\bbxpath biblatex-langsci-unified,
+ citestyle=\cbxpath langsci-authoryear-comp,
+ useprefix = true, %sort von, van, de where they should appear
%refsection=chapter,
maxbibnames=99,
+ uniquename=false,
+ mincrossrefs=99,
+ maxcitenames=2,
isbn=false,
doi=false,
url=false,
eprint=false,
+ autolang=hyphen,
+ useprefix=true,
backend=\lsBiblatexBackend,
indexing=cite,
\iflsCollection\else
- toc=bib % make bibliography appear in toc
- \fi
- ]{biblatex}
+ toc=bib, % make bibliography appear in toc
+ \fi
+ datamodel=\bstpath langsci % add authauthor and autheditor as possible fields to bibtex entries
+]{biblatex}
+
+% If the user provided a shortauthor in the bibtex entry, we use the authentic author (as with the
+% authorindex package) if it is defined, otherwise we use the author.
+% This gets F/T as shorthand right and puts the guys in the index.
+
+\renewbibmacro*{citeindex}{%
+ \ifciteindex
+ {\iffieldequalstr{labelnamesource}{shortauthor} % If biblatex uses shortauthor as the label of a bibitem
+ {\ifnameundef{authauthor} % we check whether there is something in authauthor
+ {\indexnames{author}} % if not, we use author
+ {\indexnames{authauthor}}} % if yes, we use authauthor
+ {\iffieldequalstr{labelnamesource}{author} % if biblatex uses author we similarly test for
+ % authauthor and use this field
+ {\ifnameundef{authauthor}% if defined use authauthor
+ {\indexnames{author}}
+ {\indexnames{authauthor}}} % if defined use this field
+ {\iffieldequalstr{labelnamesource}{shorteditor} % same for editor
+ {\ifnameundef{autheditor}
+ {\indexnames{editor}}
+ {\indexnames{autheditor}}}
+ {\indexnames{labelname}}}}} % as a fallback we index on whatever biblatex used.
+ {}}
+
+
+%% changes of citestyle (cbx) (FIXME: documentation missing)
\renewcommand{\postnotedelim}{: }%
-\renewcommand{\multicitedelim}{\addsemicolon\space}%
+\renewcommand{\multicitedelim}{\addsemicolon\space}%
\renewcommand{\compcitedelim}{\multicitedelim}
-\DeclareFieldFormat{postnote}{#1}%
-%\renewcommand{\nameyeardelim}{ }%
-\defbibheading{references}{\chapter{References}}
-
+% \renewcommand{\nameyeardelim}{ }%
+
+%% changes of bibliography style (bbx)
+\DeclareFieldFormat{postnote}{#1}% display pages without page prefix (p., pp.)
+\DeclareBibliographyAlias{inbook}{incollection}% see https://github.com/semprag/biblatex-sp-unified/issues/35
+\DeclareFieldFormat[techreport,report,misc]{titlecase}{\MakeSentenceCase*{#1}}% techreport/report and misc are not genuinely supported by biblatex-sp-unified
+%% The note field should appear at end of an entry just before the DOI, other than with the used bibliography style. It is therefore first removed, then again restored and included together with the DOI.
+\AtEveryBibitem{%
+ \savefield*{note}{\lsnote}%
+ \clearfield{note}%
+}
+%% DOIs are handled after hyperref.
+\defbibheading{references}{\chapter{References}\sloppy}
+\defbibheading{french}{\chapter{Références bibliographiques}\sloppy}
+\defbibheading{german}{\chapter{Literaturverzeichnis}\sloppy}
+\defbibheading{portuguese}{\chapter{Referências}\sloppy}
+\defbibheading{chinese}{\chapter{参考文献}\sloppy}
+
+
+% fix \citep* et.al.
+% unclear why it was overwritten, these are the definitions from blx-natbib.def
+\renewrobustcmd*{\citet}{%
+ \@ifstar
+ {\AtNextCite{\AtEachCitekey{\defcounter{maxnames}{999}}}%
+ \textcite}
+ {\textcite}}
+
+\renewrobustcmd*{\citep}{%
+ \@ifstar
+ {\AtNextCite{\AtEachCitekey{\defcounter{maxnames}{999}}}%
+ \parencite}
+ {\parencite}}
+
+\renewrobustcmd*{\citealt}{%
+ \@ifstar
+ {\AtNextCite{%
+ \def\nameyeardelim{\addspace}%
+ \AtEachCitekey{\defcounter{maxnames}{999}}}%
+ \orgcite}
+ {\AtNextCite{\def\nameyeardelim{\addspace}}%
+ \orgcite}}
+
+\renewrobustcmd*{\citealp}{%
+ \@ifstar
+ {\AtNextCite{\AtEachCitekey{\defcounter{maxnames}{999}}}%
+ \orgcite}
+ {\orgcite}}
+
+\let\citew\citet
+
+\let\orgcite=\cite
\let\cite=\citet % in order to prevent inconsistencies between \cite and \citet
%% penalties against widows and orphans in bibliography
@@ -1299,9 +1562,10 @@ is, or will remain, accurate or appropriate.
% \def\blx@maxline{77}
% \makeatother
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Floats:
+% Floats
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1336,7 +1600,7 @@ is, or will remain, accurate or appropriate.
\usepackage{setspace}
\usepackage{caption}
-% \captionsetup{labelfont=bf}
+% \captionsetup{labelfont=bf}
\captionsetup{%
font={%
stretch=.8%
@@ -1346,9 +1610,11 @@ width=.8\textwidth
}
\setcapindent{0pt}
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Appendices:
+% Appendices
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1370,7 +1636,7 @@ width=.8\textwidth
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Indexes:
+% Indexes
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1409,13 +1675,55 @@ width=.8\textwidth
\fi
}
+\newcommand{\lsIndexTitle}{Index}
\newcommand{\lsLanguageIndexTitle}{Language index} % This can be changed according to the language.
\newcommand{\lsSubjectIndexTitle}{Subject index}
\newcommand{\lsNameIndexTitle}{Name index}
+\newcommand{\lsPrefaceTitle}{Preface}
+\newcommand{\lsAcknowledgementTitle}{Acknowledgments}
+\newcommand{\lsAbbreviationsTitle}{Abbreviations}
+\newcommand{\lsReferencesTitle}{references} % This aligns with \defbibheading
+\IfFileExists{{\localepath langsci-hyphenation-universal}}{\input{\localepath langsci-hyphenation-universal}}{}
+
+\ifx\lsBookLanguage\lsBookLanguageFrench
+\renewcommand{\lsIndexTitle}{Index}
+\renewcommand{\lsNameIndexTitle}{Index des auteurs cités}
+\renewcommand{\lsSubjectIndexTitle}{Index des termes}
+\renewcommand{\lsLanguageIndexTitle}{Index des langues}
+\renewcommand{\lsPrefaceTitle}{Préface}
+\renewcommand{\lsAcknowledgementTitle}{Remerciements}
+\renewcommand{\lsAbbreviationsTitle}{Liste des abréviations utilisées dans les gloses des exemples}
+\renewcommand{\lsReferencesTitle}{french}
+\IfFileExists{{\localepath langsci-hyphenation-fr}}{\input{\localepath langsci-hyphenation-fr}}{}
+\fi
+
+\ifx\lsBookLanguage\lsBookLanguageGerman
+\renewcommand{\lsIndexTitle}{Register}
+\renewcommand{\lsNameIndexTitle}{Autorenregister}
+\renewcommand{\lsSubjectIndexTitle}{Sachregister}
+\renewcommand{\lsLanguageIndexTitle}{Sprachregister}
+\renewcommand{\lsPrefaceTitle}{Vorwort}
+\renewcommand{\lsAcknowledgementTitle}{Danksagung}
+\renewcommand{\lsAbbreviationsTitle}{Abkürzungsverzeichnis}
+\renewcommand{\lsReferencesTitle}{german}
+\IfFileExists{{\localepath langsci-hyphenation-de}}{\input{\localepath langsci-hyphenation-de}}{}
+\fi
+
+\ifx\lsBookLanguage\lsBookLanguagePortuguese
+\renewcommand{\lsIndexTitle}{Índices}
+\renewcommand{\lsNameIndexTitle}{Índice remissivo de autores citados}
+\renewcommand{\lsSubjectIndexTitle}{Índice remissivo temático}
+\renewcommand{\lsLanguageIndexTitle}{Índice remissivo de línguas}
+\renewcommand{\lsPrefaceTitle}{Prefácio}
+\renewcommand{\lsAcknowledgementTitle}{Agradecimentos}
+\renewcommand{\lsAbbreviationsTitle}{\colorbox{red}{Translation info for Abbv missing}}
+\renewcommand{\lsReferencesTitle}{portugese}
+\IfFileExists{{\localepath langsci-hyphenation-pt}}{\input{\localepath langsci-hyphenation-pt}}{}
+\fi
\AtBeginDocument{
\makeindex
- \newindex{lan}{ldx}{lnd}{\lsLanguageIndexTitle}
+ \newindex{lan}{ldx}{lnd}{\lsLanguageIndexTitle}
\newindex{sbj}{sdx}{snd}{\lsSubjectIndexTitle}
\renewindex{default}{adx}{and}{\lsNameIndexTitle} %biblatex can only deal with the default index
% \newindex{wrd}{wdx}{wnd}{Expression index}
@@ -1480,9 +1788,9 @@ width=.8\textwidth
\RequirePackage{soul}
% \RequirePackage[noadjust]{marginnote}
\renewcommand{\marginpar}{\marginnote}
- \let\isold\is
- \let\ilold\il
- \let\iaold\ia
+ \let\isold\is
+ \let\ilold\il
+ \let\iaold\ia
\renewcommand{\isi}[1]{\sethlcolor{green}\hl{#1}\isold{#1}}
\renewcommand{\is}[1]{{\tikzstyle{notestyleraw} += [text width=1.5cm]\todo[color=green,size=\scriptsize]{\tiny#1}\isold{#1}}}
\renewcommand{\ili}[1]{\sethlcolor{yellow}\hl{#1}\ilold{#1}}
@@ -1494,7 +1802,7 @@ width=.8\textwidth
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Hyperref:
+% Hyperref
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1523,11 +1831,25 @@ width=.8\textwidth
\iflsBiblatex
\renewbibmacro*{finentry}{\finentry
\iffieldundef{url}{}{ \url{\thefield{url}}\iffieldundef{urlday}{}{, accessed \thefield{urlyear}-\thefield{urlmonth}-\thefield{urlday}}.}
+ \restorefield{note}{\lsnote}
+ \iffieldundef{note}{}{\addspace{\thefield{note}\addperiod}}
\iffieldundef{doi}{}{ {\color{lsGuidelinesGray}\doi{\thefield{doi}}}}
}
%\DeclareFieldFormat{doi}{{\color{lsGuidelinesGray}\doi{#1}}}
\fi
+%% autoref (part of hyperref)
+\ifx\lsBookLanguage\lsBookLanguageEnglish
+\renewcommand{\partautorefname}{Part}%
+\renewcommand{\chapterautorefname}{Chapter}%
+\renewcommand{\sectionautorefname}{Section}%
+\renewcommand{\subsectionautorefname}{Section}%
+\renewcommand{\subsubsectionautorefname}{Section}%
+\renewcommand{\figureautorefname}{Figure}%
+\renewcommand{\tableautorefname}{Table}%
+\renewcommand{\Hfootnoteautorefname}{Footnote}%
+\fi
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -1542,9 +1864,9 @@ width=.8\textwidth
%% inside \author:
-\renewcommand{\and}{}
+\renewcommand{\and}{}
\newcommand{\lastand}{}
-\newcommand{\affiliation}[1]{}
+\newcommand{\affiliation}[1]{}
%% to be used below chapter titles
\newcommand{\chaptersubtitle}[1]{
@@ -1554,19 +1876,19 @@ width=.8\textwidth
\@afterindentfalse
\@afterheading
}
-
+
\iflsCollection
\iflsBiblatex\else
\ClassError{langsci/langscibook}{Collection option not compatible with plain BibTeX. Please use biblatex option}{}
\fi
-
+
\AtBeginDocument{ % for the citation in the footer
\onlyAuthor
\renewcommand{\newlineCover}{}
- \renewcommand{\newlineSpine}{}
- \edef\lsCollectionTitle{\@title} % \edef immediately expands \@title
+ \renewcommand{\newlineSpine}{}
+ \edef\lsCollectionTitle{\@title\ifx\@subtitle\empty\else{: \@subtitle}\fi} % \edef immediately expands \@title
\edef\lsCollectionEditor{\@author}
\addbibresource{collection_tmp.bib}
\newwrite\tempfile % open temporary bib file
@@ -1576,16 +1898,16 @@ width=.8\textwidth
%% customize \tableofcontents
\renewcommand{\@dotsep}{2.5} % space between dots
-\renewcommand{\@tocrmarg}{1.5em} % right margin for leader
+\renewcommand{\@tocrmarg}{1.5em} % right margin for leader
\renewcommand{\@pnumwidth}{1.5em} % width of page numbers
\usepackage{tocstyle}
\usetocstyle{standard} %\usetocstyle{allwithdot}
-\settocfeature[toc]{raggedhook}{\raggedright}
+\settocfeature[toc]{raggedhook}{\raggedright}
\iflsCollectionTOCLong\else
\setcounter{tocdepth}{0}\fi % show only parts and chapters
\settocstylefeature[-1]{pagenumberbox}{\csname @gobble\endcsname} % parts without page number
\settocstylefeature[-1]{leaders}{\hfill} % parts without dots#
-
+
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
@@ -1616,16 +1938,16 @@ width=.8\textwidth
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
- \renewcommand{\lsCollectionPaperCitationText}{\fullciteFooter{#1}}
-
+ \renewcommand{\lsCollectionPaperCitationText}{\fullciteFooter{#1}}
+
\include{#1}%
\addtocounter{page}{-1}
\edef\lsCollectionPaperLastPage{\thepage} % \lsCollectionPaperFirstPage is defined in \lsPaper
\addtocounter{page}{1}
-
+
%%% for citation in footer
%% preprocessing of author/editor names
- \onlyAuthor
+ \onlyAuthor
\renewcommand{\newlineCover}{}
\renewcommand{\newlineSpine}{}
\renewcommand{\newlineTOC}{}
@@ -1636,68 +1958,104 @@ width=.8\textwidth
%% write bib entry to file
%% FIXME: the publisher field needs a final period, since this is not provided by \fullciteFooter together with DOIs.
- \immediate\write\tempfile{@incollection{#1,author={\authorTemp},title={{\@title}},booktitle={{\lsCollectionTitle}},editor={\editorTemp},publisher={Language Science Press.},Address={Berlin},year=\lsYear,pages={\lsCollectionPaperFirstPage --\lsCollectionPaperLastPage},doi={\lsChapterDOI},options={skipbib=true,skiplab=true}}}
-
+ \immediate\write\tempfile{@incollection{#1,author={\authorTemp},title={{\lsCollectionPaperFooterTitle}},booktitle={{\lsCollectionTitle}},editor={\editorTemp},publisher={Language Science Press.},Address={Berlin},year={\,\lsYear},pages={\lsCollectionPaperFirstPage --\lsCollectionPaperLastPage},doi={\lsChapterDOI},options={skipbib=true,skiplab=true}}}
+
\end{refsection}
\end{collectionpaper}}
\fi
-
-
\newcommand{\onlyAuthor}{% % collection paper
- \renewcommand{\and}{, }%
- \renewcommand{\lastand}{ \& }%
+ \renewcommand{\and}{, }%
+ \renewcommand{\lastand}{ \& }%
\renewcommand{\affiliation}[1]{}
}
-
+
\newcommand{\AuthorAffiliation}{
- \renewcommand{\and}{\newline\newline}
- \renewcommand{\lastand}{\newline\newline}
+ \renewcommand{\and}{\newline\newline}
+ \renewcommand{\lastand}{\newline\newline}
\renewcommand{\affiliation}[1]{\\[0.5ex]{\normalsize ##1}}}
\newcommand{\lsCollectionPaperHeaderAuthor}{{%
\renewcommand{\newlineCover}{}%
\renewcommand{\newlineTOC}{}%
\onlyAuthor\@author}}
-
+
\newcommand{\lsCollectionPaperHeaderTitle}{%
\renewcommand{\newlineCover}{}
\renewcommand{\newlineTOC}{}
\iflsCollectionChapter%
\thechapter\hspace{0.5em}\fi
\@title}
-
+
\newcommand{\lsCollectionPaperTOC}{{%
\iflsCollectionChapter%
\protect\numberline{\thechapter}\fi
- \@title\newline{\normalfont\@author}}}
-
+ \@title\ \newline{\normalfont\@author}}} % space between \@title and \newline is needed for bookmarks
+
\newcommand{\lsCollectionPaperTitle}{{%
\renewcommand{\newlineTOC}{}
- \renewcommand{\newlineCover}{\\}
+ \renewcommand{\newlineCover}{\\}
% \\[-1\baselineskip]
% \vspace*{-2\baselineskip}
\renewcommand{\chapterheadstartvskip}{}
{\LARGE \noindent \hspace*{-.7cm} Chapter \thechapter}\\ %there must be a better way to undo this length than a hard value
- \bigskip
+ \bigskip
+ \@title}}
+
+\newcommand{\lsCollectionPaperFooterTitle}{\@title}
+
+\newcommand{\lsCollectionPaperFrontmatterMode}{% %%% Sometimes, chapters like prefaces appear in edited volumes that need special treatment in their headers and TOC
+ \renewcommand{\lsCollectionPaperTitle}{{%
+ \renewcommand{\newlineTOC}{}
+ \renewcommand{\newlineCover}{\\}
+ \\[-1\baselineskip]
+ \noindent{\LARGE ~}\\
+ \bigskip
+ \noindent\@title}}
+
+ \renewcommand{\lsCollectionPaperTOC}{{%
+ \iflsCollectionChapter%
+ \protect\numberline{~}\fi
+ \@title\ \newline{\normalfont\@author}}}
+}
+
+\newcommand{\lsCollectionPaperMainmatterMode}{% %%% This resets the changes done by FrontmatterMode
+ \renewcommand{\lsCollectionPaperTitle}{{%
+ \renewcommand{\newlineTOC}{}
+ \renewcommand{\newlineCover}{\\}
+ \\[-1\baselineskip]
+% \vspace*{-2\baselineskip}
+ \noindent{\LARGE Chapter \thechapter}\\
+ \bigskip
\@title}}
-
+
+ \renewcommand{\lsCollectionPaperTOC}{{%
+ \iflsCollectionChapter%
+ \protect\numberline{\thechapter}\fi
+ \@title\ \newline{\normalfont\@author}}}}
+
\newcommand{\lsCollectionPaperAuthor}{{%
\renewcommand{\newlineTOC}{}
\renewcommand{\newlineCover}{\\[0.5ex]}
\AuthorAffiliation\Large\@author}}
-
+
\newcommand{\lsCollectionPaperCitation}{\scalebox{1.2}{
\includegraphics{\logopath langsci_spinelogo_nocolor.pdf}}%
% \hspace{0.8em}%
\hfill%
\parbox[b]{.87\textwidth}{\linespread{0.8}\lsChapterFooterSize\normalfont\lsCollectionPaperCitationText}}
-
+\ifx\lsOutput\lsOutputPaper % only if output=paper
+ \renewcommand{\lsCollectionPaperCitation}{Change with \string\papernote}
+\fi
+
\newcommand{\lsCollectionPaperCitationText}{\string\lsCollectionPaperCitationText.}
+\newcommand{\papernote}[1]{
+ \renewcommand{\lsCollectionPaperCitation}{#1}}
+
\newcommand{\lsPaper}{
\renewcommand{\maketitle}{
- \addtocounter{chapter}{1}
+ \refstepcounter{chapter}
\addchap*{\lsCollectionPaperTitle}
\global\edef\lsCollectionPaperFirstPage{\thepage} % for citation in footer
\onlyAuthor
@@ -1709,13 +2067,13 @@ width=.8\textwidth
\lsCollectionPaperAuthor%
\vspace*{\baselineskip}%
\ifx\@epigram\empty%
- \else {\epigraph{\@epigram\\[-5ex]}{\@epigramsource}%
- \epigram{}\epigramsource{}}%
- \fi%
+ \else {\epigraph{\@epigram\\[-5ex]}{\@epigramsource}%
+ \epigram{}\epigramsource{}}%
+ \fi%
\begin{quote}
\small\lsCollectionPaperAbstract
\end{quote}
- }
+ }
\renewcommand*{\thesection}{\arabic{section}}
\setcounter{section}{0}
@@ -1729,20 +2087,21 @@ width=.8\textwidth
}
-%writeout page numbers for separation of chapters
+%writeout page numbers for separation of chapters
% \usepackage{newfile}
% \newoutputstream{pages}
% \openoutputfile{\jobname.pgs}{pages}
% \newcommand{\writechapterpages}{\addtostream{pages}{\thepage}}
-%
+%
% \AtEndDocument{
% \closeoutputstream{pages}
% }
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Miscellaneous:
+% Miscellaneous
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1752,9 +2111,15 @@ width=.8\textwidth
\newlength{\LSPTmp}
\newcommand*{\hspaceThis}[1]{\settowidth{\LSPTmp}{#1}\hspace*{\LSPTmp}}
-\iflsNoBabel
- \else
- \usepackage[english]{babel}
-\fi
+% no this does add vertical space instead of horizontal St. Mü. 04.03.2018
+% \newcommand*{\hspaceThis}[1]{\hphantom{#1}} %should be equivalent
+
+% in this example
+%% \eal
+%% \ex \hspaceThis{*~}The boy who is running fast can jump high. $\to$\\
+%% {}* Is the boy who running fast can jump high?
+%% \ex \hspaceThis{*~}The boy who can run fast can jump high. $\to$\\
+%% {}* Can the boy who run fast can jump high?
+%% \zl
-\endinput \ No newline at end of file
+\endinput