axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please join! Re: [Axiom-developer] Re: Axiom HyperDoc Replacement


From: Ralf Hemmecke
Subject: Re: Please join! Re: [Axiom-developer] Re: Axiom HyperDoc Replacement
Date: Sun, 22 Apr 2007 12:01:25 +0200
User-agent: Thunderbird 2.0b1 (Windows/20061206)

Martin Rubey wrote:
Ralf Hemmecke <address@hidden> writes:

looks as if you have achieved quite a lot. Congratulations.

thanks!

* A LaTeX header file that provides commands supported by HyperTeX, like \spad,
  \spadfun, etc.  For example, \spadfun should transform its argument into the 
link
  http:\\localhost:8080\?argument
\def\spadfun#1{\href{http://localhost:8080/?#1}

Oh, you even corrected the slashes...

However, that is not going to work if LaTeX special characters are involved.

I would go the script way. You call htlatex anyway so one could call a helper script that escapes the special characters before handing the text to htlatex. It is similar to the aldordoc2tex.pl script.

Yes.  Wouldn't it be possible to do something similar to \verb does?

* same thing for ALLPROSE style documentation.
That is easier. See attachment for a first demo.

it seems that wrapper.tex is missing.

Oh sorry. You find it attached.

Currently I have only Internet access via Windows and all my work lives in the Linux partition. If somebody tells me how to access the Linux partition from within Windows (the other way round that's possible) without rebooting Linux and using a usbstick that would save me some time.

However, for full generality, you must be able to ask Axiom not only for the
name of the function, but also its signature and the type where it is
defined. The wrapper could be the same for any function/type, but as you see
in copy.ad there are two definitions that I have added at the top (by hand)
that do *not* appear in the +++ environment of the corresponding .as.nw
file. In ALLPROSE this information is generated from the accompanying code
chunk. Now that you use Axiom, you should get that information from somewhere
else.

The reason why I embarked on all this is that I noticed that libdb.text
contains all the necessary information!  In particular,

\addefinetype{MyCopyableType}
\addefinename{copy!:(%, %)-> %}

contain just the information contained in the first two fields of the libdb
entry, and it can be retrieved using dbPart$Lisp.

Although it may be stupid from a "do it right" perspective, we can accomplish
something usable easily if we reuse libdb.text (or the databases, that's
roughly the same thing), generate the html and cache it.  This way we do not
need to touch the libdb and database generation at all.

That is your problem. All I want is that the stuff after

  http://localhost:8080/?

should be designed to contain the full signature and the corresponding type where the signature comes from so that the lines

  \addefinetype{MyCopyableType}
  \addefinename{copy!:(%, %)-> %}

can be automatically generated

By the way caching, I forgot one ToDo which is quite straightforward:

* remove unused files (like log files) after html generation.

Wrap the htlatex script with another script that does the remove. Or look in ALLPROSE for the html target in Makefile.nw. I copy the relevant .html and .png files to the doc/ direcory. After you have done this you can remove the whole direcory.

I just say the problem with "grep" not found. For aldordoc2tex.pl you need perl. That is probably not installed under Windows, actually, I guess, also tex4ht is not the most common program for a Windows user.

I hope you get this working somehow... The definition of \spadfun and \spadfunFrom should be done similar to the one in wrapper.tex. Unfortunately, I don't know where to look for the all the commands that cover the hypertex ++ documentation of the .spad files. So I cannot write an appropriate .sty file. I would suggest to use the AldorDoc style defined in ALLPROSE anyway. But that would mean transforming the ++ documenation of all spad file (which nobody will do in the near future).

Ralf
\documentclass{article}
\usepackage{allprose}
\def\xProject{no-project}
\def\LIBRARYVERSION{0.1.0}

\renewcommand{\adtype}[1]{
  \href{http://localhost/?#1}{\adtypeStyle{\adcodefont{#1}}}\xspace
}
\renewcommand{\adinternalusename}[6][\adthistypename]{%
%  \href{http://localhost/?#4:#1:#5}{\adnameStyle{\adcodefont{#6}}}\xspace
  \href{http://localhost:8080/?#4}{\adnameStyle{\adcodefont{#6}}}\xspace
}
\begin{document}
\begin{+++}
\input{binpow}
\end{+++}

\begin{+++}
\input{copy}
\end{+++}
\end{document}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]