Pdf:APRJA Content Form Manual
Content Form Manual
about this manual
This is a manual for using a version of wiki-to-print, borrowed from other wiki to print systems, installed on the CC server.
It may serve as a basis for understanding and being part of a developing practice of using MediaWiki, the web framework Flask and the JavaScript library paged.js within collaborative publishing environments to make PDFs.
content
structure of a wiki
Wikis are generally used for collaborative writing about particular topics. They are dynamic websites generated by files that query a database when a page is visited, to produce webpages. All the requested content is gathered together in a particular arrangement according to templates. The HTML files are only there when the page is made.
On the content management side, every entry in a wiki, therefore, including uploaded images, is viewed on the wiki as a page, including sections for editing, discussing, viewing history of changes and more.
mediawiki interface
The interface is configured to follow the layout of a "skin". The default skin, Vector has a sidebar on the left, a section of buttons and search at the top and the contents of the page below.
![Mediawiki interface]()
- sidebar navigation
- user navigation
- page navigation
- page content
basic wiki editing
starting new wiki pages
You can prompt the creation of a new page by
- adding wikilinks (these will appear as [red links](#red-link) until the page is created
- searching for a page that doesn't exist
- making a URL for the page by appending the page name to the root URL.
page naming conventions
It is best to avoid using certain characters that MediaWiki reserves for special uses when creating page names, such as `& # < > [ ] | { }`.
In APRJA, we use the following naming conventions for
- Contributions**
Content Form:APRJA 13 Name of Author
for example, Content Form:APRJA 13 Karen Eliot
Editorial Content
APRJA Content Form - Section Name
for example APRJA Content Form - Colophon
In these buttons are options to read and edit page information. This includes a reading view, "discussion" pages, reading, editing (source), viewing history of changes, and more.
- delete
- move (same as renaming)
- protect
In wiki-to-print, while in the [Pdf namespace](#pdf-namespace), you may notice a change with these buttons. There are several differently coloured additions.
MediaWiki documentation on
- starting new pages: <https://www.mediawiki.org/wiki/Help:Starting_a_new_page>
- links: <https://www.mediawiki.org/wiki/Help:Links>
- page naming: <https://www.mediawiki.org/wiki/Manual:Page_naming>
organising the content
namespaces
Wikis are organised into a series of [namespaces](https://www.mediawiki.org/wiki/Help:Namespaces). These include standard namespaces that produce the content as well as any custom namespaces made for special purposes.
Standard namespaces produce the normal content of a wiki such as user pages e.g. `https://my-wiki/User:Simon/my-page`, or information pages in the Special namespace that e.g. `https://my-wiki/Special:SpecialPages`. Any page that is not prefixed by a standard namespace name is in the mainspace, or main namespace, for example `https://my-wiki/my-page`.
Custom namespaces can be added to a wiki. This is useful when using wiki-to-print, which depends on a Pdf namespace to gather the content and a PdfCSS namespace for the related form.
These are the pages created under the custom namespaces Pdf and PdfCSS for the APRJA Content Form publication
- https://cc.vvvvvvaria.org/wiki/Pdf:APRJA_Content_Form
- https://cc.vvvvvvaria.org/wiki/PdfCSS:APRJA_Content_Form
categories
A common way to organise wiki pages is by putting them into categories.
Categories help to group content together in associations. For example, each page that is part of a publication can be in the same category.
<pre> [[Category: Content Form]] </pre>
Results for all pages in the "Content Form" category can be found can be found by entering `Category: Content Form` in the search bar.
MediaWiki documentation on
- categories: <https://www.mediawiki.org/wiki/Help:Categories>
the content staging page
It is useful to create a "staging page" to keep track of all the content needed in a publication. This can be created in the main namespace as a standalone page on the wiki, for example: <pre>https://mywiki/publication_title</pre>
It is also a useful place to keep links to all of the parts of a publication, in a list. For example, here is the staging page for APRJA Content Form: https://cc.vvvvvvaria.org/wiki/Content-Form
transclusion
A key concept in MediaWiki is "transclusion", a technique of including parts or a whole text in other pages. Updates made to the page will be visible wherever it is transcluded.
![](https://vvvvvvaria.org/~simoon/img/Transclusion_simple.svg)
wiki-to-print
In wiki-to-print, wiki pages are created in the main namespace, and in a custom Pdf namespace.
These are two environments working together:
- Main namespace; wiki pages in [categories](#categories)
- Pdf namespace; an [unfolded page](#unfolded-page) of many wiki pages gathered together
- PdfCSS namespace; a parallel page with which to edit [CSS](#css) and preview the PDF
The main namespace
is the default one on MediaWiki.
Pages created in this namespace are by default named by the title of the wiki page.
The Pdf & PdfCSS namespaces
Pages created in this namespace are named after publications.
These are used by wiki-to-print to gather together content into a PDF design environment, and to use CSS to render HTML and PDF previews.
unfolded page
An "unfolded page" gathers together the various wiki pages and HTML markup needed to assemble the publication. The unfolded page is a place to include (in HTML markup) and [transclude](#transclusion) (in wikitext) the following content:
- the cover
- the title of the journal
- a list of authors
- other publication details (logo, volume/issue number and year)
- a manually made [Table of contents](#making-the-table-of-contents)
- the colophon
- the editorial
- items from contributors
- any backmatter (e.g. about wiki-to-print)
<pre> __NOTOC__ <div id="cover"> </div> <div class="toc"> manually made table of contents </div> <div class="item"> {{ :title of contribution }} </div> </pre>
unfolded page CSS
form
making the Table Of Contents
The table of contents is made manually. It follows this wikitext format:
<pre> * '''manually made author name'''<br>[[#id_of_article|linked text]] </pre>
A breakdown of the wikitext:
1. First, use `*` for each list item
2. Then, add the author name inside of opening and closing `` marks, to make it bold. This is needed to style the Table of Contents, with the author name appearing a line above the title and subtitle of their contribution.,
3. Then, add a break `
` item in between the author name and title. This is needed to separate the authors name from the title and subtitle in the table of contents.
4. Then, add the `#id-of-the-title` from its corresponding page. The id is needed to link directly to the page there the title appears. MediaWiki auto-generates id values for each heading in a page. They are usually all lowercase, with `-` separating words. You can use the web inspector of the browser to find out what the id of the element is, where it appears in HTML in the PDF preview on the relevant page of the publication.
Select the heading, which is usually inside a `` element, labelled as `id="id-of-the-title"`. Notice that in HTML, the id is given as the value of `id=`, inside quotation marks.
In the example below, the id is `Platform_Pragmatics`. This can be added with a hash symbol `#` in the Table of Contents.
1. Finally, add linked text that will appear on the page
Finding the id of the title with a web inspector
Notes about
mediawiki
MediaWiki is a popular open-source wiki software that runs Wikipedia, the world's largest online community of wiki editors. The large community of people contributing to MediaWiki results in a wide range of extensions that can be added to the software.