[l2h] including a web counter

Walter Gull Walter.Gull at freesurf.ch
Mon Jul 2 21:08:04 CEST 2007


Dear Christian

christian.salas at yale.edu wrote:
> ... However now I
> would like to add a web counter (or hit counter) to my main webpage. I know how
> to do that (copying and pasting a code [given by the webcounter website that I
> want to use] into the html file), but I am editing the html file "by hand"
> after that I have compiled my website .tex files using latex2html.
> 
> I wonder how can I add the webcounter code directly into my .tex file, then I
> would not need to do this after the compilation.
> I have tried with \begin{htmlonly}, but of course that does not work.
> 
> Can anyone help me, please?

I do it as follows:

(a) I wrote a file "counter_inc.tex" with the follwoing content:
---
\begin{rawhtml}
<!-- START OF ACTIVEMETER CODE -->
<script type="text/javascript" language="javascript">
var __pid=7113;
var __am_invisible=1;
</script>
<script type="text/javascript" language="javascript"
src="http://www.activemeter.com/counter.js"></script>
<noscript>
   <a href="http://www.activemeter.com/" target="_blank">
         <img
src="http://am1.activemeter.com/webtracker/track.html?method=track&pid=7113&java=0"
alt="Free Hit
         Counter" border="0">
            </a>
            </noscript>
            <!-- END OF ACTIVEMETER CODE -->
\end{rawhtml}
---

(b) and added the line "\input counter_inc.tex" to my main LaTeX file.

Yours

Walter Gull
-- 
----------------------------------------------------------------------
Walter E. Gull                 Phone:  +41 44 370 10 71
mailto:Walter.Gull at freesurf.ch http://home.datacomm.ch/gull/walter/
Tobelsteig 1                   PGP KeyID: 0x0C965A78 - Fingerprint:
CH-8046 Zurich                 5092 1A6B 5887 4C0C A1F0
Switzerland                    B27E 593A 3E6E 0C96 5A78
----------------------------------------------------------------------


More information about the latex2html mailing list