\newgeometry 用于双面报告

\newgeometry 用于双面报告

我有我preload.tex

\usepackage{amsmath}
\usepackage{adjustbox} % uses graphicx
\usepackage{import}
\usepackage[T1]{fontenc}
\usepackage[math]{iwona} %nice font
\usepackage[top=1.8cm,bottom=1.8cm,left=2cm,right=2cm]{geometry}
\usepackage{lipsum}
%%
%%
\usepackage{fancyhdr}
\usepackage{lastpage}
\fancyhead{}
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
%%
%%
\usepackage{pdfpages}
\makeatletter
\newcommand\fitallincludepdf[2][]{%
    \AM@findfile{#2}%
    \setkeys{pdfpages}{#1}%
    \expandafter\AM@readlist\expandafter{\AM@pagestemp}%
    \@for\xxx:=\AM@pagelist\do{%
        \edef\AM@tmp{[\unexpanded{#1},
        width =0.99\textwidth, 
        height=0.99\textheight,
        keepaspectratio,pages=\xxx]}%
        \expandafter\includepdf\AM@tmp{#2}%
    }}%
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%      - HYPERREF -     %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{hyperref}
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%      -    QR    -     %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{qrcode}
\usepackage{background}
\backgroundsetup{
    contents={exmaple-image},
    pages=some,
    placement=bottom,
    color=black,
    scale=1,
    opacity=0.5,
    hshift=9cm,
    vshift=0.2cm
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% background - go to back
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\def\AM@AddToShipoutPicture{\AddToShipoutPictureFG*}
\makeatother
%\NoBgThispage
%\BgThispage
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%       - License -     %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[
    type={CC},
    modifier={by-nc-nd},
    version={4.0}
]{doclicense}
%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%      - By Topic -     %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{tcolorbox}
\tcbuselibrary{skins,xparse}
\tcbset{%
    colback=white,
    tikz={opacity=0.1,transparency group},
    colframe=black,
    title filled=false,
    bookmark={Q\arabic{\tcbcounter}}
}
\NewTColorBox[
    auto counter,
    number freestyle={ Q\noexpand\arabic{\tcbcounter} }
    ]{question}{ O{}mo }{
%   lowerbox=ignored, %invisible/ignored
    fonttitle=\bfseries,
    title=\thetcbcounter: #2,
% after title/after upper
    IfValueTF={#3}{after title={\hfill\colorbox{red}{\texttt #3 }}}{},
    #1
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%       -   OWN   -     %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\fakesection}[1]{%
    \par\refstepcounter{section}% Increase section counter
    \sectionmark{#1}% Add section mark (header)
    \addcontentsline{toc}{section}{#1}% Add section to ToC
    % Add more content here, if needed.
}%%
%%
%%
\setlength{\parindent}{0pt}

加载到

\documentclass[12pt, a4paper, UTF8, scheme=plain, twoside]{ctexart}
\input{../../preload2.tex}
%%
\begin{document}
%%
\fancyhead[L]{LogoName}
\fancyhead[R]{Page~\thepage\ of~\pageref{LastPage}}
\fancyfoot[L]{myhyperlink}
\fancyfoot[CO]{center for odd}
\fancyfoot[CE]{center for even}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0pt}

\clearpage
\thispagestyle{empty}
\newgeometry{left=3cm,right=3cm,top=2cm,bottom=2cm}
\lipsum[7]
\phantomsection
\addcontentsline{toc}{section}{TOC} % Add section to ToC
\tableofcontents
\vspace*{\fill}
\doclicenseImage
%%
%%
%%
%%
\clearpage
\pagestyle{fancy}
\normalsize
\newgeometry{top=1cm,left=0.5cm,right=0.5cm,bottom=1.5cm,headsep=0.3cm}
\setlength{\topskip}{0cm}
%%
%%
\lipsum[7]

%%%%%%%%%%%%%%%%%%%
%% Begin
%%%%%%%%%%%%%%%%%%%
\lipsum[20-100]

%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%       -   End   -     %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\clearpage
\NoBgThispage
\thispagestyle{empty}
\centering
\mbox{}
\vfill
\huge{[This page is intentionally left blank.]
\vfill
%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%

这里有两个问题:

首先,leftright边距对我来说很奇怪。我不知道他们使用了多长。我该如何强制设置,\newgeometry{}以便获得所需的相同左右边距?我只使用 twoside,这样我就可以对奇数页和偶数页使用不同的页脚。 在此处输入图片描述 在此处输入图片描述

extra其次,最后的页面来自 哪里???在此处输入图片描述

相关内容