Template:Template journal/doc

The Template journal template allows to showcase with colors and multiple lines the syntax of any template, while providing an easy way to display placeholder texts using colons as separators. For an identical template that displays the output in horizontal format, see Template journal inline.

Usage

 * Syntax

For instance, the following code

will produce the following result.

Likewise, the following code

will produce the following result.

And finally, the following code

will produce the following result.

Edge cases
To preserve one or more initial colons from being replaced, the  HTML entity must be used. After one colon has been replaced all other colons in the argument will be preserved.

Similarly, to insert one or more equals signs into a parameter content, either  or   must be used.

Thus, the following are all valid parameters,

and they will produce the following result.

Arguments containing one or more unescaped equals signs will be silently ignored. An unescaped leading colon will be treated as a normal character, exactly like any other colon that might follow in the same parameter. Thus, the following code

will produce the following problematic result.

Instead, the right way to write the previous unlikely example is the following,

which will correctly print

By design, there is no way to deviate from the format of one argument per line (vertical format). If you need to display a template and all its arguments in one single line (horizontal format), please refer to tji. If you need a more irregular output, please refer to other solutions.

Before editing this template

 * Do not add optional arguments for offering customized results (e.g. changing colors on demand, font, etc.): one of the purposes of this template is that of maintaining always the same look across the entire Wikipedia concerning how templates are shown and explained
 * If you intend to introduce substantial changes that are not simple bug fixes, you are invited to discuss them in the talk page first
 * If you do make changes, please make always sure that the tji template remains consistent with this template

Subpages

 * Template journal/arg
 * ./styles.css