【问题标题】:Tikzpicture on every page每页都有Tikzpicture
【发布时间】:2019-01-11 05:57:25
【问题描述】:

如何在每个页面上包含 tikzpicture?

我想创建一个复杂的文档模板(页面应该有框架,并且有一个表格来保存页眉和页脚中的文档信息)。

我正在考虑使用类似的东西:

\begin{tikzpicture}[remember picture,overlay]  
    % complicated layout should be here, simple example is given below:  
    % \node [xshift=1cm,yshift=1cm] at (current page.south west)  
    % {This is an absolutely positioned text in the page};  
\end{tikzpicture}

您对如何创建这样的模板还有其他建议吗?

【问题讨论】:

  • 您可能会在tex.stackexchange.com 得到更好的答案。
  • 谢谢,我会在那里尝试我的问题。

标签: latex tikz


【解决方案1】:

使用fancyhdrKOMA Script 将信息添加到页眉/页脚

为了在每个页面上添加一些东西,我使用了这个:

\usepackage{eso-pic}
\makeatletter
\AddToShipoutPicture{%
    \setlength{\@tempdimb}{.1\paperwidth}%
    \setlength{\@tempdimc}{.04\paperheight}%
    \setlength{\unitlength}{1pt}%
    \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%
        \makebox(0,0){ \textcolor{gray}{Rev: \svnrev{} (\svnfilerev)} }%
    }%
}
\makeatother

在这里,我在每页的右下角添加了 SVN 修订号。我不记得为什么我没有在\AddToShipoutPicture中使用tikzpicture[overlay,remember picture],可能是因为它无法记住在页面发货状态下的图片位置。

希望对您有所帮助。

【讨论】:

  • 我已经使用了 tex.stackexchange.com 姐妹网站。很抱歉没有尽快接受您的回答。
猜你喜欢
  • 1970-01-01
  • 2012-10-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-04-02
  • 1970-01-01
  • 1970-01-01
  • 2012-06-18
相关资源
最近更新 更多