![A4 文档中的 A3 页面上的图片和标题未居中,并且页码发生更改](https://linux22.com/image/368509/A4%20%E6%96%87%E6%A1%A3%E4%B8%AD%E7%9A%84%20A3%20%E9%A1%B5%E9%9D%A2%E4%B8%8A%E7%9A%84%E5%9B%BE%E7%89%87%E5%92%8C%E6%A0%87%E9%A2%98%E6%9C%AA%E5%B1%85%E4%B8%AD%EF%BC%8C%E5%B9%B6%E4%B8%94%E9%A1%B5%E7%A0%81%E5%8F%91%E7%94%9F%E6%9B%B4%E6%94%B9.png)
我编写了以下代码,将 A3 插入 A4 文档。一旦插入 A3,所有格式都会变得混乱。我尝试了几种解决方案,现在许多问题都解决了。但是,A3 页面上的页码仍然在中间,而我希望它位于右侧下角,并且数字不在中间。此外,当我尝试再次返回 A4 时,一切都变得混乱。如果您能提供解决方案,那将是一个很大的帮助
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[top=0.75in,bottom=0.75in,left=1.25in,right=0.5in]{geometry}
\usepackage{fancyhdr}
\usepackage{lscape}
\usepackage{tikz}
\usepackage{longtable}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{makecell}
\usepackage{capt-of,color}
\usetikzlibrary{shapes.geometric,arrows}
\usetikzlibrary{calc}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyfoot[R]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\tikzstyle{rect} = [rectangle,rounded corners,minimum width=3cm,minimum height=1.5cm,text centered,text width=3cm,draw=black,fill=blue!9]
\tikzstyle{circle1} = [circle, thick, draw=orange, minimum height=4mm]
\tikzstyle{arrow} = [thick,->,>=stealth]
\usetikzlibrary{decorations.pathreplacing}
\newcommand{\tikzmark}[2]{\tikz[remember picture,baseline=(#1.base)]{\node[inner sep=0pt] (#1) {#2};}}
\begin{document}
\tableofcontents
\newpage
\listoffigures
\newpage
\listoftables
\newpage
\newpage
\subsection{Approved Cadre and Current Staff Members}
\begin{table}[htbp]
\begin{tabularx}{\textwidth}{ X X }
\begin{itemize}
\item[] 01.Project Director:
\item[] 02.Dep. Project Director (Business Promotion)
\item[] 03.Dep. Project Director (Infrastructure)
\item[] 04.Senior Engineer (Electrical/ICT)
\item[] 05.Senior Engineer (Civil)
\item[] 06.Engineer (Electrical/Electronics)
\item[] 07.Engineer (Civil)
\item[] 08.Business Development Officer
\item[] 09.Planning Coordinator
\item[] 10.Town Planner
\item[] 11.Quantity Surveyor
\item[] 12.Technical Officer 01
\item[] 13.Land Officer
\item[] 14.Planning Officer
\item[] 15.Project Secretary
\item[] 16.Admin. Officer
\item[] 17.Management Assistant 01
\item[] 18.Management Assistant 02
\item[] 19.Management Assistant 03
\item[] 20.Computer Operator 01
\item[] 21.Computer Operator 02
\item[] 22.Computer Operator 03
\item[] 23.Office Employee Assistant 01
\item[] 24.Office Employee Assistant 02
\end{itemize}
&
\begin{itemize}
\item[] \tikzmark{A}{Eng. Lal Premanath}
\item[] \tikzmark{B}{Mr. Rahula Senanayake}
\item[] \tikzmark{C}{\textbf{Vacant}}
\item[] \tikzmark{D}{Mr. S.M.D.M. Ajith}
\item[] \tikzmark{E}{Mrs. Chandanie Jayathilake}
\item[] \tikzmark{F}{Ms. Devni Asheka}
\item[] \tikzmark{G}{Ms. Shavini Avanthika}
\item[] \tikzmark{H}{Mr. Thanuka Sasith}
\item[] \tikzmark{I}{Ms Chathurangani Amarasekara}
\item[] \tikzmark{J}{\textbf{Vacant}}
\item[] \tikzmark{K}{\textbf{Vacant}}
\item[] \tikzmark{L}{Ms. Chamli Shashiprabha}
\item[] \tikzmark{M}{\textbf{Vacant}}
\item[] \tikzmark{N}{Ms. Prabhashini Subasinghe}
\item[] \tikzmark{O}{Ms. Kanthi Samarawickrama}
\item[] \tikzmark{P}{\textbf{Vacant}}
\item[] Ms. Shehani Kaushalya
\item[] Ms. Sandali Lakchani
\item[] Mr. Navin Ranasinghe
\item[] Mr. Sharaka Harsha
\item[] Ms. Pawani Perera
\item[] Ms. Nadeesha Mayadunna
\item[] Mr. Sasika Ekanayake
\item[] Mr. Mangala Amith
\end{itemize}
\begin{tikzpicture}[remember picture,overlay]
\coordinate (top A) at ($(A.north east)+(1cm,0)$);
\coordinate (bottom A) at ($(A.south east)+(1cm,0)$);
\draw[decorate,decoration={brace}] (top A) -- node[right] {PS1} (top A |- bottom A);
\coordinate (top B) at ($(B.north east)+(1cm,0)$);
\coordinate (bottom C) at ($(C.south east)+(1cm,0)$);
\draw[decorate,decoration={brace}] (top B) -- node[right] {PS2} (top B |- bottom C);
\coordinate (top D) at ($(D.north east)+(2cm,0)$);
\coordinate (bottom E) at ($(E.south east)+(2cm,0)$);
\draw[decorate,decoration={brace}] (top D) -- node[right] {PS3} (top D |- bottom E);
\coordinate (top F) at ($(F.north east)+(3cm,0)$);
\coordinate (bottom J) at ($(J.south east)+(3cm,0)$);
\draw[decorate,decoration={brace}] (top F) -- node[right] {PS4} (top F |- bottom J);
\coordinate (top K) at ($(K.north east)+(5cm,0)$);
\coordinate (bottom K) at ($(K.south east)+(5cm,0)$);
\draw[decorate,decoration={brace}] (top K) -- node[right] {PS5} (top K |- bottom K);
\coordinate (top L) at ($(L.north east)+(2.5cm,0)$);
\coordinate (bottom P) at ($(P.south east)+(2.5cm,0)$);
\draw[decorate,decoration={brace}] (top L) -- node[right] {PS6} (top L |- bottom P);
\end{tikzpicture}
\end{tabularx}
\end{table}
\newpage
%---------------------------------------------------------
{\pdfpagewidth=2\pdfpagewidth
\begin{figure}
\begin{center}
\begin{tikzpicture}[node distance=2.5cm]
\node (ps1) [rect] {PD-Tech City};
\node (ps21) [rect,below of=ps1] {DPD- Infrastructure};
\node (ps22) [rect,below of=ps1,xshift=13.3cm] {DPD- Business Promotion};
\node (ps31) [rect,below of=ps21,xshift=-6cm] {Senior Eng Roads, Sewer, Water, Drainage};
\node (ps32) [rect,below of=ps21,xshift=7.5cm] {Senior Eng Electrical/ICT};
\node (ps41) [rect,below of=ps31,xshift=-2.5cm] {Civil Eng};
\node (ps42) [rect,below of=ps21,xshift=4cm,yshift=-2.5cm] {Town Planner};
\node (ps43) [rect,below of=ps32] {Electrical Eng};
\node (ps44) [rect,below of=ps22,yshift=-2.5cm] {Business Development Officer};
\node (ps45) [rect,below of=ps1,xshift=-15cm,yshift=-5cm] {Planning Coordinator};
\node (ps46) [rect,below of=ps31,xshift=2.5cm] {Architect};
\node (ps51) [rect,below of=ps41,xshift=2.5cm] {QS};
\node (ps52) [rect,below of=ps42] {GIS officer};
\node (ps61) [rect,below of=ps46,xshift=0,yshift=-2.5cm] {Draughtsman};
%\node (ps62) [rect,below of=ps43,xshift=2cm,yshift=-2.5cm] {Pr. Secretary};
%\node (ps63) [rect,below of=ps42,yshift=-2.5cm] {Land Officer};
\node (ps64) [rect,below of=ps52] {Planning Officer};
%\node (ps65) [rect,below of=ps43,xshift=6cm,yshift=-2.5cm] {Admin. Officer};
\node (ps66) [rect,below of=ps41,xshift=0,yshift=-2.5cm] {Technical officer};
\node (MA4) [rect,below of=ps66] {MA-4};
\node (CO2) [rect,below of=ps61] {CO-2};
\node (Driver3) [rect,below of=MA4,xshift=2.5cm] {Driver-3};
\node (CO4) [rect,below of=ps64] {CO-4};
%\node (level1) [circle1,right of=ps1,xshift=-5cm] {PS1};
%\node (level2) [circle1,right of=ps21,xshift=-5cm] {PS2};
%\node (level3) [circle1,right of=ps31,xshift=-5cm] {PS3};
%\node (level4) [circle1,right of=ps41,xshift=-5cm] {PS4};
%\node (level5) [circle1,right of=ps51,xshift=-5cm] {PS5};
%\node (level6) [circle1,right of=ps61,xshift=-5cm] {PS6};
%\draw [arrow] (ps1)|-(ps21);
\coordinate (below ps1) at ($(ps1.south)+(0,-0.5cm)$);
\draw [arrow] (ps1.south)--(below ps1)--++(0,0)--(ps21.north);
\draw [arrow] (ps1.south)--(below ps1)--++(13.3cm,0)--(ps22.north);
\coordinate (below ps21) at ($(ps21.south)+(0,-0.5cm)$);
\draw [arrow] (ps21.south)--(below ps21)--++(7.5cm,0)--(ps32.north);
\draw [arrow] (ps21.south)--(below ps21)--++(-6cm,0)--(ps31.north);
\draw [arrow] (ps21.south)--(below ps21)--++(2cm,0)--++(0,-6.25cm)--(ps51.east);
\draw [arrow] (ps21.south)--(below ps21)--++(4cm,0)--(ps42.north);
\draw [arrow] (ps32.south)--(ps43.north);
\draw [arrow] (ps22.south)--(ps44.north);
\draw [arrow] (ps42.south)--(ps52.north);
\draw [arrow] (ps52.south)--(ps64.north);
\draw [arrow] (ps64.south)--(CO4.north);
\coordinate (below ps31) at ($(ps31.south)+(0,-0.5cm)$);
\draw [arrow] (ps31.south)--(below ps31)--++(-2.5cm,0)--(ps41.north);
\draw [arrow] (ps31.south)--(below ps31)--++(2.5cm,0)--(ps46.north);
\coordinate (above ps66) at ($(ps66.north)+(0,0.3cm)$);
\draw [arrow] (ps31.west)--++(-3cm,0)--++(0,-6.43cm)--(above ps66)--(ps66.north);
%\draw [arrow] (ps31.south)--(below ps31)--++(-2cm,0)--(ps41.north);
\coordinate (above ps61) at ($(ps61.north)+(0,0.3cm)$);
\draw [arrow] (ps31.west)--++(-3cm,0)--++(0,-6.43cm)--(above ps61)--(ps61.north);
\coordinate (above CO2) at ($(CO2.north)+(0,0.3cm)$);
\coordinate (above MA4) at ($(MA4.north)+(0,0.3cm)$);
\coordinate (above Driver3) at ($(Driver3.north)+(0,2.8cm)$);
\draw [arrow] (ps21.south)--(below ps21)--++(2cm,0)--++(0,-10.18cm)--(above CO2)--(CO2.north);
\draw [arrow] (ps21.south)--(below ps21)--++(2cm,0)--++(0,-10.18cm)--(above MA4)--(MA4.north);
\draw [arrow] (ps21.south)--(below ps21)--++(2cm,0)--++(0,-10.18cm)--(above Driver3)--(Driver3.north);
% \draw [arrow] (ps32)--(ps43);
% \draw [arrow] (ps65)--(support);
% \coordinate (below ps22) at ($(ps22.south)+(0,-0.5cm)$);%
% \draw [arrow] (ps22.south)--(below ps22)--++(2cm,0)--(ps45.north);
% \draw [arrow] (ps22.south)--(below ps22)--++(-2cm,0)--(ps44.north);
\end{tikzpicture}
\caption{Organization Chart of Tech City Development Project}
\end{center}
\end{figure}
\clearpage
%}
%--------------------------------------------------------------
\newpage
\subsection{Progress in Road Affairs}
\subsubsection{Outcomes of Progress Review Meeting}
At the Progress Review Meeting held on 13th December 2017, the following
roles \& responsibilities were agreed upon.
\begin{longtable}{|l|p{2cm}|p{5cm}|}
\caption{List of Roles \& Responsibilities agreed at Progress Review
Meeting }\\
\hline
Project&Responsible Agency& Role\\
\hline
\multirow{3}{*}{Access road from Kottawa to Mahenwatta}&UDA&Land acquisition
\\ \cline{2-3}
&RDA&Design\\ \cline{2-3}
&PRDA&Contractor for Dampe - Pitipana section\\ \hline
\multirow{4}{*}{Roads under PRDA jurisdiction}&RDA&Design (using the
provision from UDA's Sukithapurawara projects for 2018)\\ \cline{2-3}
&TCDP& Procure and outsource the construction/ improvement works\\
\cline{2-3}
&UDA&Land acquisition\\ \cline{2-3}
&PRDA&Supervise the construction/ improvement works \\ \hline
Construction of internal roads& &\\ \hline
\end{longtable}
\end{document}
答案1
typearea
您可以使用以下软件包和组合geometry
:
\documentclass{article}
\usepackage[usegeometry]{typearea}
\usepackage{geometry}
\newcommand*\normalpage{%
\cleardoublepage
\KOMAoptions{paper=a4,paper=portrait}\recalctypearea
\newgeometry{top=0.75in,bottom=0.75in,left=1.25in,right=0.5in}%
}
\newcommand*\largepage{%
\cleardoublepage
\KOMAoptions{paper=a3,paper=landscape,usegeometry}\recalctypearea
\newgeometry{top=0.75in,bottom=0.75in,left=1.25in,right=0.5in}%
}
\AtBeginDocument{\normalpage}
\usepackage{tikz}% loads also graphicx, xcolor, ...
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[R]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyheadoffset{0pt}% <- recalculate \headwidth
\usepackage{lipsum}% only for dummy text
\usepackage{showframe}% to show the page layout
\begin{document}
\section{A section}
\lipsum
\largepage
\begin{figure}
\centering
\tikz\node[fill=lightgray,minimum width=.8\textwidth,minimum height=.9\textheight]{};
\caption{Organization Chart of Tech City Development Project}
\end{figure}
\normalpage
\subsection{Progress in Road Affairs}
\lipsum
\end{document}
结果是