Page LayoutMultiple Headers in one Document

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Fishie Bubbles
Posts: 2
Joined: Mon Nov 04, 2013 7:02 pm

Multiple Headers in one Document

Post by Fishie Bubbles »

I'm typesetting a document that requires three different headers throughout its seven plus pages and it has several user inputs defined.

For each header I created a separate text file, and the header is defined in the preamble of each text file. In each of these three files, I have several user inputs defined, a few of which overlap with the other files. I want all three files to be compiled into one main document and the user inputs to be defined in that main document such that they are propagated throughout the three text files being called on in the one main document. I can't use the \include or \input commands because I have a complete preamble in each of the three text files. I don't want to use pdfpages because I want the user inputs to be in the main file and I can't do that if I use its \includepdf command.

Right now my main file looks something like the following (without any user inputs):

Code: Select all

\documentclass{report}
...
\usepackage{}
...
\begin{document}
\includepdf{File1}%First three pages with Header 1
\includepdf{File2}%Next three pages with Header 2
\includepdf{File3}%Final page with Header 3
\end{document}
I would like to have user inputs within the main file instead of them being defined in each separate file (File1, File2, File3).

Can anyone help me? Thank you!

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Multiple Headers in one Document

Post by localghost »

I'm afraid that I don't really understand the problem since it is possible to define several page styles in one document e.g. by packages like fancyhdr or titleps. Another approach for your use case could be to use either combine or subfiles.

If that doesn't help, please prepare a concrete, self-contained and minimal example. It is easier to fix given code than to guess something from vague descriptions.


Best regards and welcome to the board
Thorsten
Fishie Bubbles
Posts: 2
Joined: Mon Nov 04, 2013 7:02 pm

Re: Multiple Headers in one Document

Post by Fishie Bubbles »

That combine document class is working well for me, thank you for bringing it up! I think that is the solution that I've been looking for :D
Post Reply