On Wed, 2010-11-17 at 14:35 +0100, Zoltan Kota wrote: > Hi, > > We are migrating the documentation of pybliographer into Mallard. > Thanks for Mario! > There is one thing that does not seem to work: Is it possible, or will > it be possible in the future, to make a link to a figure? > For example: > > ----- > <figure id="figopen"> > <title>Opening a database</title> > <media type="image" mime="image/png" src="figures/open.png"> > <p>Opening a database</p> > </media> > </figure> > > .... text .... > > see the screenshot <link xref="#figopen" />
It is not possible. Links go to pages or sections, never to block elements like figures or listings. I know this is very common in traditional print media, where figures are numbered by chapter, and cross-reference text like "Figure 3-1" can be automatically generated. Since there's no natural meaningful numbering system in Mallard, link text has to rely on titles only. And titles are optional on figure. In print, you refer readers back to earlier figures, and they switch context and flip some pages. You can't show the image over and over, because paper costs money. In online media, the cost of showing the image again is near zero. In DocBook, you can link to literally anything. It's perfectly valid to link to a phrase element, for example. The code for generating cross-reference text for those cases is crazy, and it would be crazier in Mallard with its provisions for extra link titles. Of course, we could explicitly limit linking to formal block elements, i.e. those that can take a title. And if they don't have a title, we fall back to the id, rather than trying to chain up. And we'd probably want link titles. If we allow linking to block elements, people might expect the automatic links to work with them. Although, heck, maybe there are useful automatic linking concepts we could have between figures or between listings. Also, it complicates cache file generation. We'd have to put all those block elements into the cache files. That increases processing time. So, in summary, there are (not insurmountable) technical issues that would have to be addressed. And I don't think the need is as great as in print. I could be convinced I'm wrong. Also, I'd be interested in seeing other solutions for reusing figures and other stuff. Collapsible content, for example. Or mouseovers. Or light boxes. Or some sort of persistent media sidebar. -- Shaun McCance http://syllogist.net/ _______________________________________________ gnome-doc-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-doc-list
