答案1
原因是后面的换行\fbox{...}
会产生空格!在 \fbox 后面写入 %:\fbox{...}%
答案2
替换 \centering with the center
环境(也许您必须调整垂直间距):
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[showframe]{geometry}
\begin{document}
\begingroup
\thispagestyle{empty}
\vspace*{.34\textheight}
\begin{center}
\fbox{{\normalfont\fontsize{25}{25}\bfseries Anhang}}
\end{center}
\vspace*{\fill}
\endgroup
\end{document}
答案3
最好使用\vspace
之间段落。我还将单词向下移动了其总高度加上深度的一半,并将其放置在零高度和深度框中。
\documentclass{book}
\usepackage{showframe}% for seeing the page margins
\begin{document}
% whatever before the appendix
\cleardoublepage
\begingroup
\thispagestyle{empty}
\centering
\fboxsep=-\fboxrule % just for the example
\vspace*{\stretch{0.35}}
\noindent\raisebox{-0.5\totalheight}[0pt][0pt]{%
% \normalfont\fontsize{25}{0}\bfseries Anhang% <--- should be this
\normalfont\fontsize{25}{0}\bfseries \fbox{Anhang}% <--- for the measuring
}
\vspace*{\stretch{0.65}}
\endgroup
\cleardoublepage
\end{document}