Warning:
jsMath
requires JavaScript to process the mathematics on this page.
If your browser supports JavaScript, be sure it is enabled.
View source
From QED
for
Help:Macro
Jump to:
navigation
,
search
You can view and copy the source of this page:
The '''#macro''' [[Help:parser function|parser function]] is intended for use in [[Help:template|templates]] in which template variables must be expanded before XML-style [[Help:tags|tags]] are processed. ==Syntax== <nowiki>{{#macro:TAGNAME|TEXT}}</nowiki> : or <nowiki>{{#macro:TAGNAME|ASSIGNMENTS|TEXT}}</nowiki> The effect is as though <TAGNAME ASSIGNMENTS>TEXT</TAGNAME> had been specified after any template variables in TAGNAME and ASSIGNMENTS had been expanded. ==Example== On {{qed}}, <image> is defined as an XML-style tag (see [[QED:image]]). If template variables were expanded before such tags, we would be able to write expressions such as: <nowiki><image src={{{1}}} width={{{width|{{{3|450}}}}}}>{{{2|}}}</image></nowiki> To achieve the intended effect, we would instead write: <nowiki>{{#macro:image|src={{{1}}} width={{{width|{{{3|450}}}}}} | {{{2|}}} }} </nowiki> This is in fact how [[Template:Transclude]] is defined. ==Notes== Prior to MediaWiki version 1.12, template variables were processed before XML-style extensions.
Templates used on this page:
Template:Qed
Return to
Help:Macro
.
Views
Help page
View source
History
Personal tools
Log in
Navigation
QED Home Page
Projects
Help
Community portal
Contributions
Recent changes
QED News
princeton
Almagest
Blackboard
Blog Service
IT's Academic
Mapping Globalization
University Channel
WebMedia
Princeton University
Search
Advanced search
Toolbox
What links here
Related changes
Special pages
Tag This!
BlogMarks
del.icio.us
digg
edtags
Furl
iGoogle
reddit
Segnalo
Simpy
Spurl
Yahoo