ieeecolor로 불량 상자를 무시하는 방법은 무엇입니까?

ieeecolor로 불량 상자를 무시하는 방법은 무엇입니까?

ieeecolor.cls처음으로 사용하고 있습니다 .https://www.embs.org/tmi/authors-instructions/, 즉,https://www.embs.org/wp-content/uploads/2020/04/TMI-Template-LaTeX-2020.zip

나를 짜증나게 하는 것은 저널에서 권장하는 기본 설정으로 인해 가득 차거나 적게 채워지는 상자가 발생한다는 것입니다.

Overfull \hbox (109.0pt too wide) has occurred while \output is active
Overfull \hbox (162.0pt too wide) has occurred while \output is active
Underfull \hbox (badness 10000) has occurred while \output is active
Overfull \vbox (21.77283pt too high) has occurred while \output is active []

문제를 해결하려고 시도했지만 최대 너비가 정의된 위치가 실제로 표시되지 않으므로 헤더의 요소가 왜 이러한 너비를 초과하는지 알 수 없습니다. 분명히 표준 페이지 여백을 160포인트 초과하지 않습니다. 그런 다음 운 좋게도 그들을 억제하려고 노력했습니다.

또 무엇을 시도할 수 있나요?

\vfuzz=\maxdimen
\hfuzz=\maxdimen
\hbadness=100000
\vbadness=100000

\documentclass[print]{ieeecolor}

%\usepackage{tmi}
\def\logoname{LOGO-tmi-web}
\definecolor{subsectioncolor}{rgb}{0,0.541,0.855}
\setlength{\firstpagerule}{26.5pc}
\setlength{\logowidth}{16.5pc}
\def\journalname{IEEE Transactions on Medical Imaging}

\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\title{Long title: foo bar yada yada foo bar yes thank you that's enough.}
\markboth{\journalname}{Short title}
\author{Author one, two, three, four. \thanks{\lipsum[1]}}
\maketitle
\begin{abstract}
    \lipsum[2]
\end{abstract}
\lipsum[3]
\end{document}

답변1

부분적으로 @DavidCarlisle의 내용을 기반으로 함논평, 이 답변은 서문에서 저에게 효과적입니다. 이는 세 부분으로 구성됩니다. 첫 번째 부분은 \maketitle발행된 페이지에서 대부분의 상자 경고를 끕니다 . 다음 블록은 상자 경고 값을 발행된 페이지 끝의 이전 값으로 다시 설정합니다 \maketitle.

세 번째 블록은 옵션에만 필요하다고 journal생각합니다. 모든 간격을 유지하고 여전히 제거하여 \vbox헤드 코드의 a를 로 대체합니다 .\parbox[c][15pt][c]

오버풀 \vbox (5.0pt가 너무 높음)

이후 페이지의 경고.

% Suppress other "Underfull hbox", "Overfull *box" just before \maketitle
\pretocmd{\maketitle}{%
    \newcounter{titlepage}\setcounter{titlepage}{\value{page}}%
    \newcount\oldhbadness\oldhbadness=\hbadness\hbadness=10000
    \newdimen\oldhfuzz\oldhfuzz=\hfuzz\hfuzz=162pt%
    \newdimen\oldvfuzz\oldvfuzz=\vfuzz\vfuzz=22pt%
}{}{Error.}

% Re-enable on following page
\AtBeginShipout{%
    \ifnumequal{\value{page}}{\value{titlepage}}{%
        \global\hbadness=\oldhbadness%
        \global\hfuzz=\oldhfuzz%
        \global\vfuzz=\oldvfuzz%
    }{}%
}

% Fix "Overfull \vbox (5.0pt too high)" on later pages
\patchcmd{\@evenhead}{%
    \vbox{\color{subsectioncolor}\hrule height1pt width43pc depth0pt}%
}{%
    \parbox[c][15pt][c]{\textwidth}{\color{subsectioncolor}\hrule height1pt width43pc depth0pt}%
}{}{Error.}
\patchcmd{\@oddhead}{%
    \vbox{\color{subsectioncolor}\hrule height1pt width43pc depth0pt}%
}{%
    \parbox[c][15pt][c]{\textwidth}{\color{subsectioncolor}\hrule height1pt width43pc depth0pt}%
}{}{Error.}
\makeatother

이 전체 MWE는 경고 억제 효과를 보여주고 경고가 제목 페이지에서만 억제된다는 것을 보여주는 테스트 경고를 생성합니다.

\documentclass[journal,twoside,web]{ieeecolor}
\usepackage{tmi}
\usepackage{graphicx}
\usepackage{lipsum}

\newif\ifgeneratetestwarnings
\generatetestwarningstrue

\newif\ifsuppressclasswarnings
\suppressclasswarningstrue
\ifsuppressclasswarnings
    \usepackage{etoolbox}
    \usepackage{atbegshi}

    % Suppress other "Underfull hbox", "Overfull *box" just before \maketitle
    \pretocmd{\maketitle}{%
        \newcounter{titlepage}\setcounter{titlepage}{\value{page}}%
        \newcount\oldhbadness\oldhbadness=\hbadness\hbadness=10000
        \newdimen\oldhfuzz\oldhfuzz=\hfuzz\hfuzz=162pt%
        \newdimen\oldvfuzz\oldvfuzz=\vfuzz\vfuzz=22pt%
    }{}{Error.}

    % Re-enable on following page
    \AtBeginShipout{%
        \ifnumequal{\value{page}}{\value{titlepage}}{%
            \global\hbadness=\oldhbadness%
            \global\hfuzz=\oldhfuzz%
            \global\vfuzz=\oldvfuzz%
        }{}%
    }

    % Fix "Overfull \vbox (5.0pt too high)" on later pages
    \makeatletter
    \patchcmd{\@evenhead}{%
        \vbox{\color{subsectioncolor}\hrule height1pt width43pc depth0pt}%
    }{%
        \parbox[c][15pt][c]{\textwidth}{\color{subsectioncolor}\hrule height1pt width43pc depth0pt}%
    }{}{Error.}
    \patchcmd{\@oddhead}{%
        \vbox{\color{subsectioncolor}\hrule height1pt width43pc depth0pt}%
    }{%
        \parbox[c][15pt][c]{\textwidth}{\color{subsectioncolor}\hrule height1pt width43pc depth0pt}%
    }{}{Error.}
    \makeatother
\fi

\begin{document}
\title{Title}
\author{Author \thanks{Thanks.}}
\maketitle

\lipsum[1-17]

\ifgeneratetestwarnings
    This underfuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuull hbox should be a warning.

    This \mbox{overfuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuull} hbox, too (4.43956pt).

    \parbox[c][2in][s]{4cm}{This underfull vbox, too.}

    This overfull vbox, too (2.0pt):\newpage
    \begin{minipage}[t][690pt]{\textwidth}\end{minipage}
\fi

\end{document}

관련 정보