使用 Peter R. Wilson 的“titlepages”

使用 Peter R. Wilson 的“titlepages”

我正在尝试使用 Peter Wilson 的 Title Pages 包提供的样本。

文档链接:

http://mirrors.ctan.org/info/latex-samples/TitlePages/titlepages.pdf

https://www.ctan.org/pkg/titlepages

这是我使用过的代码,但是它不起作用并出现以下错误:

代码:

\documentclass[12pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\author{Me}

\newcommand*{\titleTMB}{\begingroup% Three Men in a Boat
\drop=0.1\txtheight
\centering
\settowidth{\unitlength}{\LARGE THE BOOK OF CONUNDRUMS}
\vspace*{\baselineskip}
{\large\scshape the author}\\[\baselineskip]
\rule{\unitlength}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}
\rule{\unitlength}{0.4pt}\\[\baselineskip]
{\LARGE THE BOOK OF CONUNDRUMS}\\[\baselineskip]
{\itshape puzzles for the mind}\\[0.2\baselineskip]
\rule{\unitlength}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}
\rule{\unitlength}{1.6pt}\\[\baselineskip]
{\large\scshape drawings by the artist}\par
\vfill
{\large\scshape the publisher}\\[\baselineskip]
{\small\scshape year}\par
\vspace*{\drop}
\endgroup}

\begin{document}
\titleTMB
\end{document}

错误:

在此处输入图片描述

有人能帮我找出问题所在吗?

答案1

两个问题:

  • 有一个拼写错误:\txtheight缺少一个 e

  • \newlength{\drop}缺失(来自链接 pdf 的第 45 页)


\documentclass[12pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\author{Me}

\newlength{\drop}% for my convenience

\newcommand*{\titleTMB}{\begingroup% Three Men in a Boat
\drop=0.1\textheight
\centering
\settowidth{\unitlength}{\LARGE THE BOOK OF CONUNDRUMS}
\vspace*{\baselineskip}
{\large\scshape the author}\\[\baselineskip]
\rule{\unitlength}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}
\rule{\unitlength}{0.4pt}\\[\baselineskip]
{\LARGE THE BOOK OF CONUNDRUMS}\\[\baselineskip]
{\itshape puzzles for the mind}\\[0.2\baselineskip]
\rule{\unitlength}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}
\rule{\unitlength}{1.6pt}\\[\baselineskip]
{\large\scshape drawings by the artist}\par
\vfill
{\large\scshape the publisher}\\[\baselineskip]
{\small\scshape year}\par
\vspace*{\drop}
\endgroup}

\begin{document}

\titleTMB

test

\end{document}

相关内容