GeneralNo output after pdfpages

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
damianjb
Posts: 11
Joined: Tue Feb 04, 2014 1:42 pm

No output after pdfpages

Post by damianjb »

Hi, I'm using Auctex and pdflatex. I'm putting all the packages here to see if there is any problem of incompatibility.
I have this file called prueba-pdf.tex

Code: Select all

\documentclass[a4paper,9pt,book]{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage[nochapter,owncaptions]{vhistory}
\usepackage{multirow}
\usepackage{biblatex}
\usepackage[inline]{enumitem}
\usepackage{csquotes}
\usepackage{adforn}
\usepackage[below,section]{placeins}
\usepackage{float} 
\usepackage[xindy,style=altlist]{glossaries}
\makeglossaries
\usepackage[xindy]{imakeidx}
\makeindex
\usepackage{xcolor}
\usepackage{framed}
\usepackage{tikz}
\usepackage[colorlinks,linkcolor=black]{hyperref}
\usepackage{lipsum}

\begin{document}
\chapter{my first chapter}
\section{my first section}
\lipsum[4]

\chapter{my second chapter}
\section{my second section}
\lipsum[4]
\end{document}
This makes prueba-pdf.pdf as expected.
But, I want to print an A5 booklet on A4paper.
When I try to add

Code: Select all

\usepackage{pdfpages}
to the preamble and

Code: Select all

\includepdf[pages=-,booklet,landscape]{prueba-pdf.pdf}
after begin{document}, the minibuffer says

Code: Select all

Latex: Succesfully formatted [0] pages
and my pdf file dissapears.

Any ideas?
To see a world in a grain of sand,
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

No output after pdfpages

Post by Johannes_B »

Do you want to make a booklet out ouf your original work? I didn't quite follow.

If you do want to do that, you need to create a new file creating a completely new pdf file, please see the example below:

Code: Select all

\RequirePackage{filecontents}
\begin{filecontents}{\jobname Original.tex}
	\documentclass[a4paper,9pt,book]{memoir}
	\usepackage{lipsum}
	\usepackage{blindtext}
	\begin{document}
	\chapter{my first chapter}
	\section{my first section}
	\lipsum[4]

	\chapter{my second chapter}
	\section{my second section}
	\lipsum[4]
	\blinddocument
	\blinddocument
	\blinddocument
	\blinddocument
	\end{document}
\end{filecontents}
%^ This is supposed to be your original file
%v Now the file making the booklet
\documentclass{article}
\usepackage{pdfpages}
%v This compiles the original file above
% You need to run the original using the option
% -shell-escape
\immediate\write18{pdflatex \jobname Original.tex}
\begin{document}
\includepdf[pages=-,booklet,landscape]{\jobname Original.pdf}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
damianjb
Posts: 11
Joined: Tue Feb 04, 2014 1:42 pm

Re: No output after pdfpages

Post by damianjb »

I see I need to use those options from a different file.
I was trying to create my a4 file and my booklet at the same time and it was never going to work.
Thank you.
To see a world in a grain of sand,
And a heaven in a wild flower,
Hold infinity in the palm of your hand,
And eternity in an hour.
Post Reply