سؤال
كيف يمكنني تضمين 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
أو سيناريو كوما
لإضافة شيء ما في كل صفحة استخدمت هذا:
\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 في أسفل اليمين من كل صفحة. لا أتذكر لماذا لم أستخدم tikzpicture [تراكب ، تذكر الصورة \AddToShipoutPicture
, ، ربما لأنه لا يمكن أن يتذكر موقف الصورة في حالة الشحن خارج الصفحة.
امل ان يساعد.
لا تنتمي إلى StackOverflow