
\documentclass{article}[12pt]
\usepackage{setspace}
\usepackage{lastpage}
\usepackage{rotating}
\usepackage{etoolbox}
\usepackage{lscape}
\usepackage{pdflscape}
%\usepackage{textcomp}
\usepackage[titletoc]{appendix}
\usepackage{longtable}
\usepackage{easytable}
\usepackage{array}
\usepackage{multirow}
\usepackage{amssymb}
\usepackage{fancyhdr}
%\usepackage{helvetica} % uses helvetica postscript font (download helvetica.sty)
\usepackage[includeheadfoot]{geometry}
\geometry{a4paper,hmargin={2cm,2cm},vmargin={2cm,2cm}}
\usepackage{caption}
\captionsetup{skip=0pt}
\usepackage[table]{xcolor}
\usepackage{booktabs,arydshln}
\usepackage{lipsum}
\newcommand\VRule[1][\arrayrulewidth]{\vrule width #1}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\fancypagestyle{mydoc}{%
\fancyhf{}
\fancyhead{}
\fancyfoot{}
\fancyfoot[C]{
\scriptsize
Page \thepage\ of \pageref{LastPage}
}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
\fancypagestyle{lscape}{%
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhf{}
\fancyhead{}
\fancyfoot{}
\fancyfoot[C]{
\scriptsize
Page \thepage\ of \pageref{LastPage}
}
\fancyfoot[L]{
\footnotesize
Created: 14 August 2002 \\
Modified: 20 December 2012 \\
}
}
\begin{document}
\onehalfspacing
\title{
\vspace{48pt}
\textbf{Application \\ \vspace{48pt}
}
\vspace{96pt}
\large{Modality: \\}
\vspace{18pt}
\large{Submodality: \\}
\vspace{48pt}
}
\author{Name \\
\vspace{36pt}}
\maketitle
\thispagestyle{empty}
\newpage
\thispagestyle{mydoc}
\tableofcontents
\newpage
\clearpage
\pagestyle{mydoc}
\section{Section Title 1}
\lipsum[1-10]
\section{Section Title 2}
\lipsum[11-20]
\section{Appendices: Index and Supporting Evidence}
\begin{appendices}
\newgeometry{a4paper,hmargin={2cm,2cm},vmargin={-0.5cm,0cm},landscape,includeheadfoot}
\paperwidth=\pdfpageheight
\paperheight=\pdfpagewidth
\pdfpageheight=\paperheight
\pdfpagewidth=\paperwidth
\fancyhfoffset[R]{8.75cm}
\textheight=17.5cm
\makeatletter
\setlength{\@fptop}{0cm}
\makeatother
\pagestyle{lscape}
\setcounter{section}{1}
\addcontentsline{toc}{section}{\protect\numberline{\thesection}{Index}}
\begin{table}[h!]
\normalsize
\begin{center}
\begin{tabular}{!{\VRule[1pt]} m{2cm} | m{4.7cm} | m{3cm} | m{4.6cm} | m{2.5cm} | m{6.2cm} !{\VRule[1pt]} @{}m{0pt}@{} }
\specialrule{1pt}{0pt}{0pt}
\multicolumn{6}{ !{\VRule[1pt]} c !{\VRule[1pt]} }{\cellcolor{gray!25} \textbf{\Large TEST TEXT}} & \\ [6pt]
\specialrule{1pt}{0pt}{1pt} \specialrule{1pt}{1pt}{0pt}
\cellcolor{gray!25}\parbox{2cm}{\centering \textbf{TEXT:}} & &
\cellcolor{gray!25}\parbox{3cm}{\centering \textbf{TEXT:\\(if applicable)}} & &
\cellcolor{gray!25}\parbox{2.5cm}{\centering \textbf{TEXT \\ MORE:}} & & \\[22pt]
\specialrule{1pt}{0pt}{0pt}
\end{tabular}
\end{center}
\begin{center}
\begin{tabular}{!{\VRule[2pt]} m{251mm} !{\VRule[2pt]} @{}m{0pt}@{} }
\specialrule{2pt}{0pt}{0pt}
\vspace{2pt}
\parbox{251mm}{\centering{\LARGE{}\textbf{APPENDIX 1}}\\
\large{}\textbf{Long text \\ Long text \\ Long text. \\ \vspace{2pt}}} & \\
\specialrule{2pt}{0pt}{0pt}
\end{tabular}
\end{center}
\begin{center}
\begin{tabular}{!{\VRule[1pt]} l L{22.2cm} !{\VRule[1pt]} @{}m{0pt}@{} }
\specialrule{1pt}{0pt}{0pt}
\parbox[l]{2.6cm}{\large{}\textbf{TEXT: \\ ~} }& \large{}\parbox[l]{20.5cm}{Test TEXT.} & \\[16pt]
\specialrule{1pt}{0pt}{0pt}
\end{tabular}
\begin{tabular}{!{\VRule[1pt]} C{2cm} !{\VRule[1pt]} L{11.8cm} !{\VRule[1pt]} L{10.5cm} !{\VRule[1pt]} @{}m{0pt}@{} }
\specialrule{1pt}{0pt}{0pt}
\multicolumn{3}{ !{\VRule[1pt]} c !{\VRule[1pt]} }{\cellcolor{gray!25} \textbf{\LARGE 1 - TEXT}} & \\ [20pt]
\specialrule{1pt}{0pt}{0pt}
\cellcolor{gray!25} ~ & \cellcolor{gray!25} \centering \large \textbf{sample}
& \parbox{10.3cm}{\cellcolor{gray!25} \centering \large \textbf{sample more} } & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx1 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx2 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx3 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx4 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
\multicolumn{3}{ !{\VRule[1pt]} c !{\VRule[1pt]} }{\cellcolor{gray!25} \tiny{}} & \\
\specialrule{1pt}{0pt}{0pt}
\end{tabular}
\end{center}
\end{table}
\newpage
\clearpage
\makeatletter
\setlength{\@fptop}{0pt}
\makeatother
\begin{table}[th!]
\begin{center}
\begin{tabular}{!{\VRule[1pt]} l L{22.2cm} !{\VRule[1pt]} @{}m{0pt}@{} }
\specialrule{1pt}{0pt}{0pt}
\parbox[l]{2.6cm}{\large{}\textbf{TEXT: \\ ~} }& \large{}\parbox[l]{20.5cm}{Long text.} & \\[16pt]
\specialrule{1pt}{0pt}{0pt}
\end{tabular}
\begin{tabular}{!{\VRule[1pt]} C{2cm} !{\VRule[1pt]} L{11.8cm} !{\VRule[1pt]} L{10.5cm} !{\VRule[1pt]} @{}m{0pt}@{} }
\specialrule{1pt}{0pt}{0pt}
\multicolumn{3}{ !{\VRule[1pt]} c !{\VRule[1pt]} }{\cellcolor{gray!25} \textbf{\LARGE 1 - TEXT}} & \\ [20pt]
\specialrule{1pt}{0pt}{0pt}
\cellcolor{gray!25} ~ & \cellcolor{gray!25} \centering \large \textbf{sample}
& \parbox{10.3cm}{\cellcolor{gray!25} \centering \large \textbf{sample more} } & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx1 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx2 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx3 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx4 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
\multicolumn{3}{ !{\VRule[1pt]} c !{\VRule[1pt]} }{\cellcolor{gray!25} \tiny{}} & \\
\specialrule{1pt}{0pt}{0pt}
\end{tabular}
\end{center}
\end{table}
\newpage
\clearpage
\newgeometry{a4paper,hmargin={2.5cm,2.5cm},vmargin={1.5cm,2cm},includeheadfoot}
\paperwidth=\pdfpageheight
\paperheight=\pdfpagewidth
\pdfpageheight=\paperheight
\pdfpagewidth=\paperwidth
\fancyhfoffset[R]{0pt}
\section{Supporting Evidence}
\pagestyle{mydoc}
\subsection{Appendix 2}
\lipsum[1-5]
\clearpage
\subsection{Appendix 3}
\lipsum[1-5]
\end{appendices}
\end{document}
답변1
\newgeometry
a4paper
및 같은 옵션을 지원하지 않습니다 landscape
(로그에 이에 대한 경고가 있음). 그래서 먼저 \newgeometry
초상화 페이지를 설정하여 \textheight
많은 부분을 높게 설정했습니다(그리고 \textwidth
많은 부분을 작게 설정하여 overfull hbox
경고로 이어졌습니다). 수동으로 설정하여 이를 수정했지만 설정된 페이지에서는 이 사항이 고려되지 않습니다. 즉, 바닥글은 항상 거기에 있었지만 실제 페이지보다 훨씬 아래에 있었습니다.
\newgeometryswitchlc
그래서 저는 세로에서 가로로 또는 그 반대로 전환하는 새로운 명령을 생각해냈습니다 . 이 명령(원본과 마찬가지로)은 프리앰블의 설정을 복원하므로 다시 전환하는 데 사용할 수 없습니다. 이는 일반 으로 수행되지만 PDF 뷰어에서 올바른 크기를 얻으려면 그 후에 및 수동으로 \newgeometry
설정해야 합니다 .\pdfpageheight
\pdfpagewidth
Btw.: 여기서는 실제로 필요하지 않은(그리고 설치하지 않은) 일부 패키지를 주석 처리했습니다.
\documentclass{article}[12pt]
\usepackage{setspace}
\usepackage{lastpage}
\usepackage{rotating}
\usepackage{etoolbox}
\usepackage{lscape}
\usepackage{pdflscape}
%\usepackage{textcomp}
%\usepackage[titletoc]{appendix}
%\usepackage{longtable}
%\usepackage{easytable}
\usepackage{array}
%\usepackage{multirow}
\usepackage{amssymb}
\usepackage{fancyhdr}
%\usepackage{helvetica} % uses helvetica postscript font (download helvetica.sty)
\usepackage[includeheadfoot]{geometry}
\geometry{a4paper,hmargin={2cm,2cm},vmargin={2cm,2cm}}
\usepackage{caption}
\captionsetup{skip=0pt}
\usepackage[table]{xcolor}
\usepackage{booktabs,arydshln}
\usepackage{lipsum}
\newcommand\VRule[1][\arrayrulewidth]{\vrule width #1}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\fancypagestyle{mydoc}{%
\fancyhf{}
\fancyhead{}
\fancyfoot{}
\fancyfoot[C]{
\scriptsize
Page \thepage\ of \pageref{LastPage}
}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
\fancypagestyle{lscape}{%
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhf{}
\fancyhead{}
\fancyfoot{}
\fancyfoot[C]{
\scriptsize
Page \thepage\ of \pageref{LastPage}
}
\fancyfoot[L]{
\footnotesize
Created: 14 August 2002 \\
Modified: 20 December 2012 \\
}
}
\makeatletter
% like \newgeometry, but also switches between landscape and portait
\newcommand{\newgeometryswitchlc}[1]{%
\clearpage
\Gm@restore@org
\Gm@initnewgm
\Gm@newgmtrue
\setkeys{Gm}{#1}%
\Gm@newgmfalse
% switch between landscape and portait
\Gm@swap@papersizetrue
\Gm@process
% set the correct dimension for the PDF viewer
% must be done manually when switching back with \newgeometry
\pdfpageheight=\paperheight
\pdfpagewidth=\paperwidth
\ifnum\mag=\@m\else\Gm@magtooffset\fi
\Gm@changelayout
\Gm@showparams{newgeometry}}%
\makeatother
\begin{document}
\onehalfspacing
\title{
\vspace{48pt}
\textbf{Application \\ \vspace{48pt}
}
\vspace{96pt}
\large{Modality: \\}
\vspace{18pt}
\large{Submodality: \\}
\vspace{48pt}
}
\author{Name \\
\vspace{36pt}}
\maketitle
\thispagestyle{empty}
\newpage
\thispagestyle{mydoc}
\tableofcontents
\newpage
\clearpage
\pagestyle{mydoc}
\section{Section Title 1}
\lipsum[1-10]
\section{Section Title 2}
\lipsum[11-20]
\section{Appendices: Index and Supporting Evidence}
%\begin{appendices}
\appendix
% changed vmargin
\newgeometryswitchlc{hmargin={2cm,2cm},vmargin={0cm,1cm},includeheadfoot}
%\paperwidth=\pdfpageheight no longer necessary
%\paperheight=\pdfpagewidth
%\pdfpageheight=\paperheight done in \newgeometrylandscape
%\pdfpagewidth=\paperwidth
\fancyhfoffset[R]{8.75cm}
%\textheight=17.5cm to high, but
\makeatletter
\setlength{\@fptop}{0cm}
\makeatother
\pagestyle{lscape}
\setcounter{section}{1}
\addcontentsline{toc}{section}{\protect\numberline{\thesection}{Index}}
\begin{table}[h!]
\normalsize
\begin{center}
\begin{tabular}{!{\VRule[1pt]} m{2cm} | m{4.7cm} | m{3cm} | m{4.6cm} | m{2.5cm} | m{6.2cm} !{\VRule[1pt]} @{}m{0pt}@{} }
\specialrule{1pt}{0pt}{0pt}
\multicolumn{6}{ !{\VRule[1pt]} c !{\VRule[1pt]} }{\cellcolor{gray!25} \textbf{\Large TEST TEXT}} & \\ [6pt]
\specialrule{1pt}{0pt}{1pt} \specialrule{1pt}{1pt}{0pt}
\cellcolor{gray!25}\parbox{2cm}{\centering \textbf{TEXT:}} & &
\cellcolor{gray!25}\parbox{3cm}{\centering \textbf{TEXT:\\(if applicable)}} & &
\cellcolor{gray!25}\parbox{2.5cm}{\centering \textbf{TEXT \\ MORE:}} & & \\[22pt]
\specialrule{1pt}{0pt}{0pt}
\end{tabular}
\end{center}
\begin{center}
\begin{tabular}{!{\VRule[2pt]} m{251mm} !{\VRule[2pt]} @{}m{0pt}@{} }
\specialrule{2pt}{0pt}{0pt}
\vspace{2pt}
\parbox{251mm}{\centering{\LARGE{}\textbf{APPENDIX 1}}\\
\large{}\textbf{Long text \\ Long text \\ Long text. \\ \vspace{2pt}}} & \\
\specialrule{2pt}{0pt}{0pt}
\end{tabular}
\end{center}
\begin{center}
\begin{tabular}{!{\VRule[1pt]} l L{22.2cm} !{\VRule[1pt]} @{}m{0pt}@{} }
\specialrule{1pt}{0pt}{0pt}
\parbox[l]{2.6cm}{\large{}\textbf{TEXT: \\ ~} }& \large{}\parbox[l]{20.5cm}{Test TEXT.} & \\[16pt]
\specialrule{1pt}{0pt}{0pt}
\end{tabular}
\begin{tabular}{!{\VRule[1pt]} C{2cm} !{\VRule[1pt]} L{11.8cm} !{\VRule[1pt]} L{10.5cm} !{\VRule[1pt]} @{}m{0pt}@{} }
\specialrule{1pt}{0pt}{0pt}
\multicolumn{3}{ !{\VRule[1pt]} c !{\VRule[1pt]} }{\cellcolor{gray!25} \textbf{\LARGE 1 - TEXT}} & \\ [20pt]
\specialrule{1pt}{0pt}{0pt}
\cellcolor{gray!25} ~ & \cellcolor{gray!25} \centering \large \textbf{sample}
& \parbox{10.3cm}{\cellcolor{gray!25} \centering \large \textbf{sample more} } & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx1 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx2 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx3 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx4 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
\multicolumn{3}{ !{\VRule[1pt]} c !{\VRule[1pt]} }{\cellcolor{gray!25} \tiny{}} & \\
\specialrule{1pt}{0pt}{0pt}
\end{tabular}
\end{center}
\end{table}
\newpage
\clearpage
\makeatletter
\setlength{\@fptop}{0pt}
\makeatother
\begin{table}[th!]
\begin{center}
\begin{tabular}{!{\VRule[1pt]} l L{22.2cm} !{\VRule[1pt]} @{}m{0pt}@{} }
\specialrule{1pt}{0pt}{0pt}
\parbox[l]{2.6cm}{\large{}\textbf{TEXT: \\ ~} }& \large{}\parbox[l]{20.5cm}{Long text.} & \\[16pt]
\specialrule{1pt}{0pt}{0pt}
\end{tabular}
\begin{tabular}{!{\VRule[1pt]} C{2cm} !{\VRule[1pt]} L{11.8cm} !{\VRule[1pt]} L{10.5cm} !{\VRule[1pt]} @{}m{0pt}@{} }
\specialrule{1pt}{0pt}{0pt}
\multicolumn{3}{ !{\VRule[1pt]} c !{\VRule[1pt]} }{\cellcolor{gray!25} \textbf{\LARGE 1 - TEXT}} & \\ [20pt]
\specialrule{1pt}{0pt}{0pt}
\cellcolor{gray!25} ~ & \cellcolor{gray!25} \centering \large \textbf{sample}
& \parbox{10.3cm}{\cellcolor{gray!25} \centering \large \textbf{sample more} } & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx1 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx2 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx3 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
Tx4 & more & & \\ [16pt]
\specialrule{1pt}{0pt}{0pt}
\multicolumn{3}{ !{\VRule[1pt]} c !{\VRule[1pt]} }{\cellcolor{gray!25} \tiny{}} & \\
\specialrule{1pt}{0pt}{0pt}
\end{tabular}
\end{center}
\end{table}
\newpage
\clearpage
\newgeometry{hmargin={2.5cm,2.5cm},vmargin={1.5cm,2cm},includeheadfoot}
%\paperwidth=\pdfpageheight no longer necessary
%\paperheight=\pdfpagewidth
\pdfpageheight=\paperheight
\pdfpagewidth=\paperwidth
\fancyhfoffset[R]{0pt}
\section{Supporting Evidence}
\pagestyle{mydoc}
\subsection{Appendix 2}
\lipsum[1-5]
\clearpage
\subsection{Appendix 3}
\lipsum[1-5]
%\end{appendices}
\end{document}