Re: .dm macros

From Stefan Boddie
DateThu, 5 Dec 2002 14:56:51 +1300
Subject Re: .dm macros
In-Reply-To (20021204145613Z-tao-lib-uchicago-edu)
Hi Tod,

> I am seeing inconsistencies in the hows and whys of .dm macros
> expansion.
> I have the following lines in
> _page_ [c=chpdemo] {image }
> _pages_ [c=chpdemo] {images}
> _textgoto_ [c=chpdemo] {go to image}
> These macros are used by the page-turning interface and apply to a
> collection of scanned piano scores. All three macros are defined in
>, and I try to override them, for one collection, with these
> defns in _page_ and _pages_ expand as in, shown
> above, but _textgoto_ (the button label) expands as defined in
> Anyone know why?

This is because _textgoto_ belongs to the "document" package while _page_
and _pages_ belong to the "Global" package. You'll notice that somewhere
above the definition ot _textgoto_ in is a line reading "package
document". To do what you want you'd need to either put your overridden
_textgoto_ macro in the file or do something like the following

_page_ [c=chpdemo] {image }
_pages_ [c=chpdemo] {images}
package document
_textgoto_ [c=chpdemo] {go to image}
package Global

> As a followup question, I'd like to use some macros from the .dm files
> in format strings in the collect.cfg format string, but my experiments
> have failed. Is this possible, and under what conditions?

You should be able to put any macros in your format strings. Once again you
need to keep in mind what package the macro belongs to though. If it's in
the Global package you can specify it simply as _macroname_. Otherwise
you'll need to use _packagename:macroname_.