In 2c builds, Legal and TOC pages are temporarily switched to
1c mode, without adjusting header/footer width.
I was lazy in commit 114e330a528a ("Narrow textwidth of legal and
TOB pages in 2c build") and failed to investigate other approaches.
It turns out that the "geometry" package provides useful macros for
similar purposes with the bonus of natural adjustment of header/footer
widths.
Let's apply the "geometry" way of switching between 2c/1c layouts.
For bibliography pages, use slightly wider textwidth than that of
-1c builds for non-ebook size builds.
Signed-off-by: Akira Yokosawa <[email protected]>
---
perfbook-lt.tex | 31 ++++++++++++-------------------
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/perfbook-lt.tex b/perfbook-lt.tex
index 724e1b83..78a26c21 100644
--- a/perfbook-lt.tex
+++ b/perfbook-lt.tex
@@ -666,21 +666,17 @@
\newenvironment{fcvref}[1][]{\renewcommand{\lnrefbase}{#1}%
\ignorespaces}{\ignorespacesafterend}
+\IfTwoColumn{\newgeometry{body={4.75in,8.25in},centering=true,onecolumn}}{}
+
\frontmatter
\IfEbookSize{\hypersetup{pageanchor=false}}{}
\maketitle
\IfEbookSize{\hypersetup{pageanchor=true}}{}
-\IfTwoColumn{
- \onecolumn\begin{adjustwidth*}{.95in}{.8in}
- \addtolength{\parindent}{6pt}
-}{}
\input{legal}
\tableofcontents
-\IfTwoColumn{
- \end{adjustwidth*}\twocolumn
-}{}
+\IfTwoColumn{\restoregeometry}{}
\mainmatter
@@ -715,24 +711,21 @@
\input{glossary.tex}
% Bibliograpy
-\IfTwoColumn{
- \onecolumn\begin{adjustwidth*}{.8in}{.7in}
- %\bibliographystyle{alpha} % Use genuine alpha style (In case of build
failure, use this instead)
- \bibliographystyle{alphapf} % Use alpha style customized by urlbst with
--inlinelinks option
+%\bibliographystyle{alpha} % Use genuine alpha style (In case of build
failure, use this instead)
+\bibliographystyle{alphapf} % Use alpha style customized by urlbst with
--inlinelinks option
+\IfEbookSize{
+ % no geometry change for bibliography pages
}{
- \bibliographystyle{alphapf} % Use alpha style customized by urlbst with
--inlinelinks option
+ % slightly wider than textwidth of -1c builds
+ \newgeometry{body={5.2in,8.25in},centering=true,onecolumn}
}
+\begingroup
\IfColorLinks{}{
\hypersetup{pdfborder=0 0 1,urlbordercolor=0 0 0,pdfborderstyle=/S/U/W .2}
}
\bibliography{bib/RCU,bib/WFS,bib/hw,bib/os,bib/parallelsys,bib/patterns,bib/perfmeas,bib/refs,bib/syncrefs,bib/search,bib/swtools,bib/realtime,bib/TM,bib/standards,bib/OSS,bib/maze,bib/energy,bib/QC,bib/NP,bib/memorymodel}
-\IfColorLinks{}{
- \hypersetup{pdfborder=0 0 0}
-}
-\IfTwoColumn{
- \end{adjustwidth*}\twocolumn
-}{
-}
+\endgroup
+\IfEbookSize{}{\restoregeometry}
% Credits
\setcounter{secnumdepth}{-1} % surpress section numbering in backmatter
--
2.43.0