错误:段落中的 \hbox 过满(6.79999pt 太宽)

错误:段落中的 \hbox 过满(6.79999pt 太宽)
\documentclass[12pt,a4paper]{book}

\usepackage[utf8]{inputenc}

\usepackage{amsmath}
\usepackage{mathtools}

\let\cleardoublepage=\clearpage

\begin{document}

    \noindent\fbox{%
    \parbox{\textwidth}{%
        {PGDM2018: Microeconomics}       \hspace{30mm}{November 2018-January 2019}
        \begin{center}
            Lecture 15: 7 Dec 2018
        \end{center}
        \\{Lecturer: Dr.Rakesh Nigam}
        \hspace{20mm}{Scribes: Vaibbhav Devender Kalra}
    }%
}

\end{document}

答案1

\parbox宽了,甚至在 处也是如此\textwidth,因为周围的和\fbox会将其内容填充到四周。删除此元素可避免 过满\fboxsep\fboxrule\hbox 警告s:

在此处输入图片描述

\documentclass{article}

\begin{document}

\noindent\fbox{%
  \parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule}{%
    PGDM2018: Microeconomics
    \hfill November 2018-January 2019
    \begin{center}
      Lecture 15: 7 Dec 2018
    \end{center}
    Lecturer: Dr.Rakesh Nigam
    \hfill Scribes: Vaibbhav Devender Kalra
  }%
}

\end{document}

相关内容