几何错误

几何错误

我似乎无法摆脱这些错误,抱歉,序言太长了,但我不知道是什么原因造成的,我试过删除一些,它就消失了,但我的整个文档都需要它们。任何帮助都会受到欢迎。

\documentclass{book}

%-----------------------------Packages----------------------------%
\usepackage{geometry}           %Adjust page layout
\usepackage{parskip}                % Set zero paragraph indent and non-zero paragraph spacing
\usepackage{fancyhdr}               % Customize headers and footers
\usepackage{graphicx}               % Include graphics
\usepackage{setspace}               % Adjust line spacing
\usepackage[utf8]{inputenc}             % Input encoding
\usepackage[T1]{fontenc}            % Font encoding
\usepackage{float}
\usepackage{subcaption}
\usepackage{booktabs}               % Better horizontal rules in tables
\usepackage{xspace}                 % Used for printing a trailing space better than using a tilde (~) using the \xspace command
\usepackage{microtype}              % Improves character and word spacing
\usepackage[many]{tcolorbox}            %Boxes for headings or text
\usepackage{lmodern}
\usepackage{titlesec}               % Customize chapter and section titles
\usepackage{sidenotes}              % For Tufte-style sidenotes
\usepackage{libertine}              % Use the Linux Libertine font
    \usepackage[x11names]{xcolor}
\usepackage[table]{xcolor}
    \usepackage{etoolbox}
    \usepackage{epigraph}
    \usepackage{environ}


\setstretch{1.5}                                % Adjust line spacing
\pagestyle{fancy}  
%%%%%%

\usepackage[LGR,T1]{fontenc}
  \newcommand{\textgreek}[1]{\begingroup\fontencoding{LGR}\selectfont#1\endgroup}%%%%%%Greek Writing

%%%%%
\titleformat{\chapter}[display]
  {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
\titleformat{\section}
  {\normalfont\Large\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
  {\normalfont\large\bfseries}{\thesubsection}{1em}{}

% Wide margins
\geometry{
    paperwidth=170mm,
    paperheight=240mm,
    left=40mm,
    top=30mm,
    textwidth=95mm,
    marginparsep=8mm,
    marginparwidth=52mm,
    textheight=38\baselineskip,
    headsep=12mm,
}

% Margin citation
\usepackage{natbib}
%\setcitestyle{authoryear,open={(},close={)}}

% Margin figures

\usepackage{caption}
\usepackage{marginfix} % To fix the margin figure placement
\usepackage{sidenotes} % For Tufte-style sidenotes
\usepackage{libertine} % Use the Linux Libertine font

% Set the head height and adjust the top margin
\setlength{\headheight}{14.5pt}
\setlength{\parindent}{0em} % Remove paragraph indentation
\setlength{\parskip}{1em} % Set paragraph spacing

\setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} % Improves figure scaling

\begin{document}

A straight line originating from the vertex and pivoting within the plane of the angle, transitioning from alignment with one side to alignment with the other, is termed to have rotated through the angle. This angle increases proportionally with the degree of rotation. Additionally, considering that the line can rotate in two distinct directions between these positions, two angles emerge from lines drawn from a common point.

\end{document}

几何错误.tex

包几何警告:bmargin' results in NEGATIVE (-86.49213pt).高度'或'tmargin'应该缩短长度。几何错误.tex

包装几何警告:bmargin' results in NEGATIVE (-86.49213pt).高度'或'tmargin'的长度应缩短。

答案1

  1. 加载lmodernlibertine这两次!)毫无意义。

  2. 幸运的是,它xcolor最近已更新,因此可以多次加载(因为有多个包加载它,可能使用不同的选项),但这并不是自己动手的理由

    \usepackage[x11names,table]{xcolor}

  3. fontenc多次加载也一样

    \usepackage[LGR,T1]{fontenc}

  4. 我不知道如何

    \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} % Improves figure scaling

    可以实现其宣传的效果。即使是较小的图片也会变得尽可能大。

避免抄袭他人的序言并添加内容(双重加载sidenotes暗示了这一点)。如果该序言是您自己的作品,您确实需要将其清理干净。

现在真正的问题是。

\geometry{
    paperwidth=170mm,
    paperheight=240mm,
    left=40mm,
    top=30mm,
    textwidth=95mm,
    marginparsep=8mm,
    marginparwidth=52mm,
    textheight=38\baselineskip,
    headsep=12mm,
}

我们还应该补充一点headheight=14.5pt

您似乎想要 38 行文本,但也要求\setstretch{1.5}。现在标准基线跳过是 12pt,因此您得到 18pt,将其乘以 38 得到 684pt,即略大于 240mm。而您要求的纸张高度为 240mm。

你不可能做到。

\geometry{
    paperwidth=170mm,
    paperheight=240mm,
    left=40mm,
    top=30mm,
    textwidth=95mm,
    marginparsep=8mm,
    marginparwidth=52mm,
%    textheight=38\baselineskip,
    headsep=12mm,
    headheight=14.5pt,
    heightrounded,
}

(注意heightrounded)我们得到 29 行。这是第 2 页和第 3 页的图片(通过重复您键入的文本并删除而获得\usepackage{parskip}),您会发现由于内边距较大且 较大,您没有为边注保留足够的空间\marginparwidth。您需要注意这一点。

在此处输入图片描述

相关内容