From f5ac5b0ac4d4ea4b077c5d10866f1d715e7a986d Mon Sep 17 00:00:00 2001
From: Petter Reinholdtsen <pere@hungry.com>
Date: Thu, 16 Aug 2012 10:48:36 +0200
Subject: [PATCH] Adjust dblatex built to get the hardcover 2004 size and
 margins.

---
 data/lulu.xsl       |  2 +-
 data/origsize.xsl   | 14 +++++++-------
 freeculture.nb.po   |  2 +-
 scrreprtmargins.cls | 27 +++++++++++++++++++++++++++
 4 files changed, 36 insertions(+), 9 deletions(-)
 create mode 100644 scrreprtmargins.cls

diff --git a/data/lulu.xsl b/data/lulu.xsl
index 3c9ec47..cd7a7fb 100644
--- a/data/lulu.xsl
+++ b/data/lulu.xsl
@@ -16,7 +16,7 @@
 <xsl:param name="double.sided">1</xsl:param>
 
 <!-- used by dblatex -->
-<xsl:param name="latex.class.book">scrreprt</xsl:param>
+<xsl:param name="latex.class.book">scrreprtmargins</xsl:param>
 <xsl:param name="latex.class.options">paper=6in:9in,pagesize=pdftex,headinclude=on,footinclude=on,twoside</xsl:param>
 
 </xsl:stylesheet>
diff --git a/data/origsize.xsl b/data/origsize.xsl
index 9ec06ef..b15d529 100644
--- a/data/origsize.xsl
+++ b/data/origsize.xsl
@@ -2,21 +2,21 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'
 		xmlns:fo="http://www.w3.org/1999/XSL/Format" >
 
-<!-- settings from original PDF version -->
+<!-- settings from original 2004 hardcover version -->
 
 <xsl:param name="paper.type">book5x7.5</xsl:param>
-<xsl:param name="page.width">5in</xsl:param>
-<xsl:param name="page.height">7.51in</xsl:param>
+<xsl:param name="page.width">5.51in</xsl:param>
+<xsl:param name="page.height">8.23in</xsl:param>
 
-<xsl:param name="page.margin.inner">0.8in</xsl:param>
-<xsl:param name="page.margin.outer">0.6in</xsl:param>
+<xsl:param name="page.margin.inner">0.67in</xsl:param>
+<xsl:param name="page.margin.outer">0.71in</xsl:param>
 <xsl:param name="body.start.indent">0pt</xsl:param>
 <xsl:param name="body.font.family">Times</xsl:param>
 <xsl:param name="title.font.family">Times</xsl:param>
 <xsl:param name="dingbat.font.family">Times</xsl:param>
 
-<xsl:param name="latex.class.book">scrreprt</xsl:param>
-<xsl:param name="latex.class.options">paper=5in:7.5in,pagesize=pdftex,headinclude=on,footinclude=on,twoside</xsl:param>
+<xsl:param name="latex.class.book">scrreprtmargins</xsl:param>
+<xsl:param name="latex.class.options">paper=5.51in:8.23in,pagesize=pdftex,headinclude=on,footinclude=on,twoside</xsl:param>
 
 <!-- from http://cygwin.com/ml/docbook-apps/2004-q2/msg00107.html -->
 <!-- ~~~~~~~~~~~~~~~~ -->
diff --git a/freeculture.nb.po b/freeculture.nb.po
index ab502f8..4f45908 100644
--- a/freeculture.nb.po
+++ b/freeculture.nb.po
@@ -24,7 +24,7 @@ msgstr "Â©"
 
 #. type: Attribute 'lang' of: <book>
 msgid "en"
-msgstr "nb"
+msgstr "no"
 
 #. type: Content of: <book><bookinfo><title>
 msgid "Free Culture"
diff --git a/scrreprtmargins.cls b/scrreprtmargins.cls
new file mode 100644
index 0000000..7f2831a
--- /dev/null
+++ b/scrreprtmargins.cls
@@ -0,0 +1,27 @@
+%%
+%% This style is derivated from the scrbook one.  Partly based on
+%% <URL: http://www.vetta.org/2008/07/latex-and-lulucom/ > and
+%% <URL: http://dblatex.sourceforge.net/example/manual.pdf >.
+%% http://tex.stackexchange.com/questions/19497/how-do-you-setup-a-tex-document-to-self-publish-a-book-online
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{book6x9}[2007/04/04 My 6'' x 9'' book Style]
+
+%% Just use the original class and pass the options
+\LoadClassWithOptions{scrreprt}
+% report, book, memoir, scrreprt or scrbook ?
+
+%\setlength\paperheight {7.5in}%
+%\setlength\paperwidth  {5in}%
+
+%\setlength\topmargin{0.5in}
+%\setlength\headheight{0.5in}
+%\setlength\headsep{0.2in}
+%\setlength\textheight{5.6in}
+%\setlength\textwidth{4in}
+%\setlength\oddsidemargin{0.5in}
+%\setlength\evensidemargin{0.5in}
+
+%\usepackage[margin=1in, paperwidth=6in, paperheight=9in]{geometry}
+%\usepackage[margin=0.8in]{geometry}
+\usepackage[inner=0.67in,outer=0.71in,top=0.71in,bottom=0.87in,pdftex]{geometry}
-- 
2.51.0

