Проблема с созданием определенного верхнего и нижнего колонтитула

Проблема с созданием определенного верхнего и нижнего колонтитула

Если вам не ясно, в верхнем левом углу находится изображение (логотип университета), а в верхнем правом углу — номера страниц.

У нас в университете есть специальные заголовки и колонтитулы. Поскольку я новичок в LaTeX, может кто-нибудь помочь мне с созданием этого:

http://rapidshare.com/files/3316564346/heather.doc

Мне нужно это на всех страницах

решение1

Вот одна из возможностей использованияbackgroundпакет для размещения рамки на всех страницах документа; рамка была создана с использованием двух tabularсред; изменяя длину \xshи \ysh, (соответственно), пользователь может динамически изменять горизонтальное, вертикальное (соответственно) разделение между текстом и рамкой.

\PassOptionsToPackage{demo}{graphicx}
\documentclass{article}
\usepackage[a5paper,centering]{geometry}% a5paper just for the example
\usepackage{array}
\usepackage{lastpage}
\usepackage{multirow}
\usepackage{background}
\usepackage{tikzpagenodes}
\usepackage{lipsum}% just to generate text for the example

% a new column type
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}

% auxiliary lengths
\newlength\xsh
\newlength\ysh
\newlength\framewd
\newlength\frameht

% apply changes here to the width and height of the frame 
\setlength\xsh{1cm}
\setlength\ysh{2cm}

\setlength\framewd{\dimexpr\textwidth+2\xsh\relax}
\setlength\frameht{\dimexpr\textheight+2\ysh\relax}

\makeatletter
% auxiliary commands for the coursename, the course number and the logo
\def\coursename#1{\gdef\@coursename{#1}}
\def\cnumber#1{\gdef\@cnumber{#1}}

% the main part
% Here we built the frame using two tabular environments:
% one for the header, the other one for the footer
\backgroundsetup{
opacity=1,
scale=1,
color=black,
angle=0,
contents={%
\begin{tikzpicture}[remember picture,overlay]
\draw ([xshift=-\xsh,yshift=\ysh]current page text area.north west) --
  ([xshift=\xsh,yshift=\ysh]current page text area.north east) --
  ([xshift=\xsh,yshift=-\ysh]current page text area.south east) --
  ([xshift=-\xsh,yshift=-\ysh]current page text area.south west) -- cycle;
\node[anchor=north,inner sep=0pt] at ([yshift=\ysh]current page text area.north)
{
\renewcommand\arraystretch{1.4}%
\footnotesize%
\noindent\begin{tabular}[t]{C{\dimexpr.3\framewd-12.46pt\relax}|p{\dimexpr.45\framewd-12.46pt\relax}|p{\dimexpr.25\framewd-12.46pt\relax}}
\multirow{2}{*}{\includegraphics[height=15pt,width=\dimexpr.3\framewd-12.46pt\relax,keepaspectratio]{logo}} & \textsc{Course}: & \@cnumber \\
\cline{3-3}
& \multicolumn{1}{c|}{\@coursename} & \thepage/\pageref{LastPage} \\
\hline
\end{tabular}%
};
\node[anchor=south,inner sep=0pt] at ([yshift=-\ysh]current page text area.south)
{%
\renewcommand\arraystretch{1.4}%
\footnotesize%
\noindent\begin{tabular}[t]{C{\dimexpr.15\framewd-12.4pt\relax}|C{\dimexpr.37\framewd-12.4pt\relax}|C{\dimexpr.12\framewd-12.4pt\relax}|C{\dimexpr.12\framewd-12.3pt\relax}|C{\dimexpr.12\framewd-12.4pt\relax}|C{\dimexpr.12\framewd-12.3pt\relax}}
\hline
Id number & Last name and name & Level & Year & E & Sign\\
\hline
& & & & & \\
\end{tabular}%
};
\end{tikzpicture}%
}
}
\makeatother

\pagestyle{empty}

% assign here the course name and course number
\coursename{General Topology}
\cnumber{444 555 111-02}

\begin{document}

\lipsum[1-20]

\end{document}

введите описание изображения здесь

Линия

\PassOptionsToPackage{demo}{graphicx}

просто заменяет реальные изображения черными прямоугольниками; делая таким образом мой пример кода компилируемым для всех. Удалите эту строку в вашем фактическом документе и убедитесь, что вы используете правильное имя вашего собственного логотипа в аргументе команды \includegraphics.

Связанный контент