Extension:Proofread Page

The Proofread Page extension creates a book either:
 * 1) as a column of ocr>w:Optical character recognition|OCR text beside a column of scanned images, or
 * 2) broken into chapters or poems. The content of a document appears in the mediawiki page. (transclusion).

The extension is intended to allow easy comparison of text to the original digitization.

This extension shows the text in several ways without actually duplicating the original text.

Use
The extension is installed on all 1>s:mul:|Wikisource wikis. For the syntax, see 2>s:mul:Wikisource:ProofreadPage. It is also used on 3>wikilivres:|Bibliowiki.

Requirements and recommendations

 * Access to the command line is required if running the update script (maintenance/update.php) from the web browser fails (1>Upgrade|documentation here and 2>Manual:Update.php|here).


 * If you want to use DjVu files (optional but recommended), a native DjVu handler needs to be available for configuration. See also 1>Manual:How to use DjVu with MediaWiki.


 * In addition, use of ProofreadPage is highly improved by the use of the following extensions:
 * LabeledSectionTransclusion (strongly recommended)
 * Cite (default page footer contains  
 * Poem</>
 * <tvar|pdfhandler>PdfHandler</> (may require additional PHP packages) — adds PDF support
 * <tvar|pagedtiffhandler>PagedTiffHandler</>
 * <tvar|parser>ParserFunctions</>

Thumbnailing
The extension links directly to image thumbnails which often don't exist. You must catch 404 errors and generate the missing thumbnails. You can do this with any one of these solutions:


 * Set an Apache <tvar|1>RewriteRule</> in <tvar|htaccess>.htaccess</> to thumb>Manual:Thumb.php</>|thumb.php for missing thumbnails:
 * or set the Apache 404 handler to Wikimedia's <tvar|svn>thumb-handler</>. This is a general-purpose 404 handler with Wikimedia-specific code, not simply a thumbnail generator.
 * For MediaWiki >= 1.20, you can simply redirect to <tvar|1>thumb_handler.php</>:
 * Or in <tvar|1>apache2.conf</>:

WARNING: There is an <tvar|1></> in the images directory that may interfere with any <tvar|2>.htaccess</> rules you install.

Namespaces
ProofreadPage create by default two custom namespaces named "Page" and "Index" in English with respectively ids 250 and 252.

Their names are translated if your wiki use an other language. <tvar|1></>.

You can customize their name or their id: namespaces>Manual:Using_custom_namespaces#Creating_a_custom_namespace</>|Create namespaces by hand and set their ids in <tvar|localsettings>LocalSettings.php</> using <tvar|1>$wgProofreadPageNamespaceIds</> global. You will do something like: Namespace id customization is not recommended and might not be supported in the future.

Configuration

 * In order to use the status>:s:Help:Page status</>|page quality system, it is necessary to create five categories. The names of these categories must be defined in <tvar|quality0>Mediawiki:Proofreadpage_quality0_category</> to <tvar|quality4>Mediawiki:Proofreadpage_quality4_category</>.
 * Ensure that you have installed <tvar|1>Extension:ParserFunctions</>

Configuration of index namespace

 * You need to create <tvar|template>MediaWiki:Proofreadpage_index_template</> in order to display index pages. This page is a template that receive as parameter entries of the edition form.

The configuration is a JSON array of properties. Here is the structure of a property in the array, all the parameters are optional, the default value are set: The data parameter can have for value: "type", "language", "title", "author", "translator", "illustrator", "editor", "school", "year", "publisher", "place" or "progress".
 * You need to create <tvar|config>MediaWiki:Proofreadpage_index_data_config</> that contain the configuration of the index form. This new configuration page overrides <tvar|index>MediaWiki:Proofreadpage_index_attributes</> and <tvar|js>MediaWiki:Proofreadpage_js_attributes</>.

Page separator
The extension puts a separator between every transcluded page and the next, which is defined by <tvar|1> </>. The default value is <tvar|2> </> (a whitespace). Set <tvar|var> </> to suppress the separator.

Join hyphenated words across pages
When a word is hyphenated between a page and the next, the extension joins together the two halves of the word. Example: his- and tory becomes history. The "joiner" character is defined by <tvar|1> </> and defaults to '-' (the regular hyphen character).

Creating your first page (example with DjVu)

 * Before following these steps ensure you have followed the instructions in Using DjVu with MediaWiki.


 * (when and in which namespace is the djvu file itself uploaded?)


 * Create a page in the "Page" namespace (or the internationalized name if you use an not-English wiki). For example if your namespace is <tvar|1>'Page'</> create <tvar|2> </>


 * Create the corresponding file for this page <tvar|1>commons:File:Carroll - Alice's Adventures in Wonderland.djvu</> (or set <tvar|2>Manual:$wgUseInstantCommons</> to <tvar|true> </>).


 * Create the index page <tvar|1> </>
 * Insert the tag <tvar|2> </> in the Pages field to visualize the page list


 * To edit page 5 of the book navigate to <tvar|1>'Page:Carroll - Alice's Adventures in Wonderland/5'</> and click edit

Syntax
This extension introduces the following tags: <tvar|pages> </> and <tvar|pagelist> </>.