Format Preview

From DPWiki
Jump to navigation Jump to search

This function checks the text for formatting issues and shows the text with in-line formatting. The types of mark-up can optionally be shown in different colours. It is primarily intended for use in the formatting rounds, but can show super- and sub-scripts in proofreading rounds.

It can also show an approximate view of the re-wrapped text using the out-of-line markup.

The text in the preview is not editable.

Using Format Preview

The preview is activated by a button: "Preview" in the standard proofreading interface or the icon with an "F" in the enhanced interface.

When the preview is shown the bottom frame (with character pulldowns etc.) is hidden. The text is shown together with a panel at the bottom containing various controls. To exit the preview click on the "Quit" button in the panel or press the 'escape' key. If there are no problems with the markup then italic, bold, gesperrt, small caps, font change, subscripts and superscripts are shown and optionally coloured.

Requirements

Preview works on all browsers supported by DP, with JavaScript enabled.

Controls

Quit
Exits the preview and returns to the normal proofreading interface. The 'escape' key also exits the preview.
Color markup
This checkbox enables or disables colouring of marked-up text and tags.
"Image" and "Text" + and -
These buttons zoom in the ratio 1 : 1.1.
Font
The options are "Browser default", "DejaVu Sans Mono", "DP Sans Mono", "Browser serif" and "Browser sans-serif" and possibly a user-configured font, as specified in a user's preferences. "Browser default" will select the browser monospace font.
Tags, No Tags, Text radio buttons
When "Tags" is selected all markup tags are shown. Assuming there are no major issues with the formatting "No Tags" hides the inline markup tags. The "Text" mode shows what a "plain text" version will look like. This is useful for cases where aligment is required such as in tables. The style of the marked text is not changed but it is surrounded by characters as follows: _italic_ =bold= $gesperrt$ ~font change~. Small caps is left like the original text.
Re-wrap
Check to re-wrap the text - see below.
Issues and Possible issues
These are described below. A warning triangle means that some issues have been suppressed.
Configure
Shows another panel where colors may be selected and other options changed (see below).

Text view

Trailing spaces are removed and any lines which contain only user's comments are completely ignored when checking for the blank lines which are required.

If there are no major issues with the markup then italic, bold, gesperrt, small caps, font change, subscripts and superscripts are shown and optionally coloured. There is also an option to allow underlined text. "Font change" is shown as normal text. The "Tags" and "No Tags" radio buttons determine whether in-line tags are shown.

The "Re-wrap" button attempts to make an approximate representation of the formatted text: all markup tags and proofreaders' notes are hidden, the text is re-wrapped except for /* */ sections. /# #/ sections are indented. It also gives approximate formatting to headings based on the number of preceding and following blank lines. It is often not accurate but is sometimes useful to show where no-wrap markup has been omitted.

Any issues or possible issues which are found are highlighted. If the mouse cursor hovers over a highlight then a message describing the problem should appear. Not all issues are necessarily marked at once (there could be two in the same place, some checks are only made if parsing is correct), but if the marked issues are corrected then any other issues should be marked if the preview is shown again.

The configuration can allow some warnings for possible issues to be suppressed as shown below. In this case a yellow triangle marker appears after the possible issues box to remind you of this.

The messages for definite issues are as follows (If any of these appear then the formatting (italic etc.) is not shown and the "Color markup", "Tags, No tags, Text" and "Re-wrap" options are not available):

  • Only 1, 2 or 4 blank lines should be used.
  • Tab should not be used.
  • Heading should not be entirely bold.
  • Small caps must contain at least one upper case character. (If the small-caps section includes a proofer's note containing an upper-case letter then this is marked as a possible issue).

For in-line and out-of-line tags:

  • No start tag for this end tag
  • No end tag for this start tag
  • End tag does not match start tag
  • Empty tag

For in-line tags:

  • No corresponding end tag in paragraph
  • Tag nested within same tag
  • Space after start tag
  • Newline after start tag
  • Newline before end tag
  • Space before end tag

For out-of-line tags:

  • No-wrap inside no-wrap
  • Block quote inside no-wrap
  • Out-of-line start tag should not be preceded by normal text
  • Out-of-line end tag should not be followed by normal text
  • This tag should be alone on its line

For Footnote, Sidenote, Illustration and thought break

  • A blank line should precede this
  • No characters should precede this

For a thought break:

  • A blank line should follow <tb>

The following are marked as possible issues (Formatting is marked and coloured, "No tags" and "Re-wrap" options are still available):

  • Unrecognized tag
  • Punctuation after start tag (, . ; : ! ?)
  • Character or punctuation before inline start tag -- can be suppressed.
  • Character after inline end tag
  • comma, semicolon or colon before end tag
  • No matching closing bracket (for Footnote, Sidenote and Illustration)
  • Footnote identifier should be a letter or number
  • Footnote anchor should be an upper-case letter (if [*] is found)
  • No corresponding footnote on this page
  • No anchor for this footnote
  • Multiple anchors for same footnote
  • Footnote must have a colon
  • The colon should immediately follow *[Footnote (for a continuation footnote)
  • Footnote should be followed by one space and identifier
  • Duplicate footnote identifier
  • Continuation footnote should precede others
  • A blank line should follow Footnote
  • A blank line should precede and follow Sidenote -- can be suppressed
  • A blank line should follow Illustration

"No matching closing bracket" and "A blank line should follow ..." for Footnote, Sidenote and Illustration, are marked only as possible issues because although the bracket and blank line are required by the guidelines, if a footnote contains a legitimate unmatched opening or closing bracket then one of these errors will occur. The user can then decide whether it is a real error.

Tags inside proofreader's notes are ignored.

Configuration

Pressing OK (at the bottom of the panel) applies the options selected to the preview and saves them for future use. Pressing Cancel leaves everything as it was before. The configuration settings are stored on the user's computer. If you use different browsers then each will have its own configuration.

Choose Colors

At the top of the configuration panel the example text shows the effect of the options selected.

The table allows colors to be selected for each type of markup.

"Plain text" controls the default overall background and text colors for all text with no markup. Text and background colors can be customized for the standard inline tags, for "Other tags", "Issues" and "Possible Issues". "Other tags" refers to <tb>, sub- and superscripts, and start/end blockquote and no-wrap tags. Greek, Footnote, Sidenote, Illustration and Proofers' notes markup cannot be assigned a color.

If a checkbox is blank then the same color is used as for plain text. If a box is checked a color selector appears next to it. This will initialy show the color for plain text but clicking on it allows the color to be changed. Un-checking a checkbox causes the color selector to disappear and the corresponding color to go back to that for plain text.

Each browser's implementation of choosing colors is likely to be different from the others, but they all have a way to choose colors.

Options

  • Allow <u> for underline: <u> and </u> tags will be recognised and underlining shown. This text is not colored. This should only be used where it is requested in the Project Comments. (The guidelines say that underlined text should normally be marked as italic).
  • Preview Math: latex-style math markup enclosed in \[ ... \] or \( ... \) delimiters will be rendered. This should only be used where it is requested in the Project Comments which will also refer to the relevant documentation.

Suppress warnings

Some warnings can be suppressed. If any of these options is selected a warning triangle is shown next to the possible issues box.

  • Character or punctuation before inline start tag.
  • A blank line should precede and follow Sidenote.

Initial view mode

Tags, No Tags or Text can be selected.

Known Bugs and Shortcomings

  • Nested subscripts or superscripts such as a^{b^{cd}} do not show correctly.
  • Tables: If a table cell has inline markup and extends over more than one line then the markup may show incorrectly and various issues may be shown. See for exanple [1] where the correct markup of "hors de combat" would cause text in other cells to also appear italic.