我可能走对了方向,但正如你从编译中看到的那样,我的图像被裁剪了。该怎么办?
\documentclass[]{memoir}
% Lipsum
\usepackage{kantlipsum}
% Sidenote attempt
\usepackage{caption}
\usepackage[textwidth=25mm]{todonotes}
\setlength{\marginparwidth}{25mm}
%% Pagesize
\setstocksize{226mm}{146mm}
\settrimmedsize{220mm}{140mm}{*}
\settrims{0.3cm}{0.3cm}
\renewcommand\trimmarkscolor{\color{red}}
\setlrmarginsandblock{2cm}{2cm}{*}
\setulmarginsandblock{2.5cm}{2.5cm}{*}
\setheadfoot{25pt}{10mm}
\checkandfixthelayout
\fixpdflayout
% Changemargin environment
\newenvironment{changemargin}[2]{%
\begin{list}{}{%
\setlength{\topsep}{0pt}%
\setlength{\leftmargin}{#1}%
\setlength{\rightmargin}{#2}%
\setlength{\listparindent}{\parindent}%
\setlength{\itemindent}{\parindent}%
\setlength{\parsep}{\parskip}%
}%
\item[]}{\end{list}}
\begin{document}
\chapter{Larger margins}
\begin{changemargin}{2cm}{2cm}
\marginpar{
\includegraphics[width=25mm]{example-image-a}
\captionof{figure}{This is a test case.}
\label{fig:test}
}
\kant[1-2]
\end{changemargin}
\chapter{Normal margins}
\kant[3-4]
\end{document}
答案1
有几件事。您增加了页边距,但没有改变边注的水平位置。我认为您可以使用环境memoir
adjustwith
而不是您的changemargin
环境。
根据您的 MWE,请尝试以下操作:
...
\chapter{Larger margins}
\begin{adjustwidth}{2cm}{2cm} % increase margins by 2cm
\setlength{\marginparsep}{-1cm} % move marginal notes closer to the reduced textwidth
\marginpar{
\includegraphics[width=25mm]{example-image-a}
\captionof{figure}{This is a test case.}
\label{fig:test}
}
\kant[1-2]
\end{adjustwidth}
...
或者如果您想保留您的changemargin
添加内容\setlength{\marginparsep}{-1cm}
到其定义。