代码之家  ›  专栏  ›  技术社区  ›  pgb

乳胶-只更改几页的页边距

  •  57
  • pgb  · 技术社区  · 16 年前

    我有一个乳胶文档,我只需要更改几页的页边距(在这些页中我添加了很多图形)。

    特别是,我想更改上页边距( \voffset )我试过这样做:

    \addtolength{\voffset}{-4cm}
    
    % Insert images here
    
    \addtolength{\voffset}{4cm}
    

    但它不起作用。我已经看到了几何图形包的引用,但是我还没有找到如何将它用于一大堆页面,而不是用于整个文档。

    有什么暗示吗?

    9 回复  |  直到 9 年前
        1
  •  52
  •   ansate    16 年前

    我在beamer中使用过这个,但不是一般文档,但看起来这就是最初的提示suggets

    \newenvironment{changemargin}[2]{%
    \begin{list}{}{%
    \setlength{\topsep}{0pt}%
    \setlength{\leftmargin}{#1}%
    \setlength{\rightmargin}{#2}%
    \setlength{\listparindent}{\parindent}%
    \setlength{\itemindent}{\parindent}%
    \setlength{\parsep}{\parskip}%
    }%
    \item[]}{\end{list}}
    

    然后使用它

    \begin{changemargin}{-1cm}{-1cm}
    

    别忘了

    \end{changemargin}
    

    在页面的末尾

    我从这里得到的 http://www.tex.ac.uk/cgi-bin/texfaq2html?label=chngmargonfly

        2
  •  89
  •   Kevin Chen    13 年前

    使用“几何”包并写入 \newgeometry{left=3cm,bottom=0.1cm} 要更改页边距的位置。当你想重设你的页边距时,你写 \restoregeometry .

        3
  •  5
  •   Alexey Malistov    16 年前
    \par\vfill\break % Break Last Page
    
    \advance\vsize by 8cm % Advance page height
    \advance\voffset by -4cm % Shift top margin
    % Start big page
    Some pictures
    % End big page
    \par\vfill\break % Break the page with different margins
    
    \advance\vsize by -8cm % Return old margings and page height
    \advance\voffset by 4cm % Return old margings and page height
    
        4
  •  4
  •   Alisa    9 年前

    我在很多不同的解决方案中挣扎,包括页面顶部和底部的\vspace-xmm,以及处理警告和错误。最后我找到了这个答案:

    您可以更改一页或多页的页边距,然后将其恢复为默认值:

    \usepackage{geometry}
    ...
    ... 
    ...
    \newgeometry{top=5mm, bottom=10mm}     % use whatever margins you want for left, right, top and bottom.
    ...
    ... %<The contents of enlarged page(s)>
    ...    
    \restoregeometry     %so it does not affect the rest of the pages.
    ...
    ... 
    ...
    

    PS:

    1-这也可以修复以下警告:

    乳胶警告:在输入行上,浮动太大,无法按…点翻页…

    2-有关更详细的答案,请查看 this .

    3-我发现这是对陈凯文答案的更详细的阐述。

        5
  •  2
  •   shoosh    16 年前

    对于图,您可以使用下面描述的方法:
    http://texblog.net/latex-archive/layout/centering-figure-table/
    也就是说,这样做:

    \begin{figure}[h]
    \makebox[\textwidth]{%
            \includegraphics[width=1.5\linewidth]{bla.png}
        }
    \end{figure}
    

    请注意,如果图中有子图,则可能需要在框中进入段落模式,如下所示:

    \begin{figure}[h]
    \makebox[\textwidth]{\parbox{1.5\textwidth}{ %
    \centering
    \subfigure[]{\includegraphics[width=0.7\textwidth]{a.png}}
    \subfigure[]{\includegraphics[width=0.7\textwidth]{b.png}}
    \end{figure}
    

    允许图形在页面中居中,突出到两个页边距,而不仅仅是右边距。
    这通常对图像有帮助。请注意,使用此方法,图像的标题仍将由页面的正常页边距分隔(这是一件好事)。

        6
  •  2
  •   Noah    16 年前

    对 this 改变 \voffset 为我工作:

    \newenvironment{changemargin}[1]{
      \begin{list}{}{
        \setlength{\voffset}{#1}
      }
      \item[]}{\end{list}}
    

    然后把你的数字放在 \begin{changemargin}{-1cm}...\end{changemargin} 环境。

        7
  •  0
  •   None    13 年前

    仰望 \enlargethispage 在一些乳胶参考文献中。

        8
  •  0
  •   user3510575    12 年前

    我在比默的演讲中也遇到了同样的问题。对于我来说,使用的是Columns环境:

    \begin{frame}
      \begin{columns}
        \column{1.2\textwidth}
        \begin{figure}
          \subfigure{\includegraphics[width=.49\textwidth]{1.png}}
          \subfigure{\includegraphics[width=.49\textwidth]{2.png}}
        \end{figure}
       \end{columns}
    \end{frame}
    
        9
  •  0
  •   NeaÅ£u Ovidiu Gabriel    12 年前

    我找不到一种简单的方法来设置一页的页边空白。

    我的解决方案是使用VSpace,它具有我想要的厘米数的空白空间:

     \vspace*{5cm}                                                             
    

    我把这个命令放在我想要的页边+5厘米的开头。