對於一個小項目,我嘗試了一些讓人覺得好像應該是花生的東西,但是反對(嘿,那是法國人,從來沒有想過我會記得那些東西的某些部分。 ...)。 問題是,我想要一個乳膠布局,其中頁眉和頁腳跨越整個頁面寬度並且具有背景顏色,並且還可以在左邊,中間或右邊有一些元素(如fancyhdr)。事情是,我根本無法在沒有搞砸佈局的其餘部分的情況下繼續工作。我要的是從位於這裏的圖像更清晰(我不能包括圖像還):http://img641.imageshack.us/img641/2128/exampletexfile.png在Latex中定義一個極其明顯的背景顏色
編輯:添加例子。
這是我嘗試過的一個例子。標題顯示不正確,因爲背景不跨頁面的整個寬度。頁腳根本沒有顯示。
\documentclass[10pt,a4paper,notitlepage]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[usenames,dvipsnames]{color}
\usepackage{fancyhdr}
\usepackage{calc}
\usepackage{tikz}
\usepackage[landscape, top=0cm, bottom=3cm]{geometry}
\definecolor{logoGreen}{RGB}{218,226,87}
\newcommand{\HBG}{
\begin{tikzpicture}[remember picture,overlay]
\node[yshift=-2cm] at (current page.north west)
{
\begin{tikzpicture}[remember picture, overlay]
\draw[fill=logoGreen] (0,0) rectangle (\paperwidth,2cm);
\end{tikzpicture}
};
\end{tikzpicture}
}
\fancyhead{}
\fancyhead[L]{\HBG}
\fancyhead[C]{\includegraphics[height=1.2cm]{"img/headerimg"}}
\fancyfoot[C]{\includegraphics[height=1.2cm]{"img/footerimg"}}
\fancyhfoffset[]{1in+\hoffset+\oddsidemargin}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\headheight 3cm
\footskip -2cm
\pagestyle{fancy}
\begin{document}
\section{first section}
content
\end{document}
你可以顯示你到目前爲止的文檔結構(粘貼代碼),並解釋在佈局的其餘部分被搞砸了什麼? – Vivi 2010-07-07 07:30:33
我已經添加了一個我到目前爲止的例子 – SeeDoubleYou 2010-07-08 07:47:29