标题中的水平盒子过满

标题中的水平盒子过满

我在 \rhead 命令中的页眉中得到了一个溢出的水平盒子,这是我没有想到的,因为它是右对齐的。出于某种原因,删除页脚似乎可以解决这个问题,但删除 tikz 包却给了我一个未定义的控制序列。似乎我做错了什么,但我无法确定。我该如何解决这个问题?

以下是去掉核心部分的代码。

\documentclass[letterpaper]{article}

\usepackage{graphicx}
\usepackage{float}
\usepackage[letterpaper, top=1.25in, headheight=1.02in, headsep=0.08in, bottom=0.85in, footskip=0.0in,
            left=0.75in, right=0.75in]{geometry} % showframe option handy for designing.
\usepackage{fancyhdr}
\usepackage{listings}
\usepackage{pxfonts}
\PassOptionsToPackage{usenames,dvipsnames}{xcolor}
\usepackage[toc, page]{appendix}
%% \usepackage[printwatermark]{xwatermark}
\usepackage{tikz}
\usepackage{hyperref}
%% % Make the links blue, to follow the Web convention. Using xcolor syntax, internal links will be
%% % 70 % blue, the remainder black, and URLs 80 % blue (brighter)
\hypersetup{colorlinks, linkcolor={blue!70!black}, citecolor={blue!50!black}, urlcolor={blue!80!black}}


\DeclareGraphicsExtensions{.png,.pdf,.jpg,.mps}


% Give the subsubsections letters instead of numbers
\renewcommand \thesubsubsection {\thesubsection.\alph{subsubsection}}

% Use fancy headers and footers, and make the footer show the Subsection and Name %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{fancy}
\fancyhf{}

\renewcommand{\headrule}{{\color{GreenYellow}%
\hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}}

\renewcommand{\subsubsectionmark}[1]{\markright{\thesubsubsection.\ #1}}

%\showboxdepth=\maxdimen
%\showboxbreadth=\maxdimen
\rhead{\includegraphics[width=1.25in]{CDS}}

\lhead{Config Control--General Classification\\Config CONTROLLED}

\cfoot{\fancyplain{}{\begin{center}}
    \footnotesize{\rightmark}
    \begin{tabular}[c]{| p{1.1875in} | p{0.5625in} | p{3.3157in} | p{1.5in} |}
    \hline
    \centering \footnotesize{Document number} &  \centering \footnotesize{Issue} &  \centering \footnotesize{Config Control--General Classification} &
    \tabularnewline
    \centering JSGT XXXX & \centering 1 & \centering Config CONTROLLED &  \centering\small{Page {\thepage}}
    \tabularnewline
    \hline
    \end{tabular}
    \tiny{\copyright{} \the\year{} Company name}
    \end{center}
}


\begin{document}
%
\title{Title}
\author{Author}
%
% Title page
\maketitle
\newpage
Some text....
\end{document}

答案1

溢出的箱子是脚而不是头,它实在太宽了。

\documentclass[letterpaper]{article}

\usepackage{graphicx}
\usepackage{float}
\usepackage[letterpaper, top=1.25in, headheight=1.02in, headsep=0.08in, bottom=0.85in, footskip=0.0in,
            left=0.75in, right=0.75in]{geometry} % showframe option handy for designing.
\usepackage{fancyhdr}
\usepackage{listings}
\usepackage{pxfonts}
\PassOptionsToPackage{usenames,dvipsnames}{xcolor}
\usepackage[toc, page]{appendix}
%% \usepackage[printwatermark]{xwatermark}
\usepackage{tikz}
\usepackage{hyperref}
%% % Make the links blue, to follow the Web convention. Using xcolor syntax, internal links will be
%% % 70 % blue, the remainder black, and URLs 80 % blue (brighter)
\hypersetup{colorlinks, linkcolor={blue!70!black}, citecolor={blue!50!black}, urlcolor={blue!80!black}}


\DeclareGraphicsExtensions{.png,.pdf,.jpg,.mps}

% Give the subsubsections letters instead of numbers
\renewcommand \thesubsubsection {\thesubsection.\alph{subsubsection}}

% Use fancy headers and footers, and make the footer show the Subsection and Name %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{fancy}
\fancyhf{}

\renewcommand{\headrule}{{\color{GreenYellow}%
\hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}}

\renewcommand{\subsubsectionmark}[1]{\markright{\thesubsubsection.\ #1}}

%\showboxdepth=\maxdimen
%\showboxbreadth=\maxdimen
\rhead{\includegraphics[width=1.25in]{example-image}}

\lhead{Config Control--General Classification\\Config CONTROLLED}

\cfoot{\fancyplain{}{\begin{center}}
    \footnotesize{\rightmark}
    \begin{tabular}[c]{| p{1in} | p{0.5in} | p{3.3in} | p{1.5in} |}
    \hline
    \centering \footnotesize{Document number} &  \centering \footnotesize{Issue} &  \centering \footnotesize{Config Control--General Classification} &
    \tabularnewline
    \centering JSGT XXXX & \centering 1 & \centering Config CONTROLLED &  \centering\small{Page {\thepage}}
    \tabularnewline
    \hline
    \end{tabular}
    \tiny{\copyright{} \the\year{} Company name}
    \end{center}
}


\begin{document}
%
\title{Title}
\author{Author}
%
% Title page
\maketitle
\newpage
Some text....
\end{document}

相关内容