Library of Formatting Examples:How To Make an Example

From DPWiki
Jump to navigation Jump to search
Library of Formatting Examples (Work in Progress--full version here)DP Links: Activity Hub · Wiki · Forums

This page explains, step by step, how to create an Example in the Wiki version of the Library of Formatting Examples.

Getting Started

Check the Discussion Thread

The Library of Formatting Examples Discussion Thread is the best place to ask questions or propose new ideas. It might be a good idea to review the thread and ask about your idea before creating a new page.

Creating a Page Proposal

Only certain posters can edit the pages in the actual LOFE. Other users are welcome to propose new or revised pages, but the first step will be to create your proposed page in your own user namespace.

For example, if your username was JoSmith, you could create a new page by typing in the searchbar:

User:JoSmith/New Italics Example

and clicking "Create This Page" on the resulting page. You may want to create a link to the new page from your main User page to make it easier to access and keep track of.

Creating an Image

If you're proposing a revision to an existing page, you can link to the existing example image. For a new example, you'll need to create and upload a new image.

Images for the Library of Formatting Examples should come only from in-progress or completed DP projects. Please include a link to the Project Page in the Source: field of the image when you upload it to the DP Wiki.

Images should be:

  • In PNG format
  • Cropped to show only the issue you're addressing, and enough context for it to make sense.
  • Low resolution (like a proofing image)
  • Compressed with pngcrush

Add the LOFE Templates

Pages in the LOFE are created using standard templates. Start by adding the following templates to your new page in order. Click on the link in the header for the full documentation of each template and its arguments.

LOFE:Header
The header is used on every page in the LOFE, including Example pages. It includes links to other parts of the DP site.
LOFE:Navbar
The navbar appears at the top of each page. Use it to show where your proposed example fits in the LOFE as a whole.
LOFE:Example image
This template displays your example image, the name of which must be set with the image-filename argument. It also takes several important arguments that will be discussed below. In your final example, it will be followed by the page numbers for your example text. For now, move on to:
LOFE:Example text
This template takes no arguments. It will be followed by your correctly formatted example text.
LOFE:Example discussion
This template takes no arguments. It will be followed by your discussion section.
LOFE:Example end
This template ends the Example; it takes no arguments.
LOFE:Shared
Add this optional template only if your example shares an image with another example.
LOFE:Footer
This final template creates the footer bar, which matches the header bar and tells the user where to go with questions or suggestions.

Add the Correctly Formatted Text

The next step is to add the correctly formatted text in after the Example text template. Your correctly formatted text should reflect the text shown in the image, with no extra or missing lines.

In order to display the text in a monospaced font, please add one blank space at the beginning of each line, including any blank lines. There are other ways to create monospace text in a wiki, but only this method will work correctly with the templates needed to mark up the examples.

Any example that starts with a new paragraph or footnote, or any other situation where a blank line is called for, should start with a blank line. In order to create an empty blank line at the top of the example text, you need to use this template call:

 {{LOFE:Blank|hide=true}}

Make sure there is a blank space before the first of the double brackets. You only need to do this if you want a blank line as the first line of an example; anywhere else in the example you can just use a line with one space and nothing else to create a blank line.

Marking Up the Correctly Formatted Text

The following standard templates are used to mark up the correctly formatted text. Click on each template for full documentation.

LOFE:Tag
Used for all markup tags that use < and >, such as <i> and <tb>
LOFE:Markup
Used for other markup elements like /* and /#
LOFE:Blank
Creates a blank line, marked with [Blank line] and semantically colored. Don't forget to add a space before the template call.
LOFE:Comment
Creates a comment. Use the Comment template only for comments specific to the Example; do not use it for comments left by the proofreaders or formatters.

Add the line numbers

Next, count the number of lines in your example text (including any blank lines) and create line numbers in the space between the Example image template and the Example text template. Put one number on each line, and add one space to the beginning of each line, just as you did with the formatted text. The final result should look something like this:

{{LOFE:Example image|image-filename=101-00A.png|iw=30|tw=35|}}
 1
 2
 3
 4
{{LOFE:Example text}}

If there are more than nine lines in the example, add an extra space before each single-digit number. This will line up all numbers on the right and make them easier to read.

{{LOFE:Example image|image-filename=101-00A.png|iw=30|tw=35|}}
  8
  9
 10
 11
{{LOFE:Example text}}

Write the Discussion

Each example should include some discussion of its intended topic. This should be long enough to be clear but no longer than necessary.

Discussion headings

The discussion should include at least one heading, marked as a level two header (in source editing view, use two equals signs before and after the heading). The heading should identify the topic in a word or two.

If the example covers more than one subject, break each subject into a new section with its own heading.

Discussion markup

There are a few templates that may be helpful in marking up the discussion section:

LOFE:X
Creates a cross-reference to another example. Please use this template instead of a direct link if you'd like to reference another example.
LOFE:Cat
Creates a cross-reference to another example category, such as "Italics" or "Lists".
LOFE:Guidelines
Creates a link to a specific section of the Formatting Guidelines

You should also mark up any literal tags or markup used in the discussion with LOFE:Tag or LOFE:Markup.

Final configuration and cleanup

Once your content is in place, you should adjust the arguments to LOFE:Example image to reflect the size of your image and text. There are two arguments, both of which accept any value ending in 5 or 0 between 15 and 75.

tw
The tw argument sets the minimum width of your correctly formatted text. It should be set wide enough that, on a standard web browser, the lines of text do not wrap even if the window is small enough that the whole example does not fit.
iw
The iw argument sets the width at which your image will be displayed. In most cases, it should be set so that the text in your image is slightly larger than the correctly formatted text; it should always be clearly legible.

Carefully proofread and review your example, and if you would like it considered for inclusion, post it in the discussion thread linked above.

To comment or request edits to this page, please visit the LOFE discussion thread.