latex - 每页上的 Tikzpicture

标签 latex tikz

如何在每个页面上包含 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}

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

最佳答案

使用 fancyhdr 向页眉/页脚添加信息或 KOMA 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] ,可能是因为它在页面发货的状态下无法记住图片位置。

希望有帮助。

关于latex - 每页上的 Tikzpicture,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4098356/

相关文章:

latex - 如何使用 LaTeX 创建时间线?

gnuplot - 使用 tikz 术语在 Gnuplot 中管理奇怪的 tex 文件

ipython-notebook - Jupyter:如何制作简单的插图

graph - TikZ:包围图形的阴影区域

latex - 如何控制 latex 中pgf/tikz图形的字体大小?

python - 我如何像在 Illustrator 中一样在 python 中格式化文本?

latex - 新命令 for\end{tabular}\\?绕过语法和转义

LaTeX:如何删除表格中两个单元格之间的特定垂直线

pdf - 如何增加.tex文件的缓冲区大小以在Windows中存储大量数据?

r - 包小插图取决于 tikz/pgf