Category:HelloXenProjectBook: Difference between revisions

From Xen
Jump to navigationJump to search
(Created page with "== Credits == This book was originally contributed by Mohsen Mostafa Jokar (see [http://markmail.org/thread/2p34bqkugkjhicwp e-mail thread that includes a PDF]) with the inte...")
 
Line 16: Line 16:
* Repeat and rinse until correct
* Repeat and rinse until correct


==== Fixing up the generated markup ====
==== Preparing the generated markup ====
Before you create the page, copy the chapter into your favourite editor. I observed that several things tend to go wrong
Before you create the page, copy the chapter into your favourite editor. I observed that several things tend to go wrong
* Some of the bulleting does not get converted correctly: you may find special characters being created such as "•" and "• " (sometimes in different sizes). You may need to replace "•" with "* ", etc.
* Some of the bulleting does not get converted correctly: you may find special characters being created such as "•" and "• " (sometimes in different sizes). You may need to replace "•" with "* ", etc.
Line 33: Line 33:
* At the bottom of the page, add
* At the bottom of the page, add
<pre>[[Category:Users]] [[Category:HelloXenProjectBook]]</pre>
<pre>[[Category:Users]] [[Category:HelloXenProjectBook]]</pre>

==== Creating the page ====
If you add chapter X, then create a page called
* <pre>Book/HelloXenProject/X-Chapter</pre> and copy the content in
* Go to preview and check how it looks
* Fix up any remaining issues
* Then save


==== Adding images ====
==== Adding images ====

Revision as of 17:15, 12 April 2017

Credits

This book was originally contributed by Mohsen Mostafa Jokar (see e-mail thread that includes a PDF) with the intention to become a book that others can contribute to and evolve over time.

Converting chapters

Prerequisites

  • Install a Linux distribution which contains LibreOffice's MediaWiki export function (e.g. openSUSE, Fedora, some versions of Debian)
  • Download the the attachment from [1]

Workflow

Chose the chapter that you want to convert. You can do this in one of two ways

Preparing the generated markup

Before you create the page, copy the chapter into your favourite editor. I observed that several things tend to go wrong

  • Some of the bulleting does not get converted correctly: you may find special characters being created such as "•" and "• " (sometimes in different sizes). You may need to replace "•" with "* ", etc.
  • Tables tend to be generated poorly, but ultimately they are OK. If you want them to look pretty, remove any style="..." elements (you can use replace the style strong with "") and make sure table headers start with "!". In addition you may want to add have the table begin with
    {| class="prettytable"
  • Special characters such as ticks or crosses get to converted wrongly: they will end up as "x". You will have to fix these up manually. Check out [2] for suggestions
  • Images tend to get generated as
[[Image:|top]]

==== Figure 2: ... ====

To fix this you can use search and replace to get something like

[[Image:|top|Figure 2: ... ]]

After that, replace "[[Image:|top|" with "[[Image:XXX.png|600px|none|thumb|" - this ensures that images are the same size and you can search for XXX.png

  • Headlines do not always come across correctly. You may need to do some editing there.
  • At the bottom of the page, add
[[Category:Users]] [[Category:HelloXenProjectBook]]

Creating the page

If you add chapter X, then create a page called

  • Book/HelloXenProject/X-Chapter
    and copy the content in
  • Go to preview and check how it looks
  • Fix up any remaining issues
  • Then save

Adding images