Revert "Merge pull request #36 from krono/krono/draft-enhanchement"
authorAaron Kaplan <aaron@lo-res.org>
Sat, 4 Jan 2014 19:08:20 +0000 (20:08 +0100)
committerAaron Kaplan <aaron@lo-res.org>
Sat, 4 Jan 2014 19:08:20 +0000 (20:08 +0100)
This reverts commit 76b22bb473e0f089fcd78159af74f3226b9be089, reversing
changes made to a3b6a5dffd72b739b98b8c9c0ead5793ab747479.

Reason:
oops, wait... I see some problems:
1) the header on the top of each page always says "Contents" (no matter which chapter it is)
2) the draft git version in the footer disappeared
3) I actually don't see a bitmap.
Sorry, reverting for now...

src/common/style.tex
src/common/system.tex
src/img/draft.png [deleted file]

index 7f812a4..386801c 100644 (file)
 \definecolor{CadetBlue}{cmyk}{0.62,0.57,0.23,0}
 \definecolor{lightlightgray}{gray}{0.9}
 
-% Draft stuff
-\ifdraft{
-  % Ensure that everything is neatly set up for us
-  \AtBeginDocument{
-    \def\draftInfo{%
-      Draft revision\gitVtags: \gitAbbrevHash{} %
-      (\gitCommitterIsoDate) \gitCommitterName}
-    \sbox{\draftWatermark}{%
-      \includegraphics[width=\paperwidth]{img/draft}}
-    \sbox{\draftPageLine}{%
-      \colorbox{black!10}{%
-        % enlarge box vertically by 2/3 lines
-        \raisebox{0pt}%
-        [\dimexpr .33\baselineskip + \height]%
-        [\dimexpr .33\baselineskip + \depth]{%
-          \makebox[\paperwidth]{\color{black!50}\draftInfo}}}}
-  }
-}{}
-
-
 %%% Fonts
 % Fonts are loaded, now is the right time for mictorype.
 \microtypesetup{stretch=9,shrink=15,step=3,tracking=smallcaps,letterspace=75}
 % Section headers
 \addtokomafont{disposition}{\color{darkblue}\bfseries}
 
+
 % Page foot
 \setkomafont{pagefoot}{\normalfont\sffamily\footnotesize}
 \ifoot%
-[Applied Crypto Hardening\ifdraft{ % Space!
-  \textbullet{} \draftInfo}{}]%
-{Applied Crypto Hardening \ifdraft{ % Space!
-    \textbullet{} \draftInfo}{}}
+[Applied Crypto Hardening \textbullet{} Draft revision\gitVtags: \gitAbbrevHash{} (\gitCommitterIsoDate) \gitCommitterName]%
+{Applied Crypto Hardening \textbullet{} Draft revision\gitVtags: \gitAbbrevHash{} (\gitCommitterIsoDate) \gitCommitterName}
 \cfoot[]{}
 \ofoot%
 [page \thepage\ of \pageref{LastPage}]%
index 17b044d..f1f996c 100644 (file)
@@ -64,6 +64,7 @@
 \usepackage{lastpage}
 
 % Misc
+%\usepackage{draftwatermark}
 \usepackage{gitinfo}
 \usepackage{catchfile}
 \usepackage{hyperref}
   %% Heavy debugging
   %\usepackage{showframe}
   \usepackage{blindtext}
-  \usepackage{eso-pic}
-  \newsavebox{\draftPageLine}
-  \newsavebox{\draftWatermark}
-  \AddToShipoutPicture{%
-    \AtPageLowerLeft{\usebox{\draftWatermark}}
-    \AtPageUpperLeft{%
-      \raisebox{-\height}[\height][0pt]{\usebox{\draftPageLine}}}%
-    \AtPageLowerLeft{%
-      \raisebox{\depth}[\height][0pt]{\usebox{\draftPageLine}}}%
-  }
-  % \AtEndDocument{\listoftodos}
+  \usepackage{draftwatermark}
+  \SetWatermarkLightness{0.95}
+  %\AtEndDocument{\listoftodos}
 }{
   \let\blindtext\relax
   \let\Blindtext\relax
diff --git a/src/img/draft.png b/src/img/draft.png
deleted file mode 100644 (file)
index 3c3ea61..0000000
Binary files a/src/img/draft.png and /dev/null differ