[texhax] A Self-Referential Logo

Iraj Kalantari I-Kalantari at wiu.edu
Tue Oct 11 22:05:58 CEST 2011



On Oct 6, 2011, at 3:43 AM, Martin Heller wrote:

> Iraj Kalantari wrote, on 04-10-2011 17:29:
>> I must say as a more involved project I imagine and hope for producing a multi-page pdf file that has a logo on each page of the very same page.
> 
> Try something like the below compiled with shell escape/write18 enabled.
> 
> % test.tex
> \documentclass{article}
> \usepackage{fancyhdr}
> \usepackage{graphicx}
> \usepackage{calc}
> \usepackage{pgffor}
> \usepackage{lipsum}
> \headheight=3cm
> 
> \def\realjobname{test}% <- change to match filename
> \newcounter{logopage}
> \rhead{\rule{0.1\paperwidth}{0.1\paperheight}}%
> \ifx\logolevel\undefined
> \gdef\logolevel{0}%
> \foreach \runno in {0,1,...,5} {%
>  \immediate\write18{%
>    pdfLaTeX --jobname="\jobname\runno"
>    \gdef"\string\logolevel{\runno}\string\input\space\jobname"
>  }%
> }%
> \fi
> \ifnum\logolevel>0
> 	\setcounter{logopage}{\logolevel}%
> 	\addtocounter{logopage}{-1}%
> 	\rhead{%
> 		\setlength{\fboxsep}{0pt}%
> 	 \fbox{\includegraphics[scale=0.1,page=\thepage]{\realjobname\thelogopage.pdf}}}%
> \fi
> \pagestyle{fancy}
> 
> \begin{document}
> 
> \lipsum
> 
> \end{document}
> 


I am afraid it does not work for me.

I get:

! Undefined control sequence.
l.583 \pgfkeys
              {/pgf/foreach/.cd,


Question: How does one "enable escape/write18"?

(Mac user; OS 10.6.8; TeXlive-2009; TeXShop)







> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
> 
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20111011/75362514/attachment.html>


More information about the texhax mailing list