[Top][All Lists]

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

How to make a custom @Thing cooperate with @TitleOf in a book?

From: Mark Summerfield
Subject: How to make a custom @Thing cooperate with @TitleOf in a book?
Date: Fri, 3 Dec 2010 16:00:45 +0000


I have these two definitions:

def @XRef right address@hidden
    address@hidden@Case {
        ""   @Yield {(page @PageOf{tag})}
        "??"   @Yield {(page @PageOf{tag})}
        else @Yield address@hidden'' (page @PageOf{tag})}

def @Function
    named tag {""}
    named return {""}
    named name {}
    named args {""}
{ # TODO format it nicely
+1p @Font @C{
    return @Case{"" @address@hidden else @Yield{return~}} &0c
{tag @Case{"" @address@hidden else @Yield @PageMark{tag}}}

The @Function is used like this:

@LD @Function tag{findObject.function}

Now I want to be able to write:

    See @XRef{findObject.function}.

And have it come out as:

    See ``findObject'' (page 99).

But I don't know how to do this.

Also, I would like be to be able to make @XRef smart enough to format
functions specially by matching the end of the tag (i.e.,
".function")---is that possible?


Mark Summerfield, Qtrac Ltd, www.qtrac.eu
    C++, Python, Qt, PyQt - training and consultancy
        "Advanced Qt Programming" - ISBN 0321635906

reply via email to

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