]> pere.pagekite.me Git - text-free-culture-lessig.git/commitdiff
Grouping endnotes with a global counter.
authorben <ben@saturne.(none)>
Wed, 2 Sep 2015 20:41:14 +0000 (22:41 +0200)
committerben <ben@saturne.(none)>
Wed, 2 Sep 2015 20:41:14 +0000 (22:41 +0200)
data/pdf.xsl
myclass.cls

index 6df6e2b05090c24a900ba831c49a798f13993c4e..a9244596395f3526ef54200d9a0cc8fb4829035b 100644 (file)
 </xsl:template>
 
 <!-- transform footnotes to endnotes -->
-  <xsl:param name="footnote.as.endnote" select="1"/>
-  <xsl:attribute-set name="endnotes.properties"
+<xsl:param name="footnote.as.endnote" select="1"/>
+
+<!-- configure the endnotes package -->
+<xsl:attribute-set name="endnotes.properties"
                      use-attribute-sets="endnotes.properties.default">
 <!--
 Increase footnote/endnote size to be more than 6 pts, to avoid
@@ -69,10 +71,23 @@ the same size as the colophon page (see myclass.cls)
 make sure \fontsize{x}{y} use y=1.2*x, x >= 6
 -->
 
-    <!--xsl:attribute name="font-size">\fontsize{10}{12}</xsl:attribute-->
-    <xsl:attribute name="font-size">\footnotesize</xsl:attribute>
-    <!--xsl:attribute name="font-size">\normalsize</xsl:attribute-->
-  </xsl:attribute-set>
+  <!--xsl:attribute name="font-size">\fontsize{10}{12}</xsl:attribute-->
+  <xsl:attribute name="font-size">\footnotesize</xsl:attribute>
+  <!--xsl:attribute name="font-size">\normalsize</xsl:attribute-->
+</xsl:attribute-set>
+
+<!-- the endnotes are grouped by part, chapter, and preface -->
+<xsl:param name="endnotes.heading.groups" select="'part chapter preface'"/>
+<xsl:param name="endnotes.heading.style" select="'select:title'"/>
+<xsl:param name="endnotes.heading.command" select="'\enoteheader*'"/>
+
+<xsl:template match="preface" mode="endnotes">
+  <xsl:call-template name="endnotes.add.header"/>
+</xsl:template>
+
+<!-- even if grouped, never reset the endnotes counter, so clear the rule -->
+<xsl:param name="endnotes.counter.resetby"/>
+
 
   <xsl:param name="latex.begindocument">
     <xsl:text>
index 7b2cd40d940ecd80f6c1faad9643506c23218734..912b55b8a86c2a70bbe1638b203bedb8374e8e78 100644 (file)
 \titleformat{\subsection}
 {\filcenter\large\bfseries}{\thesubsection}{1em}{}
 
+%% New header, behaving like a section but formatted differently
+\titleclass{\enoteheader}{straight}[\chapter]
+\newcounter{enoteheader}
+\renewcommand{\theenoteheader}{\Alph{enoteheader}}
+
+\titleformat{\enoteheader}
+{\normalfont\large}{}{0pt}{}
+\titlespacing*{\enoteheader}{0pt}{2.5ex plus 1ex minus .2ex}{1.3ex plus .2ex}
+
+\dottedcontents{enoteheader} %
+[0em] % was (3.8)
+{\addvspace{0pt}} % 
+{2.3em} % tab
+{0.75em} % space between dots
+[\addvspace{0pt}]
+
 %% New header, behaving like a chapter but formatted differently
 \titleclass{\lotheader}{top}[\part]
 \newcounter{lotheader}