如何确保边距正确 - 几何包无法正常工作

如何确保边距正确 - 几何包无法正常工作

我的论文必须满足以下标准:

  • A4纸,
  • 所有边距必须等于 2.5 厘米,
  • 字体必须是 Times New Roman,12 点,
  • 页码位于页面底部中间

我使用geometry包 (line: \usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry}) 正确设置了页边距。不幸的是,出版社要求修改顶部和底部的页边距,因为它们太小了。我使用了屏幕标尺应用程序,可以确认有些地方出了问题。你能提出解决方案吗?我尝试更改加载包的顺序,但没有帮助。

我的最小工作示例如下:

\documentclass[twoside,12pt]{mwbk} % polish counterpart of book class

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \usepackage{blindtext} % package for generating some dummy text
    \usepackage{apalike}
        \let\bibhang\relax
    \usepackage[round]{natbib}
    \usepackage{amsmath, amssymb}
    \usepackage{floatrow}
        \floatsetup[table]{capposition=top}
        \floatsetup[figure]{capposition=bottom}

    \usepackage{polski}
     \usepackage[english, polish]{babel} 
    \usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage[unicode, naturalnames, breaklinks]{hyperref}
        \def\UrlBreaks{\do\/\do-}

    \usepackage{longtable,booktabs}

    \usepackage{graphicx}
        \graphicspath{ {grafika/} {ObrazkiZRaportuZDyzagregacji/figures/} }

    \raggedbottom % Solution from: https://tex.stackexchange.com/questions/36423/random-unwanted-space-between-paragraphs

    \usepackage[all]{nowidow}

    \usepackage[lang=english]{bicaption}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% THERE's an issue

    % MARGINS must be equal 2,5 cm
    \usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry}

    % MUST be Times
    \usepackage{times}
    \usepackage{mathptmx} 
        \urlstyle{same} 

    \linespread{1.3}

    \usepackage{fancyhdr}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{document}

\section{Introduction}

 \pagestyle{fancy}
    \lhead{}
    \rhead{}
    \fancyhead[LE]{\leftmark }
    \fancyhead[RO]{\rightmark}
    \fancyfoot[CE,CO]{\thepage}

\blindtext[10]

\begin{figure}[h!]
\centering
\includegraphics[scale=1.7]{universe.jpg}
\bicaption{Kosmos}{The Universe}
\label{fig:univerise}
\end{figure}

\section{Conclusion}
``I always thought something was fundamentally wrong with the universe'' \citep{adams1995hitchhiker}


\bibliographystyle{papalike}
    \twocolumn
    {\footnotesize \bibliography{references}}
\end{document}

以及结果 PDF(我运行“屏幕标尺”应用程序来显示边距):

顶部边距不正确

底部边距似乎太小了 - 让我引用一下出版社的话:“边距 - 底部边距有点太小了(它是 1 厘米,应该是 2.5 厘米)”

底部边距太小

答案1

由于您希望将页眉和页脚包含在文本主体中,因此您必须使用和includeheadincludefoot作为includeheadfoot几何选项。

头包括

顺便说一句:如果不禁用标题的兼容模式,您的文档将无法编译。

\PassOptionsToPackage{compatibility=false}{caption}
\documentclass[twoside,12pt]{mwbk} % polish counterpart of book class

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \usepackage{blindtext} % package for generating some dummy text
    \usepackage{apalike}
        \let\bibhang\relax
    \usepackage[round]{natbib}
    \usepackage{amsmath, amssymb}
    \usepackage{floatrow}
        \floatsetup[table]{capposition=top}
        \floatsetup[figure]{capposition=bottom}

    \usepackage{polski}
     \usepackage[english, polish]{babel} 
    \usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage[unicode, naturalnames, breaklinks]{hyperref}
        \def\UrlBreaks{\do\/\do-}

    \usepackage{longtable,booktabs}

    \usepackage[demo]{graphicx}

    \raggedbottom % Solution from: https://tex.stackexchange.com/questions/36423/random-unwanted-space-between-paragraphs

    \usepackage[all]{nowidow}

    \usepackage[lang=english]{bicaption}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% THERE's an issue

    % MARGINS must be equal 2,5 cm
    \usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm,includehead,includefoot]{geometry}

    % MUST be Times
    \usepackage{times}
    \usepackage{mathptmx} 
        \urlstyle{same} 

    \linespread{1.3}

    \usepackage{fancyhdr}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{document}

\section{Introduction}

 \pagestyle{fancy}
    \lhead{}
    \rhead{}
    \fancyhead[LE]{\leftmark }
    \fancyhead[RO]{\rightmark}
    \fancyfoot[CE,CO]{\thepage}

\blindtext[10]

\begin{figure}[h!]
\centering
\includegraphics[scale=1.7]{universe.jpg}
\bicaption{Kosmos}{The Universe}
\label{fig:univerise}
\end{figure}

\section{Conclusion}
``I always thought something was fundamentally wrong with the universe'' \citep{adams1995hitchhiker}


\bibliographystyle{papalike}
    \twocolumn
    {\footnotesize \bibliography{references}}
\end{document}

相关内容