Library of Formatting Examples talk:Main
This page explains how to build an LOFE example page using the templates.
This new format has, so far, been applied to examples through Italics/08B
Each example page starts with the navigation bar. (To be documented)
The Start Template
The start template takes a number of required arguments, and uses them to display the example image and set up for the formatted text display. Call it like so:
{{LOFE:Example start |argument=value...}}
The arguments are:
- image-filename
- the wiki filename of the page image. Do not include "File:". Required.
- iw
- the width of the image file; see discussion below. Required.
- tw
- the width of the formatted text example; see discussion below. Required.
- size
- add "size=small" to use a smaller text size in the correctly formatted text; useful in side-by-side display. Optional; default is "normal" (100%).
The image and text width may be set to any multiple of 5 between 20 and 70 (20, 25, 30, etc.) In setting the widths:
- Set the text width so that the lines of text do not wrap when displayed in a standard monospace font.
- Set the image width so that the text in the image appears about the same size as the example text, or a little bit larger. This will normally mean a slightly lower setting for iw compared to tw.
The Marked-Up Text Example
After the start template comes the correctly formatted text example. Start the correctly formatted text, then make the following changes:
- Add once space to the front of each line, including blank lines, in the source editor to create a single block of monospace text. You cannot use pre tags or any other method to achieve this; it will cause the required templates not to work.
- Where the number and spacing of blank lines is important, use the template {{LOFE:Blank}}.
- Replace any HTML-style tags that appear in the text with the {{LOFE:Tag}} template. Remember to replace both opening and closing tags:
{{LOFE:Tag|sc}}Tools and Appliances{{LOFE:Tag|/sc}}
looks like this:
<sc>Tools and Appliances</sc>
- Where there is a short comment directly related to a specific line of text, use the {{LOFE:Comment}} template to add a comment.
{{LOFE:Comment|This line is Mixed-small-caps; mark it}}
looks like this:
[** This line is Mixed-small-caps; mark it]
- In the original LOFE, all discussion was placed in the example as comments. Here, comments should only be used where they relate to a specific line; general discussion of the topic should instead go in the discussion section, described below.
The Middle Template
After the formatted text, call the middle template with:
{{LOFE:Example middle}}
This template does not need any arguments or customisation. It will close the formatted text block and set up for the discussion section.
Discussion
At this point, there should be a brief discussion of the example. This starts with a three-equals-sign heading summarizing the primary issue:
=== Complete sentences ===
Some examples are used to demonstrate more than one type of formatting--for example, [example] discusses both small caps and front matter. In that case:
- List the issue related to the current section first (so in the Front Matter example the front matter section will come first, but in the Small Caps example the section on small caps will come first);
- Use a new three-equals-sign subheading for the separate topic; and
- Include links to the section and the specific discussion related to any other topic.
The End Template
Like the middle template, the end template takes no arguments.
{{LOFE:Example end}}