]> pere.pagekite.me Git - text-free-culture-lessig.git/commitdiff
Build the titlepage verso from colophon chapter.
authorben <ben@saturne.(none)>
Wed, 14 Oct 2015 19:57:17 +0000 (21:57 +0200)
committerben <ben@saturne.(none)>
Wed, 14 Oct 2015 19:57:17 +0000 (21:57 +0200)
data/xetex_param.xsl
myclass.cls

index 52af314b77412bc39ce9e3a866e5ffeb6b09a716..9142d3db73680c0f6320483b5b655825cd56e8b2 100644 (file)
@@ -1,17 +1,32 @@
 <?xml version='1.0'?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
-  <xsl:param name="xetex.font">
-    <xsl:text>\setmainfont{Crimson Text}&#10;</xsl:text>
-    <xsl:text>\setsansfont{Crimson Text}&#10;</xsl:text>
-    <xsl:text>\setmonofont{Latin Modern Mono}&#10;</xsl:text>
+<xsl:param name="xetex.font">
+  <xsl:text>\setmainfont{Crimson Text}&#10;</xsl:text>
+  <xsl:text>\setsansfont{Crimson Text}&#10;</xsl:text>
+  <xsl:text>\setmonofont{Latin Modern Mono}&#10;</xsl:text>
 
-    <!-- Force <emphasis role='strong'> to be bold, not semibold -->
-    <xsl:text>\setmainfont[BoldFont={CrimsonText-Bold}]{Crimson Text}&#10;</xsl:text>
-  </xsl:param>
+  <!-- Force <emphasis role='strong'> to be bold, not semibold -->
+  <xsl:text>\setmainfont[BoldFont={CrimsonText-Bold}]{Crimson Text}&#10;</xsl:text>
+</xsl:param>
+
+<!-- Do it the hard way: put this content in a file loaded by \maketitle -->
 <xsl:template match="colophon">
-  <xsl:text>\begin{colophon}&#10;</xsl:text>
-  <xsl:apply-templates/>
-  <xsl:text>\end{colophon}&#10;</xsl:text>
+  <xsl:variable name="titlepage.verso">
+    <xsl:text>\begin{colophon}&#10;</xsl:text>
+    <xsl:apply-templates/>
+    <xsl:text>\end{colophon}&#10;</xsl:text>
+  </xsl:variable>
+  <xsl:call-template name="write.text.chunk">
+    <!-- The filename must end with 'input.rtex' to be parsed by dblatex -->
+    <xsl:with-param name="filename">
+      <xsl:text>titlepg.input.rtex</xsl:text>
+    </xsl:with-param>
+    <xsl:with-param name="method" select="'text'"/>
+    <xsl:with-param name="content">
+      <xsl:value-of select="$titlepage.verso"/>
+    </xsl:with-param>
+    <xsl:with-param name="encoding" select="$chunker.output.encoding"/>
+  </xsl:call-template>
 </xsl:template>
 
 </xsl:stylesheet>
index f3d725a2e31d837cb852c901685a5e1574c7548c..e8106b737140e343d8781c9954fb3f8130f31d0b 100644 (file)
@@ -9,9 +9,38 @@
 %\usepackage{showframe}% http://ctan.org/pkg/showframe
 \makeatletter
 
-% Customize the titlepage: remove the date
-\let\stdmaketitle=\maketitle
-\def\maketitle{\let\@date\empty\stdmaketitle}
+% 
+% Customize the titlepage: remove the date, place the publisher name, and 
+% load a specific file for the verso page, containing some legal notices
+%
+\def\maketitle{%
+  \titlerecto%
+  \titleverso}
+
+\def\titlerecto{\begin{titlepage}%
+  \null\vfil
+  \vskip 160\p@
+  \begin{center}%
+    {\LARGE \@title \par}%
+    \vskip 3em%
+    {\Large
+     \lineskip .75em%
+      \begin{tabular}[t]{c}%
+        \@author
+      \end{tabular}\par}%
+      \vskip 25.5em%
+    {\large \DBKpublishername \par}
+    \vskip .75em%
+    {\large \DBKpublisheraddress \par}%
+  \end{center}\par
+  \vfil\null
+  \end{titlepage}}%
+
+\def\titleverso{%
+  \def\titlepagefile{titlepg.input.tex}
+  \IfFileExists{\titlepagefile}{\input{\titlepagefile}}{}
+}%
+
 
 % Divide by 2 the index item indentation (10pt -> 5pt)
 \renewcommand\@idxitem{\par\hangindent 20\p@}