axiom-developer
[Top][All Lists]

Re: [Axiom-developer] hyperlinked algebra

 From: Ralf Hemmecke Subject: Re: [Axiom-developer] hyperlinked algebra Date: Thu, 15 Dec 2005 11:45:45 +0100 User-agent: Thunderbird 1.4 (X11/20050908)

Page, Bill wrote:

On Tuesday, December 13, 2005 12:27 PM Ralf Hemmecke wrote:

Bill Page wrote:

Doing the same thing with \n instead of \- would be a bit more complicated. But I think for LaTeX-speakers \- is more natural
anyway.

Hmmm ... maybe '\n ' would be better - more compatible with
the definition of the "dot" language?

Well, yes, this may be a good reason to look for something that
works with \n. But the problem is that \n would be expanded during
\write so \nGroup would count as one control sequence which is
usually not defined. I don't know how I can easily achieve a
similar trick as with \-.


What I had in mind was writing it like this:

XxxYyy [label="Xxx\n Yyy"];

i.e. with a space character after the \n. That would allow LaTeX
to treat it as a two-character command, right? And the extra
space would not greatly affect the way GraphViz handles multi-line
labels outside of LaTeX.


If you can generate it that way then just replace in the definition I gave

\expandafter\def\csname -\endcsname{\string\n}%

by

\def\n{\string\n}%


The output will be exactly the same. The space gets eaten by TeX because it comes after a control sequence.


But I like your solution below better.


Why would you say '\-' is more natural in LaTeX?

TeX has automatic hyphenation, but sometimes one must help. That can be done via the \- control sequence. Then TeX considers
the place where \- is as an additional place to break lines.


Well, I even think we should have

\expandafter\def\csname -\endcsname{-\string\n}%

so that there would be a hyphen at the end of the first word.


I have solved the remaining problems with using hyperlinking
with GraphViz in LaTeX so that now the links in the diagram
link directly to the appropriate section of the target. For
example:

http://wiki.axiom-developer.org/book--main--1/Endpaper3


Wow, it is really that easy!!!

I think you are a hero in figuring that out so quickly.


To make this work, I had to upgrade to the most recent GraphViz
version 2.7 and also modify the procedure to create pdf files
to use 'dvips -z' and 'ps2pdf'. This is now implemented for the
pamphlet page type on MathAction.



Is there any chance to get this translated to html? As I have read GraphViz can output SVG, but I have no idea how to use it.

Ralf



reply via email to