[l2h] citation scheme
Miguel Frasson
frasson@math.leidenuniv.nl
Sat, 25 May 2002 19:40:00 +0200 (MEST)
Hi all.
I am writing a package that implement citations for standards in Brazil,
and I would like to provide latex2html for it. I tried figure out what
part of the code does, but unfortunately I don't know perl (but I can
learn something).
The rules for citations are rather complicated, so I thought LaTeX could
do the job easier. My package writes to a file \jobname.lhc, for every
\cite, a command like
\generalcite{text of the citation}
So the first citation writes the first line in that file, and so on, in
order.
My idea is that the perl-l2h version of my package
* creates a counter gencite (and set it to zero)
* reads that file \jobname.lhc
- for each \generalcite command, l2h increments gencite counter
and defines a new subroutine named as do_gencite_(value on counter),
and this subroutine contains the html translation of the code given
as argument of \generalcite.
* set again the gencite counter to zero.
* (re)defines do_cmd_cite to
- increment the counter
- use the command do_gencite_(value of gencite)
In order to provide links to the references, each \generalcite can contain
a command \citelink{text}{cite key}. A tipical line of the real
\jobname.lhc:
\generalcite {({\citelink {\MakeUppercase{Faria}, 2000}{6023:2000}})}
\generalcite {({\citelink {Souto, 1916}{10520:4.8}, p.~46, grifo nosso})}
The idea of \citelink{text}{cite key} is to make an archor with
<A href='the url of the entry in references with key (cite key)'>
HTML translation of 'text'
</A>
So
\generalcite {({\citelink {\MakeUppercase{Faria}, 2000}{6023:2000}})}
would (if gencite=1) create the subroutine do_gencite_1 (or the value of
gencite in small roman numbers, if digits are not allowed in perl routine
names) and the execution of do_gencite_1 would give the html code
(<A href='...'>FARIA</A>, 2000)
In the text, at the first occurence of \cite, do_gencite_1 should be
executed.
Somebody can help me?
Thanks
Miguel.
--
=======================================
Miguel Vinicius Santini Frasson
=======================================
PhD student at Leiden University
e-mail: frasson@math.leidenuniv.nl
mvsfrasson@bol.com.br
http://mvsfrasson.vila.bol.com.br