Memoir、showframe 和 curve2e 不能很好地协同工作

Memoir、showframe 和 curve2e 不能很好地协同工作

似乎memoir类和showframe包的组合curve2e不能很好地协同工作。下面是我用于测试的 MWE。

% memframeprob.tex

%\documentclass{book}
\documentclass[a4paper]{memoir}
\usepackage{showframe}
\usepackage{lipsum}
\usepackage{comment}

%\begin{comment}
\setlrmarginsandblock{0.5in}{*}{*}
\setulmarginsandblock{0.5in}{*}{1}
\checkandfixthelayout
\pagestyle{empty}
\usepackage{url}
%\end{comment]

\usepackage{pict2e}
\usepackage{curve2e} % problem 


%\begin{comment}
\newcommand*{\X}{{\LARGE\textbf{.}}}
\renewcommand*{\X}{\makebox(0,0){{\large\textbf{+}}}}
\newcommand*{\Flag}{{\LARGE$\uparrow$}}
\newcommand*{\mk}{\makebox(0,0){$\circ$}}
\newcommand*{\Mk}{\makebox(0,0){$\bullet$}}
%\end{comment}

\begin{document}
\lipsum[1]
\end{document}

正如您所看到的,我尝试通过注释掉一些代码来找出问题所在。当我编译 MWE 时,我得到了

(/usr/local/texlive/2020/texmf-dist/context/base/mkii/sypp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)
! Missing number, treated as zero.
<to be read again>
                   \bgroup
l.31 \end{document}

book当我使用该类(删除所有特定命令)时不会发生这种情况,而当我不使用该包时也memoir不会发生这种情况。memoirbookcurve2e

我不知道是什么原因导致了这个问题。

答案1

自 2020-10-01 版本起,LaTeX 图片模式允许\put坐标中的长度(该功能以前但由picture包以不同的方式提供)。

Curve2e 已更新,但遗漏了一些情况,包括\line

% memframeprob.tex

%\documentclass{book}
\documentclass[a4paper]{memoir}
\usepackage{showframe}
\usepackage{lipsum}
\usepackage{comment}

%\begin{comment}
\setlrmarginsandblock{0.5in}{*}{*}
\setulmarginsandblock{0.5in}{*}{1}
\checkandfixthelayout
\pagestyle{empty}
\usepackage{url}
%\end{comment]

\usepackage{pict2e}
\usepackage{curve2e} % problem 

\makeatletter



\def\line(#1)#2{\begingroup
  \@defaultunitsset\@linelen{#2}\unitlength
  \ifdim\@linelen<\z@\@badlinearg\else
    \expandafter\DirOfVect#1to\Dir@line
    \GetCoord(\Dir@line)\d@mX\d@mY
    \ifdim\d@mX\p@=\z@\else
      \edef\sc@lelen{\fpeval{1 / abs(\d@mX)}}\relax
      \@linelen=\sc@lelen\@linelen
    \fi
    \moveto(0,0)\pIIe@lineto{\d@mX\@linelen}{\d@mY\@linelen}%
    \strokepath
  \fi
\endgroup\ignorespaces}%


\makeatother


%\begin{comment}
\newcommand*{\X}{{\LARGE\textbf{.}}}
\renewcommand*{\X}{\makebox(0,0){{\large\textbf{+}}}}
\newcommand*{\Flag}{{\LARGE$\uparrow$}}
\newcommand*{\mk}{\makebox(0,0){$\circ$}}
\newcommand*{\Mk}{\makebox(0,0){$\bullet$}}
%\end{comment}

\begin{document}
\lipsum[1]
\end{document}

相关内容