← All templates

Glossa (glossa)

Glossa's own glossa class, BibTeX style and biblatex styles; the sample is the journal's submission guidelines typeset in the class, with glossed examples, trees and a sample bibliography.

Create an account to use this
Category
Journal
Document class
glossa (glossa.cls) — ships with TeX Live
Workflow
Journal manuscript — submissions and revision rounds
Author
Glossa: a journal of general linguistics (Open Library of Humanities)
Source
Glossa: a journal of general linguistics (Open Library of Humanities)
Licence
glossa.cls: LaTeX Project Public License. The sample text is Glossa: a journal of general linguistics (Open Library of Humanities)'s, provided for authors preparing a submission.

These are the publisher’s own files. This project starts from Glossa: a journal of general linguistics (Open Library of Humanities)’s package for this publication — their manuscript, their glossa.cls, their bibliography style — so what compiles here is what they would have given you.

Glossa: a journal of general linguistics (Open Library of Humanities) serves this exact file to Glossa: a journal of general linguistics. Check Glossa: a journal of general linguistics (Open Library of Humanities)’s author pages for the current instructions.

Where this differs from the publisher’s download.

  • Note: The sample selects the Charis font (class option charis), which needs XeLaTeX. Without that option the class uses Times (mathptmx) and builds with pdfLaTeX. Use natbib/BibTeX by default; the biblatex option needs Biber.

What you get

  • LICENSE.md · 844 B
  • biblatex-gl.bbx · 22 KB
  • cgloss.sty · 7 KB
  • gl-authoryear-comp.cbx · 11 KB
  • glossa-template.tex — the file that is compiled · 43 KB
  • glossa.bst · 29 KB
  • glossa.cls · 21 KB
  • glossa.png · 256 KB
  • sample.bib · 7 KB

These become your files. Editing them afterwards changes your project and nothing else — a project owns its files from the moment it is made.

Journals using this template

Source

LICENSE.md · 844 B
LICENSE

Copyright 2016 Guido Vanden Wyngaerd

This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License.
The latest version of this license is in
   http://www.latex-project.org/lppl.txt
and version 1.3 or later is part of all distributions of LaTeX
version 2005/12/01 or later.

This work has the LPPL maintenance status `maintained'.
 
The Current Maintainer of this work is 
Guido Vanden Wyngaerd ([email protected]).

This work consists of the files 
 glossa.cls
 glossa.bst
 gl-authoryear-comp.cbx
 biblatex-gl.bbx
 glossa-template.tex
 glossa.png

The files of the work are derived from the Semantics & Pragmatics style files
by Kai von Fintel, Christopher Potts, and Chung-chieh Shan
All changes are documented on the github repository 
https://github.com/guidovw/Glossalatex.
biblatex-gl.bbx · 22 KB
% biblatex-gl.bbx
% Copyright 2016 Guido Vanden Wyngaerd
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
% 
% The Current Maintainer of this work is 
% Guido Vanden Wyngaerd ([email protected]).
%
% This work consists of the files 
% glossa.cls
% glossa.bst
% gl-authoryear-comp.cbx
% biblatex-gl.bbx
% glossa-template.tex
% glossa.png
%
% The files of the work are derived from the Semantics & Pragmatics style files
% by Kai von Fintel, Christopher Potts, and Chung-chieh Shan
% All changes are documented on the github repository 
% https://github.com/guidovw/Glossalatex.

%\ProvidesFile{biblatex-gl.bbx}

% For backward compatibility: choose labeldate or labeldateparts depending on the biblatex version

\@ifpackagelater{biblatex}{2016/09/09}
{%
  \ExecuteBibliographyOptions{labeldateparts} % as of biblatex 3.5 (2016/09/10)
}
{%
  \ExecuteBibliographyOptions{labeldate}
  \def\printlabeldateextra{\printdateextralabel}
}%

% biblatex has a "useprefix" option, which makes "von" count for alphabetization; the Glossa Stylesheet wants that, so it is important that this option be enabled (even if an author tries to set it to false)
% The Unified Style Sheet wants abbreviated "ed(s)", "edn". But using the abbreviate option also abbreviates the names of months. But then dateabbrev=false restores the long names of months

\ExecuteBibliographyOptions{sorting=nyt,abbreviate,dateabbrev=false,useprefix=true}
\RequireBibliographyStyle{authoryear}
\ExecuteBibliographyOptions{dashed=false,isbn=false}

% [GVW] 1/7/2021: changed the internal order of names to last-first throughout, and & between all names in name lists, in accordance with Haspelmath's `The Generic Style Rules for Linguistics'.

\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{default}{family-given}
\renewcommand*{\nametitledelim}{\addperiod\space} % period after the year


% biblatex by default calls biblatex.def, we add to this authoryear.bbx, which in turn loads standard.bbx. So, sp-biblatex.bbx is built on top of those styles; once authoryear.bbx is loaded, we tell it not to put in dashes for repeated authors (in accordance with the Unified Stylesheet)

% If an @article entry contains Issuetitle and Editor information, we might not want to print it. The Unified Style Sheet does not offer explicit guidelines on this, but they don't have any examples where either of these pieces of information are actually printed. Therefore, we can offer an option for the user to decide whether to print it. The default will be not to print it since the Unified Style Sheet does not have examples where this information is printed. The user can print it by setting `issueandeditor=true` as a package option when biblatex is called.

\newtoggle{issueandeditor}
\DeclareBibliographyOption{issueandeditor}[false]{%
  \settoggle{issueandeditor}{#1}}

% Formatting directives for name lists
% ------------------------------------------------------------------
%
% In biblatex.def, there are name formats defined: given-family, family-given, family-given/given-family. They could be simplified (we don't need provisions for using initials only, since the Unified Style doesn't do that), but since biblatex.def is loaded automatically, there's no point. The name formats call bibmacros that figure out how to order the internal of name components. These are re-defined here to make sure that "von" is treated as part of the family name (it also counts for sorting -- which is controlled by the \useprefix package option)
% name:last is used to produce citation labels
% name:last-first is used to produce the first author's name listing in the alphabetical bibliography

% Also moved the Jr part to after the given name and inserted another comma, because the Unified Stylesheet disagrees with standard.bbx: it wants "Jr." not to be treated as part of the family name.

% The macros here get 4 arguments passed to them. They are: #1 family name, #2 given name, #3 von, #4 Jr.

% [GVW] 1/7/2021 commented out lines 49-68 since they seemed to have no effect

%\renewbibmacro*{name:last}[4]{%				
%     \usebibmacro{name:delim}{#3#1}%
%     \usebibmacro{name:hook}{#3#1}%
%     \ifblank{#3}
%       {}
%       {\ifcapital
%          {\mkbibnameprefix{\MakeCapital{#3}}\isdot}
%          {\mkbibnameprefix{#3}\isdot}%
%        \ifpunctmark{'}{}{\bibnamedelimc}}%
%  \mkbibnamelast{#1}}%
%  
%\renewbibmacro*{name:last-first}[4]{%      
%     \usebibmacro{name:delim}{#3#1}%
%     \usebibmacro{name:hook}{#3#1}%
%     \ifblank{#3}{}{%
%	   \mkbibnameprefix{#3}\isdot%
%       \ifpunctmark{'}{}{\bibnamedelimc}}%
%     \mkbibnamelast{#1}\isdot
%     \ifblank{#2}{}{\addcomma\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
%     \ifblank{#4}{}{\addcomma\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Various bibmacros used in producing the bibliography
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewbibmacro*{date+extrayear}{%
  \iffieldundef{labelyear}
    {}
    {\printtext{\printlabeldateextra}}}%     Took out the parentheses around the year

\renewbibmacro*{author}{%
  \ifboolexpr{
    test \ifuseauthor
    and
    not test {\ifnameundef{author}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\usebibmacro{bbx:savehash}%
        \printnames{author}%
  \iffieldundef{authortype}
    {\newunit}%                               period instead of space
    {\setunit{\addcomma\space}}}%
     \iffieldundef{authortype}
       {}
       {\usebibmacro{authorstrg}%
  \newunit}}%                                 period instead of space
    {\global\undef89
     \usebibmacro{labeltitle}%
     \newunit}%                               period instead of space
  \usebibmacro{date+extrayear}}

\renewbibmacro*{editor}{%
  \usebibmacro{bbx:editor}{editorstrg}}
\renewbibmacro*{editor+others}{%
  \usebibmacro{bbx:editor}{editor+othersstrg}}
\renewbibmacro*{bbx:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{editor}%
  \setunit{\addspace}%
  \usebibmacro{bbx:savehash}}%
     \printtext[parens]{\usebibmacro{#1}}%
     \clearname{editor}%
     \newunit}%                                         period instead of space
    {\global\undef\bbx@lasthash
     \usebibmacro{labeltitle}%
     \newunit}%                                         period instead of space
  \usebibmacro{date+extrayear}}

\renewbibmacro*{translator}{%
  \usebibmacro{bbx:translator}{translatorstrg}}
\renewbibmacro*{translator+others}{%
  \usebibmacro{bbx:translator}{translator+othersstrg}}
\renewbibmacro*{bbx:translator}[1]{%
  \ifboolexpr{
    test \ifusetranslator
    and
    not test {\ifnameundef{translator}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{translator}%
  \setunit{\addcomma\space}%
  \usebibmacro{bbx:savehash}}%
     \usebibmacro{translator+othersstrg}%
     \clearname{translator}%
     \newunit}%                                     period instead of space
    {\global\undef\bbx@lasthash
     \usebibmacro{labeltitle}%
     \newunit}%                                     period instead of space
  \usebibmacro{date+extrayear}}

\renewbibmacro*{journal}{%
  \iffieldundef{journaltitle}
    {}
    {\printtext{%
       \printfield{journaltitle}%
       \setunit{\subtitlepunct}%
       \printfield{journalsubtitle}}}}

\newbibmacro*{journal+issuetitle+editor}{%
  \usebibmacro{journal}%
  \setunit*{\addspace}%
  \iffieldundef{series}
    {}
    {\newunit
     \printfield{series}%
     \setunit{\addspace}}%
  \usebibmacro{volume+number+eid}%
  \iftoggle{issueandeditor}
    {\setunit{\addspace}%
     \usebibmacro{issue+date}%
     \setunit{\addcolon\space}%
     \usebibmacro{issue}
     % The following three lines were originally not included inside of
     % the journal+issuetitle bibmacro. They have been moved inside of
     % this macro in order to allow them to be controlled by the toggle
     % `issuetitle` that is defined at the top of this style file.
     \newunit
     \usebibmacro{byeditor+others}%
     \newunit}
    {}%
  \newunit}

% The next three bib macros are for printing the maintitle and booktitle fields
% of an @inproceedings entry with an ISSN as an article in accordance with the
% unified style sheet guidelines.
% 1. maintitle
\newbibmacro*{unified:proc-as-article:maintitle}{%
  \ifboolexpr{
    test {\iffieldundef{maintitle}}
    and
    test {\iffieldundef{mainsubtitle}}
  }
    {}
    {\printtext{%
       \printfield[maintitle]{maintitle}%
       \setunit{\subtitlepunct}%
       \printfield[maintitle]{mainsubtitle}}%
     \newunit}%
  \printfield{maintitleaddon}}

% 2. booktitle
\newbibmacro*{unified:proc-as-article:booktitle}{%
  \ifboolexpr{
    test {\iffieldundef{booktitle}}
    and
    test {\iffieldundef{booksubtitle}}
  }
    {}
    {\printtext{%
       \printfield[booktitle]{booktitle}%
       \setunit{\subtitlepunct}%
       \printfield[booktitle]{booksubtitle}}%
     \newunit}%
  \printfield{booktitleaddon}}

% 3. maintitle+booktitle
\newbibmacro*{unified:proc-as-article:maintitle+booktitle}{%
  \iffieldundef{maintitle}
    {}
    {\usebibmacro{unified:proc-as-article:maintitle}%
     \newunit\newblock}
  \usebibmacro{unified:proc-as-article:booktitle}%
  \setunit{\addspace}}

\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
%  \setunit*{\adddot}%
  \printfield[parens]{number}%        parentheses instead of dot before issue number
  \setunit{\addcomma\space}%
  \printfield{eid}}

% This is for printing the volume field of a proceedings with an ISSN as an article
% in accordance with the unified style sheet guidelines. It depends on the declared
% field format below.
\newbibmacro*{unified:proc-as-article:volume+number+eid}{%
  \printfield[volume:unified:proc-as-article]{volume}%
  \printfield[parens]{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

% Because of the weird format "3 May, 2007" specified in the Unified Stylesheet for URL access dates, we need a special way to format the urldate
  
\newcommand{\mkbibdateunified}[3]{% Year-Month-Day as input --> xx Month, Year
  \iffieldundef{#3}
    {}
    {\stripzeros{\thefield{#3}}%
     \nobreakspace}%
  \iffieldundef{#2}
    {\iffieldundef{#1}%
      {}%
      {\stripzeros{\thefield{#1}}}}%
    {\mkbibmonth{\thefield{#2}}%
     \iffieldundef{#1}%
      {}%
      {\iffieldundef{#3}%
           {}%
           {,}%
         \space\stripzeros{\thefield{#1}}}%
    }%
  }% 

\renewbibmacro*{url+urldate}{%
  \printfield{url}%
  \iffieldundef{urlyear}%
  	{}%
  	{\setunit*{\addspace}%
     \printtext[parens]{\mkbibdateunified{urlyear}{urlmonth}{urlday}}}%
  }

\renewbibmacro*{series+number}{%
  \iffieldundef{series}
    {}
    {\printtext[parens]{%
      \printfield{series}%
      \setunit*{\addspace}%
      \printfield{number}}%
    }}

\renewbibmacro*{byeditor+others}{%
  \ifnameundef{editor}
    {}
    {\printnames[byeditor]{editor}%
     \setunit{\addspace}%
     \printtext[parens]{\usebibmacro{editor+othersstrg}}%  putting (ed.) or (eds.) after editors of books
     \clearname{editor}%
     \newunit}%
  \usebibmacro{byeditorx}%
  \usebibmacro{bytranslator+others}}

\renewbibmacro*{chapter+pages}{%
  \iffieldundef{chapter}%
  {}%
  {\printfield{chapter}%
  \setunit{\addcomma\space}}%
  \printfield{pages}%
  \newunit}

\renewbibmacro*{note+pages}{%
  \iffieldundef{note}%
  {}%
  {\printfield{note}%
  \setunit{\addcomma\space}}%
  \printfield{pages}%
  \newunit}

\newbibmacro*{institution+location+type+date}{%
  \printlist{location}%
  \iflistundef{institution}
    {}
    {\setunit*{\addcolon\space}}%
  \printlist{institution}%
  \setunit{\addspace}%
  \printfield{type}%
  \setunit*{\addcomma\space}%
  \usebibmacro{date}%
  \newunit}

% The following is a hack to satisfy the Unified Stylesheet's decision to give the edition right after the OED as used as a sortlabel.

\renewbibmacro*{labeltitle}{%
  \iffieldundef{label}
    {\iffieldundef{shorttitle}
       {\printfield{title}%
        \setunit{\addcomma\space}%     Here it comes, preparing for the edition
        \printfield{edition}%          Here's the edition
        \clearfield{title}%
        \clearfield{edition}}%         Clearing the edition field, so it's not printed again below
       {\printfield[title]{shorttitle}}}
    {\printfield{label}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Punctuation & formatting
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% This gets rid of the Oxford comma in name lists and uses the ampersand rather than "and":

\renewcommand*{\finalnamedelim}{\addspace\&\addspace} %delimiter of the final name    
\renewcommand*{\multinamedelim}{\addspace\&\addspace} %[GVW] 1/7/2021: delimiter of the non-final name(s) in lists with more than two names is no different
\renewcommand*{\finallistdelim}{\addspace\&\addspace}   

% no colon after "In" in incollection entries (overriding biblatex.def):

\renewcommand{\intitlepunct}{\addspace}  

\renewcommand{\subtitlepunct}{\addcolon\space}
\renewcommand*{\bibpagespunct}{\newunitpunct}  % No comma before pages, just the usual new unit period

\DefineBibliographyStrings{english}{%
  edition          = {edn\adddot},
  phdthesis        = {dissertation},
}

% basically everything is in sentence case, other than journals and book series (recurring titles)
\DeclareFieldFormat[article,book,thesis,incollection,unpublished,inproceedings]{titlecase}{\MakeSentenceCase*{#1}}%

% No quotes around titles
\DeclareFieldFormat[article,inbook,incollection,inproceedings,patent,thesis,unpublished]{title}{#1}

% Just like book titles, thesis titles are in italics
\DeclareFieldFormat[thesis]{title}{\mkbibemph{#1}}

\DeclareFieldFormat{pages}{#1}     % no pp. prefix, took \mkpageprefix out [kvf]
\DeclareFieldFormat{doi}{%
  \ifhyperref
    {\href{https://doi.org/#1}{\nolinkurl{https://doi.org/#1}}}
    {\nolinkurl{https://doi.org/#1}}}
\DeclareFieldFormat{url}{\url{#1}}

% This is for printing the volume field of a proceedings with an ISSN as an article
% in accordance with the unified style sheet guidelines
\DeclareFieldFormat{volume:unified:proc-as-article}{#1}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The bibliography drivers, specifying the formats of each type of entry in the bibliography
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% First, the entry types used in the Unified Test Bibliography. Could rely on standard.bbx for all others as a fallback.

% For the article type, the only departure from standard.bbx is that 
% we don't use a literal "In: " before the journal title; other formatting
% departures are done in the format specs and bibmacros

\DeclareBibliographyDriver{article}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\nametitledelim}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{bytranslator+others}%
  \newunit\newblock
  \printfield{version}%
  \newunit\newblock
% \usebibmacro{in:}%                         We don't use "In: " before journal titles
  \usebibmacro{journal+issuetitle+editor}%
  \newblock%                          \newblock ensures period before pages
  \usebibmacro{note+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{issn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}

\DeclareBibliographyDriver{book}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\nametitledelim}\newblock
  \usebibmacro{maintitle+title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{edition}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit
  \printfield{volumes}%
  \setunit{\addspace}%  crucial difference from standard.bbx: space and then (Series + number)
  \usebibmacro{series+number}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}

\DeclareBibliographyAlias{incollection}{inproceedings}

% Given the guidelines in the unified style sheet, we should print conference
% proceedings and working papers as @article's just in case the publication has
% an ISSN. So, rather than have users handle this in the database by changing the
% entry type, we can implement this by checking if the inproceedings entry has an
% ISSN. If the field is undefined, the driver will do what driver did for 
% @inproceedings entries as of 512f11657199a6044f7663da454f3eac338bdbd5
% except that \printlist{organization} and \newunit have been removed.
% On the other hand, if the ISSN field is not undefined, then we will do largely
% the exact same thing that we do in the @article driver, except that we use the
% two macros \usebibmacro{unified:proc-as-article:maintitle+booktitle} and 
% \usebibmacro{unified:proc-as-article:volume+number+eid} instead of
% \usebibmacro{journal+issuetitle} and except that \usebibmacro{byeditor+others}
% has been removed so as to ensure that the editors are not listed even if they
% are present in the database.
\DeclareBibliographyDriver{inproceedings}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \iffieldundef{issn}
    {\usebibmacro{author/translator+others}%
     \setunit{\nametitledelim}\newblock
     \usebibmacro{title}%
     \newunit
     \printlist{language}%
     \newunit\newblock
     \usebibmacro{byauthor}%
     \newunit\newblock
     \usebibmacro{in:}%
     \ifnameundef{editor}
       {\setunit{\addspace}}
       {\usebibmacro{byeditor+others}\setunit{\addcomma\space}}
     \usebibmacro{maintitle+booktitle}%
     \setunit{\addcomma\space}
     \printfield{edition}%
     \setunit{\addcomma\space}
     \iffieldundef{maintitle}
       {\printfield{volume}%
        \printfield{part}}
       {}%
     \setunit{\addcomma\space}
     \printfield{volumes}%
     \setunit{\addspace}%
     \usebibmacro{series+number}%
     \setunit{\addcomma\space}
     \usebibmacro{chapter+pages}%
     \newunit\newblock
     \printfield{note}%
     \newunit\newblock
     \usebibmacro{publisher+location+date}%
     \newunit\newblock
     \iftoggle{bbx:isbn}
       {\printfield{isbn}}
       {}%
     \newunit\newblock
     \usebibmacro{doi+eprint+url}%
     \newunit\newblock
     \usebibmacro{addendum+pubstate}%
     \setunit{\bibpagerefpunct}\newblock
     \usebibmacro{pageref}%
     \newunit\newblock
     \iftoggle{bbx:related}
       {\usebibmacro{related:init}%
        \usebibmacro{related}}
       {}}
    {\usebibmacro{author/translator+others}%
     \setunit{\nametitledelim}\newblock
     \usebibmacro{title}%
     \newunit
     \printlist{language}%
     \newunit\newblock
     \usebibmacro{byauthor}%
     \newunit\newblock
     \usebibmacro{bytranslator+others}%
     \newunit\newblock
     \printfield{version}%
     \newunit\newblock
     \usebibmacro{unified:proc-as-article:maintitle+booktitle}%
     \usebibmacro{unified:proc-as-article:volume+number+eid}
     \newunit\newblock%                           \newblock ensures period before pages
     \usebibmacro{note+pages}%
     \newunit\newblock
     \iftoggle{bbx:isbn}
       {\printfield{issn}}
       {}%
     \newunit\newblock
     \usebibmacro{doi+eprint+url}%
     \newunit\newblock
     \usebibmacro{addendum+pubstate}%
     \setunit{\bibpagerefpunct}\newblock
     \usebibmacro{pageref}%
     \newunit\newblock
     \iftoggle{bbx:related}
       {\usebibmacro{related:init}%
        \usebibmacro{related}}
       {}}
  \usebibmacro{finentry}}
 
\DeclareBibliographyDriver{thesis}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\nametitledelim}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{institution+location+type+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}

\DeclareBibliographyDriver{unpublished}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\nametitledelim}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{howpublished}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{location+date}%
  \newunit\newblock
  \iftoggle{bbx:url}
    {\usebibmacro{url+urldate}}
    {}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}
cgloss.sty · 7 KB
% -*- LaTeX -*-

% Modified version of cgloss4e.sty.  Hacked and renamed cgloss.sty
% by Alexis Dimitriadis ([email protected]) 

% Following borrows from Covington's style files inspired by Midnight by M.
% de Groot, adapted to be used with gb4e.sty: examples beginning with \ex can
% contain glosses directly. Default is
% Linguistic Inquiry style with all lines in \rm; to change a line (eg. to
% \it for a particular journal, change the appropriate line: e.g.,
% \let\eachwordone=\rm in a copy of this file. Note that it will NOT work
% to put \it before the line as the words are parsed separately.

% Use \singlegloss to force single-spaced glosses even in double-space
% environments. Works also in footnotes (^M as delimiter replaced by
% \\)---hpk
%

% Changes by Alexis Dimitriadis 
%
% Removed flushleft environment and initial vskip to make macros usable
% on the same line with earlier and/or later text, e.g.,
% \item Q: \gll ... \\
%               ... \\   \hfill (Greek)
%    \trans Q: `...' 
% Note: Text following the gloss will appear on line one of the example;
% To get a line break, insert one manually with \\ or use \trans or \glt.
% (\gln does not end the line, since it was already the
% case in cgloss4e that a translation must be ended with a line break).
%
% Modified \glt to keep translation on the same page as the text.

% BUGS: does not work very gracefully with double spacing (struts are not
% automatically inserted after the \vboxes used by the macros).  
% In double space mode without \nosinglegloss, when a translation
% is not given, the next line of text is single-spaced from the glossed text.
% With \nosinglegloss, the translation is set too close to the bottom line.


%%%
%%% Sentences with word-by-word glosses
%%%

% See covingtn.tex for full documentation.  Some examples:
%
% Displayed sentence with gloss and translation:
%
%             \gll Dit is een Nederlands voorbeeld.\\
%                  This is a Dutch example.\\
%             \glt `This is an example in Dutch.'
%
% Same, using bracketing where words do not correspond one-to-one:
%
%             \gll Dit is een voorbeeldje     in het Nederlands.\\
%                  This is a {little example} in {}  Dutch.\\
%             \glt `This is a little example in Dutch.'
%
% If you want to align 3 lines rather than two, use \glll instead of \gll.
%
% Layout is critical between \gll (or \glll) and \glt (or \gln).
%
% Thanks to Marcel R. van der Goot for permission to reproduce code.
\let\@gsingle=1
\def\singlegloss{\let\@gsingle=1}
\def\nosinglegloss{\let\@gsingle=0}
\@ifundefined{new@fontshape}%
   {\def\@selfnt{\ifx\@currsize\normalsize\@normalsize\else\@currsize\fi}}
   {\def\@selfnt{\selectfont}}

\def\gll%                  % Introduces 2-line text-and-gloss.
   {\bgroup %\begin{flushleft}
     \ifx\@gsingle1%           conditionally force single spacing (hpk/MC)
	 \def\baselinestretch{1}\@selfnt\fi
%        \vskip\baselineskip\def\baselinestretch{1}%
%        \@selfnt\vskip-\baselineskip\fi%
    \bgroup
    \twosent
   }

\def\glll%                  % Introduces 3-line text-and-gloss.
   {\bgroup %\begin{flushleft}
     \ifx\@gsingle1%        conditionally force single spacing (hpk/MC)
	\def\baselinestretch{1}\@selfnt\fi
%        \vskip\baselineskip\def\baselinestretch{1}%
%        \@selfnt\vskip-\baselineskip\fi%
    \bgroup
    \threesent
   }

% \def\glt{\vskip.0\baselineskip}

% redefine \gltoffset to set off translation from ex and gloss
\@ifundefined{gltoffset}{\def\gltoffset{0pt}}{}

\def\glt{\ifhmode\\*[\gltoffset]\else\nobreak\vskip\gltoffset\nobreak\fi}


% Introduces a translation
\let\trans\glt

\def\gln{\relax}
\def\glend{} % obsolete
      % Ends the gloss environment.

% The following TeX code is adapted, with permission, from:
% gloss.tex: Macros for vertically aligning words in consecutive sentences.
% Version: 1.0  release: 26 November 1990
% Copyright (c) 1991 Marcel R. van der Goot ([email protected]).
% Original Midnight/gloss.tex and Midnight/gloss.doc are available from
% csvax.cs.caltech.edu [131.215.131.131] in pub/tex
% and many other anonymous ftp archives.

\newbox\lineone % boxes with words from first line
\newbox\linetwo
\newbox\linethree
\newbox\wordone % a word from the first line (hbox)
\newbox\wordtwo
\newbox\wordthree
\newbox\gline % the constructed double line (hbox)
\newskip\glossglue % extra glue between glossed pairs or triples
\glossglue = 0pt plus 2pt minus 1pt % allow stretch/shrink between words
%\glossglue = 5pt plus 2pt minus 1pt % allow stretch/shrink between words
\newif\ifnotdone

\@ifundefined{eachwordone}{\let\eachwordone=\rm}{\relax}
\@ifundefined{eachwordtwo}{\let\eachwordtwo=\rm}{\relax}
\@ifundefined{eachwordthree}{\let\eachwordthree=\rm}{\relax}

\def\lastword#1#2#3% #1 = \each, #2 = line box, #3 = word box
   {\setbox#2=\vbox{\unvbox#2%
                    \global\setbox#3=\lastbox
                   }%
    \ifvoid#3\global\setbox#3=\hbox{#1\strut{} }\fi
        % extra space following \strut in case #1 needs a space
   }

\def\testdone
   {\ifdim\ht\lineone=0pt
         \ifdim\ht\linetwo=0pt \notdonefalse % tricky space after pt
         \else\notdonetrue
         \fi
    \else\notdonetrue
    \fi
   }

\gdef\getwords(#1,#2)#3 #4\\% #1=linebox, #2=\each, #3=1st word, #4=remainder
   {\setbox#1=\vbox{\hbox{#2\strut#3 }% adds space
                    \unvbox#1%
                   }%
    \def\more{#4}%
    \ifx\more\empty\let\more=\donewords
    \else\let\more=\getwords
    \fi
    \more(#1,#2)#4\\%
   }

\gdef\donewords(#1,#2)\\{}%

\gdef\twosent#1\\ #2\\{% #1 = first line, #2 = second line
    \getwords(\lineone,\eachwordone)#1 \\%
    \getwords(\linetwo,\eachwordtwo)#2 \\%
    \loop\lastword{\eachwordone}{\lineone}{\wordone}%
         \lastword{\eachwordtwo}{\linetwo}{\wordtwo}%
         \global\setbox\gline=\hbox{\unhbox\gline
                                    \hskip\glossglue
                                    \vtop{\box\wordone   % vtop was vbox
                                          \nointerlineskip
                                          \box\wordtwo
                                         }%
                                   }%
         \testdone
         \ifnotdone
    \repeat
    \egroup % matches \bgroup in \gloss
   \gl@stop}

\gdef\threesent#1\\ #2\\ #3\\{% #1 = first line, #2 = second line, #3 = third
    \getwords(\lineone,\eachwordone)#1 \\%
    \getwords(\linetwo,\eachwordtwo)#2 \\%
    \getwords(\linethree,\eachwordthree)#3 \\%
    \loop\lastword{\eachwordone}{\lineone}{\wordone}%
         \lastword{\eachwordtwo}{\linetwo}{\wordtwo}%
         \lastword{\eachwordthree}{\linethree}{\wordthree}%
         \global\setbox\gline=\hbox{\unhbox\gline
                                    \hskip\glossglue
                                    \vtop{\box\wordone   % vtop was vbox
                                          \nointerlineskip
                                          \box\wordtwo
                                          \nointerlineskip
                                          \box\wordthree
                                         }%
                                   }%
         \testdone
         \ifnotdone
    \repeat
    \egroup % matches \bgroup in \gloss
   \gl@stop}

%\def\gl@stop{{\hskip -\glossglue}\unhbox\gline\end{flushleft}}

% \leavevmode puts us back in horizontal mode, so that a \\ will work
\def\gl@stop{{\hskip -\glossglue}\unhbox\gline\leavevmode \egroup}

\endinput
gl-authoryear-comp.cbx · 11 KB
% gl-authoryear-comp.cbx
% Copyright 2016 Guido Vanden Wyngaerd
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
% 
% The Current Maintainer of this work is 
% Guido Vanden Wyngaerd ([email protected]).
%
% This work consists of the files 
% glossa.cls
% glossa.bst
% gl-authoryear-comp.cbx
% biblatex-gl.bbx
% glossa-template.tex
% glossa.png
%
% The files of the work are derived from the Semantics & Pragmatics style files
% by Kai von Fintel, Christopher Potts, and Chung-chieh Shan
% All changes are documented on the github repository 
% https://github.com/guidovw/Glossalatex.

\ProvidesFile{sp-authoryear-comp.cbx}

% For backward compatibility: choose labeldate or labeldateparts depending on the biblatex version
\@ifpackagelater{biblatex}{2016/09/09}
{%
  \ExecuteBibliographyOptions{labeldateparts} % as of biblatex 3.5 (2016/09/10)
}
{%
  \ExecuteBibliographyOptions{labeldate}
}%

\ExecuteBibliographyOptions{uniquename=minfull,uniquelist=minyear,autocite=inline}

% disabled sortcites option, since it was sorting by name, instead of year, and we often want to keep citations in the order chosen by the author
\newbool{cbx:parens}

\newbibmacro*{cite:init}{%
  \ifnumless{\value{multicitecount}}{2}
    {\global\boolfalse{cbx:parens}%
     \global\undef\cbx@lasthash
     \global\undef\cbx@lastyear}
    {\iffieldundef{prenote}
       {}
       {\global\undef\cbx@lasthash
	\global\undef\cbx@lastyear}}}

\newbibmacro*{cite:reinit}{%
  \global\undef\cbx@lasthash
  \global\undef\cbx@lastyear}

\newbibmacro*{cite}{% Based on cite bib macro from authoryear-comp.cbx
  \iffieldundef{shorthand}
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\printtext[bibhyperref]{% Include labelname in hyperlink
          \DeclareFieldAlias{bibhyperref}{default}% Prevent nested hyperlinks
          \usebibmacro{cite:label}%
          \setunit{\addspace}%
          \usebibmacro{cite:labelyear+extrayear}}%
          \usebibmacro{cite:reinit}}
       {\iffieldequals{namehash}{\cbx@lasthash}
          {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
                       \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
             {\setunit{\addsemicolon}%
              \usebibmacro{cite:extrayear}}
             {\setunit{\compcitedelim}%
              \usebibmacro{cite:labelyear+extrayear}%
              \savefield{labelyear}{\cbx@lastyear}}}
          {\printtext[bibhyperref]{% Include labelname in hyperlink
             \DeclareFieldAlias{bibhyperref}{default}% Prevent nested hyperlinks
             \printnames{labelname}%
             \setunit{\nameyeardelim}%
             \usebibmacro{cite:labelyear+extrayear}}%
             \savefield{namehash}{\cbx@lasthash}%
             \savefield{labelyear}{\cbx@lastyear}}}}
    {\usebibmacro{cite:shorthand}%
     \usebibmacro{cite:reinit}}%
  \setunit{\multicitedelim}}

\newbibmacro*{citeyear}{%
  \iffieldundef{shorthand}
    {\iffieldundef{labelyear}
       {\usebibmacro{cite:label}%
        \usebibmacro{cite:reinit}}
       {\iffieldequals{namehash}{\cbx@lasthash}
          {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
                       \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
             {\setunit{\addsemicolon}%
              \usebibmacro{cite:extrayear}}
             {\setunit{\compcitedelim}%
              \usebibmacro{cite:labelyear+extrayear}%
              \savefield{labelyear}{\cbx@lastyear}}}
          {\usebibmacro{cite:labelyear+extrayear}%
           \savefield{namehash}{\cbx@lasthash}%
           \savefield{labelyear}{\cbx@lastyear}}}}
    {\usebibmacro{cite:shorthand}%
     \usebibmacro{cite:reinit}}%
  \setunit{\multicitedelim}}

\renewbibmacro*{textcite}{% Based on textcite bib macro from authoryear-comp.cbx
  \iffieldequals{namehash}{\cbx@lasthash}
    {\iffieldundef{shorthand}
       {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
                    \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
          {\setunit{\addsemicolon}%
           \usebibmacro{cite:extrayear}}
          {\setunit{\compcitedelim}%
           \usebibmacro{cite:labelyear+extrayear}%
           \savefield{labelyear}{\cbx@lastyear}}}
       {\setunit{\compcitedelim}%
        \usebibmacro{cite:shorthand}%
        \global\undef\cbx@lastyear}}
    {\ifnameundef{labelname}
       {\printtext[bibhyperref]{% Include labelname in hyperlink
          \DeclareFieldAlias{bibhyperref}{default}% Prevent nested hyperlinks
          \iffieldundef{shorthand}
            {\usebibmacro{cite:label}%
             \setunit{%
               \global\booltrue{cbx:parens}%
               \addspace\bibopenparen}%
             \ifnumequal{\value{citecount}}{1}
               {\usebibmacro{prenote}}
               {}%
             \usebibmacro{cite:labelyear+extrayear}}
            {\usebibmacro{cite:shorthand}}%
          \ifthenelse{\iffieldundef{postnote}\AND
                      \(\value{multicitetotal}=0\AND\value{citetotal}=1\)}
            {\bibcloseparen% Include closing parenthesis in hyperlink
             \global\boolfalse{cbx:parens}}
            {}}}
       {\printtext[bibhyperref]{% Include labelname in hyperlink
          \DeclareFieldAlias{bibhyperref}{default}% Prevent nested hyperlinks
          \printnames{labelname}%
          \setunit{%
            \global\booltrue{cbx:parens}%
            \addspace\bibopenparen}%
          \ifnumequal{\value{citecount}}{1}
            {\usebibmacro{prenote}}
            {}%
          \iffieldundef{shorthand}
            {\iffieldundef{labelyear}
               {\usebibmacro{cite:label}}
               {\usebibmacro{cite:labelyear+extrayear}}%
             \savefield{labelyear}{\cbx@lastyear}}
            {\usebibmacro{cite:shorthand}%
             \global\undef\cbx@lastyear}%
          \ifthenelse{\iffieldundef{postnote}\AND
                      \(\value{multicitetotal}=0\AND\value{citetotal}=1\)}
            {\bibcloseparen% Include closing parenthesis in hyperlink
             \global\boolfalse{cbx:parens}}
            {}}%
          \savefield{namehash}{\cbx@lasthash}}}%
  \setunit{%
    \ifbool{cbx:parens}
      {\bibcloseparen\global\boolfalse{cbx:parens}}
      {}%
    \multicitedelim}}

\newbibmacro*{cite:shorthand}{%
  \printtext[bibhyperref]{\printfield{shorthand}}}

\newbibmacro*{cite:label}{%
  \iffieldundef{label}
    {\printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}
    {\printtext[bibhyperref]{\printfield{label}}}}

\newbibmacro*{cite:labelyear+extrayear}{%
  \iffieldundef{labelyear}
    {}
    {\printtext[bibhyperref]{%
       \printfield{labelyear}%
       \printfield{extrayear}}}}

\newbibmacro*{cite:extrayear}{%
  \iffieldundef{extrayear}
    {}
    {\printtext[bibhyperref]{\printfield{extrayear}}}}

\newbibmacro*{textcite:postnote}{%
  \usebibmacro{postnote}%
  \ifthenelse{\value{multicitecount}=\value{multicitetotal}}
    {\setunit{}%
     \printtext{%
       \ifbool{cbx:parens}
	 {\bibcloseparen\global\boolfalse{cbx:parens}}
	 {}}}
    {\setunit{%
       \ifbool{cbx:parens}
	 {\bibcloseparen\global\boolfalse{cbx:parens}}
	 {}%
       \multicitedelim}}}

\DeclareCiteCommand{\cite}
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {}
  {\usebibmacro{postnote}}

\DeclareCiteCommand*{\cite}
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{citeyear}}
  {}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\parencite}[\mkbibparens]
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {}
  {\usebibmacro{postnote}}

\DeclareCiteCommand*{\parencite}[\mkbibparens]
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{citeyear}}
  {}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\footcite}[\mkbibfootnote]
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\textcite}
  {\usebibmacro{cite:init}}
  {\usebibmacro{citeindex}%
   \usebibmacro{textcite}}
  {}
  {\usebibmacro{textcite:postnote}}

\DeclareMultiCiteCommand{\cites}{\cite}{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\footcites}[\mkbibfootnote]{\footcite}{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\footcitetexts}[\mkbibfootnotetext]{\footcitetext}{\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibparens\mkbibfootnote]{\smartcite}
                                     {\setunit{\multicitedelim}}
\DeclareMultiCiteCommand{\textcites}{\textcite}{}

\renewcommand*{\nameyeardelim}{\addspace}

\let\citealt\cite
\let\cite\textcite
\let\citet\textcite
\let\Citet\Textcite
\newcommand{\pgcitep}[2]{(\cite{#1}:~#2)}
\newcommand{\pgcitealt}[2]{\cite{#1}:~#2}
\newcommand{\pgcitet}[2]{\citeauthor{#1} (\citeyear{#1}:~#2)}
\newcommand{\pgposscitet}[2]{\citeauthor{#1}'s (\citeyear{#1}:~#2)}
\let\citep\parencite

\DeclareCiteCommand{\citeauthor}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}}
     {}%
   \printtext[bibhyperref]{\printnames{labelname}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\citeyear}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\printtext[bibhyperref]{\printfield{year}\printfield{extrayear}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\citeyearpar}[\mkbibparens]
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\printtext[bibhyperref]{\printfield{year}\printfield{extrayear}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\posscitet}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}}
  {\printtext[bibhyperref]{\printnames{labelname}'s \printtext[parens]{\printfield{year}\printfield{extrayear}}}}
  {}
  {}

\DeclareCiteCommand{\posscitealt}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}}
  {\printtext[bibhyperref]{\printnames{labelname}'s \printfield{year}\printfield{extrayear}}}
  {}
  {}

\DeclareCiteCommand{\possciteauthor}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}}
  {\printtext[bibhyperref]{\printnames{labelname}'s}}
  {}
  {}

\renewcommand\multicitedelim{\addsemicolon\space} %semicolon and space between multiple citations in text
\renewcommand*{\compcitedelim}{\addsemicolon\space} %semicolon and non-breaking space between compressed multiple citations by the same author

\renewcommand*{\postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}

 \endinput
glossa-template.tex — the file that is compiled · 43 KB

43 KB — too long to show here. It arrives with the project.

glossa.bst · 29 KB
% glossa.bst
% Copyright 2016 Guido Vanden Wyngaerd
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
% 
% The Current Maintainer of this work is 
% Guido Vanden Wyngaerd ([email protected]).
%
% This work consists of the files 
% glossa.cls
% glossa.bst
% gl-authoryear-comp.cbx
% biblatex-gl.bbx
% glossa-template.tex
% glossa.png
%
% The files of the work are derived from the Semantics & Pragmatics style files
% by Kai von Fintel, Christopher Potts, and Chung-chieh Shan
% All changes are documented on the github repository 
% https://github.com/guidovw/Glossalatex.

% This is glossa.bst, coded by Guido Vanden Wyngaerd as the house style for bibliographies in Glossa
% It is largely based on sp.bst, coded by Kai von Fintel as the house style for bibliographies in
% the journal Semantics and Pragmatics. The style is based on a style generated
% with custom-bib/merlin.mbs, a system for customizing bibliographic styles
% created by Patrick W Daly. There have been some hand-coded adjustments to that
% style to get the style closer to the Unified Style Sheet for Linguistics Journals.
%
% Version 1.3 [2021/7/1] changed the internal order of names to last-first throughout, and & between all names in name lists, in accordance with Haspelmath's `The Generic Style Rules for Linguistics'.
% Version 1.2 [2017/2/16] corrected minor mistake (to get a comma preceding page numbers of articles in edited volumes)
% Version 1.1 [2016/12/24] rewrote the function format.number.series to improve the treatment of book series (series title in to appear in roman font between brackets followed by optional number field)
% Version 1.0 [2016/04/21] last names with a prefix have the prefix first and are alphabetized accordingly
%


ENTRY
  { address
    author
    booktitle
    chapter
    doi
    edition
    editor
    eid
    howpublished
    institution
    journal
    key
    month
    note
    number
    organization
    pages
    publisher
    school
    series
    title
    type
    url
    volume
    year
  }
  {}
  { label extra.label sort.label short.list }
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
FUNCTION {init.state.consts}
{ #0 'before.all :=
  #1 'mid.sentence :=
  #2 'after.sentence :=
  #3 'after.block :=
}
STRINGS { s t}
FUNCTION {output.nonnull}
{ 's :=
  output.state mid.sentence =
    { " " * write$ }
    { output.state after.block =
        { add.period$ write$
          newline$
          "\newblock " write$
        }
        { output.state before.all =
            'write$
            { add.period$ " " * write$ }
          if$
        }
      if$
      mid.sentence 'output.state :=
    }
  if$
  s
}
FUNCTION {output}
{ duplicate$ empty$
    'pop$
    'output.nonnull
  if$
}
FUNCTION {output.check}
{ 't :=
  duplicate$ empty$
    { pop$ "empty " t * " in " * cite$ * warning$ }
    'output.nonnull
  if$
}
FUNCTION {fin.entry}
{ doi empty$
    { add.period$ }
    { }
  if$
  write$
  newline$
}

FUNCTION {new.block}
{ output.state before.all =
    'skip$
    { after.block 'output.state := }
  if$
}
FUNCTION {new.sentence}
{ output.state after.block =
    'skip$
    { output.state before.all =
        'skip$
        { after.sentence 'output.state := }
      if$
    }
  if$
}
FUNCTION {add.blank}
{  " " * before.all 'output.state :=
}

FUNCTION {add.colon}
{  ": " * before.all 'output.state :=
}

FUNCTION {add.comma}
{  ", " * before.all 'output.state :=
}


FUNCTION {date.block}
{
  new.block
}

FUNCTION {not}
{   { #0 }
    { #1 }
  if$
}
FUNCTION {and}
{   'skip$
    { pop$ #0 }
  if$
}
FUNCTION {or}
{   { pop$ #1 }
    'skip$
  if$
}
FUNCTION {new.block.checkb}
{ empty$
  swap$ empty$
  and
    'skip$
    'new.block
  if$
}
FUNCTION {field.or.null}
{ duplicate$ empty$
    { pop$ "" }
    'skip$
  if$
}
FUNCTION {emphasize}
{ duplicate$ empty$
    { pop$ "" }
    { "\emph{" swap$ * "}" * }
  if$
}
FUNCTION {tie.or.space.prefix}
{ duplicate$ text.length$ #3 <
    { "~" }
    { " " }
  if$
  swap$
}

FUNCTION {capitalize}
{ "u" change.case$ "t" change.case$ }

FUNCTION {space.word}
{ " " swap$ * " " * }

FUNCTION {bbl.and}
{ "\&"}

FUNCTION {bbl.etal}
{ "et~al." }

FUNCTION {bbl.editors}
{ "eds." }

FUNCTION {bbl.editor}
{ "ed." }

FUNCTION {bbl.edby}
{ "edited by" }

FUNCTION {bbl.edition}
{ "edn." }

FUNCTION {bbl.volume}
{ "vol." }

FUNCTION {bbl.of}
{ "of" }

FUNCTION {bbl.number}
{ "no." }

FUNCTION {bbl.nr}
{ "no." }

FUNCTION {bbl.in}
{ "in" }

FUNCTION {bbl.pages}
{ "" }

FUNCTION {bbl.page}
{ "" }

FUNCTION {bbl.chapter}
{ "chap." }

FUNCTION {bbl.techrep}
{ "Tech. Rep." }

FUNCTION {bbl.mthesis}
{ "MA thesis" }

FUNCTION {bbl.phdthesis}
{ "dissertation" }

FUNCTION {bbl.first}
{ "1st" }

FUNCTION {bbl.second}
{ "2nd" }

FUNCTION {bbl.third}
{ "3rd" }

FUNCTION {bbl.fourth}
{ "4th" }

FUNCTION {bbl.fifth}
{ "5th" }

FUNCTION {bbl.st}
{ "st" }

FUNCTION {bbl.nd}
{ "nd" }

FUNCTION {bbl.rd}
{ "rd" }

FUNCTION {bbl.th}
{ "th" }

MACRO {jan} {"Jan."}

MACRO {feb} {"Feb."}

MACRO {mar} {"Mar."}

MACRO {apr} {"Apr."}

MACRO {may} {"May"}

MACRO {jun} {"Jun."}

MACRO {jul} {"Jul."}

MACRO {aug} {"Aug."}

MACRO {sep} {"Sep."}

MACRO {oct} {"Oct."}

MACRO {nov} {"Nov."}

MACRO {dec} {"Dec."}

FUNCTION {eng.ord}
{ duplicate$ "1" swap$ *
  #-2 #1 substring$ "1" =
     { bbl.th * }
     { duplicate$ #-1 #1 substring$
       duplicate$ "1" =
         { pop$ bbl.st * }
         { duplicate$ "2" =
             { pop$ bbl.nd * }
             { "3" =
                 { bbl.rd * }
                 { bbl.th * }
               if$
             }
           if$
          }
       if$
     }
   if$
}

FUNCTION {bibinfo.check}
{ swap$
  duplicate$ missing$
    {
      pop$ pop$
      ""
    }
    { duplicate$ empty$
        {
          swap$ pop$
        }
        { swap$
          pop$
        }
      if$
    }
  if$
}
FUNCTION {bibinfo.warn}
{ swap$
  duplicate$ missing$
    {
      swap$ "missing " swap$ * " in " * cite$ * warning$ pop$
      ""
    }
    { duplicate$ empty$
        {
          swap$ "empty " swap$ * " in " * cite$ * warning$
        }
        { swap$
          pop$
        }
      if$
    }
  if$
}
FUNCTION {format.url}
{ url empty$
    { "" }
    { "\urlprefix\url{" url * "}" * }
  if$
}

INTEGERS { nameptr namesleft numnames }


STRINGS  { bibinfo}

FUNCTION {format.names}
{ 'bibinfo :=
  duplicate$ empty$ 'skip$ {
  's :=
  "" 't :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr
      duplicate$ #1 >
        { "{vv~}{ll}{, ff}{, jj}" }
        { "{vv~}{ll}{, ff}{, jj}" }
      if$
      format.name$
      bibinfo bibinfo.check
      't :=
      nameptr #1 >
        {
          namesleft #1 >
            { 
                  bbl.and
                  space.word * t * }
            {
              s nameptr "{ll}" format.name$ duplicate$ "others" =
                { 't := }
                { pop$ }
              if$
              t "others" =
                {
                  " " * bbl.etal *
                }
                {
                  bbl.and
                  space.word * t *
                }
              if$
            }
          if$
        }
        't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
  } if$
}
FUNCTION {format.names.ed}
{
  'bibinfo :=
  duplicate$ empty$ 'skip$ {
  's :=
  "" 't :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr
      "{vv~}{ll}{, ff}{, jj}"
      format.name$
      bibinfo bibinfo.check
      't :=
      nameptr #1 >
        {
          namesleft #1 >
            { 
            	bbl.and
				space.word * t * }
            {
              s nameptr "{ll}" format.name$ duplicate$ "others" =
                { 't := }
                { pop$ }
              if$
              t "others" =
                {

                  " " * bbl.etal *
                }
                {
                  bbl.and
                  space.word * t *
                }
              if$
            }
          if$
        }
        't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
  } if$
}
FUNCTION {format.key}
{ empty$
    { key field.or.null }
    { "" }
  if$
}

FUNCTION {format.authors}
{ author "author" format.names
}
FUNCTION {get.bbl.editor}
{ editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ }

FUNCTION {format.editors}
{ editor "editor" format.names duplicate$ empty$ 'skip$
    {
      " " *
      get.bbl.editor
   "(" swap$ * ")" *
      *
    }
  if$
}
FUNCTION {format.doi}
{ doi "doi" bibinfo.check
  duplicate$ empty$ 'skip$
    {
      new.block
      "\doi{" swap$ * "}" *
    }
  if$
}
FUNCTION {format.note}
{
 note empty$
    { "" }
    { note #1 #1 substring$
      duplicate$ "{" =
        'skip$
        { output.state mid.sentence =
          { "l" }
          { "u" }
        if$
        change.case$
        }
      if$
      note #2 global.max$ substring$ * "note" bibinfo.check
    }
  if$
}

FUNCTION {format.title}
{ title
  duplicate$ empty$ 'skip$
    { "t" change.case$ }
  if$
  "title" bibinfo.check
}
FUNCTION {format.full.names}
{'s :=
 "" 't :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr
      "{vv~}{ll}" format.name$
      't :=
      nameptr #1 >
        {
          namesleft #1 >
            { bbl.and
                  space.word * t * }
            {
              s nameptr "{ll}" format.name$ duplicate$ "others" =
                { 't := }
                { pop$ }
              if$
              t "others" =
                {
                  " " * bbl.etal *
                }
                {
                  bbl.and
                  space.word * t *
                }
              if$
            }
          if$
        }
        't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}

FUNCTION {author.editor.key.full}
{ author empty$
    { editor empty$
        { key empty$
            { cite$ #1 #3 substring$ }
            'key
          if$
        }
        { editor format.full.names }
      if$
    }
    { author format.full.names }
  if$
}

FUNCTION {author.key.full}
{ author empty$
    { key empty$
         { cite$ #1 #3 substring$ }
          'key
      if$
    }
    { author format.full.names }
  if$
}

FUNCTION {editor.key.full}
{ editor empty$
    { key empty$
         { cite$ #1 #3 substring$ }
          'key
      if$
    }
    { editor format.full.names }
  if$
}

FUNCTION {make.full.names}
{ type$ "book" =
  type$ "inbook" =
  or
    'author.editor.key.full
    { type$ "proceedings" =
        'editor.key.full
        'author.key.full
      if$
    }
  if$
}

FUNCTION {output.bibitem}
{ newline$
  "\bibitem[{" write$
  label write$
  ")" make.full.names duplicate$ short.list =
     { pop$ }
     { * }
   if$
  "}]{" * write$
  cite$ write$
  "}" write$
  newline$
  ""
  before.all 'output.state :=
}

FUNCTION {n.dashify}
{
  't :=
  ""
    { t empty$ not }
    { t #1 #1 substring$ "-" =
        { t #1 #2 substring$ "--" = not
            { "--" *
              t #2 global.max$ substring$ 't :=
            }
            {   { t #1 #1 substring$ "-" = }
                { "-" *
                  t #2 global.max$ substring$ 't :=
                }
              while$
            }
          if$
        }
        { t #1 #1 substring$ *
          t #2 global.max$ substring$ 't :=
        }
      if$
    }
  while$
}

FUNCTION {word.in}
{ bbl.in capitalize
  " " * }

FUNCTION {format.date}
{ year "year" bibinfo.check duplicate$ empty$
    {
      "empty year in " cite$ * "; set to ????" * warning$
       pop$ "????"
    }
    'skip$
  if$
  extra.label *
  before.all 'output.state :=
  after.sentence 'output.state :=
}
FUNCTION {format.btitle}
{ title "title" bibinfo.check
  duplicate$ empty$ 'skip$
    {
      "t" change.case$
      emphasize
    }
  if$
}
FUNCTION {either.or.check}
{ empty$
    'pop$
    { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  if$
}
FUNCTION {format.bvolume}
{ volume empty$
   { "" }
   { add.comma bbl.volume volume tie.or.space.prefix
     "volume" bibinfo.check * *
   }
 if$
}

FUNCTION {format.number.series}
{ series empty$
	{""}
	{ add.blank "(" *
           series "series" bibinfo.check *
	number empty$
		{""}
		{number tie.or.space.prefix "number" bibinfo.check * }
	if$
         ")" *
}
if$
}

FUNCTION {is.num}
{ chr.to.int$
  duplicate$ "0" chr.to.int$ < not
  swap$ "9" chr.to.int$ > not and
}

FUNCTION {extract.num}
{ duplicate$ 't :=
  "" 's :=
  { t empty$ not }
  { t #1 #1 substring$
    t #2 global.max$ substring$ 't :=
    duplicate$ is.num
      { s swap$ * 's := }
      { pop$ "" 't := }
    if$
  }
  while$
  s empty$
    'skip$
    { pop$ s }
  if$
}

FUNCTION {convert.edition}
{ extract.num "l" change.case$ 's :=
  s "first" = s "1" = or
    { bbl.first 't := }
    { s "second" = s "2" = or
        { bbl.second 't := }
        { s "third" = s "3" = or
            { bbl.third 't := }
            { s "fourth" = s "4" = or
                { bbl.fourth 't := }
                { s "fifth" = s "5" = or
                    { bbl.fifth 't := }
                    { s #1 #1 substring$ is.num
                        { s eng.ord 't := }
                        { edition 't := }
                      if$
                    }
                  if$
                }
              if$
            }
          if$
        }
      if$
    }
  if$
  t
}

FUNCTION {format.edition}
{ edition duplicate$ empty$ 'skip$
    {
      convert.edition
      output.state mid.sentence =
        { "l" }
        { "t" }
      if$ change.case$
      "edition" bibinfo.check
      " " * bbl.edition *
    }
  if$
}

INTEGERS { multiresult }
FUNCTION {multi.page.check}
{ 't :=
  #0 'multiresult :=
    { multiresult not
      t empty$ not
      and
    }
    { t #1 #1 substring$
      duplicate$ "-" =
      swap$ duplicate$ "," =
      swap$ "+" =
      or or
        { #1 'multiresult := }
        { t #2 global.max$ substring$ 't := }
      if$
    }
  while$
  multiresult
}

FUNCTION {format.pages}
{ pages duplicate$ empty$ 'skip$
    { duplicate$ multi.page.check
        {
          n.dashify
        }
        {
        }
      if$
      "pages" bibinfo.check
    }
  if$
}
FUNCTION {format.journal.pages}
{ pages duplicate$ empty$ 'pop$
    { swap$ duplicate$ empty$
        { pop$ pop$ format.pages }
        {
          ". " *
          swap$
          n.dashify
          "pages" bibinfo.check
          *
        }
      if$
    }
  if$
}
FUNCTION {format.journal.eid}
{ eid "eid" bibinfo.check
  duplicate$ empty$ 'pop$
    { swap$ duplicate$ empty$ 'skip$
      {
          ". " *
      }
      if$
      swap$ *
    }
  if$
}
FUNCTION {format.vol.num.pages}
{ volume field.or.null
  duplicate$ empty$ 'skip$
    {
      "volume" bibinfo.check
    }
  if$
  number "number" bibinfo.check duplicate$ empty$ 'skip$
    {
      swap$ duplicate$ empty$
        { "there's a number but no volume in " cite$ * warning$ }
        'skip$
      if$
      swap$
      "(" swap$ * ")" *
    }
  if$ *
  eid empty$
    { format.journal.pages }
    { format.journal.eid }
  if$
}

FUNCTION {format.chapter.pages}
{ chapter empty$
    'format.pages
    { type empty$
        { bbl.chapter }
        { type "l" change.case$
          "type" bibinfo.check
        }
      if$
      chapter tie.or.space.prefix
      "chapter" bibinfo.check
      * *
      pages empty$
        'skip$
        { ", " * format.pages * }
      if$
    }
  if$
}

FUNCTION {format.booktitle}
{
  booktitle "booktitle" bibinfo.check
  "t" change.case$
  emphasize
}
FUNCTION {format.in.ed.booktitle}
{ format.booktitle duplicate$ empty$ 'skip$
    {
      editor "editor" format.names.ed duplicate$ empty$ 'pop$
        {
          " " *
          get.bbl.editor
          "(" swap$ * "), " *
          * swap$
          * }
      if$
      word.in swap$ *
    }
  if$
}
FUNCTION {format.thesis.type}
{ type duplicate$ empty$
    'pop$
    { swap$ pop$
      "t" change.case$ "type" bibinfo.check
    }
  if$
}
FUNCTION {format.tr.number}
{ number "number" bibinfo.check
  type duplicate$ empty$
    { pop$ bbl.techrep }
    'skip$
  if$
  "type" bibinfo.check
  swap$ duplicate$ empty$
    { pop$ "t" change.case$ }
    { tie.or.space.prefix * * }
  if$
}
FUNCTION {format.article.crossref}
{
  word.in
  " \cite{" * crossref * "}" *
}
FUNCTION {format.book.crossref}
{ volume duplicate$ empty$
    { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
      pop$ word.in
    }
    { bbl.volume
      capitalize
      swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word *
    }
  if$
  " \cite{" * crossref * "}" *
}
FUNCTION {format.incoll.inproc.crossref}
{
  word.in
  " \cite{" * crossref * "}" *
}
FUNCTION {format.org.or.pub}
{ 't :=
  ""
  address empty$ t empty$ and
    'skip$
    {
      address "address" bibinfo.check *
      t empty$
        'skip$
        { address empty$
            'skip$
            { ": " * }
          if$
          t *
        }
      if$
    }
  if$
}
FUNCTION {format.publisher.address}
{ publisher "publisher" bibinfo.warn format.org.or.pub
}

FUNCTION {format.organization.address}
{ organization "organization" bibinfo.check format.org.or.pub
}

FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.title "title" output.check
  new.block
  crossref missing$
    {
      journal
      "journal" bibinfo.check
      emphasize
      "journal" output.check
      add.blank
      format.vol.num.pages output
    }
    { format.article.crossref output.nonnull
      format.pages output
    }
  if$
  format.doi output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}
FUNCTION {book}
{ output.bibitem
  author empty$
    { format.editors "author and editor" output.check
      editor format.key output
    }
    { format.authors output.nonnull
      crossref missing$
        { "author and editor" editor either.or.check }
        'skip$
      if$
    }
  if$
  format.date "year" output.check
  date.block
  format.btitle "title" output.check
  crossref missing$
    { format.bvolume output
       format.number.series output
      new.block
      new.sentence
      format.publisher.address output
    }
    {
      new.block
      format.book.crossref output.nonnull
    }
  if$
  format.edition output
  format.doi output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}
FUNCTION {booklet}
{ output.bibitem
  format.authors output
  author format.key output
  format.date "year" output.check
  date.block
  format.title "title" output.check
  new.block
  howpublished "howpublished" bibinfo.check output
  address "address" bibinfo.check output
  format.doi output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}

FUNCTION {inbook}
{ output.bibitem
  author empty$
    { format.editors "author and editor" output.check
      editor format.key output
    }
    { format.authors output.nonnull
      crossref missing$
        { "author and editor" editor either.or.check }
        'skip$
      if$
    }
  if$
  format.date "year" output.check
  date.block
  format.btitle "title" output.check
  crossref missing$
    {
      format.bvolume output
      format.chapter.pages "chapter and pages" output.check
      new.block
      new.sentence
      format.number.series output
      format.publisher.address output
    }
    {
      format.chapter.pages "chapter and pages" output.check
      new.block
      format.book.crossref output.nonnull
    }
  if$
  format.edition output
  format.doi output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}

FUNCTION {incollection}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
      add.comma
      format.chapter.pages output
      new.sentence
      format.publisher.address output
      format.edition output
    }
    { format.incoll.inproc.crossref output.nonnull
      format.chapter.pages output
    }
  if$
  format.doi output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}
FUNCTION {inproceedings}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.title "title" output.check
  new.block
  crossref missing$
    { format.in.ed.booktitle "booktitle" output.check
      format.bvolume output
      format.number.series output
      new.sentence
      format.pages output
      new.sentence
      publisher empty$
        { format.organization.address output }
        { organization "organization" bibinfo.check output
          format.publisher.address output
        }
      if$
    }
    { format.incoll.inproc.crossref output.nonnull
      format.pages output
    }
  if$
  format.doi output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}
FUNCTION {conference} { inproceedings }
FUNCTION {manual}
{ output.bibitem
  format.authors output
  author format.key output
  format.date "year" output.check
  date.block
  format.btitle "title" output.check
  organization address new.block.checkb
  organization "organization" bibinfo.check output
  address "address" bibinfo.check output
  format.edition output
  format.doi output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}

FUNCTION {mastersthesis}
{ output.bibitem
 format.authors "author" output.check
 author format.key output
 format.date "year" output.check
 date.block
 format.btitle
 "title" output.check
 new.block
 address "address" bibinfo.check output
 add.colon
 school "school" bibinfo.warn output
 bbl.mthesis format.thesis.type output.nonnull
 format.doi output
 new.block
 format.url output
 new.block
 format.note output
 fin.entry
}

FUNCTION {misc}
{ output.bibitem
  format.authors output
  author format.key output
  format.date "year" output.check
  date.block
  format.title output
  new.block
  howpublished "howpublished" bibinfo.check output
  format.doi output
  new.block
  format.note output
  new.block
  format.url output
  fin.entry
}

FUNCTION {phdthesis}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.btitle
  "title" output.check
  new.block
  address "address" bibinfo.check output
  add.colon
  school "school" bibinfo.warn output
  bbl.phdthesis format.thesis.type output.nonnull
  format.doi output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}

FUNCTION {proceedings}
{ output.bibitem
  format.editors output
  editor format.key output
  format.date "year" output.check
  date.block
  format.btitle "title" output.check
  format.bvolume output
  new.sentence
  format.number.series output
  publisher empty$
    { format.organization.address output }
    { organization "organization" bibinfo.check output
      format.publisher.address output
    }
  if$
  format.doi output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}

FUNCTION {techreport}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.title
  "title" output.check
  new.block
  format.tr.number output.nonnull
  institution "institution" bibinfo.warn output
  address "address" bibinfo.check output
  format.doi output
  new.block
  format.url output
  new.block
  format.note output
  fin.entry
}

FUNCTION {unpublished}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.title "title" output.check
  format.doi output
  new.block
  format.note "note" output.check
  new.block
  format.url output
  fin.entry
}

FUNCTION {default.type} { misc }
READ
FUNCTION {sortify}
{ purify$
  "l" change.case$
}
INTEGERS { len }
FUNCTION {chop.word}
{ 's :=
  'len :=
  s #1 len substring$ =
    { s len #1 + global.max$ substring$ }
    's
  if$
}
FUNCTION {format.lab.names}
{ 's :=
  "" 't :=
  s #1 "{vv~}{ll}" format.name$
  s num.names$ duplicate$
  #2 >
    { pop$
      " " * bbl.etal *
    }
    { #2 <
        'skip$
        { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
            {
              " " * bbl.etal *
            }
            { bbl.and space.word * s #2 "{vv~}{ll}" format.name$
              * }
          if$
        }
      if$
    }
  if$
}

FUNCTION {author.key.label}
{ author empty$
    { key empty$
        { cite$ #1 #3 substring$ }
        'key
      if$
    }
    { author format.lab.names }
  if$
}

FUNCTION {author.editor.key.label}
{ author empty$
    { editor empty$
        { key empty$
            { cite$ #1 #3 substring$ }
            'key
          if$
        }
        { editor format.lab.names }
      if$
    }
    { author format.lab.names }
  if$
}

FUNCTION {editor.key.label}
{ editor empty$
    { key empty$
        { cite$ #1 #3 substring$ }
        'key
      if$
    }
    { editor format.lab.names }
  if$
}

FUNCTION {calc.short.authors}
{ type$ "book" =
  type$ "inbook" =
  or
    'author.editor.key.label
    { type$ "proceedings" =
        'editor.key.label
        'author.key.label
      if$
    }
  if$
  'short.list :=
}

FUNCTION {calc.label}
{ calc.short.authors
  short.list
  "("
  *
  year duplicate$ empty$
  short.list key field.or.null = or
     { pop$ "" }
     'skip$
  if$
  *
  'label :=
}

FUNCTION {sort.format.names}
{ 's :=
  #1 'nameptr :=
  ""
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr
     "{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}"
      format.name$ 't :=
      nameptr #1 >
        {
          "   "  *
          namesleft #1 = t "others" = and
            { "zzzzz" * }
            { t sortify * }
          if$
        }
        { t sortify * }
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}

FUNCTION {sort.format.title}
{ 't :=
  "A " #2
    "An " #3
      "The " #4 t chop.word
    chop.word
  chop.word
  sortify
  #1 global.max$ substring$
}
FUNCTION {author.sort}
{ author empty$
    { key empty$
        { "to sort, need author or key in " cite$ * warning$
          ""
        }
        { key sortify }
      if$
    }
    { author sort.format.names }
  if$
}
FUNCTION {author.editor.sort}
{ author empty$
    { editor empty$
        { key empty$
            { "to sort, need author, editor, or key in " cite$ * warning$
              ""
            }
            { key sortify }
          if$
        }
        { editor sort.format.names }
      if$
    }
    { author sort.format.names }
  if$
}
FUNCTION {editor.sort}
{ editor empty$
    { key empty$
        { "to sort, need editor or key in " cite$ * warning$
          ""
        }
        { key sortify }
      if$
    }
    { editor sort.format.names }
  if$
}
FUNCTION {presort}
{ calc.label
  label sortify
  "    "
  *
  type$ "book" =
  type$ "inbook" =
  or
    'author.editor.sort
    { type$ "proceedings" =
        'editor.sort
        'author.sort
      if$
    }
  if$
  #1 entry.max$ substring$
  'sort.label :=
  sort.label
  *
  "    "
  *
  title field.or.null
  sort.format.title
  *
  #1 entry.max$ substring$
  'sort.key$ :=
}

ITERATE {presort}
SORT
STRINGS { last.label next.extra }
INTEGERS { last.extra.num number.label }
FUNCTION {initialize.extra.label.stuff}
{ #0 int.to.chr$ 'last.label :=
  "" 'next.extra :=
  #0 'last.extra.num :=
  #0 'number.label :=
}
FUNCTION {forward.pass}
{ last.label label =
    { last.extra.num #1 + 'last.extra.num :=
      last.extra.num int.to.chr$ 'extra.label :=
    }
    { "a" chr.to.int$ 'last.extra.num :=
      "" 'extra.label :=
      label 'last.label :=
    }
  if$
  number.label #1 + 'number.label :=
}
FUNCTION {reverse.pass}
{ next.extra "b" =
    { "a" 'extra.label := }
    'skip$
  if$
  extra.label 'next.extra :=
  extra.label
  duplicate$ empty$
    'skip$
    { "{\natexlab{" swap$ * "}}" * }
  if$
  'extra.label :=
  label extra.label * 'label :=
}
EXECUTE {initialize.extra.label.stuff}
ITERATE {forward.pass}
REVERSE {reverse.pass}
FUNCTION {bib.sort.order}
{ sort.label
  "    "
  *
  year field.or.null sortify
  *
  "    "
  *
  title field.or.null
  sort.format.title
  *
  #1 entry.max$ substring$
  'sort.key$ :=
}
ITERATE {bib.sort.order}
SORT
FUNCTION {begin.bib}
{ preamble$ empty$
    'skip$
    { preamble$ write$ newline$ }
  if$
  "\begin{thebibliography}{" number.label int.to.str$ * "}" *
  write$ newline$
  "\providecommand{\natexlab}[1]{#1}"
  write$ newline$
  "\providecommand{\url}[1]{\texttt{#1}}"
  write$ newline$
  "\providecommand{\urlprefix}{}"
  write$ newline$
  "\expandafter\ifx\csname urlstyle\endcsname\relax"
  write$ newline$
  "  \providecommand{\doi}[1]{doi:\discretionary{}{}{}#1}\else"
  write$ newline$
  "  \providecommand{\doi}{doi:\discretionary{}{}{}\begingroup \urlstyle{rm}\Url}\fi"
  write$ newline$
}
EXECUTE {begin.bib}
EXECUTE {init.state.consts}
ITERATE {call.type$}
FUNCTION {end.bib}
{ newline$
  "\end{thebibliography}" write$ newline$
}
EXECUTE {end.bib}
glossa.cls · 21 KB
% glossa.cls
% Copyright 2016 Guido Vanden Wyngaerd
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
% 
% The Current Maintainer of this work is Guido Vanden Wyngaerd.
%
% This work consists of the files 
% glossa.cls
% glossa.bst
% gl-authoryear-comp.cbx
% biblatex-gl.bbx
% glossa-template.tex
% glossa.png
%
% The files of the work are derived from the Semantics & Pragmatics style files
% by Kai von Fintel, Christopher Potts, and Chung-chieh Shan
% All changes are documented on the github repository 
% https://github.com/guidovw/Glossalatex.

\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesClass{glossa}[2018/01/27 v.2.3 Class for Glossa]

% OUTLINE OF THIS CLASS FILE
%   option declarations 
%   required packages 
%   metadata 
%   page dimensions 
%   title 
%   running headers 
%   frontmatter 
%   sectioning 
%   footnotes 
%   backmatter 
%   other environments 
%   useful macros

%=====================================================================
%======================== option declarations ========================

\newif\if@lucida\@lucidafalse
\newif\if@cm\@cmtrue
\newif\if@times\@timestrue
\newif\if@brill\@brillfalse
\newif\if@charis\@charisfalse
\newif\if@final\@finalfalse
\newif\if@biblatex\@biblatexfalse
\newif\if@linguex\@linguexfalse

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}

\newcommand{\@sizeoption@err}{\ClassError{sp}
  {Cannot use size option \CurrentOption} 
  {Glossa style requires (and automatically loads) 11pt text}}

\DeclareOption{10pt}{\@sizeoption@err}
\DeclareOption{12pt}{\@sizeoption@err}

\DeclareOption{lucida}{\@lucidatrue \@timesfalse \@cmfalse \@brillfalse \@charisfalse}
\DeclareOption{times}{\@lucidafalse \@timestrue \@cmfalse \@brillfalse \@charisfalse}
\DeclareOption{cm}{\@lucidafalse \@timesfalse \@cmtrue \@brillfalse \@charisfalse}
\DeclareOption{brill}{\@lucidafalse \@timesfalse \@cmtrue \@brilltrue \@charisfalse}
\DeclareOption{charis}{\@lucidafalse \@timesfalse \@cmtrue \@brillfalse \@charistrue}
\DeclareOption{final}{\@finaltrue}
\DeclareOption{biblatex}{\@biblatextrue}
\DeclareOption{linguex}{\@linguextrue}

\ExecuteOptions{times} % times is the default.
\ProcessOptions\relax
\LoadClass[11pt,twoside]{article}

\if@lucida
 \IfFileExists{lucimatx.sty}{%
    \RequirePackage[romanfamily=bright-osf, scale=0.9, stdmathdigits=true]{lucimatx}%
    \linespread{1.05}%
    \DeclareMathDelimiter{\llbracket} 
      {\mathopen}{letters}{130}{largesymbols}{130} 
    \DeclareMathDelimiter{\rrbracket} 
      {\mathclose}{letters}{131}{largesymbols}{131}
    \normalfont\DeclareTextCommand
      \textbullet\encodingdefault{\UseTextSymbol{OMS}\textbullet}
    \let\nLeftrightarrow\undefined
    \DeclareMathSymbol{\nLeftrightarrow}{\mathrel}{arrows}{105}
}{\ClassWarning{glossa.cls}{Requested fonts not present}}% 
\else\relax 
\fi
%
\if@times
  \RequirePackage[T1]{fontenc}% use T1 font encoding
  \IfFileExists{mathptmx.sty}{\RequirePackage{mathptmx}}{}
  \IfFileExists{stmaryrd.sty}%
    {\RequirePackage{stmaryrd}}%
    {\newcommand{\llbracket}{\ensuremath{\left [\!\left [}}%
     \newcommand{\rrbracket}{\ensuremath{\right ]\!\right ]}}}
  \RequirePackage{textcomp}   
  \RequirePackage{amssymb}
  \else\relax
\fi
%
\if@cm
\IfFileExists{stmaryrd.sty}%
  {\RequirePackage{stmaryrd}}%
  {\newcommand{\llbracket}{\ensuremath{\left [\!\left [}}%
   \newcommand{\rrbracket}{\ensuremath{\right ]\!\right ]}}}
  \RequirePackage{amssymb}
  \RequirePackage{textcomp}
  \else\relax
\fi

\if@brill
\IfFileExists{stmaryrd.sty}%
  {\RequirePackage{stmaryrd}}%
  {\newcommand{\llbracket}{\ensuremath{\left [\!\left [}}%
   \newcommand{\rrbracket}{\ensuremath{\right ]\!\right ]}}}
  \RequirePackage[no-math]{fontspec}
  \setmainfont[RawFeature=+tnum]{Brill} %RawFeature ensures proper alignment of examples with linguex
  \RequirePackage{amssymb}
  \RequirePackage{textcomp}
  \else\relax
\fi

\if@charis
\IfFileExists{stmaryrd.sty}%
  {\RequirePackage{stmaryrd}}%
  {\newcommand{\llbracket}{\ensuremath{\left [\!\left [}}%
   \newcommand{\rrbracket}{\ensuremath{\right ]\!\right ]}}}
  \RequirePackage[bitstream-charter]{mathdesign} %math font close to Charis
  \RequirePackage[no-math]{fontspec}
  \setmainfont{Charis}
  \RequirePackage{FiraSans} %sf font; download from https://www.fontsquirrel.com/fonts/fira-sans
  \RequirePackage{amssymb}
  \RequirePackage{textcomp}
  \else\relax
\fi

% Strong widow and orphan control

\clubpenalty10000
\widowpenalty10000

%=====================================================================
%========================= required packages =========================
%%% xunicode is not compatible
%%% with pdflatex, and one should not use inputenc with xelatex
%%% LuaLaTeX is incompatible with xunicode, but can safely load tipa
\RequirePackage{iftex}
\ifXeTeX
  \RequirePackage{xunicode} %IPA characters are displayed; the commands of the tipa package are understood
\else
  \RequirePackage[safe]{tipa}
\fi

\ifPDFTeX
  \RequirePackage[utf8]{inputenc}
\else
\fi
%%% End modification

\RequirePackage{xspace}
% microtype handles punctuation at the right margin. We want it for the final product, but it's okay if authors lack it.
\IfFileExists{microtype.sty}{%
  \RequirePackage[final,protrusion={true,compatibility}]{microtype}
}{}
\RequirePackage{ifthen}
\RequirePackage[hyphens]{url}

\if@biblatex
	\RequirePackage[backend=biber,
			natbib=true, %compatibility with natbib cite commands
			bibstyle=biblatex-gl, %alphabetises and typesets the bibliography
			citestyle=gl-authoryear-comp, %makes the references in the text
			maxcitenames=3,
			maxbibnames=99]{biblatex}
\else
	\RequirePackage{natbib}
	\bibpunct[: ]{(}{)}{; }{a}{}{;~}
	\newcommand{\BIBand}{\&}
	\setlength{\bibsep}{0pt}
	\setlength{\bibhang}{0.25in}
	\bibliographystyle{glossa}
    \newcommand{\posscitet}[1]{\citeauthor{#1}'s (\citeyear{#1})}
    \newcommand{\posscitealt}[1]{\citeauthor{#1}'s \citeyear{#1}}
    \newcommand{\possciteauthor}[1]{\citeauthor{#1}'s}
    \newcommand{\pgposscitet}[2]{\citeauthor{#1}'s (\citeyear{#1}:~#2)}
    \newcommand{\secposscitet}[2]{\citeauthor{#1}'s (\citeyear{#1}:~$\S$#2)}
    \newcommand{\pgcitealt}[2]{\citealt{#1}:~#2}
    \newcommand{\seccitealt}[2]{\citealt{#1}:~$\S$#2}
    \newcommand{\pgcitep}[2]{(\citealt{#1}:~#2)}
    \newcommand{\seccitep}[2]{(\citealt{#1}:~$\S$#2)}
    \newcommand{\pgcitet}[2]{\citeauthor{#1} (\citeyear{#1}:~#2)}
    \newcommand{\seccitet}[2]{\citeauthor{#1} (\citeyear{#1}:~$\S$#2)}
\fi	

\RequirePackage[usenames,dvipsnames]{xcolor}
\definecolor{splinkcolor}{rgb}{.0,.2,.4}
\RequirePackage[colorlinks,breaklinks,
                linkcolor=splinkcolor, 
                urlcolor=splinkcolor, 
                citecolor=splinkcolor,
                filecolor=splinkcolor,
                plainpages=false,
                pdfpagelabels,
                bookmarks=false,
                pdfstartview=FitH]{hyperref}
\newcommand{\doi}[1]{\url{https://doi.org/#1}}
\urlstyle{rm}
\RequirePackage[leqno,tbtags]{amsmath}
% If the author is using postscript (discouraged), then load the breakurl package, else don't load it.
\RequirePackage{ifpdf}
\ifpdf
  \relax
\else
\relax
  %\RequirePackage{breakurl}
\fi
\RequirePackage{graphicx}
\RequirePackage[hang,FIGBOTCAP,loose]{subfigure}

% additions/changes to the S&P required packages for Glossa are listed below

\RequirePackage[normalem]{ulem}
\RequirePackage{enumitem}
\RequirePackage[font=sf,labelfont=bf,labelsep=colon,justification=raggedright,singlelinecheck=off,justification=centering]{caption}
\RequirePackage{booktabs}
\RequirePackage[font=sf]{floatrow}
%\floatsetup{style=plaintop} %captions above floats

%=====================================================================
%============================= metadata ==============================

\def\@pdfauthor{\relax}
\newcommand{\pdfauthor}[1]{\gdef\@pdfauthor{#1}}
\def\@pdftitle{\relax}
\newcommand{\pdftitle}[1]{\gdef\@pdftitle{#1}}
\def\@pdfkeywords{\relax}
\newcommand{\pdfkeywords}[1]{\gdef\@pdfkeywords{#1}}

\hypersetup{pdfauthor=\@pdfauthor, 
            pdftitle=\@pdftitle,
            pdfkeywords=\@pdfkeywords}

\def\@spvolume{\relax}
\newcommand{\spvolume}[1]{\gdef\@spvolume{#1}}

\def\@sparticle{\relax}
\newcommand{\sparticle}[1]{\gdef\@sparticle{#1}}

\def\@spyear{\relax}
\newcommand{\spyear}[1]{\gdef\@spyear{#1}}

\def\@spdoi{10.5334/.\@spvolume.\@sparticle}
\def\@splastpage{\relax}
\newcommand{\splastpage}[1]{\gdef\@splastpage{#1}}
            
%=====================================================================
%========================== page dimensions ==========================

% Vertical.
\paperheight=297mm
\topmargin=-13mm   %
\headheight=5mm    % head: 30mm (margin + head + sep = 0.46cm); latex adds 1in)
\headsep=17.6mm   %
\topskip=0.1in     % included in the textheight
\textheight=237mm  % (297mm - 60mm)
\footskip=0.46cm   % foot: 30mm total (1.0in leftover)
\parskip=0pt

% Horizontal.
\paperwidth=210mm
\textwidth=150mm % (210mm - 60mm)
\oddsidemargin=0.46cm  % put at 3cm margins (3cm - 1in = 0.46cm)
\evensidemargin=0.46cm % put at 3cm margins (3cm - 1in = 0.46cm)
\raggedbottom % constant spacing in the text; cost is a ragged bottom
\parindent=0.1in
\leftmargini=0.5in
\@ifundefined{mathindent}{}{\mathindent=0.5in\relax}%

% Tell dvips about our paper.
\special{papersize=210mm,297mm}

%=====================================================================
%============================== title ================================

% Formats individual <name--institute> pairs inside \author.
\newcommand{\spauthor}[1]%
{\begin{minipage}[t]{16pc}\centering
        #1%
 \end{minipage}\hspace{.5pc plus1pc}%
 \ignorespaces
}

\renewcommand*{\title}[2][]{\gdef\@shorttitle{#1}\gdef\@title{#2}}
\renewcommand*{\author}[2][]{\gdef\@shortauthor{#1}\gdef\@author{#2}}

% Adapted from JMLR.
\renewcommand{\maketitle}{%
  \par
  \begingroup
  \renewcommand{\thefootnote}{\fnsymbol{footnote}}
  \@maketitle\@thanks
  \setcounter{footnote}{0}
  \endgroup
  \let\maketitle\relax \let\@maketitle\relax
  \gdef\@thanks{}
  \let\thanks\relax%
}

% From salt.cls.
\newskip\onelineskip 
\onelineskip=\baselineskip 
\advance\onelineskip by0pt plus 4pt minus 2pt

\def\@maketitle{%
  \vbox{\sffamily\hsize\textwidth%
    \linewidth\hsize%
    \centering
    \vskip\onelineskip
    \LARGE\@title\@@par
    \normalsize
    \def\institute{\textit}%
    \newcommand{\AND}{\ignorespaces}%
    \let\par\@empty
    \@author
    \lineskiplimit\onelineskip
    \lineskip\onelineskip
    \@@par
  }%
  \global\everypar{\everypar{}\vskip 3.5ex}
}

%=====================================================================
%========================== running headers ==========================

% Creative commons license text.  The font is even smaller here than it is elsewhere in the headers so that we have a chance of fitting the whole license on the page.
\newcommand{\cctext}{{\footnotesize This is an open-access article distributed under the terms of a Creative Commons Attribution License
    (\http{http://creativecommons.org/licenses/by/3.0/}).}}

% This boolean switch lets the user control whether the logo is included even when the requisite image file is present.  (If it is missing, then the class file accommodates that no matter how the switch is set.)
\newboolean{logo}
\setboolean{logo}{true} % Default true (include logo if it's present)
\newcommand{\splogo}{\setboolean{logo}{true}}
\newcommand{\nosplogo}{\setboolean{logo}{false}}

% This sets the font size for the header and footer on all pages.
\newcommand{\headerfontsize}{\footnotesize}

% Prints publication and copyright info on the first page
% Also loads info into metadata (superseded by new metadata commands)
\gdef\@articlenumber{}%
\newcommand{\firstpageheadings}[6]%
{
  \gdef\@articlenumber{#2}
  \gdef\@spvolume{#1}
  \gdef\@sparticle{#2}
  \gdef\@splastpage{#3}
  \gdef\@spyear{#4}
  \def\ps@spfirstheadings{%
    \let\@mkboth\@gobbletwo%
    \renewcommand{\@oddhead}{%
      \headerfontsize%
      % If the switch is set to "include image",
      \ifthenelse{\boolean{logo}}{%
        \ifpdf
        % If the pdf logo is present,
        \IfFileExists{sp-logo.pdf}{%
          % then insert the pdf version,
          \begin{minipage}[c]{.25in}
            \includegraphics[width=.25in]{sp-logo.pdf}
          \end{minipage}%
        }{}% else nothing; closes \IfFileExists
        \else
        % If the ps logo is present,
        \IfFileExists{sp-logo.ps}{%   
          % then insert the postscript version,
          \begin{minipage}[c]{.25in}
            \includegraphics[width=.25in]{sp-logo.ps}
          \end{minipage}%
        }{}% else, nothing; closes \IfFileExists
        \fi % close \ifpdf
      }{}% closes \ifthenelse
      \begin{minipage}[c]{5.25in}
        \href{http://glossa.ubiquitypress.com/}{Glossa} Volume \@spvolume, Article \@sparticle: 1--\@splastpage, \@spyear\\
        \href{https://doi.org/10.5334/sp.\@spvolume.\@sparticle}{https://doi.org/10.5334/.\@spvolume.\@sparticle}
      \end{minipage}%
    }%
    \renewcommand{\@oddfoot}{%
      \begin{minipage}[c]{1\textwidth}%
        \footnotesize\copyright \@spyear\ \@shortauthor\\
        \cctext
      \end{minipage}%
    }%
    \renewcommand{\@evenhead}{}%
    \renewcommand{\@evenfoot}{}%
  }%
  \thispagestyle{spfirstheadings}%
}%

\newcommand{\firstpagefinalheadings}%
{
  \def\ps@spfirstheadings{%
    \let\@mkboth\@gobbletwo%
    \renewcommand{\@oddhead}{%
      \headerfontsize%
      % If the switch is set to "include image",
      \ifthenelse{\boolean{logo}}{%
        \ifpdf
        % If the pdf logo is present,
        \IfFileExists{sp-logo.pdf}{%
          % then insert the pdf version,
          \begin{minipage}[c]{.25in}
            \includegraphics[width=.25in]{sp-logo}
          \end{minipage}%
        }{}% else nothing; closes \IfFileExists
        \else
        % If the ps logo is present,
        \IfFileExists{sp-logo.ps}{%   
          % then insert the postscript version,
          \begin{minipage}[c]{.25in}
            \includegraphics[width=.25in]{sp-logo}
          \end{minipage}%
        }{}% else, nothing; closes \IfFileExists
        \fi % close \ifpdf
      }{}% closes \ifthenelse
      \begin{minipage}[c]{5.25in}
        \href{http://http://glossa.ubiquitypress.com/}{Glossa} Volume \@spvolume, Article \@sparticle: 1--\@splastpage, \@spyear\\
        \href{https://doi.org/\@spdoi}{https://doi.org/\@spdoi}
      \end{minipage}%
      \gdef\@articlenumber{\@sparticle}
    }%
    \renewcommand{\@oddfoot}{%
      \begin{minipage}[c]{1\textwidth}%
        \footnotesize\copyright \@spyear\ \@shortauthor\\
        \cctext
      \end{minipage}%
    }%
    \renewcommand{\@evenhead}{}%
    \renewcommand{\@evenfoot}{}%
  }%
  \thispagestyle{spfirstheadings}%
}%


% Prints abbreviated article information on non-initial pages.
\def\ps@spheadings{%
  \let\@mkboth\@gobbletwo%
  \def\@oddhead{{\headerfontsize\sffamily \@shorttitle}\hfill{\headerfontsize\sffamily\ifx\@empty\@articlenumber\else\@articlenumber:\fi\thepage}}% short title, inner
  \def\@oddfoot{%\hfill{\headerfontsize\ifx\@empty\@articlenumber\else\@articlenumber:\fi%\thepage}\hfill
  }% centered pg no
  \def\@evenhead{{\headerfontsize\sffamily\ifx\@empty\@articlenumber\else\@articlenumber:\fi\thepage} \hfill {\headerfontsize\sffamily\@shortauthor}}% author names, inner
  \def\@evenfoot{%\hfill{\headerfontsize\ifx\@empty\@articlenumber\else\@articlenumber:\fi\thepage}\hfill
  }% centered pg no
}
\pagestyle{spheadings}         

%=====================================================================
%=========================== final typeset ===========================


\if@final
\RequirePackage{sp-hyperxmp}
\splogo
\AtBeginDocument{\firstpagefinalheadings}
\else            
\nosplogo
\AtBeginDocument{\thispagestyle{plain}} 
\fi


%=====================================================================
%=========================== frontmatter =============================

% The spacing specs (arg 2 of \list) are the same for the mshistory, abstract, and keywords environments, except that the abstract is indented somewhat.

% Single parameter determines the left and right margin size.
\newcommand{\frontmatterspacing}[1]{%
  \small
  \topsep 10\p@ \@plus4\p@   \@minus6\p@ % from size12.clo
  \advance\topsep by3.5ex plus -1ex minus -.2ex
  \setlength{\listparindent}{0em}
  \setlength{\itemindent}{0em}
  \setlength{\leftmargin}{#1}
  \setlength{\rightmargin}{\leftmargin}
  \setlength{\parskip}{0em}
}

\newenvironment{mshistory}%
{\list{}{\frontmatterspacing{0em}}%
\item\relax}%
{\endlist}

\renewenvironment{abstract}%
{\sffamily\list{}{\frontmatterspacing{0.25in}}%
\item\relax\textbf{\abstractname} }%
{\endlist}

\newenvironment{keywords}%
{\sffamily\list{}{\frontmatterspacing{0em}}%
\item\relax\textbf{Keywords:}}%
{\endlist}

%=====================================================================
%============================ sectioning =============================

\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}

\renewcommand{\section}{\@startsection{section}{1}{0pt}%
  {-3.5ex plus -1ex minus -.2ex}%
  {1.8ex plus.2ex}%
  {\noindent\normalfont\Large\sffamily\bfseries}}

\renewcommand{\subsection}{\@startsection{subsection}{2}{0pt}%
  {-3.5ex plus -1ex minus -.2ex}%
  {1.8ex plus.2ex}%
  {\noindent\normalfont\large\sffamily\bfseries}}

\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0pt}%
  {-3.5ex plus -1ex minus -.2ex}%
  {1.8ex plus.2ex}%
  {\noindent\normalfont\normalsize\sffamily\bfseries}}

\renewcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}%
  {-3.5ex plus -1ex minus -.2ex}%
  {1.8ex plus.2ex}%
  {\noindent\normalsize\sffamily\bfseries}}

\renewcommand{\subparagraph}{\@startsection{subparagraph}{5}{\z@}%
  {-3.5ex plus -1ex minus -.2ex}%
  {1.8ex plus.2ex}%
  {\noindent\normalsize\sffamily\it}}

% General formatting --- for punctuating section headings.
\renewcommand{\@seccntformat}[1]{\@nameuse{the#1}\hspace{1em}}

%=====================================================================
%============================ footnotes ==============================

\renewcommand{\@makefntext}[1]{%
  \parindent=0.25in
  \noindent \hbox to \z@{\hss{\textsuperscript{\@thefnmark}} \hfil}#1}

%=====================================================================
%============================ backmatter =============================

% Environment for formatting all the addresses.
\newenvironment{addresses}%
{\@@par
 \let\par\@empty
 \addvspace{3.25ex}%
 \noindent%\textbf{Author addresses}
 \small
 % Individual author addresses.
 \newenvironment{address}%
   {% For email addresses inside the address environment.
    %\newcommand{\email}{\texttt}%
    \begin{minipage}[t]{19pc}\raggedright}
   {\end{minipage}\hspace{.15pc plus1pc}}%
 \ignorespaces
}%
{\lineskiplimit 1pc
 \lineskip 1pc
 \@@par}

%=====================================================================
%======================== other environments =========================

% enumerate labeling that won't conflict with standard ex. numbers.
\renewcommand{\theenumi}{\roman{enumi}}
\renewcommand{\labelenumi}{\theenumi.}
\renewcommand{\theenumii}{\alph{enumii}}
\renewcommand{\labelenumii}{\theenumii.}

% list spacing ought to satisfy \itemsep + \parsep < \topsep + \parskip
\def\@listi{\leftmargin\leftmargini
            \parsep 4\p@  \@plus2\p@ \@minus\p@
            \topsep 10\p@ \@plus4\p@ \@minus\p@
            \itemsep4\p@  \@plus2\p@ \@minus\p@}
\let\@listI\@listi
\@listi

% typeset figures with lines above and below and the caption title and caption texts in boxes next to each other, top aligned.  these definitions extend those of float.sty.
%
% sp caption style
%\newcommand\floatc@sp[2]{%
%  \parbox[t]{0.15\textwidth}{{\@fs@cfont#1}}%
%  \parbox[t]{0.85\textwidth}{#2}}%

% sp float style; uses the sp caption style
%\newcommand\fs@sp{
%  \def\@fs@cfont{\bfseries}\let\@fs@capt\floatc@sp
%  \def\@fs@pre{\hrule\kern5pt}%
%  \def\@fs@post{\kern5pt\hrule\relax}%
%  \def\@fs@mid{\kern10pt}
%  \let\@fs@iftopcapt\iffalse}

% users can override these commands using float.sty's functionality
%\floatstyle{sp}
%\restylefloat{figure}
%\restylefloat{table}

%=====================================================================
%=========================== useful macros ===========================

\newcommand{\spj}{\emph{S\&P}\xspace}

\def\co{\colon\thinspace}

\DeclareRobustCommand\dash{%
  \unskip\nobreak\thinspace\textemdash\thinspace\ignorespaces}
\pdfstringdefDisableCommands{\renewcommand{\dash}{ - }}

% based on \url defined in hyperref.sty
\DeclareRobustCommand*{\http}{\hyper@normalise\http@}
\def\http@#1{\hyper@linkurl{\Hurl{#1}}{http://#1}}

\newcommand{\email}[1]{\href{mailto:#1}{#1}}

\providecommand{\sv}[1]{\ensuremath{\llbracket #1 \rrbracket}}

%=====================================================================
%=========================== linguex settings ========================

\if@linguex
    \RequirePackage{linguex}%
    \renewcommand{\firstrefdash}{}%
    \AtBeginDocument{\settowidth{\Exlabelwidth}{(110)}}
\else
\relax
\fi

\RequirePackage{cgloss} %for adding the language name and source of the example on the first line of glossed examples (requires \gll before the foreign language example and \glt before the translation)

%================================ miscellaneous ======================
%=====================================================================

\setlist{nolistsep} %reduce space between items in lists

glossa.png — binary, 256 KB

sample.bib · 7 KB
%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/


%% Created for Guido at 2022-07-04 17:53:23 +0200 


%% Saved with string encoding Unicode (UTF-8) 



@inproceedings{Marantz1991,
	address = {Cornell University, Ithaca, NY},
	author = {Marantz, Alec},
	booktitle = {Eastern States Conference on Linguistics},
	date-added = {2021-07-05 12:57:19 +0200},
	date-modified = {2021-07-05 12:57:19 +0200},
	editor = {Westphal, Germ{\'a}n and Ao, Benjamin and Chae, Hee-Rahk},
	pages = {234--253},
	publisher = {Cornell Linguistics Club},
	title = {Case and Licensing},
	year = {1991}}

@book{chomsky:1981,
	author = {Noam Chomsky},
	date-added = {2020-07-27 12:58:34 +0200},
	date-modified = {2020-07-27 12:58:45 +0200},
	publisher = {Dordrecht: Foris},
	title = {Lectures on Government and Binding},
	year = {1981}}

@article{iverson:1989,
	author = {Iverson, Gregory K.},
	date-added = {2020-07-27 12:55:35 +0200},
	date-modified = {2020-07-27 12:55:35 +0200},
	journal = {Phonology},
	pages = {285-303},
	title = {On the Category Supralaryngeal},
	volume = {6},
	year = {1989}}

@incollection{mccarthy:1999,
	address = {Malden, MA and Oxford},
	author = {McCarthy, John J. and Prince, Alan S.},
	booktitle = {Phonological Theory: {The} Essential Readings},
	date-added = {2020-07-27 12:55:03 +0200},
	date-modified = {2020-07-27 12:55:03 +0200},
	editor = {Goldsmith, John A.},
	pages = {238-288},
	publisher = {Blackwell},
	title = {Prosodic morphology},
	year = {1999}}

@article{murray:1983,
	author = {Murray, Robert W. and Vennemann, Theo},
	date-added = {2020-07-27 12:55:03 +0200},
	date-modified = {2020-07-27 12:55:03 +0200},
	journal = {Language},
	number = {3},
	pages = {514-528},
	title = {Sound Change and Syllable Structure in {Germanic} Phonology},
	volume = {59},
	year = {1983}}

@article{Caha2017a,
	author = {Caha, Pavel},
	date-added = {2019-11-21 16:41:55 +0100},
	date-modified = {2021-05-17 17:20:18 +0200},
	journal = {Glossa},
	pages = {84.1-32},
	title = {How (not) to derive a {*ABA}: The case of {Blansitt's} generalization},
	volume = {2},
	year = {2017}}

@incollection{Massam2000,
	address = {Oxford},
	author = {Massam, Diane},
	booktitle = {The Syntax of Verb Initial Languages},
	date-added = {2016-12-24 13:58:53 +0000},
	date-modified = {2022-07-04 17:53:16 +0200},
	editor = {Andrew Carnie and Eithne Guilfoyle},
	pages = {97-116},
	publisher = {Oxford University Press},
	series = {Oxford Studies in Comparative Syntax},
	title = {{VSO} versus {VOS}: Aspects of {Niuean} word order},
	year = {2000}}

@book{Bobaljik2012,
	address = {Cambridge, MA},
	author = {Jonathan Bobaljik},
	date-added = {2016-10-15 19:51:15 +0000},
	date-modified = {2016-10-15 19:51:15 +0000},
	publisher = {MIT Press},
	title = {Universals In Comparative Morphology},
	year = {2012}}

@book{chomsky:1986a,
	address = {Cambridge, MA},
	author = {Noam Chomsky},
	date-added = {2016-07-05 12:37:10 +0000},
	date-modified = {2019-02-27 11:21:25 +0100},
	publisher = {MIT Press},
	title = {Barriers},
	year = {1986}}

@incollection{Li1999,
	address = {Guangzhou},
	author = {Li, Rulong},
	booktitle = {Daici \textup{[Pronouns]}},
	date-added = {2015-11-29 12:04:06 +0000},
	date-modified = {2021-05-03 15:32:40 +0200},
	editor = {Li, Rulong and Chang, Song-Hing},
	pages = {263--287},
	publisher = {Jinan University Press},
	title = {Minnan fangyan de daici [{Pronouns} in Southern {Min}]},
	year = {1999}}

@article{swart:1998,
	author = {de Swart, Henri{\"e}tte},
	date-added = {2015-11-21 20:38:48 +0000},
	date-modified = {2021-10-07 17:57:30 +0200},
	journal = {Natural Language and Linguistic Theory},
	number = {2},
	pages = {347-385},
	title = {Aspect shift and coercion},
	volume = {16},
	year = {1998},
	bdsk-url-1 = {http://www.jstor.org/stable/4047954}}

@article{belder:2011,
	author = {De Belder, Marijke},
	date-added = {2015-11-21 11:57:38 +0000},
	date-modified = {2016-03-08 10:19:10 +0000},
	doi = {10.1007/s10828-011-9045-0},
	journal = {Journal of Comparative Germanic Linguistics},
	pages = {173--202},
	title = {A morphosyntactic decomposition of countability in {G}ermanic},
	volume = {14},
	year = {2011},
	bdsk-url-1 = {https://doi.org/10.1007/s10828-011-9045-0}}

@book{blevins:2004,
	address = {Cambridge},
	author = {Blevins, Juliette},
	publisher = {Cambridge University Press},
	title = {Evolutionary Phonology},
	year = {2004}}

@article{casali:1998a,
	author = {Casali, Roderic},
	date-modified = {2016-12-25 14:33:53 +0000},
	journal = {Chicago Linguistic Society (CLS)},
	number = {1},
	pages = {55-68},
	title = {Predicting {ATR} Activity},
	volume = {34},
	year = {1998}}

@book{chomsky:1986,
	address = {New York},
	author = {Noam Chomsky},
	date-modified = {2016-01-22 22:17:32 +0000},
	publisher = {Praeger},
	title = {Knowledge of Language},
	year = {1986}}

@book{coetsem:2000,
	address = {Heidelberg},
	author = {van Coetsem, Frans},
	date-modified = {2016-01-22 22:14:58 +0000},
	publisher = {Winter},
	title = {A General and Unified Theory of the Transmission Process in Language Contact},
	year = {2000}}

@unpublished{franks:2005,
	author = {Franks, Steven},
	date-modified = {2016-07-05 12:52:45 +0000},
	note = {Ms. Indiana University},
	title = {Bulgarian Clitics are Positioned in the Syntax},
	year = {2005},
	bdsk-url-1 = {http://www.cogs.indiana.edu/people/homepages/franks/Bg_clitics_remark_dense.pdf}}

@article{baker:1989,
	author = {Baker, Mark and Johnson, Kyle and Roberts, Ian},
	date-modified = {2021-05-03 15:30:56 +0200},
	journal = {Linguistic Inquiry},
	number = {2},
	pages = {219-251},
	title = {Passive Arguments Raised},
	volume = {20},
	year = {1989}}

@book{lahiri:2000,
	address = {Berlin},
	date-modified = {2016-12-25 14:07:42 +0000},
	editor = {Lahiri, Aditi},
	number = {127},
	publisher = {Mouton de Gruyter},
	series = {Trends in Linguistics},
	title = {Analogy, Leveling, Markedness: {Principles} of Change in Phonology and Morphology},
	year = {2000}}

@book{oed:1989,
	address = {Oxford},
	date-modified = {2015-11-22 21:03:41 +0000},
	publisher = {Oxford University Press},
	title = {Oxford {English} Dictionary},
	year = {1989}}

@incollection{rissanen:1999,
	address = {Cambridge},
	author = {Rissanen, Matti},
	booktitle = {Cambridge History of the {English} Language},
	date-modified = {2015-11-20 22:59:49 +0000},
	editor = {Lass, Roger},
	pages = {187-331},
	publisher = {Cambridge University Press},
	title = {Syntax},
	volume = {3},
	year = {1999}}

@phdthesis{stewart:2000,
	address = {Columbus, OH},
	author = {Stewart, Jr., Thomas W.},
	date-modified = {2018-01-27 11:06:42 +0000},
	school = {The Ohio State University},
	title = {Mutation as Morphology: {Bases}, Stems, and Shapes in {Scottish Gaelic}},
	year = {2000}}

@phdthesis{yu:2003,
	address = {Berkeley, CA},
	author = {Yu, Alan},
	date-modified = {2018-01-27 10:51:37 +0000},
	school = {University of California},
	title = {The Morphology and Phonology of Infixation},
	year = {2003}}

The first page, as this template compiles today. Click it to enlarge, and again to shrink. Open the file ↗