From dda3ebed2157d0224af1466d83530b73ad38001a Mon Sep 17 00:00:00 2001
From: kthoden <kthoden@mpiwg-berlin.mpg.de>
Date: Wed, 29 Jan 2020 15:59:41 +0100
Subject: [PATCH] Latest changes in submodules

---
 xxe/eoa/rnc/eoa-tei-strict.rnc                |   9 +-
 xxe/eoa/xsl/tei2eoatex/eoatex_frontmatter.xsl | 527 ++++++++++++------
 2 files changed, 350 insertions(+), 186 deletions(-)

diff --git a/xxe/eoa/rnc/eoa-tei-strict.rnc b/xxe/eoa/rnc/eoa-tei-strict.rnc
index 060ee39..8cf9155 100644
--- a/xxe/eoa/rnc/eoa-tei-strict.rnc
+++ b/xxe/eoa/rnc/eoa-tei-strict.rnc
@@ -144,7 +144,7 @@ tei_header =
       element encodingDesc {
          element projectDesc {
             element p {
-               attribute n { "eoainfo" | ("mprlinformation" | "eosinformation" ) | "scientificboard" | "eoadevteam" },
+               attribute n { "eoainfo" | "pressinformation" | "scientificboard" | "eoadevteam" },
                ( text | hi )+
             }+
          },
@@ -216,7 +216,7 @@ author-or-volumeeditor =
 
 editors =
    element editor {
-      attribute role { "submitter"|"editorialcoordinator"|"copyeditor"|"translator"|"publicationmanager"|"publicationassistant"|"imageprocessor" },
+      attribute role { "submitter"|"editorialcoordinator"|"copyeditor"|"translator"|"publicationmanager"|"publicationassistant"|"imageprocessor"|"editorinchief"|"serieseditor" },
       attribute ref { xsd:anyURI },
       text
    }*
@@ -380,9 +380,8 @@ table =
       # attribute n { xsd:integer },
       attribute rows { xsd:integer },
       attribute cols { xsd:integer },
-      (( attribute xml:id { xsd:NCName },
-         attribute n { xsd:integer }?)|
-         attribute n { "nonumber" } ),
+      attribute xml:id { xsd:NCName },
+      attribute n { "nonumber" }? ,
       # ( attribute xml:id { xsd:NCName }
       # | attribute n { "nonumber" }),
       attribute rend { "blank" }?,
diff --git a/xxe/eoa/xsl/tei2eoatex/eoatex_frontmatter.xsl b/xxe/eoa/xsl/tei2eoatex/eoatex_frontmatter.xsl
index d664939..1f747e2 100644
--- a/xxe/eoa/xsl/tei2eoatex/eoatex_frontmatter.xsl
+++ b/xxe/eoa/xsl/tei2eoatex/eoatex_frontmatter.xsl
@@ -7,192 +7,357 @@
                 exclude-result-prefixes="xs tei"
                 version="2.0">
 
-<xsl:template name="writefrontmatter">
-  <xsl:result-document method="text" include-content-type="no" href="{'texfiles/frontmatter.tex'}">
-    <xsl:value-of select="eoa:texcomment('Frontmatter created automatically out of metadata in TEI header')" />
-    <xsl:text>\pagestyle{empty}&#x000a;\pagenumbering{roman}&#x000a;\setcounter{page}{1} &#x2E0E;&#x000a;&#x000a;</xsl:text>
-    <xsl:value-of select="eoa:texcomment('Page 1: Just the title')" />
-    <xsl:text>\begin{center}&#x000a;\Large{</xsl:text>
-    <xsl:apply-templates select="//tei:titleStmt/tei:title[@type='main']"/>
-    <xsl:text>}\\&#x000a;&#x000a;\vspace{2mm}&#x000a;&#x000a;\large{</xsl:text>
-    <xsl:apply-templates select="//tei:titleStmt/tei:title[@type='sub']"/>
-    <xsl:text>}&#x000a;\end{center}&#x000a;&#x000a;\newpage&#x000a;&#x000a;</xsl:text>
-    <xsl:value-of select="eoa:texcomment('Page 2: Series Editors, Team, Board, Edition Open Access description, year')" />
-    <xsl:text>\begin{center}&#x000a;\large \EOAbold{</xsl:text>
-    <xsl:apply-templates select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='EOA']"/>
-    <xsl:text>}&#x000a;\end{center}&#x000a;&#x000a;</xsl:text>
-    <xsl:text>\vspace{15mm}&#x000a;\noindent\EOAbold{</xsl:text>
-    <xsl:value-of select="//tei:seriesStmt/tei:respStmt/tei:resp"/>
-    <xsl:text>}\\[2mm]&#x000a;</xsl:text>
-    <xsl:value-of select="//tei:seriesStmt/tei:respStmt/tei:name[@type='serieseditors']"/>
-    <!-- Ian T.\ Baldwin, Gerd Graßhoff, Jürgen Renn, Dagmar Schäfer,\\Robert Schlögl, Bernard F.\ Schutz -->
-    <xsl:text>&#x000a;&#x000a;\vspace{10mm}&#x000a;\noindent\EOAbold{Edition Open Access Development Team}\\[2mm]&#x000a;</xsl:text>
-    <xsl:value-of select="//tei:projectDesc/tei:p[@n='eoadevteam']"/>
-    <xsl:text>&#x000a;&#x000a;\vspace{10mm}&#x000a;\noindent </xsl:text>
-    <xsl:apply-templates select="//tei:projectDesc/tei:p[@n='eoainfo'][1]"/>
-    <xsl:text>\vspace{3pt}&#x000a;&#x000a;\noindent </xsl:text>
-    <xsl:apply-templates select="//tei:projectDesc/tei:p[@n='eoainfo'][2]"/>
-    <xsl:text>&#x000a;\newpage&#x000a;&#x000a;</xsl:text>
-    <xsl:value-of select="eoa:texcomment('Page 3: Title, subtitle, author/editor, series, year')" />
-    <xsl:choose>
-      <xsl:when test="//tei:seriesStmt/tei:title/text()= ('Studies', 'Sources') ">
-        <xsl:value-of select="eoa:texcomment('No need for minipage')"/>
-      </xsl:when>
-      <xsl:otherwise>
-    <xsl:text>\begin{minipage}[t]{90mm}</xsl:text>
-    <xsl:text>&#x000a;&#x000a;</xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:text>
-    \vspace*{12mm}&#x000a;\begin{center}&#x000a;\Large {</xsl:text>
-    <xsl:apply-templates select="//tei:titleStmt/tei:title[@type='main']"/>
-    <xsl:text>}\\&#x000a;&#x000a;\vspace{2mm}&#x000a;</xsl:text>
-    <xsl:if test="//tei:titleStmt/tei:title[@type='sub']">
-      <xsl:text>\large{</xsl:text>
-      <xsl:apply-templates select="//tei:titleStmt/tei:title[@type='sub']"/>
-      <xsl:text>}&#x000a;</xsl:text>
-    </xsl:if>
-    <xsl:text>\end{center}&#x000a;&#x000a;\vspace{10mm}&#x000a;\begin{center}&#x000a;\large </xsl:text>
+  <xsl:template name="writefrontmatter">
+    <xsl:result-document method="text" include-content-type="no" href="{'texfiles/frontmatter.tex'}">
+      <xsl:choose>
+        <xsl:when test="//tei:seriesStmt/tei:title/text()= 'Sources' ">
+          <xsl:value-of select="eoa:texcomment('Frontmatter created automatically out of metadata in TEI header')" />
+          <xsl:text>\pagestyle{empty}&#x000a;\pagenumbering{roman}&#x000a;\setcounter{page}{1} &#x2E0E;&#x000a;&#x000a;</xsl:text>
+          <xsl:value-of select="eoa:texcomment('Page 1: Just the title')" />
+          <xsl:text>\begin{center}&#x000a;\vspace{60mm}&#x000a;\Large{</xsl:text>
+          <xsl:apply-templates select="//tei:titleStmt/tei:title[@type='main']"/>
+          <xsl:text>}\\&#x000a;&#x000a;\vspace{3mm}&#x000a;&#x000a;\large{</xsl:text>
+          <xsl:apply-templates select="//tei:titleStmt/tei:title[@type='sub']"/>
+          <xsl:text>}&#x000a;\end{center}&#x000a;&#x000a;\newpage&#x000a;&#x000a;</xsl:text>
+          <xsl:value-of select="eoa:texcomment('Page 2: Series Editors, Team, Board, Edition Open Access description, year')" />
+          <xsl:text>\begin{center}&#x000a;\Huge \textbf{</xsl:text>
+          <xsl:apply-templates select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='EOA']"/>
+          <xsl:text>}&#x000a;\end{center}&#x000a;&#x000a;</xsl:text>
+          <xsl:text>\vspace{15mm}&#x000a;\noindent\textbf{</xsl:text>
+          <xsl:value-of select="//tei:seriesStmt/tei:respStmt/tei:resp"/>
+          <xsl:text>}\\[2mm]&#x000a;</xsl:text>
+          <xsl:value-of select="//tei:seriesStmt/tei:respStmt/tei:name[@type='serieseditors']"/>
+          <!-- Ian T.\ Baldwin, Gerd Graßhoff, Jürgen Renn, Dagmar Schäfer,\\Robert Schlögl, Bernard F.\ Schutz -->
+          <xsl:text>&#x000a;&#x000a;\vspace{15mm}&#x000a;\noindent\textbf{Edition Open Access Development Team}\\[2mm]&#x000a;</xsl:text>
+          <xsl:value-of select="//tei:projectDesc/tei:p[@n='eoadevteam']"/>
+          <xsl:text>&#x000a;&#x000a;\vspace{15mm}&#x000a;\noindent </xsl:text>
+          <xsl:apply-templates select="//tei:projectDesc/tei:p[@n='eoainfo'][1]"/>
+          <xsl:text>\\&#x000a;\vspace{3pt}&#x000a;&#x000a;\noindent </xsl:text>
+          <xsl:apply-templates select="//tei:projectDesc/tei:p[@n='eoainfo'][2]"/>
+          <xsl:text>\\&#x000a;\vfill&#x000a;\begin{center}&#x000a;</xsl:text>
+          <xsl:text>\large\textbf{</xsl:text>
+          <xsl:apply-templates select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='EOA']"/>
+          <xsl:text>\\ </xsl:text>
+          <xsl:value-of select="format-date(xs:date(//tei:publicationStmt/tei:date/@when), '[Y0001]')"/>
+          <xsl:text>}&#x000a;\end{center}&#x000a;\newpage&#x000a;&#x000a;</xsl:text>
+          <xsl:value-of select="eoa:texcomment('Page 3: Title, subtitle, author/editor, series, year')" />
+          <xsl:text>
+          \vspace*{12mm}&#x000a;\begin{center}&#x000a;\Large {</xsl:text>
+          <xsl:apply-templates select="//tei:titleStmt/tei:title[@type='main']"/>
+          <xsl:text>}\\&#x000a;&#x000a;\vspace{2mm}&#x000a;</xsl:text>
+          <xsl:if test="//tei:titleStmt/tei:title[@type='sub']">
+            <xsl:text>\large{</xsl:text>
+            <xsl:apply-templates select="//tei:titleStmt/tei:title[@type='sub']"/>
+            <xsl:text>}&#x000a;</xsl:text>
+          </xsl:if>
+          <xsl:text>\end{center}&#x000a;&#x000a;\vspace{16mm}&#x000a;&#x000a;\vspace{18mm}&#x000a;\begin{center}&#x000a;\large </xsl:text>
 
-    <xsl:variable name="people" select="//tei:titleStmt/tei:author/@ref | //tei:titleStmt/tei:editor[@role='volumeeditor']/@ref"/>
-    <xsl:call-template name="format_persons">
-      <xsl:with-param name="people" select="$people"/>
-    </xsl:call-template>
+          <xsl:variable name="people" select="//tei:titleStmt/tei:author/@ref | //tei:titleStmt/tei:editor[@role='volumeeditor']/@ref"/>
+          <xsl:call-template name="format_persons">
+            <xsl:with-param name="people" select="$people"/>
+          </xsl:call-template>
 
-    <xsl:if test="//tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:editor[@role='volumeeditor']">
-      <!-- observe number of people here, name is taken from translations file -->
-      <xsl:choose>
-        <xsl:when test="count($people) = 1">
-          <xsl:variable name="keyterm" select="$transl//entry[@name='editor-abbr']"/>
-          <xsl:value-of select="concat(' (', $keyterm/@*[local-name() = $langid], ')')"/>
+          <xsl:if test="//tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:editor[@role='volumeeditor']">
+            <!-- observe number of people here, name is taken from translations file -->
+            <xsl:choose>
+              <xsl:when test="count($people) = 1">
+                <xsl:variable name="keyterm" select="$transl//entry[@name='editor-abbr']"/>
+                <xsl:value-of select="concat(' (', $keyterm/@*[local-name() = $langid], ')')"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:variable name="keyterm" select="$transl//entry[@name='editors-abbr']"/>
+                <xsl:value-of select="concat(' (', $keyterm/@*[local-name() = $langid], ')')"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:if>
+          <xsl:text>&#x000a;\end{center}&#x000a;&#x000a;\vfill&#x000a;\begin{center}&#x000a;\Large {\textbf{</xsl:text>
+          <xsl:value-of select="concat(//tei:seriesStmt/tei:title, '\ ', //tei:seriesStmt/tei:idno[@type='number'])"/>
+          <xsl:text>}}&#x000a;\end{center}&#x000a;&#x000a;</xsl:text>
+          <xsl:text>\newpage&#x000a;&#x000a;&#x000a;</xsl:text>
+          <xsl:value-of select="eoa:texcomment('Page 4: Complete Series Information EOS, Editor')" />
+          <xsl:text>\begin{flushleft}&#x000a;\Large \textbf{</xsl:text>
+          <xsl:apply-templates select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='Press']"/>
+          <xsl:text>}&#x000a;\end{flushleft}&#x000a;&#x000a;</xsl:text>
+          <xsl:text>\vspace{5mm}&#x000a;\noindent </xsl:text>
+          <xsl:apply-templates select="//tei:encodingDesc/tei:projectDesc/tei:p[@n='pressinformation']"/>
+          <xsl:text>&#x000a;&#x000a;\vspace{5mm}&#x000a;\noindent\textbf{Editor-in-chief}\\[2mm]&#x000a;</xsl:text>
+          <xsl:variable name="editorinchief" select="//tei:titleStmt/tei:editor[@role='editorinchief']/@ref"/>
+          <xsl:call-template name="format_persons">
+            <xsl:with-param name="people" select="$editorinchief"/>
+          </xsl:call-template>
+          <xsl:text>, </xsl:text>
+          <xsl:apply-templates select="//tei:titleStmt/tei:respStmt[tei:resp/text() = 'editorinchief']/tei:persName/tei:affiliation/tei:orgName"/>
+          <xsl:text>\newline&#x000a;</xsl:text>
+          <xsl:apply-templates select="//tei:titleStmt/tei:respStmt[tei:resp/text() = 'editorinchief']/tei:persName/tei:email"/>
+          <xsl:text>&#x000a;&#x000a;\vspace{5mm}&#x000a;\noindent\textbf{Editors}\\[2mm]</xsl:text>
+          <xsl:text>
+            <!-- take care of these! -->
+            Stephen P. Weldon, Department of History of Science, University of Oklahoma \newline
+            Esther Chen, Library of the Max Planck Institute for the History of Science, Berlin \newline
+            Kerry V. Magruder, History of Science Collections, University of Oklahoma Libraries \newline
+            Anne-Laurence Caudano, History Faculty, The University of Winnipeg \newline
+            Massimiliano Badino, Department of Human Sciences, University of Verona \newline
+            Robert G. Morrison, Department of Religion, Bowdoin College
+          </xsl:text>
+          <xsl:text>&#x000a;&#x000a;\newpage&#x000a;&#x000a;</xsl:text>
+          <xsl:value-of select="eoa:texcomment('Page 5: Communicator, Assistance, Gratitude, ISBN-Number, License')" />
+          <xsl:text>\vspace{20mm}&#x000a;</xsl:text>
+          <xsl:text>\noindent \textbf{</xsl:text>
+          <xsl:value-of select="concat(//tei:seriesStmt/tei:title, '\ ', //tei:seriesStmt/tei:idno[@type='number'])"/>
+          <xsl:text>}\\&#x000a;</xsl:text>
+          <xsl:if test="//tei:titleStmt/tei:editor[(@role='submitter')]/@ref">
+            <xsl:text>\noindent Submitted by: </xsl:text>
+            <xsl:variable name="submitters" select="//tei:titleStmt/tei:editor[@role='submitter']/@ref"/>
+            <xsl:call-template name="format_persons">
+              <xsl:with-param name="people" select="$submitters"/>
+            </xsl:call-template>
+            <xsl:text>\\&#x000a;\vspace{4mm}&#x000a;</xsl:text>
+          </xsl:if>
+          <xsl:text>\vspace{10pt}&#x000a;</xsl:text>
+          <xsl:text>\noindent Cover:</xsl:text>
+          <xsl:apply-templates select="//tei:text/tei:front/tei:figure/tei:head"/>
+          <xsl:text>\vspace{10pt}&#x000a;</xsl:text>
+          <xsl:if test="//tei:titleStmt/tei:editor[@role='imageprocessor']/@ref">
+            <xsl:text>\noindent Image Processing: \\</xsl:text>
+            <xsl:variable name="imageprocessors" select="//tei:titleStmt/tei:editor[@role='imageprocessor']/@ref"/>
+            <xsl:call-template name="format_persons">
+              <xsl:with-param name="people" select="$imageprocessors"/>
+            </xsl:call-template>
+            <xsl:text>\\&#x000a;&#x000a;</xsl:text>
+          </xsl:if>
+          <xsl:text>\vfill&#x000a;\begin{flushleft}&#x000a;</xsl:text>
+          <xsl:if test="//tei:publicationStmt/tei:idno[@type='isbn']">
+            <xsl:text>
+            \noindent ISBN </xsl:text>
+            <xsl:value-of select="//tei:publicationStmt/tei:idno[@type='isbn']"/>
+            <xsl:text>\\&#x000a;</xsl:text>
+          </xsl:if>
+          <xsl:if test="//tei:publicationStmt/tei:idno[@type='isbnpdf']">
+            <xsl:text>
+            \noindent e-ISBN [PDF] </xsl:text>
+            <xsl:value-of select="//tei:publicationStmt/tei:idno[@type='isbnpdf']"/>
+            <xsl:text>\\&#x000a;</xsl:text>
+          </xsl:if>
+          <xsl:if test="//tei:publicationStmt/tei:idno[@type='isbnepub']">
+            <xsl:text>
+            \noindent e-ISBN [EPUB] </xsl:text>
+            <xsl:value-of select="//tei:publicationStmt/tei:idno[@type='isbnepub']"/>
+            <xsl:text>\\&#x000a;</xsl:text>
+          </xsl:if>
+          <xsl:text>First published </xsl:text>
+          <xsl:value-of select="format-date(xs:date(//tei:publicationStmt/tei:date/@when), '[Y0001]')"/>
+          <xsl:text> by </xsl:text>
+          <xsl:value-of select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='EOA']"/>
+          <xsl:text>\\&#x000a;Max Planck Institute for the History of Science\\&#x000a;</xsl:text>
+          <xsl:value-of select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='EOA']/@ref"/>
+          <xsl:text>\\&#x000a;</xsl:text><xsl:if test="//tei:publicationStmt/tei:distributor/tei:orgName">
+          <xsl:text>Printed and distributed by\\&#x000a;</xsl:text>
+          <xsl:apply-templates select="//tei:publicationStmt/tei:distributor/tei:orgName"/>
+          <xsl:text>\\&#x000a;</xsl:text></xsl:if>
+          <xsl:text>Published under </xsl:text>
+          <xsl:apply-templates select="//tei:publicationStmt/tei:availability/tei:licence"/>
+          <xsl:text> License\\&#x000a;</xsl:text>
+          <xsl:value-of select="//tei:publicationStmt/tei:availability/tei:licence/@target"/>
+          <xsl:text>&#x000a;\\[2mm]&#x000a;The Deutsche Nationalbibliothek lists this publication in the Deutsche National-bibliografie; detailed bibliographic data are available in the Internet at \url{http://dnb.d-nb.de}.&#x000a;</xsl:text>
+          <xsl:text>\\&#x000a;&#x000a;\end{flushleft}&#x000a;\clearpage&#x000a;\mbox{}&#x000a;&#x000a;\newpage</xsl:text>
+          <xsl:choose>
+            <xsl:when test="$extranewpage">
+              <xsl:text>\newpage&#x000a;</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="eoa:texcomment('\newpage&#x000a;')" />
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:value-of select="eoa:texcomment('Following pages use normal page style, which is fancy')" />
+          <xsl:text>\pagestyle{fancy}</xsl:text>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:variable name="keyterm" select="$transl//entry[@name='editors-abbr']"/>
-          <xsl:value-of select="concat(' (', $keyterm/@*[local-name() = $langid], ')')"/>
+          <xsl:value-of select="eoa:texcomment('Frontmatter created automatically out of metadata in TEI header')" />
+          <xsl:text>\pagestyle{empty}&#x000a;\pagenumbering{roman}&#x000a;\setcounter{page}{1} &#x2E0E;&#x000a;&#x000a;</xsl:text>
+          <xsl:value-of select="eoa:texcomment('Page 1: Just the title')" />
+          <xsl:text>\begin{center}&#x000a;\Large{</xsl:text>
+          <xsl:apply-templates select="//tei:titleStmt/tei:title[@type='main']"/>
+          <xsl:text>}\\&#x000a;&#x000a;\vspace{2mm}&#x000a;&#x000a;\large{</xsl:text>
+          <xsl:apply-templates select="//tei:titleStmt/tei:title[@type='sub']"/>
+          <xsl:text>}&#x000a;\end{center}&#x000a;&#x000a;\newpage&#x000a;&#x000a;</xsl:text>
+          <xsl:value-of select="eoa:texcomment('Page 2: Series Editors, Team, Board, Edition Open Access description, year')" />
+          <xsl:text>\begin{center}&#x000a;\large \textbf{</xsl:text>
+          <xsl:apply-templates select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='EOA']"/>
+          <xsl:text>}&#x000a;\end{center}&#x000a;&#x000a;</xsl:text>
+          <xsl:text>\vspace{15mm}&#x000a;\noindent\textbf{</xsl:text>
+          <xsl:value-of select="//tei:seriesStmt/tei:respStmt/tei:resp"/>
+          <xsl:text>}\\[2mm]&#x000a;</xsl:text>
+          <xsl:value-of select="//tei:seriesStmt/tei:respStmt/tei:name[@type='serieseditors']"/>
+          <!-- Ian T.\ Baldwin, Gerd Graßhoff, Jürgen Renn, Dagmar Schäfer,\\Robert Schlögl, Bernard F.\ Schutz -->
+          <xsl:text>&#x000a;&#x000a;\vspace{10mm}&#x000a;\noindent\textbf{Edition Open Access Development Team}\\[2mm]&#x000a;</xsl:text>
+          <xsl:value-of select="//tei:projectDesc/tei:p[@n='eoadevteam']"/>
+          <xsl:text>&#x000a;&#x000a;\vspace{10mm}&#x000a;\noindent </xsl:text>
+          <xsl:apply-templates select="//tei:projectDesc/tei:p[@n='eoainfo'][1]"/>
+          <xsl:text>\vspace{3pt}&#x000a;&#x000a;\noindent </xsl:text>
+          <xsl:apply-templates select="//tei:projectDesc/tei:p[@n='eoainfo'][2]"/>
+          <xsl:text>&#x000a;\newpage&#x000a;&#x000a;</xsl:text>
+          <xsl:value-of select="eoa:texcomment('Page 3: Title, subtitle, author/editor, series, year')" />
+          <xsl:choose>
+            <xsl:when test="//tei:seriesStmt/tei:title/text()= ('Studies', 'Sources') ">
+              <xsl:value-of select="eoa:texcomment('No need for minipage')"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>\begin{minipage}[t]{90mm}</xsl:text>
+              <xsl:text>&#x000a;&#x000a;</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:text>
+          \vspace*{12mm}&#x000a;\begin{center}&#x000a;\Large {</xsl:text>
+          <xsl:apply-templates select="//tei:titleStmt/tei:title[@type='main']"/>
+          <xsl:text>}\\&#x000a;&#x000a;\vspace{2mm}&#x000a;</xsl:text>
+          <xsl:if test="//tei:titleStmt/tei:title[@type='sub']">
+            <xsl:text>\large{</xsl:text>
+            <xsl:apply-templates select="//tei:titleStmt/tei:title[@type='sub']"/>
+            <xsl:text>}&#x000a;</xsl:text>
+          </xsl:if>
+          <xsl:text>\end{center}&#x000a;&#x000a;\vspace{10mm}&#x000a;\begin{center}&#x000a;\large </xsl:text>
+
+          <xsl:variable name="people" select="//tei:titleStmt/tei:author/@ref | //tei:titleStmt/tei:editor[@role='volumeeditor']/@ref"/>
+          <xsl:call-template name="format_persons">
+            <xsl:with-param name="people" select="$people"/>
+          </xsl:call-template>
+
+          <xsl:if test="//tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:editor[@role='volumeeditor']">
+            <!-- observe number of people here, name is taken from translations file -->
+            <xsl:choose>
+              <xsl:when test="count($people) = 1">
+                <xsl:variable name="keyterm" select="$transl//entry[@name='editor-abbr']"/>
+                <xsl:value-of select="concat(' (', $keyterm/@*[local-name() = $langid], ')')"/>
+              </xsl:when>
+              <xsl:otherwise>
+                <xsl:variable name="keyterm" select="$transl//entry[@name='editors-abbr']"/>
+                <xsl:value-of select="concat(' (', $keyterm/@*[local-name() = $langid], ')')"/>
+              </xsl:otherwise>
+            </xsl:choose>
+          </xsl:if>
+          <xsl:text>&#x000a;\end{center}&#x000a;&#x000a;\vspace{126mm}&#x000a;\begin{center}&#x000a;\large {\textbf{</xsl:text>
+          <xsl:value-of select="concat(//tei:seriesStmt/tei:title, '\ ', //tei:seriesStmt/tei:idno[@type='number'])"/>
+          <xsl:text>}}&#x000a;\end{center}&#x000a;&#x000a;</xsl:text>
+          <xsl:choose>
+            <xsl:when test="//tei:seriesStmt/tei:title/text()= ('Studies', 'Sources') ">
+              <xsl:value-of select="eoa:texcomment('No need for minipage to end here')"/>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:text>\end{minipage}&#x000a;</xsl:text>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:text>\newpage&#x000a;&#x000a;&#x000a;</xsl:text>
+          <xsl:value-of select="eoa:texcomment('Page 4: Complete Series Information, Communicator, Assistance, Gratitude, ISBN-Number, License')" />
+          <xsl:text>\begin{flushleft}&#x000a;\noindent </xsl:text>
+          <xsl:value-of select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='Press']"/>
+          <xsl:text>\\&#x000a;\noindent </xsl:text>
+          <xsl:value-of select="concat(//tei:seriesStmt/tei:title, '\ ', //tei:seriesStmt/tei:idno[@type='number'])"/>
+          <xsl:text>\\&#x000a;\vspace{4mm}&#x000a;</xsl:text>
+          <xsl:if test="//tei:titleStmt/tei:editor[(@role='submitter')]/@ref">
+            <xsl:text>\noindent Submitted by: </xsl:text>
+            <xsl:variable name="submitters" select="//tei:titleStmt/tei:editor[@role='submitter']/@ref"/>
+            <xsl:call-template name="format_persons">
+              <xsl:with-param name="people" select="$submitters"/>
+            </xsl:call-template>
+            <xsl:text>\\&#x000a;\vspace{4mm}&#x000a;</xsl:text>
+          </xsl:if>
+          <xsl:if test="//tei:titleStmt/tei:editor[not(@role='volumeeditor' or @role='submitter')]/@ref">
+            <xsl:text>\noindent Editorial Team:\\</xsl:text>
+            <xsl:variable name="editorialteam" select="//tei:titleStmt/tei:editor[not(@role='volumeeditor' or @role='submitter')]/@ref"/>
+            <xsl:call-template name="format_persons">
+              <xsl:with-param name="people" select="$editorialteam"/>
+            </xsl:call-template>
+            <xsl:text>\\&#x000a;</xsl:text>
+          </xsl:if>
+          <xsl:text>\vspace{4mm}&#x000a;</xsl:text>
+          <xsl:if test="//tei:titleStmt/tei:editor[@role='imageprocessor']/@ref">
+            <xsl:text>\noindent Image Processing: \\</xsl:text>
+            <xsl:variable name="imageprocessors" select="//tei:titleStmt/tei:editor[@role='imageprocessor']/@ref"/>
+            <xsl:call-template name="format_persons">
+              <xsl:with-param name="people" select="$imageprocessors"/>
+            </xsl:call-template>
+            <xsl:text>\\&#x000a;&#x000a;</xsl:text>
+          </xsl:if>
+          <xsl:text>\vspace{4mm}&#x000a;&#x000a;\noindent Cover Image:\\&#x000a;\noindent </xsl:text>
+          <xsl:apply-templates select="//tei:text/tei:front/tei:figure/tei:head"/>
+          <xsl:text>\\&#x000a;&#x000a;\vspace{4mm}&#x000a;\noindent </xsl:text>
+          <xsl:apply-templates select="//tei:profileDesc/tei:abstract[@n='additional']"/>
+          <xsl:value-of select="eoa:texcomment('\noindent Sponsoring Institutions: optional info&#x000a;')" />
+          <xsl:if test="//tei:titleStmt/tei:sponsor">
+            <xsl:text>\noindent Scholarly Support: &#x000a;&#x000a;</xsl:text>
+            <xsl:apply-templates select="//tei:titleStmt/tei:sponsor"/>
+            <xsl:text>&#x000a;&#x000a;</xsl:text>
+          </xsl:if>
+          <xsl:if test="//tei:titleStmt/tei:funder">
+            <xsl:text>\noindent Financial Support:&#x000a;&#x000a;</xsl:text>
+            <xsl:apply-templates select="//tei:titleStmt/tei:funder"/>
+            <xsl:text>&#x000a;&#x000a;</xsl:text>
+          </xsl:if>
+          <xsl:text>&#x000a;\end{flushleft}&#x000a;&#x000a;</xsl:text>
+          <xsl:text>\vfill&#x000a;\begin{flushleft}&#x000a;\begin{footnotesize}&#x000a;</xsl:text>
+          <xsl:if test="//tei:publicationStmt/tei:idno[@type='isbn']">
+            <xsl:text>
+            \noindent ISBN </xsl:text>
+            <xsl:value-of select="//tei:publicationStmt/tei:idno[@type='isbn']"/>
+            <xsl:text>\\&#x000a;</xsl:text>
+          </xsl:if>
+          <xsl:if test="//tei:publicationStmt/tei:idno[@type='isbnpdf']">
+            <xsl:text>
+            \noindent e-ISBN [PDF] </xsl:text>
+            <xsl:value-of select="//tei:publicationStmt/tei:idno[@type='isbnpdf']"/>
+            <xsl:text>\\&#x000a;      </xsl:text>
+          </xsl:if>
+          <xsl:if test="//tei:publicationStmt/tei:idno[@type='isbnepub']">
+            <xsl:text>
+            \noindent e-ISBN [EPUB] </xsl:text>
+            <xsl:value-of select="//tei:publicationStmt/tei:idno[@type='isbnepub']"/>
+            <xsl:text>\\&#x000a;      </xsl:text>
+          </xsl:if>
+          <xsl:text>First published </xsl:text>
+          <xsl:value-of select="substring-before(//tei:publicationStmt/tei:date/@when, '-')"/>
+          <xsl:text> by </xsl:text>
+          <xsl:value-of select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='EOA']"/>
+          <xsl:text>,\\&#x000a;Max Planck Institute for the History of Science\\&#x000a;</xsl:text>
+          <xsl:value-of select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='EOA']/@ref"/>
+          <xsl:text>\\&#x000a;</xsl:text><xsl:if test="//tei:publicationStmt/tei:distributor/tei:orgName">
+          <xsl:text>Printed and distributed by\\&#x000a;</xsl:text>
+          <xsl:apply-templates select="//tei:publicationStmt/tei:distributor/tei:orgName"/>
+          <xsl:text>\\&#x000a;</xsl:text></xsl:if>
+          <xsl:text>Published under </xsl:text>
+          <xsl:apply-templates select="//tei:publicationStmt/tei:availability/tei:licence"/>
+          <xsl:text> License\\&#x000a;</xsl:text>
+          <xsl:value-of select="//tei:publicationStmt/tei:availability/tei:licence/@target"/>
+          <xsl:text>&#x000a;\\[2mm]&#x000a;The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalbibliografie; detailed bibliographic data are available in the Internet at http://dnb.d-nb.de.&#x000a;</xsl:text>
+          <xsl:text>\end{footnotesize}&#x000a;\end{flushleft}&#x000a;\newpage&#x000a;\normalsize&#x000a;&#x000a;</xsl:text>
+          <xsl:value-of select="eoa:texcomment('Page 5: Complete Series Information,')" />
+          <xsl:text>\noindent \small\textbf{</xsl:text>
+          <xsl:apply-templates select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='Press']"/>
+          <xsl:text>}\\&#x000a;&#x000a;\vspace{6pt}&#x000a;&#x000a;\noindent </xsl:text>
+          <xsl:apply-templates select="//tei:projectDesc/tei:p[@n='mprlinformation']"/>
+          <xsl:text>&#x000a;&#x000a;\vspace{30pt}&#x000a;&#x000a;\noindent\small\textbf{Scientific Board}\\&#x000a;&#x000a;\vspace{3pt}</xsl:text>
+          <xsl:text>&#x000a;\begin{footnotesize}&#x000a;&#x000a;\noindent </xsl:text>
+          <xsl:apply-templates select="//tei:projectDesc/tei:p[@n='scientificboard']"/>
+          <xsl:text>&#x000a;\end{footnotesize}&#x000a;\clearpage&#x000a;\mbox{}&#x000a;\newpage&#x000a;</xsl:text>
+          <xsl:value-of select="eoa:texcomment('Optional: Pages 5 and 6: Dedication, followed by a blank page')" />
+          <xsl:if test="//tei:text/tei:front/tei:div[@type='dedication']">
+            <xsl:text>\vspace*{25mm}&#x000a;\begin{center}&#x000a;\EOAemph{</xsl:text>
+            <xsl:apply-templates select="//tei:text/tei:front/tei:div[@type='dedication']"/>
+            <xsl:text>}&#x000a;\end{center}&#x000a; \clearpage&#x000a;\mbox{}&#x000a;</xsl:text>
+          </xsl:if>
+          <xsl:choose>
+            <xsl:when test="$extranewpage">
+              <xsl:text>\newpage&#x000a;</xsl:text>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:value-of select="eoa:texcomment('\newpage&#x000a;')" />
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:text>&#x000a;\normalsize&#x000a;</xsl:text>
+          <xsl:value-of select="eoa:texcomment('Following pages use normal page style, which is fancy')" />
+          <xsl:text>\pagestyle{fancy}&#x000a;</xsl:text>
         </xsl:otherwise>
       </xsl:choose>
-    </xsl:if>
-    <xsl:text>&#x000a;\end{center}&#x000a;&#x000a;\vspace{126mm}&#x000a;\begin{center}&#x000a;\large {\EOAbold{</xsl:text>
-    <xsl:value-of select="concat(//tei:seriesStmt/tei:title, '\ ', //tei:seriesStmt/tei:idno[@type='number'])"/>
-    <xsl:text>}}&#x000a;\end{center}&#x000a;&#x000a;</xsl:text>
-    <xsl:choose>
-      <xsl:when test="//tei:seriesStmt/tei:title/text()= ('Studies', 'Sources') ">
-        <xsl:value-of select="eoa:texcomment('No need for minipage to end here')"/>
-      </xsl:when>
-      <xsl:otherwise>
-    <xsl:text>\end{minipage}&#x000a;</xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:text>\newpage&#x000a;&#x000a;&#x000a;</xsl:text>
-    <xsl:value-of select="eoa:texcomment('Page 4: Complete Series Information, Communicator, Assistance, Gratitude, ISBN-Number, License')" />
-    <xsl:text>\begin{flushleft}&#x000a;\noindent </xsl:text>
-    <xsl:value-of select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='Press']"/>
-    <xsl:text>\\&#x000a;\noindent </xsl:text>
-    <xsl:value-of select="concat(//tei:seriesStmt/tei:title, '\ ', //tei:seriesStmt/tei:idno[@type='number'])"/>
-    <xsl:text>\\&#x000a;\vspace{4mm}&#x000a;</xsl:text>
-    <xsl:if test="//tei:titleStmt/tei:editor[(@role='submitter')]/@ref">
-      <xsl:text>\noindent Submitted by: </xsl:text>
-    <xsl:variable name="submitters" select="//tei:titleStmt/tei:editor[@role='submitter']/@ref"/>
-    <xsl:call-template name="format_persons">
-      <xsl:with-param name="people" select="$submitters"/>
-    </xsl:call-template>
-    <xsl:text>\\&#x000a;\vspace{4mm}&#x000a;</xsl:text>
-    </xsl:if>
-    <xsl:if test="//tei:titleStmt/tei:editor[not(@role='volumeeditor' or @role='submitter')]/@ref">
-      <xsl:text>\noindent Editorial Team:\\</xsl:text>
-      <xsl:variable name="editorialteam" select="//tei:titleStmt/tei:editor[not(@role='volumeeditor' or @role='submitter')]/@ref"/>
-      <xsl:call-template name="format_persons">
-        <xsl:with-param name="people" select="$editorialteam"/>
-      </xsl:call-template>
-      <xsl:text>\\&#x000a;</xsl:text>
-    </xsl:if>
-    <xsl:text>\vspace{4mm}&#x000a;</xsl:text>
-    <xsl:if test="//tei:titleStmt/tei:editor[@role='imageprocessor']/@ref">
-<xsl:text>\noindent Image Processing: \\</xsl:text>
-      <xsl:variable name="imageprocessors" select="//tei:titleStmt/tei:editor[@role='imageprocessor']/@ref"/>
-      <xsl:call-template name="format_persons">
-        <xsl:with-param name="people" select="$imageprocessors"/>
-      </xsl:call-template>
-    <xsl:text>\\&#x000a;&#x000a;</xsl:text>
-    </xsl:if>
-<xsl:value-of select="eoa:texcomment('\noindent Sponsoring Institutions: optional info&#x000a;')" />
-    <xsl:if test="//tei:titleStmt/tei:sponsor">
-      <xsl:text>\noindent Scholarly Support: &#x000a;&#x000a;</xsl:text>
-      <xsl:apply-templates select="//tei:titleStmt/tei:sponsor"/>
-      <xsl:text>&#x000a;&#x000a;</xsl:text>
-    </xsl:if>
-    <xsl:if test="//tei:titleStmt/tei:funder">
-      <xsl:text>\noindent Financial Support:&#x000a;&#x000a;</xsl:text>
-      <xsl:apply-templates select="//tei:titleStmt/tei:funder"/>
-      <xsl:text>&#x000a;&#x000a;</xsl:text>
-    </xsl:if>
-    <xsl:text>\vspace{4mm}&#x000a;&#x000a;\noindent Cover Image:\\&#x000a;\noindent </xsl:text>
-    <xsl:apply-templates select="//tei:text/tei:front/tei:figure/tei:head"/>
-    <xsl:text>\\&#x000a;&#x000a;\vspace{4mm}&#x000a;\noindent </xsl:text>
-    <xsl:apply-templates select="//tei:profileDesc/tei:abstract[@n='additional']"/>
-    <xsl:text>&#x000a;\end{flushleft}&#x000a;&#x000a;</xsl:text>
-    <xsl:text>\vfill&#x000a;\begin{flushleft}&#x000a;\begin{footnotesize}&#x000a;</xsl:text>
-    <xsl:if test="//tei:publicationStmt/tei:idno[@type='isbn']">
-      <xsl:text>
-\noindent ISBN </xsl:text>
-    <xsl:value-of select="//tei:publicationStmt/tei:idno[@type='isbn']"/>
-    <xsl:text>\\&#x000a;</xsl:text>
-    </xsl:if>
-    <xsl:if test="//tei:publicationStmt/tei:idno[@type='isbnpdf']">
-      <xsl:text>
-\noindent e-ISBN [PDF] </xsl:text>
-    <xsl:value-of select="//tei:publicationStmt/tei:idno[@type='isbnpdf']"/>
-    <xsl:text>\\&#x000a;      </xsl:text>
-    </xsl:if>
-    <xsl:if test="//tei:publicationStmt/tei:idno[@type='isbnepub']">
-      <xsl:text>
-\noindent e-ISBN [EPUB] </xsl:text>
-    <xsl:value-of select="//tei:publicationStmt/tei:idno[@type='isbnepub']"/>
-    <xsl:text>\\&#x000a;      </xsl:text>
-    </xsl:if>
-    <xsl:text>First published </xsl:text>
-    <xsl:value-of select="substring-before(//tei:publicationStmt/tei:date/@when, '-')"/>
-    <xsl:text> by </xsl:text>
-    <xsl:value-of select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='EOA']"/>
-    <xsl:text>,\\&#x000a;Max Planck Institute for the History of Science\\&#x000a;</xsl:text>
-    <xsl:value-of select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='EOA']/@ref"/>
-    <xsl:text>\\&#x000a;</xsl:text><xsl:if test="//tei:publicationStmt/tei:distributor/tei:orgName">
-    <xsl:text>Printed and distributed by\\&#x000a;</xsl:text>
-    <xsl:apply-templates select="//tei:publicationStmt/tei:distributor/tei:orgName"/>
-    <xsl:text>\\&#x000a;</xsl:text></xsl:if>
-    <xsl:text>Published under </xsl:text>
-    <xsl:apply-templates select="//tei:publicationStmt/tei:availability/tei:licence"/>
-    <xsl:text>\\&#x000a;</xsl:text>
-    <xsl:value-of select="//tei:publicationStmt/tei:availability/tei:licence/@target"/>
-    <xsl:text>&#x000a;\\[2mm]&#x000a;The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalbibliografie; detailed bibliographic data are available in the Internet at http://dnb.d-nb.de.&#x000a;</xsl:text>
-    <xsl:text>\end{footnotesize}&#x000a;\end{flushleft}&#x000a;\newpage&#x000a;\normalsize&#x000a;&#x000a;</xsl:text>
-    <xsl:value-of select="eoa:texcomment('Page 5: Complete Series Information,')" />
-    <xsl:text>\noindent \small\EOAbold{</xsl:text>
-    <xsl:apply-templates select="//tei:publicationStmt/tei:publisher/tei:orgName[@n='Press']"/>
-    <xsl:text>}\\&#x000a;&#x000a;\vspace{6pt}&#x000a;&#x000a;\noindent </xsl:text>
-    <xsl:apply-templates select="//tei:projectDesc/tei:p[@n='mprlinformation']"/>
-    <xsl:text>&#x000a;&#x000a;\vspace{30pt}&#x000a;&#x000a;\noindent\small\EOAbold{Scientific Board}\\&#x000a;&#x000a;\vspace{3pt}</xsl:text>
-    <xsl:text>&#x000a;\begin{footnotesize}&#x000a;&#x000a;\noindent </xsl:text>
-    <xsl:apply-templates select="//tei:projectDesc/tei:p[@n='scientificboard']"/>
-    <xsl:text>&#x000a;\end{footnotesize}&#x000a;\clearpage&#x000a;\mbox{}&#x000a;\newpage&#x000a;</xsl:text>
-    <xsl:value-of select="eoa:texcomment('Optional: Pages 5 and 6: Dedication, followed by a blank page')" />
-    <xsl:if test="//tei:text/tei:front/tei:div[@type='dedication']">
-      <xsl:text>\vspace*{25mm}&#x000a;\begin{center}&#x000a;\EOAemph{</xsl:text>
-      <xsl:apply-templates select="//tei:text/tei:front/tei:div[@type='dedication']"/>
-      <xsl:text>}&#x000a;\end{center}&#x000a; \clearpage&#x000a;\mbox{}&#x000a;</xsl:text>
-    </xsl:if>
-    <xsl:choose>
-      <xsl:when test="$extranewpage">
-        <xsl:text>\newpage&#x000a;</xsl:text>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="eoa:texcomment('\newpage&#x000a;')" />
-      </xsl:otherwise>
-    </xsl:choose>
-    <xsl:text>&#x000a;\normalsize&#x000a;</xsl:text>
-    <xsl:value-of select="eoa:texcomment('Following pages use normal page style, which is fancy')" />
-    <xsl:text>\pagestyle{fancy}&#x000a;</xsl:text>
-  </xsl:result-document>
-</xsl:template>
+    </xsl:result-document>
+  </xsl:template>
 
 </xsl:stylesheet>