0

I am facing a big problem I am adding many Pdf files using includepdf in appendix, the problem is that when I start numbering my pages in appendix, I start having my fancyhead which I don't want it to appear My code is :

\documentclass[oneside,fr,maths]{ty_book}
\begin{document}
\frontmatter
\input{title}   
\tableofcontents
\mainmatter
\pagestyle{fancy}
\geometry{top=1in,bottom=1in,left=1in,right=0.8in}
\fancyhf{}
\fancyhead[L]{}
\fancyhead[R]{\includegraphics[width=2.5cm]{ESSA}}
\fancyfoot[C]{-- \thepage\ / \pageref*{LastPage} --}
\fancypagestyle{plain}{
\fancyhf{}
\fancyhead[L]{}
\fancyhead[R]{\includegraphics[width=2.5cm]{ESSA}}
\fancyfoot[C]{-- \thepage\ / \pageref*{LastPage} --}}


\begin{appendices}
\newpage
\begin{figure}[H]
\centering 
\includepdf[pages=1,\includepdf[pagecommand={\thispagestyle{plain}}]{DMOS1}
\end{figure}
\newpage
\end{document}

To do brief I want to include a pdf file by numbering my pages without having a fancyhead

  • (1) you cannot use \includepdf inside a figure, the included image is larger than what is allowed for a figure. (2) \includepdf[...,\includepdf[[....] makes not sense at all. – daleif Jun 6 '16 at 7:46
  • I have delete the begin figure. So How can I add a numbering for my pages without adding my fancyhead – Abdallah Jun 6 '16 at 7:51
  • \includepdf[pages=1,pagecommand={\thispagestyle{plain}}]{DMOS1} should do it. – daleif Jun 6 '16 at 7:53
  • I have already tried this syntax it add's a numbering plus fancyhead... – Abdallah Jun 6 '16 at 7:55
  • Welcome to TeX.SX!! Rather than posting code fragments it is better to post a full minimal working example. A LaTeX MWE should start with a \documentclass command, have a minimal preamble and then \begin{document}...\end{document}. The code should compile and be as small as possible to demonstrate your problem -- so you should include your fancy header code. This makes it much easier for people to help you --- and much more likely that they will! – Andrew Jun 6 '16 at 7:56
0

MWE is not given. Still find this solution using memoir

\documentclass{memoir}

\usepackage[final]{pdfpages}


\begin{document}


\backmatter

\includepdf[pages=1-2,pagecommand=\thispagestyle{plain}]{Sample}
\newpage

\end{document}

This is working for me. Please ensure a pdf file named Sample.pdf is in its folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.