Project

General

Profile

FNAL Redmine tricks

Empty page - for testing

An empty page for your tests: LArSoft Redmine sandbox; remember to clean up after yourself!

Calling macros

A macro can be called by enclosing its name in double braces; for example:

{{hello_world(arg="argument text")
  block of text
}}

Hello world! Object: WikiContent, Arguments: arg="argument text" and a 13 bytes long block of text.

Syntax highlight for code

The standard way to get some syntax highlight is to switch to HTML mode with.

Class names are

C c
C++ cpp (does not know C++11 keywords)
python python
ruby ruby
JSON json
bash n/a
FHiCL n/a (try with python)

References to other redmine locations

  • issue trackers: issue #1083 renders as: issue #1083 (grayed and barred if closed); the numbering is unique within Fermilab Redmine
  • source code:
  • commits: lardata:commit:ce08cb0c03376890c3e9339edf95d9ce10ffb377 or shortened lardata:commit:ce08cb0 render as lardata:ce08cb0c03376890c3e9339edf95d9ce10ffb377 and lardata:ce08cb0 respectively (both point to the same place)
  • wiki pages: the labels can be obtained from the page and section titles, removing all "special" characters
    • [[art:]] points to the main wiki page of art Redmine project: art ([[art:|art wiki]] typesets the specified label: art wiki)
    • [[FNAL Redmine tricks]] points to this wiki page: FNAL Redmine tricks ([[FNAL Redmine tricks|tricks]] typesets the specified label: tricks)
    • [[FNAL Redmine tricks#References to other redmine locations]] points to this paragraph: FNAL Redmine tricks (label syntax available as above)
    • [[art:Configuration validation and description]] points to a specific wiki page of the redmine project art: Configuration validation and description (label syntax available as above)
  • projects: project:art renders as art
  • versions: versions are declared in the Settings panel of a Redmine project

Custom macro test

(this is currently incorrect or not working)

macro :my_macro, :desc => 'This is a custom macro' do |obj, args| # args is an array # and this macro does not accept a block of text
end

{{my_macro}}

Collapsing text

The following macro creates a collapsible window with the specified text as short description.
The extended text can contain macros; e.g.:

{{collapse(View details...)
  bq. {{child_pages}}
  This is a block of text that is collapsed by default.
  It can be expanded by clicking a link.
}}

Mathematical formulas with LaTeX

{{latex($\beta\tau\Theta\theta$)}}

$\beta\tau\Theta\theta$

Other tricks with LaTeX

Today's date:

{{latex(\today)}}

\today

Minutes since midnight:

{{latex(\the\time)}}

\the\time

Note: The above do not seem to consistently update when the page is edited.

DOT graphs

This seems not to work...

{{graphviz( a -> b ;)}}

Error executing the graphviz macro (Error applying external filter: stdout is , stderr is )

List of supported macros

The following list can be rendered by running the {{macro_list}} macro:


hello_world
Sample macro.
macro_list
Displays a list of all available macros, including description if available.
child_pages
Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:

{{child_pages}} -- can be used from a wiki page only
{{child_pages(depth=2)}} -- display 2 levels nesting only
{{child_pages(Foo)}} -- lists all children of page Foo
{{child_pages(Foo, parent=1)}} -- same as above with a link to page Foo
include
Includes a wiki page. Examples:

{{include(Foo)}}
{{include(projectname:Foo)}} -- to include a page of a specific project wiki
collapse
Inserts of collapsed block of text. Examples:

{{collapse
This is a block of text that is collapsed by default.
It can be expanded by clicking a link.
}}

{{collapse(View details...)
With custom link text.
}}
thumbnail
Displays a clickable thumbnail of an attached image. Examples:

{{thumbnail(image.png)}}
{{thumbnail(image.png, size=300, title=Thumbnail)}} -- with custom title and size
review
This is my macro link to code review
latex
Converts LaTeX to embedded image
latex_include
Converts LaTeX to embedded image
graphviz
Constructs graph image from its textual description in DOT language, see http://www.graphviz.org
graphviz_include
Constructs graph image from its textual description in DOT language, see http://www.graphviz.org
ritex
Converts WebTeX expression to MathML, see http://ritex.rubyforge.org/
ritex_include
Converts WebTeX expression to MathML, see http://ritex.rubyforge.org/
video
Converts video file given by its filename to FLV and displays it via Flowplayer
video_include
Converts video file given by its filename to FLV and displays it via Flowplayer
video_url
Converts video file given by its URL to FLV and displays it via Flowplayer
video_url_include
Converts video file given by its URL to FLV and displays it via Flowplayer
fortune
Prints a random, hopefully interesting, adage, see http://en.wikipedia.org/wiki/Fortune_(Unix)
fortune_include
Prints a random, hopefully interesting, adage, see http://en.wikipedia.org/wiki/Fortune_(Unix)
repository
Prints path to project repository, args are (mode,reponame) mode is 'ro' or 'rw', reponame only if multiple repositories on project
repository_include
Prints path to project repository, args are (mode,reponame) mode is 'ro' or 'rw', reponame only if multiple repositories on project