使用 \includepdf 后消除多余的页面

使用 \includepdf 后消除多余的页面

我有个问题。我正在写论文,我使用 \includepdf 命令自定义封面,然后我启动文档,但我觉得这个命令在使用后会添加一个额外的空白页。看看我的代码:

\documentclass[letterpaper,12pt,openany]{book}
\usepackage[spanish,mexico,es-lcroman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{pdfpages}
\begin{document}
    \thispagestyle{empty}
    \includepdf[pages=1]{portada_tesis.pdf} %the cover page, after it the blank page is added
    \maketitle %another filled page
    \thispagestyle{empty}
     The document text starts here...
\end{document}

你们知道为什么会发生这种情况以及如何避免多余的页面吗?

答案1

我不太确定您的问题。据我所知,您希望有一个显示“portada_tesis.pdf”的“标题页”。然后是第二个标题页,由命令\maketitle?生成。

如果是,您需要使用 来说明哪个标题\title{whatever}。为了避免出现空白页,您可以更改\maketitle,使用以下答案:https://tex.stackexchange.com/a/86255/4736所以我在你的例子中进行了注释\maketitle并添加了标题和{\let\newpage\relax\maketitle}

\documentclass[letterpaper,12pt,openany]{book}
\usepackage[spanish,mexico,es-lcroman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{pdfpages}

\title{Title of Document}
\begin{document}
    \thispagestyle{empty}
    \includepdf[pages=1]{portada_tesis.pdf} %the cover page, after it the blank page is added
{\let\newpage\relax\maketitle}
%    \maketitle %another filled page
    \thispagestyle{empty}
     The document text starts here...
\end{document}

相关内容