![部分出现在具有表格样式的标题中](https://linux22.com/image/374636/%E9%83%A8%E5%88%86%E5%87%BA%E7%8E%B0%E5%9C%A8%E5%85%B7%E6%9C%89%E8%A1%A8%E6%A0%BC%E6%A0%B7%E5%BC%8F%E7%9A%84%E6%A0%87%E9%A2%98%E4%B8%AD.png)
我对标题在表格格式并将图片作为徽标,其中部分标题作为每页页眉的一部分出现。有人能说说为什么会发生这种情况吗?
\documentclass[a4paper,12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[demo]{graphicx}
\usepackage{hyperref}
\usepackage{array}
\usepackage{lastpage}
\usepackage{lipsum}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage{fancyhdr}
\usepackage[hmargin=2cm,top=4cm,headheight=1 in,footskip=0.9 cm]{geometry}
\setlength{\parindent}{0.95cm}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
%\fancyhead[CE,CO,LE,LO,RE,RO]{} %% clear out all headers
\fancyhead[C]{
\begin{tabular}{|m{5cm} m{5.5cm} m{5cm}|l }
\multicolumn{1}{l}{} & & \multicolumn{1}{r}{\includegraphics[height=1.2cm,width=5cm]{image3.jpeg}} & \\
\cline{1-3}
Company & Owner & Description & \\
AAAAA & Test & Technical Specification & \\
\begin{tabular}[c]{@{}l@{}}\\
\end{tabular} & & & \\
Doc No. & Revision & Date & \\
BBBBBB & A & \today & \\
\cline{1-3}
\end{tabular}
}
\cfoot{}
\rfoot{page \thepage\ of \pageref{LastPage}}
\begin{document}
\vspace*{2cm}
%%% first page revision control
\noindent\begin{tabular}{|m{5cm} m{5.5cm} m{5cm}|l }
\multicolumn{1}{l}{} & & \multicolumn{1}{r}{} & \\
\cline{1-3}
Author & Checked & Approved & \\
AAAAAA & BBBBBBBB & AAAAAAAAA & \\
\begin{tabular}[c]{@{}l@{}}\\
\end{tabular} & & & \\
Revision History & Action & Responsible & \\
BBBBBBB & NNNNNNNN & MMMMMM & \\
\cline{1-3}
\end{tabular}
\tableofcontents
\newpage
\section{General}
\subsection{Nomenclature}
\subsection{Reference Documents}
\subsection{Objective and Scope}
\subsection{System Overview}
\section{System Functionality}
\subsection{Function Relations}
\subsection{Function Descriptions}
\subsection{Functional Matrix for Subsystems}
\subsection{Interfaces Between Subsystems}
\section{Realization}
\subsection{Basic Hardware Choices}
\subsection{Basic Software Choices}
\subsection{Function Matrix For System Modules}
\subsection{Interfaces between System Modules}
\section{Interface to the Environment}
\subsection{Interface to other Hardware}
\subsubsection{First Connector}
\subsubsection{Second Connector}
\subsection{Interface to other Software}
\subsubsection{First Signal Group}
\subsubsection{Second Signal Group}
%\lipsum[1-30]
\end{document}
答案1
默认情况下,您的文档在左侧和右侧都有页眉。您可以覆盖页眉[C]
,因此您可以指定页眉中心的内容,但这不会更改页眉的单独左侧和右侧部分。为了避免这种情况,您可以在设置自己的页眉之前清除所有页眉。您已经有了一行,
%\fancyhead[CE,CO,LE,LO,RE,RO]{} %% clear out all headers
只需删除第一个即可取消注释%
。