]> pere.pagekite.me Git - text-free-culture-lessig.git/commitdiff
Merge pull request #8 from marsgui/master
authorpetterreinholdtsen <pere@hungry.com>
Sat, 1 Aug 2015 21:08:24 +0000 (23:08 +0200)
committerpetterreinholdtsen <pere@hungry.com>
Sat, 1 Aug 2015 21:08:24 +0000 (23:08 +0200)
Example about changing index font and layout + handle colophon

data/pdf.xsl
freeculture.xml
myclass.cls

index 6e53ef266b4d1b26d41ebf9b95c1293d3df798b9..a3f98b1a29c2119a6c3180bed9da66c6d8b8c113 100644 (file)
 <!-- font for XSL/FOP, see also fop-params.xconf -->
 
 <xsl:param name="body.font.family">Crimson Text</xsl:param>
+<xsl:param name="sans.font.family">Crimson Text</xsl:param>
 <xsl:param name="title.font.family">Crimson Text</xsl:param>
 <xsl:param name="slide.font.family">Crimson Text</xsl:param>
 <xsl:param name="slide.title.font.family">Crimson Text</xsl:param>
+<xsl:param name="monospace.font.family">Nimbus Mono L</xsl:param>
+
+<xsl:template match="colophon">
+  <xsl:text>\begin{colophon}&#10;</xsl:text>
+  <xsl:apply-templates/>
+  <xsl:text>\end{colophon}&#10;</xsl:text>
+</xsl:template>
+
 </xsl:stylesheet>
index 020aed3c41727a70eeb7878676edb6e92f839ea8..d0c1c1899bb2efd46bde498fbdecbdaafd48209b 100644 (file)
@@ -15636,12 +15636,6 @@ conventional Colophon page.  The disadvantage is a useless blank page
 where the empty chapter title is printed.
 -->
 <title></title>
-<?latex
-\pagebreak
-{\footnotesize
-\setlength{\parskip}{0.5em}%
-\setlength{\parindent}{0pt}%
-?>
 <?latex {\centering
 ?>
 <para>
@@ -15750,7 +15744,5 @@ Please report any problems using the GitHub issue tracker.
 </tgroup>
 </informaltable>
 </para>
-<?latex } %\tiny
-?>
 </colophon>
 </book>
index 6d87152ae924dc4ee3acc714c12c5833c8adfae4..9b1ca43ca36e8283349fe0bb444267497d9c4aab 100644 (file)
@@ -5,12 +5,22 @@
 \LoadClassWithOptions{report}
 % report, book, memoir, scrreprt or scrbook ?
 
+% Divide by 2 the index item indentation (10pt -> 5pt)
+\makeatletter
+\renewcommand\@idxitem{\par\hangindent 20\p@}
+\renewcommand\subitem{\@idxitem \hspace*{10\p@}}
+\renewcommand\subsubitem{\@idxitem \hspace*{15\p@}}
+\makeatother
+
 % Put the index in the TOC
 \makeatletter
 \let\stdindex=\theindex
 \let\endstdindex=\endtheindex
 \renewenvironment{theindex}{
   \begin{stdindex}
+  % Use a smaller font except for the letter heading which is bold
+  \newfontfamily\indexfont[Scale=0.7,
+                           BoldFeatures={Scale=1}]{Crimson Text}
   \@ifundefined{chapter}{}{
     % To not have the number, replace by:
     % \addcontentsline{toc}{chapter}{\numberline{}\indexname}
       \addcontentsline{toc}{chapter}{\indexname}
     \fi
   }
+  % Adapt the vertical sizes to the smaller font
+  \setlength{\baselineskip}{0.7\baselineskip}%
+  \setlength{\parskip}{0.2\baselineskip}%
+  \indexfont
 }{
   \end{stdindex}
 }
 \makeatother
 
+\newenvironment{colophon}{
+  \pagebreak %
+  \fontsize{7}{8.4}\selectfont %
+  \setlength{\parskip}{0.5em} %
+  \setlength{\parindent}{0pt} %
+}{}
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % Based on ideas from https://bugs.debian.org/684772
 \usepackage{titlesec}