From dd8127a95120fbf9a867a5546af1b41430ece729 Mon Sep 17 00:00:00 2001
From: Boris Kolpackov
Date: Sun, 31 Jan 2016 09:59:24 +0200
Subject: Generate both A4 and Letter PDF/PS
---
doc/.gitignore | 4 ++--
doc/a4.html2ps | 1 +
doc/cli.sh | 11 +++++++----
doc/intro-prologue.xhtml | 8 ++++++--
doc/intro.cli | 7 +++++++
doc/intro.html2ps | 11 ++++++++---
doc/letter.html2ps | 1 +
doc/style | 2 +-
8 files changed, 33 insertions(+), 12 deletions(-)
create mode 120000 doc/a4.html2ps
create mode 120000 doc/letter.html2ps
(limited to 'doc')
diff --git a/doc/.gitignore b/doc/.gitignore
index 88dbecc..4bb8225 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -1,3 +1,3 @@
-build2-toolchain-intro.ps
-build2-toolchain-intro.pdf
+build2-toolchain-intro*.ps
+build2-toolchain-intro*.pdf
build2-toolchain-intro.xhtml
diff --git a/doc/a4.html2ps b/doc/a4.html2ps
new file mode 120000
index 0000000..4b31c06
--- /dev/null
+++ b/doc/a4.html2ps
@@ -0,0 +1 @@
+style/a4.html2ps
\ No newline at end of file
diff --git a/doc/cli.sh b/doc/cli.sh
index 2b0d030..b12cc46 100755
--- a/doc/cli.sh
+++ b/doc/cli.sh
@@ -12,8 +12,8 @@ function error () { info "$*"; exit 1; }
while [ $# -gt 0 ]; do
case $1 in
--clean)
- rm -f build2-toolchain-intro.xhtml build2-toolchain-intro.ps \
-build2-toolchain-intro.pdf
+ rm -f build2-toolchain-intro.xhtml build2-toolchain-intro*.ps \
+build2-toolchain-intro*.pdf
exit 0
;;
*)
@@ -30,5 +30,8 @@ cli -I .. -v version="$version" -v date="$date" \
--link-regex '%bpkg([-.].+)%../../bpkg/doc/bpkg$1%' \
--output-prefix build2-toolchain- intro.cli
-#html2ps -f intro.html2ps -o build2-toolchain-intro.ps build2-toolchain-intro.xhtml
-#ps2pdf14 build2-toolchain-intro.ps build2-toolchain-intro.pdf
+html2ps -f intro.html2ps:a4.html2ps -o build2-toolchain-intro-a4.ps build2-toolchain-intro.xhtml
+ps2pdf14 -sPAPERSIZE=a4 -dOptimize=true -dEmbedAllFonts=true build2-toolchain-intro-a4.ps build2-toolchain-intro-a4.pdf
+
+html2ps -f intro.html2ps:letter.html2ps -o build2-toolchain-intro-letter.ps build2-toolchain-intro.xhtml
+ps2pdf14 -sPAPERSIZE=letter -dOptimize=true -dEmbedAllFonts=true build2-toolchain-intro-letter.ps build2-toolchain-intro-letter.pdf
diff --git a/doc/intro-prologue.xhtml b/doc/intro-prologue.xhtml
index a6362cf..c99c919 100644
--- a/doc/intro-prologue.xhtml
+++ b/doc/intro-prologue.xhtml
@@ -31,8 +31,12 @@ $./intro.css$
Revision $version$
, $date$
This revision of the document describes the build2
toolchain $version$.x
series and is available in the following
- formats: XHTML, PDF,
- and PostScript.
+ formats:
+ XHTML,
+ PDF/A4,
+ PDF/Letter,
+ PostScript/A4, and
+ PostScript/Letter.
diff --git a/doc/intro.cli b/doc/intro.cli
index 8401ed6..bf251bf 100644
--- a/doc/intro.cli
+++ b/doc/intro.cli
@@ -12,6 +12,13 @@
//
// @@ section boundary page breaks (
)
// @@ when printed, code background is gone, but spaces still there
+//
+// PDF
+//
+// @@ tree output is garbled
+// @@ Install list margins missing
+// @@ Could we use a nicer font, seeing that we embed them?
+//
// NOTES
//
diff --git a/doc/intro.html2ps b/doc/intro.html2ps
index 051e384..cb3c458 100644
--- a/doc/intro.html2ps
+++ b/doc/intro.html2ps
@@ -1,6 +1,6 @@
@html2ps {
option {
- toc: hb;
+ /*toc: hb;*/
colour: 1;
hyphenate: 1;
titlepage: 1;
@@ -26,7 +26,7 @@
Permission is granted to copy, distribute and/or modify this document under
the terms of the MIT License.
- Revision $[version], $D
+
Revision $[version]
, $D
This revision of the document describes the build2
toolchain
$[version].x
series.
";
}
@@ -54,8 +54,13 @@
body {
font-size: 12pt;
text-align: justify;
+ background: white;
+}
+
+code {
+ font-size: 9pt;
}
pre {
- font-size: 10pt;
+ font-size: 9pt;
}
diff --git a/doc/letter.html2ps b/doc/letter.html2ps
new file mode 120000
index 0000000..607ca58
--- /dev/null
+++ b/doc/letter.html2ps
@@ -0,0 +1 @@
+style/letter.html2ps
\ No newline at end of file
diff --git a/doc/style b/doc/style
index cacc054..ea72b21 160000
--- a/doc/style
+++ b/doc/style
@@ -1 +1 @@
-Subproject commit cacc05431f8b243e8cd94aba3910d8e5680dfe6d
+Subproject commit ea72b21f2502527d8f25fda5817cb87672995cef
--
cgit v1.1