UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
Edit Discussion
> Text Formatting Guidelines    
Text Formatting Guidelines

Image:NotifWarningWeak.gif This page has been marked as incomplete

Notes:

This is a work in progress and will be expanded upon in conjunction with Article Layout Guidelines.



If this page has been completed please remove the {{INCOMPLETE}} template from the page's source markup.

Related Content:
    Article Layout Guidelines

The purpose of this article is to inform of technical detail and best practices with regards to formatting text. The article will provide detailed coverage of common wiki markups and other UA Wiki/Forum and HTML markups that we may run into during regular article text formatting. The markup methods will be listed in alphabetical order


Contents

Line Break & Whitespace Behavior

For those familiar with HTML, the effect of line breaks and whitespace will be familiar with wiki markup. In short, whitespace characters are ignored when there's more than one in succession. Line breaks are ignored unless there's two in a row.

Whitespace Examples

The following demonstrates the effect (or lack thereof) when placing multiple spaces in succession:

INPUT:
This demonstrates          whitespace.

OUTPUT:
This demonstrates whitespace.

To force extra spaces, use the non-breaking space markup:  

INPUT:
This demonstrates          whitespace.

OUTPUT:
This demonstrates          whitespace.

Additionally, the pre style can be applied to retain whitespace within an element.

Line Break Examples

The following demonstrates a single line break and it's output. As demonstrated, the single line break is ignored. This is usually the case:

INPUT:
This shows a line break, with
the break placed after "with"

OUTPUT:
This shows a line break, with the break placed after "with"

Two line breaks in succession work as expected:

INPUT:
This shows a line break, with

breaks placed after "with"

OUTPUT:
This shows a line break, with

breaks placed after "with"

Forcing a Single Line Break

To force a single line break, use the <br /> tag:

INPUT:
This is a line break with<br />an explicit break after the "with"

OUTPUT:
This is a line break with
an explicit break after the "with"

Line Breaks & Whitespace Summary

Like it's HTML cousin, working with line breaks and whitespace is intuitive when we get used to it. In the mean time, when writing content, write normally and include a single black space between paragraphs in the markup, and the formatting will come out as expected. Keep in mind the explicit breaks and spaces for working up non-standard content layouts.

When working in the proximity of other types of auto-formatting markup, such as indents and bulleted or numbered lists, be aware that the auto-formatted markup usually includes it's own pre and post line breaks, and therefore may or may not be required depending on the outcome you'd like.

Lastly, be wary of line breaks causing problems when authoring and calling templates. This is more of an issue when authoring, as template documentation should note whether line breaks need to be removed when calling. When authoring templates, be particularly mindful of the very last line break: a common error is to unknowingly leave the cursor on a new line at the end of the markup, instead of at the end of the last content (thus leaving one trailing line break which may have undesirable output).


Code & Specialty Text

Content Forthcoming. The author of the article has included this section as a placeholder or otherwise noted that it is incomplete.
The following notes were left with regards to the forthcoming content:
Code tag indenting and Code vs. CodeBox tags should be covered here, as well as tt/pre tags vs code tags

Code blocks and other specialty text can be handled by using a variety of methods. This section will describe those available, their usage details as well as the recomended practices (forthcoming)

Indenting

The Colon ( : ) at the start of a line is the standard wiki markup character for content indentation. However, it's use may not be quite as straightfoward as we would like when trying to obtain a specific formatting.

Indenting and Line Breaks

The Indenting markup automatically handles some line breaking for us. This can be a helpful tool when we understand how it works. In a nutshell, an indent block will have a line break before the start of the block, as well as a line break after the end of the block. And indent block is any multiple lines of code with successive indent characters at the start of each new line. Below is examples of indent blocks with pre- and post-line breaks, as well as wraparound text:

Example 1

INPUT:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.
:Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.

OUTPUT:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.

Example 2

INPUT:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.
:Lorem ipsum dolor sit amet, consectetur adipiscing elit.
:Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.

OUTPUT:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.

For readabilty in our markup, we can include a line break in the markup code before or after the indent. This will be ignored and replaced with the line breaks inherent to the indent markup.

Example 3

INPUT:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.

:Lorem ipsum dolor sit amet, consectetur adipiscing elit.
:Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.

OUTPUT:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sagittis, tellus in facilisis dapibus, metus magna rhoncus quam, eu elementum tortor tortor eget elit. Vivamus et purus sed dolor dapibus mattis.
Edit Discussion
Custom Search
Thank you for your support!
This page has been accessed 9,684 times.  This page was last modified 05:05, 4 February 2012 by Jack Leach. Contributions by Glenn Lloyd  Disclaimers