On Fri, 2007-06-15 at 14:46 -0400, tom sgouros wrote:
> John C. Lusth <[EMAIL PROTECTED]> wrote:
> > The link still rendered in blue.
> 
> Fidget with that stuff in the CSS.  If you need it to vary, give the
> link its own class with \xmlattributes.

Some day...

I did get things to work after a fashion using HlxEval. Here is
my latest version which I am sure can be greatly improved!
The \see{thisPage} macro call looks for 'thisPage.tex' and if
it finds the page, it renders the name in blue (and makes it
a link in html); otherwise it renders the name as plain text
in red.

\newcommand{\see}[1]
    {
    \IfFileExists{#1.tex}
        {\textcolor{blue}{#1}}
        {\textcolor{red}{#1?}}
    }

\T\begin{ifhtml}
\HlxEval{
(put 'HlxSee 'hyperlatex 'hyperlatex-See)

(defun hyperlatex-See ()
    (let ((name (hyperlatex-parse-required-argument)))
        (cond
            ((file-exists-p (concat name ".tex"))
                (hyperlatex-insert-URL name)
                )
            (t
                (hyperlatex-insert-name name "red")
                )
            )
        )
    )
(defun hyperlatex-insert-name (filename color)
    (insert hyperlatex-meta-< "font color=" color hyperlatex-meta->)
    (insert filename "?")
    (insert hyperlatex-meta-< "/font" hyperlatex-meta->)
    )
(defun hyperlatex-insert-URL (filename)
    (insert hyperlatex-meta-< "a href=" hyperlatex-meta-dq)
    (insert filename ".html" hyperlatex-meta-dq)
    (insert hyperlatex-meta->)
    (insert filename)
    (insert hyperlatex-meta-< "/a" hyperlatex-meta->)
    )
}
\newcommand{\see}{\HlxSee}
\T\end{ifhtml}





-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Hyperlatex-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hyperlatex-users

Reply via email to