Re: [latexusersgroup] A3 page in A4 document, such that headers and footers are converted into correct format, pictures and captions are centered

829 views
Skip to first unread message

Peter Flynn

unread,
Jul 2, 2012, 3:34:11 PM7/2/12
to latexus...@googlegroups.com
On Mon, Jul 2, 2012 at 2:14 PM, Vinay Shekhar <shekha...@gmail.com> wrote:
I would like to know if it is possible to insert an A3 page into an A4 document, while also changing the header and footer to match the changed page. 

I tried the following:

\newpage
\pdfpagewidth=2\paperwidth

%figure inserted here

\pdfpagewidth=1\paperwidth

But it places the header and footer, for a single A4 page, while also not centering the figure on the page.
Does anyone have any advice?

Do you want to print the resulting file?
Do you want the A3 page in landscape or portrait orientation?

I would try the \newgeometry command from a recent version of the geometry package.

///Peter

Vinay Shekhar

unread,
Jul 3, 2012, 6:20:45 AM7/3/12
to latexus...@googlegroups.com
Thanks, but i was able to figure it out. I created a new environment and called it a3page. Then i added the fancyfoot and fancyhead that were used for the rest of the document. It seems to need to update the header and footer for each a3 page that is inserted in the document.
This is what i did:

\newenvironment{a3page}
{\newpage

\begingroup

\advance\textwidth\pdfpagewidth

\hsize=\textwidth\linewidth=\hsize\columnwidth=\hsize

\headheight = 10pt

\headwidth = \textwidth

\fancyhead[L]{%sometext}

\fancyhead[R]{%sometext}

\fancyfoot[R]{\bfseries\thepage}

\fancyfoot[C]{\begin{minipage}[c]{0.4\textwidth}\begin{center}\nouppercase{\leftmark}\end{center}\end{minipage}}

\fancypagestyle{plain}{%

\headheight = 10pt

\headwidth = \textwidth

\fancyhead[L]{%sometext}

\fancyhead[R]{%sometext}

\fancyfoot[R]{\bfseries\thepage}

\fancyfoot[C]{\begin{minipage}[c]{0.4\textwidth}\begin{center}\nouppercase{\leftmark}\end{center}\end{minipage}}}

\pdfpagewidth=2\pdfpagewidth}


{\newpage

\endgroup}

Mico Loretan

unread,
Jul 4, 2012, 6:32:42 AM7/4/12
to latexus...@googlegroups.com
I believe there's an issue with the name of the environment: By TeX's syntax rules, names of environments (like names of macros) may contain only letters i.e., lowercase and uppercase alphabetic letters, but no digits and no non-alphabetic characters. Hence, a3paper isn't quite valid; you might call the environmen aiiipaper or athreepaper instead. (You may want to check if your output and/or log files contain complaints about extra "3paper" snippets.)

Werner Grundlingh

unread,
Jul 4, 2012, 10:49:53 AM7/4/12
to latexus...@googlegroups.com
Hey Mico,

\newenvironment creates the associated commands using \csname ... \endcsname, and therefore allows non-alphabetic (or letter) characters. Sure, having created \newenvironment{abc1}{\itshape}{} doesn't allow you to use \abc1 ... \endabc1 (for the reasons you mention/know) but using it in its environment form is fine: \begin{abc1} ... \end{abc1}

--
You received this message because you are subscribed to the Google Groups "LaTeX Users Group" group.
To view this discussion on the web visit https://groups.google.com/d/msg/latexusersgroup/-/-9YkOpLCguIJ.
To post to this group, send email to latexus...@googlegroups.com.
To unsubscribe from this group, send email to latexusersgro...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/latexusersgroup?hl=en.

Mico Loretan

unread,
Jul 4, 2012, 2:29:02 PM7/4/12
to latexus...@googlegroups.com
Werner: You're absolutely correct -- my posting was in error! Sincerely, Mico
Reply all
Reply to author
Forward
0 new messages