## page was renamed from DraSyntax == DRA Macro Syntax == This page describes the macros added to the base Moin``Moin wiki that are not documented on the other help pages. The most frequently used macros are described first. In the examples below, the text shown in gray boxes contains the macro text to be inserted into a wiki page, and the dotted box following contains the output from the macro. === DraPix === This macro displays images or elements from the Digital``Rock``Art database. Its normal use will be within Survey Report pages. Multiple parameters may be entered as a comma separated list. The possible parameters are: * Any Image ID preceded by the letter i * Any element ID preceded by the letter e * The size of the desired image, where size is between 64 and 800 inclusive. If not specified, the default size is 224. * As an option, image and element IDs may be followed by the letters: * r, g, or b to show the respective red, green, or blue color layer in grayscale. * y to show image in natural grayscale The size of the image displayed may be limited by the size of the cropped element. Pages printed in portrait mode may truncate images wider than about 660 pixels. The grayscale option should only be used when an element or panel is known to have better contrast in the selected color band. {{{ <> <> <> }}} {{{#!wiki dotted <> <> <> }}} An obsolete format may be found within a few older survey reports. The first example above could be duplicated by using `<>` where ''782'' is the image ID and ''1'' is the element number. This form is deprecated and should be removed whenever survey reports are updated. === DraSiteName === /* @@ This may be less confusing if it were renamed to Dra``Survey``Name. */ This macro is intended for use within Survey Reports and returns a site name based upon the current user's ID and privileges. If privileged, the site name will contain the survey reference ID, site name, site number, and area. If not privileged, the site name will contain the survey reference ID and the area. The possible parameters are: * None, this form should only be used at the top of a survey report. * Survey Reference ID - this may be used to reference another site for comparison within a site report. {{{ <> # creates a heading based upon the survey report page name, not shown below. ... some text <> more text... }}} {{{#!wiki dotted ... some text <> more text... }}} === DraElementClassCounts === This macro is intended for use within Survey Reports and returns a table and a bar graph comparing the class counts and percentages of the site against the element class percentages of all other sites recorded in the database. In normal use, the site reference ID will be extracted from the page name so no parameter is required. ''The macro will accept an integer parameter ONLY if the page name does not contain a valid reference ID -- the example below shows site <>.'' {{{ <> }}} {{{#!wiki dotted <> }}} === DraElementSize === This macro is intended for use within Survey Reports and returns a table and a bar graph comparing the element class sizes of the site. In normal use, the site reference ID will be extracted from the page name. ''The macro will accept an integer parameter ONLY if the page name does not contain a valid reference ID -- the example below shows site <>.'' If there are more than 5 element classes occur within a survey, multiple bar graphs are created. {{{ <> }}} {{{#!wiki dotted <> }}} === DraPanelFacing === This macro is intended for use within Survey Reports and returns a table and a graph comparing the panel facing counts and percentages for all panels within the survey. In normal use, the survey reference ID will be extracted from the page name. ''The macro will accept an integer parameter ONLY if the page name does not contain a valid reference ID -- the example below shows site <>.'' {{{ <> }}} {{{#!wiki dotted <> }}} === DraPanelInclination === This macro is intended for use within Survey Reports and returns a table and/or a graph comparing the class counts and percentages of the site against the element class percentages of all other sites recorded in the database. In normal use, the site reference ID will be extracted from the page name. ''The macro will accept an integer parameter ONLY if the page name does not contain a valid reference ID -- the example below shows site <>.'' {{{ <> }}} {{{#!wiki dotted <> }}} === DraEject === This macro adds a printer eject function to a wiki page. It has no effect on a page displayed on a monitor. It may be used within the tutorial pages or site reports to assist in placement of images and related text on the same printed page. There are no parameters accepted. ''NOTE: This function will not work with the Microsoft Internet Explorer 6 browser.'' {{{ <> # you must print or use print preview to see the effect. }}} {{{#!wiki dotted <> }}} === DraPageInfo === This macro writes the last revision date and author's name. The information provided is similar to that written at the bottom of every wiki page. The macro may be placed anywhere in the page. {{{ <> }}} {{{#!wiki dotted <> }}} === DraCenterImage === This macro is used to display screenshots within the tutorial. It may be used to replace the '''attachment:''' syntax for displaying an image attached to a wiki page. The macro draws a border around the image and centers the image horizontally on the page. This is useful when displaying or printing screenshot images with a white background on a wiki page with a white background. Up to five image file names may be passed. File names may include wiki page names: * filename.png - for displaying an image attached to the current page. * Screen``Shots/filename.png - for displaying an image attached the Screen``Shots wiki page. /!\ Use forward slashes. {{{ <> {{attachment:logosml.jpg}} }}} {{{#!wiki dotted <> {{attachment:logosml.jpg}} }}} === DraSurveyReport === This macro returns a list of survey reports. It is intended for use on the bottom of FrontPage and SurveyReport. A list is provided only if the user reading the page has logged in. The contents of the list will vary depending upon the user's ID and privileges. There are no parameters accepted. {{{ <> }}} {{{#!wiki dotted No example is shown here because the list is too long, see FrontPage#Survey_Reports . }}} === DraExamples === This macro displays a hyperlink that will open a new window and display elements from the Digital``Rock``Art database with each of the attributes of a rock art class. It is used within the wiki pages that describe the rock art classes and attributes. The parameters are: * Class_Name.Attribute_Set_Name Where ''Class_Name'' is a valid rock art class and ''Attribute_Set_Name'' is an attribute set of the preceding class. Use of underscore characters to replace blanks within the names is optional. {{{ <> }}} {{{#!wiki dotted <> }}} === DraClassExamples === This macro displays a hyperlink that will open a new window and display example elements of all rock art classes. It is used within the wiki pages that describe the rock art classes There are no parameters accepted. {{{ <> }}} {{{#!wiki dotted <> }}} === DraShowMap === This macro displays a hyperlink that will open a new window and display a Google map centered on the latitude-longitude passed as a parameter. {{{ The site is here: <> }}} {{{#!wiki dotted The site is here: <> }}} === Sortable Tables === Any table can be made sortable by adding a `` to the table definition. {{{ ||Head 1||Head 2||Head 3|| ||11||44||66|| ||77||55||3|| ||55||5||555|| }}} {{{#!wiki dotted ||Head 1||Head 2||Head 3|| ||11||44||66|| ||77||55||3|| ||55||5||555|| }}} === NewWindow === This macro creates a hyperlink that will open a new window. The parameters are: * URL - the page to be displayed; may be a wiki page name or a fully qualified http: url. * alias - optional, text describing the URL. {{{ * <> * <> * <> }}} {{{#!wiki dotted * <> * <> * <> }}}