All block level rules must start at the beginning of the line. Note that if a line ends with a backslash (\), the next line will be considered part of it. All block-level rules are applied before any inline rules are considered.
***** With a leading space * * I can include preformatted text * * with interior spaces and stuff ***** like that.
table | newcell |
table | newcell |
second row |
centered
right flush
All inline rules must start and end on the same line. Note that ending a line with a backslash (\) will cause it to be joined with the next line.
To create a gallery of images, first divide the images into groups. Setting your file browser to show thumbnails makes this easy enough. Drag & drop groups of images into folders.
Next you need to scale the images to an appropriate size and make thumbnails. I use the ImageMagick package to do most of the work. Here are the commands I use to shrink images and to create thumbnails (after creating directories called small and thumbs in each image directory):
When I need to rotate the images at the same time, I use:
These settings yield a nice tradeoff between file size and quality, and the thumbnails are all the same height (which looks good on the page). Using bash you can process a whole directory using:
mkdir small thumbs for x in *.jpg ; do echo $x convert $x -resize 512x512 -quality 80 +profile "*" small/$x convert $x -resize 200x64 -quality 90 +profile "*" thumbs/$x done
To convert a PDF file, use:
gs -sDEVICE=pngmono -sOutputFile=$x.png -r600x600 $x.pdf
The directory hierarchy should look something like this:
pics/picdir/small/picZ.jpg pics/picdir/thumbs/picZ.jpg pics/picdir/groupdir1/small/pic1.jpg pics/picdir/groupdir1/thumbs/pic1.jpg pics/picdir/groupdir2/small/pica.jpg pics/picdir/groupdir2/thumbs/pica.jpg pics/picdir/groupdir2/large/pica.jpg
Note that images in the large/ directory are optional. If present, the corresponding small images will link to them. The other groupings are described in more detail below.
Upload the images and then create a page as you normally would, but add ::Index to the end, as in MyPictures::Index. Pages with this kind of name are given special treatment. The file should follow this format:
picdir (the subdirectory containing these images) <-- (a blank line) groupdir1: Title of the first group of images with indexing pic1.jpg pic2.jpg .. <-- (blank line between groups) (groupdir2:) Title of the second group of images with no indexing pica.jpg *picb.jpg .. <-- (blank line) : Title of third group with indexing ... <-- (blank line) Title of fourth group with no indexing ...
A main index page will be created with the a few thumbnails from each group and a link to the group index page. If you want to specify the thumbnails to be displayed on the main index page, put a * in front of each one (as in picb.jpg above). Otherwise, the first few images will be selected by default.
If there are only a few images in a group, the main index will take you directly to the images. Otherwise, titles starting with groupdir: or : will be split into smaller groups and the main index will link to a group index page with thumbnails for all of that group's images.
If the title isn't preceeded by groupdir:, all images in that group must be in small/ and thumbs/ subdirectories under the picdir directory. No secondary index page will be created in this case unless you preceed the title with a : as in the third group above. When there is no index, the group will still be split into multiple groups but the thumbnails will all appear on the main index page. To force this behavior when the images are in a subdirectory, enclose the directory name and colon in parentheses as in the second group above.
Any time a group is split, the pages will be given suffixes like "part I", "part II", etc.
Any time you request to edit a page in the image group, you will be taken to the ::Index page (since all other pages are generated). Similarly, whenever you take any action on a page in the group, the entire group will be affected. If you view a page, all pages will be generated (and cached if appropriate). If you delete a page, the entire group will be deleted, etc. Generally this is the expected behavior, but it can mean slow page loads if you are working with a large image set. Note that once the group has been rendered and cached, it will still be as fast as normal, so the slow loads only show up when you are editing pages or you do a refresh.
Captions are optional for individual pictures and for groups of pictures. Group captions appear above the (first) group of thumbnails on the main index page, and captions for individual pictures appear above that picture. Captions can also appear at the top and/or bottom of the main index page.
Captions are indented with one or more spaces on the lines following the image file name or the group name. Multiple line captions are okay, they are processed just like any other markup; the only difference is that all leading spaces are removed. You can optionally start each line with a '|' character, in which case any spaces following the '|' will be left in (this lets you include preformatted blocks that are marked with a single leading space).