Руководство Нотаций

Печать полезных подсказок
Расширенное Форматирование

Дополнителное форматирование текста.

Нотации Комментарий
{code:title=Bar.java|borderStyle=solid}
// Some comments here
public String getFoo()
{
    return foo;
}
{code}

{code:xml}
<test>
  <another tag="attribute"/>
</test>
{code}
создает предварительно форматированный блок кода с выделением синтаксиса. Все опциональные параметры макроса {panel} верны и для {code} . Язык по умолчанию Java но вы также можете указать JavaScript, ActionScript, XML, HTML и SQL.

Пример:

Bar.java
// Some comments here
public String getFoo()
{
  return foo;
}

<test>
    <another tag="attribute"/>
</test>

{chart:title=Fish Sold}
|| Fish Type || 2004 || 2005 ||
|| Herring | 9,500 | 8,300 |
|| Salmon | 2,900 | 4,200 |
|| Tuna | 1,500 | 1,500 |
{chart}

{chart:type=line|title=Temperatures in Brisbane|yLabel=Celcius
|dataDisplay=true|dataOrientation=vertical}
|| Month || Min || Max ||
| January | 31.3 | 37.5 |
| February | 26.8 | 32.7 |
| March | 25.1 | 28 |
| April | 18.7 | 25.3 |
{chart}

{chart:type=timeSeries|dateFormat=MM.yyyy|timePeriod=Month|
dataOrientation=vertical|rangeAxisLowerBound=0|colors=blue,gray}
|| Month || Revenue ||
| 1.2005 | 31.8 |
| 2.2005 | 41.8 |
| 3.2005 | 51.3 |
| 4.2005 | 33.8 |
| 5.2005 | 27.6 |
| 6.2005 | 49.8 |
| 7.2005 | 51.8 |
| 8.2005 | 77.3 |
| 9.2005 | 73.8 |
| 10.2005 | 97.6 |
| 11.2005 | 101.2 |
| 12.2005 | 113.7 |

|| Month || Expenses ||
| 1.2005 | 41.1 |
| 2.2005 | 43.8 |
| 3.2005 | 45.3 |
| 4.2005 | 45.0 |
| 5.2005 | 44.6 |
| 6.2005 | 43.8 |
| 7.2005 | 51.8 |
| 8.2005 | 52.3 |
| 9.2005 | 53.8 |
| 10.2005 | 55.6 |
| 11.2005 | 61.2 |
| 12.2005 | 63.7 |
{chart}

Displays a chart using data from the supplied table or tables.

  • Chart type parameters - These parameters change what type of chart to display and the way the chart looks.
    • type - The type of chart to display. The following chart types are available:

      Standard charts

      • pie (default)
      • bar
      • line
      • area

      XY plots - The standard XY plot has numerical x and y axes.The x values may optionally be time based. See timeSeries.

      • xyArea
      • xyBar
      • xyLine
      • xyStep
      • xyStepArea
      • scatter
      • timeSeries

      Other charts


    • orientation - A bar, line, or area chart will be displayed vertically (y axis is vertical) unless 'orientation=horizontal' is specified.
    • 3D - A pie, bar, or line chart will be shown in 3D if 3D=true is specified.
    • stacked - A bar or area chart will be shown with stacked values if stacked=true is specified.
    • showShapes - Shapes will be shown at each data point in a line chart unless showShapes=false.
    • opacity - A percent value between 0 (not visible) and 100 (non-transparent) that determines how opaque the foreground areas and bars display. Defaults are:
      • 75 percent for 3D charts
      • 50 percent for non-stacked area charts
      • 100 percent for all other charts
  • Display control parameters
    • width - The width of the chart in pixels (default is '300')
    • height - The height of the chart in pixels (default is '300')
    • dataDisplay - Default is false to not display the rendered body of the macro (usually the data tables). When dataDisplay=true or dataDisplay=after, the data will be displayed after the chart. When dataDisplay=before, the data will be displayed before the chart.
    • imageFormat - Default is png. Format of generated image. Valid formats are png and jpg. Other formats may be also be valid if installed on your server.
  • Title and label customization parameters
    • title - The title of the chart.
    • subTitle - A subtitle for the chart using a smaller font.
    • xLabel - The label to use for the x (domain) axis
    • yLabel - The label to use for the y (range) axis
    • legend - A legend will be displayed unless legend=false is specified.
  • Data specification parameters - The data for the chart is taken from tables found when the macro body is rendered. These options control how this data is interpreted. By default, numeric and date values are interpreted according to the Confluence global default language (locale) formats. If conversion fails, other languages defined to Confluence will be tried. Additional conversion options can be specified using the parameters below.
    • tables - Comma separated list of table ids and/or table numbers contained within the body of the macro that will be used as the data for the chart. Defaults to all first level tables. If data tables are embedded in other tables, then table selection will be required. This occurs when more complex formatting is done (for example using section and column macros).
    • columns - Comma separated list of column labels and/or column titles and/or column numbers for tables used for chart data. This applies to all tables processed. Defaults to all columns. Columns are enumerated starting at 1. Column label is the text for the column in the header row. Column title is the (html) title attribute for the column in the header row.
    • dataOrientation - The data tables will be interpreted as columns (horizontally) representing domain and x values unless 'dataOrientation=vertical'.
    • timeSeries - If 'true', the x values in an XY plot will be treated as time series data and so will be converted according date formats.
    • dateFormat - For time series data, the date format allows for additional customization of the conversion of data to date values. By default, the Confluence language defined date formats will be used. If a dateFormat is specified, it will be the first format used to interpret date values. Specify a format that matches the format of the time series data. See Date Format.
    • timePeriod - Specify the time period for time series data. Default is 'Day'. This defines the granularity of how the data is interpreted. Valid values are: Day, Hour, Millisecond, Minute, Month, Quarter, Second, Week, Year.
    • language - If provided, the language and country specification will be used to create additional number and date formats to be used for data conversion. This specification will be used before the default languages automatically used. Valid values are 2 character ISO 639-1 alpha-2 codes.
    • country - Used in combination with the language parameter. Valid values are 2 character ISO 3166 codes.
    • forgive - Default is true to try to convert numeric and date values that do not totally match any of the default or user specified formats. Specify forgive=false to enforce strict data format. Data format errors will cause the chart to not be produced.
  • Color customization parameters - See Colors for how to specify colors.
    • bgColor - Color (default is 'white') to use as the background of the chart.
    • borderColor - Color of a border around the chart. Default is to not show a border.
    • colors - Comma separated list of colors used to customize category, sections, and series colors.
  • Axis customization parameters - Depending on the chart type, the range and domain axis may be customized. These values are automatically generated based on the data but can be overridden by specifying one or more more of these paramters.
    • rangeAxisLowerBound - range axis lower bound
    • rangeAxisUpperBound - range axis upper bound
    • rangeAxisTickUnit - range axis units between axis tick marks
    • rangeAxisLabelAngle - angle for the range axis label in degrees
    • domainAxisLowerBound - domain axis lower bound. For a date axis, this value must be expressed in the date format specified by the dateFormat parameter. (Only used in XY Plots, standard charts will have no effect)
    • domainAxisUpperBound - domain axis upper bound. For a date axis, this value must be expressed in the date format specified by the dateFormat parameter. (Only used in XY Plots, standard charts will have no effect)
    • domainAxisTickUnit - domain axis units between axis tick marks. For a date axis, this value represents a count of the units specified in the timePeriod parameter. The time period unit can be overridden by specifying a trailing character: y for years, M for months, d for days, h for hours, m for minutes, s for seconds, u - milliseconds. (Only used in XY Plots, standard charts will have no effect)
    • domainAxisLabelAngle - angle for the domain axis label in degrees. (Only used in XY Plots, standard charts will have no effect)
    • categoryLabelPosition - allows axis label text position for categories to be customized
      • up45 - 45 degrees going upward
      • up90 - 90 degrees going upward
      • down45 - 45 degrees going downward
      • down90 - 90 degrees going downward
    • dateTickMarkPosition - placement of the date tick mark
      • start (default) - tick mark is at the start of the date period
      • middle - tick mark is in the middle of the date period
      • end - tick mark is at the end of the date period
  • Pie chart customization parameters
    • pieSectionLabel - Format for how pie section labels are displayed. :
      • %0% is replaced by the pie section key.
      • %1% is replaced by the pie section numeric value.
      • %2% is replaced by the pie section percent value.
      Example 1: "%0% = %1%" would display something like "Independent = 20"
      Example 2: "%0% (%2%)" would display something like "Independent (20%)"
    • pieSectionExplode - Comma separated list of pie keys that are to be shown exploded. Defaults to no exploded sections. Note: requires jFreeChart version 1.0.3 or higher.
  • Attachment parameters - These are advanced options that can be used for chart versioning, automation enablement, and to improve performance. Use these options carefully! Normally, the chart image is regenerated each time the page is displayed. These options allow for the generated image to be saved as an attachment and have subsequent access re-use the attachment. This can be useful especially when combined with the cache macro to improve performance. Depending on the options chosen, chart images can be versioned for historical purposes.
    • attachment - Chart image will be saved in a attachment.
      • ^attachment - chart.macro.param.attachment.attachment
      • page^attachment - The chart is saved as an attachment to the page name provided.
      • space:page^attachment - The chart is saved as an attachment to the page name provided in the space indicated.
    • attachmentVersion - Defines the the versioning mechanism for saved charts.
      • new - (default) Creates new version of the attachment.
      • replace - Replaces all previous versions of the chart. To replace an existing attachment, the user must be authorized to remove attachments for the page specified.
      • keep - Only saves a new attachment if an existing export of the same name does not exist. An existing attachment will not be changed or updated.
    • attachmentComment - Comment used for a saved chart attachment.
    • thumbnail - Default is false. If true, the chart image attachment will be shown as a thumbnail.

Colors

Colors can be specified by name or hex value. See Web-colors. The following are the valid color names that will automatically be converted.
Color Hexadecimal Color Hexadecimal Color Hexadecimal Color Hexadecimal
black #000000 silver #c0c0c0 maroon #800000 red #ff0000
navy #000080 blue #0000ff purple #800080 fuchsia #ff00ff
green #008000 lime #00ff00 olive #808000 yellow #ffff00
teal #008080 aqua #00ffff gray #808080 white #ffffff

Date Format

Copied from Java SimpleDateFormat specification.

Date and time formats are specified by date and time pattern strings. Within date and time pattern strings, unquoted letters from 'A' to 'Z' and from 'a' to 'z' are interpreted as pattern letters representing the components of a date or time string. Text can be quoted using single quotes (') to avoid interpretation. "'" represents a single quote. All other characters are not interpreted; theyre simply copied into the output string during formatting or matched against the input string during parsing.

The following pattern letters are defined (all other characters from 'A' to 'Z' and from 'a' to 'z' are reserved):

Letter Date or Time Component Presentation Examples
G Era designator Text AD
y Year Year 1996; 96
M Month in year Month July; Jul; 07
w Week in year Number 27
W Week in month Number 2
D Day in year Number 189
d Day in month Number 10
F Day of week in month Number 2
E Day in week Text Tuesday; Tue
a Am/pm marker Text PM
H Hour in day (0-23) Number 0
k Hour in day (1-24) Number 24
K Hour in am/pm (0-11) Number 0
h Hour in am/pm (1-12) Number 12
m Minute in hour Number 30
s Second in minute Number 55
S Millisecond Number 978
z Time zone General time zone Pacific Standard Time; PST; GMT-08:00
Z Time zone RFC 822 time zone -0800
Pattern letters are usually repeated, as their number determines the exact presentation.
  • Text: For formatting, if the number of pattern letters is 4 or more, the full form is used; otherwise a short or abbreviated form is used if available. For parsing, both forms are accepted, independent of the number of pattern letters.
  • Number: For formatting, the number of pattern letters is the minimum number of digits, and shorter numbers are zero-padded to this amount. For parsing, the number of pattern letters is ignored unless its needed to separate two adjacent fields.
  • Year: For formatting, if the number of pattern letters is 2, the year is truncated to 2 digits; otherwise it is interpreted as a number.

    For parsing, if the number of pattern letters is more than 2, the year is interpreted literally, regardless of the number of digits. So using the pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D.

    For parsing with the abbreviated year pattern ("y" or "yy"), SimpleDateFormat must interpret the abbreviated year relative to some century. It does this by adjusting dates to be within 80 years before and 20 years after the time the SimpleDateFormat instance is created. For example, using a pattern of "MM/dd/yy" and a SimpleDateFormat instance created on Jan 1, 1997, the string "01/11/12" would be interpreted as Jan 11, 2012 while the string "05/04/64" would be interpreted as May 4, 1964. During parsing, only strings consisting of exactly two digits, will be parsed into the default century. Any other numeric string, such as a one digit string, a three or more digit string, or a two digit string that isnt all digits (for example, "-1"), is interpreted literally. So "01/02/3" or "01/02/003" are parsed, using the same pattern, as Jan 2, 3 AD. Likewise, "01/02/-3" is parsed as Jan 2, 4 BC.

  • Month: If the number of pattern letters is 3 or more, the month is interpreted as text; otherwise, it is interpreted as a number.
  • General time zone: Time zones are interpreted as text if they have names. For time zones representing a GMT offset value, the following syntax is used:
         GMTOffsetTimeZone:
                 GMT Sign Hours : Minutes
    
         Sign: one of
                 + -
         Hours:
                 Digit
                 Digit Digit
    
         Minutes:
                 Digit Digit
         Digit: one of
                 0 1 2 3 4 5 6 7 8 9
    Hours must be between 0 and 23, and Minutes must be between 00 and 59. The format is locale independent and digits must be taken from the Basic Latin block of the Unicode standard.

    For parsing, RFC 822 time zones are also accepted.

  • RFC 822 time zone: For formatting, the RFC 822 4-digit time zone format is used:
         RFC822TimeZone:
                 Sign TwoDigitHours Minutes
         TwoDigitHours:
                 Digit Digit
    TwoDigitHours must be between 00 and 23. Other definitions are as for general time zones.

    For parsing, general time zones are also accepted.

{widget:url=http://au.youtube.com/watch?v=cOE8ukQoz6E}
{widget:url=http://au.youtube.com/watch?v=cOE8ukQoz6E | width=500 | height=400}

Widget Connector

  • url - (required) The URL to the widget you want to display in Confluence
  • {widget:url=http://au.youtube.com/watch?v=cOE8ukQoz6E}
  • width & height - (optional) Specify the width and height of your widget
  • {widget:url=http://au.youtube.com/watch?v=cOE8ukQoz6E | width=500 | height=400}
{content-by-user:fred}

Показывает простую таблицу всего контента (страницы, комментарии, сообщения в блок, профили пользователя и описания пространства) созданные пользователем (здесь это 'fred').

{index}

показывает индекс всех страниц в текущем пространстве, с кросс связями и в алфавитном порядке.

{include:Home}

{include:FOO:Home}

{include:spaceKey=FOO|pageTitle=Home}
Включает одну страницу в другую (этот пример включает страницу ,названную "Home"). Страницы из другого пространства могут быть включены посредством введения заголовка страницы с пробелом и двоеточием.

Пользователь просматривающий страницу должен иметь разрешение для просмотра страницы или она не будет показана.

{note:title=Be Careful}
The body of the note here..
{note}

Prints a simple note to the user.

  • title: - (optional) the title of the note.
  • icon: - (optional) if "false", dont display the icon.

Be Careful

The body of the note here..
{warning:title=Warning}
Insert warning message here!
{warning}

Prints a warning note to the user.

  • title: - (optional) the title of the warning.
  • icon: - (optional) if "false", dont display the icon.

Warning

Insert warning message here!
{info:title=Be Careful}
This macro is useful for including helpful information in your confluence pages
{info}

Prints an informational note.

  • title: - (optional) the title of the information box.
  • icon: - (optional) if "false", dont display the icon.

Useful Information

This macro is useful for including helpful information in your confluence pages
{tip:title=Handy Hint}
Join the Confluence Mailing-List!
{tip}

Prints a helpful tip for the user.

  • title: - (optional) the title of the tip.
  • icon: - (optional) if "false", dont display the icon.

Handy Hint

Join the Confluence Mailing-List!
{graph-from-table}
| A | B |
| A | C |
{graph-from-table}


{graph-from-table}
|| heading 1 ignored || heading 2 ignored ||
| A node | B node | label="relationship 1", style=dashed | style=normal | fillcolor=lightblue |
| A node | C node |
| A node | D node | style=invis |
{graph-from-table}


{graph-from-table:node=fillcolor=lightblue,fontsize=20|edge=style=bold,color=red| replace=key1:'style=dashed, color=blue', key2:style=invis|ranksep=2.0}
| A node | B node | | shape=polygon,sides=8,peripheries=3 | |
| A node | B node | | style=dashed |
| A node | C node |
| A node | D node | key2 |

Here is a second table
| E | F | key1 |
| F | G | key1 |
{graph-from-table}


{graph-from-table:direction=LR|ranksep=1.5|node=fillcolor=lightblue,fontsize=20| edge=style=bold,color=red|replace=key1:style=dashed}
| A node | B node | label="r1" | | | cluster 1 | key1 |
| F | G | key1 | | | cluster 1 |
| X | Y | key1 | | | cluster 1 | | big cluster |
{graph-from-table}


{graph-from-table:direction=LR|edge=color=blue|displayData=true}

{sql:dataSource=ConfluenceDS}
select PARENTID, TITLE from CONTENT where PARENTID is not NULL
{sql}

{graph-from-table}

Converts a table into a Graphviz graph by rendering the body of the macro and then converting each row in each table to a node relationship. A flowchart macro is used for the rendering. This macro simplifies use of the Graphviz support by eliminating or significantly reducing the need to know the dot language. Advanced users will still need to consult the Graphviz documentation for the multitude of attributes and settings that are possible.

The table or tables specified in the body of the macro can be wiki markup or created as a result of other macros. Specifically, the sql, csv, and excel macros can be used to produce the tables.

The columns in the table are interpreted as follows:

  1. Node with label equal to the column. The source of a relationship.
  2. Node with label equal to the column. The target of a relationship.
  3. Relationship attributes.
  4. Source node attributes.
  5. Target node attributes.
  6. First cluster label. A cluster is a subgraph that contains the source and target nodes for this row.
  7. First cluster attributes. For instance, if you do not want a label to show for the cluster, put label=""
  8. Second cluster label. The second cluster is a subgraph that contains the first cluster.
  9. Second cluster attributes.

Attributes are defined by Graphviz for nodes, relationships, and subgraphs (clusters). They are specified as comma separated list. Attribute values containing blanks must be surrounded by double quotes. Some commonly used attributes are:

  • label - text to display
  • style - examples: filled, bold, dotted, dashed, invis (for invisible)
  • fillcolor - node fill color
  • fontname - standard font name (enclosed in double quotes if contains a blank)
  • fontsize - standard font size
  • fontcolor - color usually specified as a color name like blue, grey, lightyellow
  • shape - examples: rect, box, circle, ellise, triangle, polygon (together with sides attibutes), diamond, ...
  • sides - number of sides for a polygon shape
  • peripheries - number of node boundaries

References:

Parameters - all are optional:
  • displayData - Default is false. Set to true to show the rendered body data after the graph. This is useful to see the results of a sql macro for instance.
  • node - The default node attributes are: shape=rect, style=filled, fillcolor=lightyellow, fontname="Verdana", fontsize=9. The default attributes are taken from the default flowchart macro behavior. By specifying the node parameter, you can override these defaults or add additional default attributes. See the Graphviz Documentation for information on attributes and settings.
  • edge - The default edge attributes are: arrowsize=0.8. The default attributes are taken from the default flowchart macro behavior. By specifying the edge parameter, you can override these defaults or add additional default attributes. See the Graphviz Documentation for information on attributes and settings.
  • direction - The default layout direction is top to bottom (TB). Set direction=LR to layout in a left to right direction. This is equivalent to the rankdir setting.
  • tables - Comma separated list of table ids and/or table numbers contained within the body of the macro that will be used as the data for the graph. Defaults to all tables found in the body.
  • columns - Allows selection of the columns of the table that will be used for the graph. It must be a comma separated list of 1 or more positive integers in any order. The default is columns=1,2,3,4,5,6,7,8,9. If the table does not contain the column indicated, it will be ignored. For example, if columns=3,13 then column 3 will be used for the source node and column 13 will be used for the target node of the relationship. All other columns will be ignored.
  • replace - A comma separated list of key:value pairs that will be used to convert column values to attributes. If a column value for an attribute column matches one of the keys, the associated value will replace the column value. This makes it easy to associate attributes to column data. If more than one attribute needs to be specified for a key, enclose the value in a single quote so that the comma gets treated as a attribute separator.
  • ... - All other parameters are passed through to Graphviz for setting any global Graphviz parameter. Some common examples are:
    • ranksep - Separation in inches between nodes.
    • bgcolor - Background color.
    • size - Size specified as width, height in inches. Example: size="3,5".
{graphviz}
digraph {
A -> B
A -> C
C -> D
}
{graphviz}

Displays a graph drawn using the GraphViz language.

{flowchart}
A -> B
A -> C
C -> D
{flowchart}

Displays a flowchart diagram drawn using the GraphViz language. Some defaults are set to match the Confluence look.

{noformat}
предварительно отформатированый кусок текста
так *не* форматированный в дальнейшем сделан здесь
{noformat}
Делает предварительно отформатированный блок текста с не выделенным синтаксисом. Все опциональные параметры макроса {panel} верны и для {noformat}.

  • nopanel: Если значение "nopanel" равно true, то выдержка будет выведена без окружающей панели.
Пример:
предварительно отформатированый кусок текста
так *не* форматированный в дальнейшем сделан здесь

{panel}Some text{panel}

{panel:title=My Title}Some text with a title{panel}

{panel:title=My Title| borderStyle=dashed| borderColor=#ccc| titleBGColor=#F7D6C1| bgColor=#FFFFCE}
a block of text surrounded with a *panel*
yet _another_ line
{panel}
Охватывает блок текста в панели полностью настраиваемой пользователем. Опциональные параметры, которые вы можете определить, следующие:
  • title: Заголовок панели
  • borderStyle: Стиль границы, который использует эта панель (сплошной, пунктирный и другие CSS стили границ)
  • borderColor: Цвет границы, который использует эта панель
  • borderWidth: Ширина границы, которую использует эта панель
  • bgColor: Цвет фона этой панели
  • titleBGColor: Цвет фона заголовка этой панели

Example:

My Title
a block of text surrounded with a panel
yet another line