summaryrefslogtreecommitdiff
path: root/latex/lxarticle/lxheaders.sty
diff options
context:
space:
mode:
authorHans J. Koch <hjk@linutronix.de>2009-06-15 15:54:43 +0200
committerHans J. Koch <hjk@linutronix.de>2009-06-15 15:54:43 +0200
commit5ea77abba63caf9c7c7fd86a6196857e79e12325 (patch)
treea633ed1c8ec012971ae6abbb6b98ce8be4f0465c /latex/lxarticle/lxheaders.sty
parent11c04512ee21a6285e14c2e1300a2aa345e65c74 (diff)
Added initial version of lxheaders.sty
Diffstat (limited to 'latex/lxarticle/lxheaders.sty')
-rw-r--r--latex/lxarticle/lxheaders.sty80
1 files changed, 80 insertions, 0 deletions
diff --git a/latex/lxarticle/lxheaders.sty b/latex/lxarticle/lxheaders.sty
new file mode 100644
index 0000000..be89d6b
--- /dev/null
+++ b/latex/lxarticle/lxheaders.sty
@@ -0,0 +1,80 @@
+\ProvidesPackage{lxheaders}
+\RequirePackage{graphicx}
+\RequirePackage{color}
+%% \NeedsTexFormat{LaTeX2e}
+
+\topmargin-5em
+\textheight230mm
+\textwidth140mm
+\headsep5em
+\oddsidemargin10mm
+
+\newdimen\fullwidth \fullwidth=\textwidth
+\advance\fullwidth by\marginparwidth
+\advance\fullwidth by\marginparsep
+
+%% Linutronix Header
+
+\if@twocolumn\advance\fullwidth by\marginparwidth
+ \advance\fullwidth by\marginparsep \fi
+\def\chaptermark#1{} \def\subsectionmark#1{}
+
+\newdimen\emptyfoot \advance\headsep by 0.5\baselineskip
+\emptyfoot=\topmargin \advance\emptyfoot by 1\baselineskip
+
+\newdimen\emptyhead \advance\footskip by 0.5\baselineskip
+\emptyhead=\topmargin \advance\emptyhead by -1\baselineskip
+
+\if@twoside
+ \def\ps@headings{\let\@mkboth=\markboth \topmargin\emptyfoot
+ \def\@evenhead{\hss\vbox{\hsize\fullwidth
+ \hbox to \fullwidth{\includegraphics[width=10em]{linutronix-right.png}\quad
+ \textit{\leftmark}\hfil}%
+ \vskip 3pt \hrule}\hss}%
+ \def\@oddhead{\if@twocolumn\hss\fi\vbox{\hsize\fullwidth
+ \hbox to \fullwidth{\hfil\textit{\rightmark}\quad
+ \includegraphics[width=10em]{linutronix-right.png}}%
+ \vskip 3pt \hrule}\hss}%
+ \def\sectionmark##1{\markboth
+ {{\ifnum\c@secnumdepth>\z@ \thesection:\enspace\fi ##1}}%
+ {{\ifnum\c@secnumdepth>\z@ \thesection:\enspace\fi ##1}}} }
+\else
+ \def\ps@headings{\let\@mkboth=\markboth \topmargin\emptyfoot
+ \def\@oddhead{\if@twocolumn\hss\fi\vbox{\hsize\fullwidth
+ \hbox to \fullwidth{\hfil\textit{\rightmark}\quad
+ \includegraphics[width=10em]{linutronix-right.png}}%
+ \vskip 3pt \hrule}\hss}%
+ \def\sectionmark##1{\markright
+ {{\ifnum\c@secnumdepth>\z@ \thesection:\enspace\fi ##1}}} }
+\fi
+
+%% Linutronix Footer
+
+\if@twoside
+ \def\ps@footings{\let\@mkboth=\markboth \topmargin\emptyhead
+ \def\@evenfoot{\hss\vbox{\hsize\fullwidth
+ \vskip 3pt
+ \textbf{Hallo} \color{lxcolor} \hrule height 5pt%
+ }\hss}%
+ \def\@oddfoot{\if@twocolumn\hss\fi\vbox{\hsize\fullwidth
+ \vskip 3pt
+ \textbf{Hallo} \color{lxcolor} \hrule height 5pt%
+ }\hss}%
+ \def\sectionmark##1{\markboth
+ {{\ifnum\c@secnumdepth>\z@ \thesection:\enspace\fi ##1}}%
+ {{\ifnum\c@secnumdepth>\z@ \thesection:\enspace\fi ##1}}} }
+\else
+ \def\ps@footings{\let\@mkboth=\markboth \topmargin\emptyfoot
+ \def\@oddfoot{\if@twocolumn\hss\fi\vbox{\hsize\fullwidth
+ \vskip 3pt
+ \color{lxcolor} \hrule height 5pt%
+ \vskip 3pt
+ \hbox to \fullwidth{\textsc{\rightmark}\hfil
+ \textbf{\thepage}}}\hss}%
+ \def\sectionmark##1{\markright
+ {{\ifnum\c@secnumdepth>\z@ \thesection:\enspace\fi ##1}}} }
+\fi
+
+
+\pagestyle{headings}
+\pagestyle{footings}