the scruffy markup

scruffy is the markup that is understood by scruf.

All scruffy marked up documents must have a .scruffy extension -- that is how scruf comes to know that a particular file is, indeed, a scruffy document.

The following sections will get you acquainted with the scruffy markup.

meta things

First things first. At the beginning of the scruffy document, it is required to specify some meta things -- the document title & the author of the document.

This is how it is done.

meta-title: Title of Your Document
meta-author: Author

document date

To specify the date of creation of the document, surround the date with a pair of $$$.

$$$ 1 January, 1984 $$$

It can be made verbose too.

$$$ Posted on 1 January, 1984 $$$

headings

The mark-up for specifying the heading is the clumsiest of all. Now is the time to hate scruffy for what it is.

To specify a <h1> heading, surround the heading string with a pair of 10 equals sign(=).

==========
Heading 1
==========

For a <h2> heading, the heading string is surrounded by a pair of 20 equals sign.

====================
Heading 2
====================

So the math is:

 no of equals signs = ((heading size) * 10)

For <h3> (head size is 3), the number of equals signs is equal to 30. Therefore, to get a <h3> heading, the heading string should be surrounded by a pair of 30 equals signs.

paragraphs

Paragraphs are delimited by a blank line.

foo is good at drinking.

bar loves to hack code.

The above two lines are converted to:

<p> foo is good at drinking.</p>

<p> bar loves to hack code.</p>

word decoration

Bold text is surrounded by three singles quotes(''').

'''This text will be in bold'''  

Italic text is surrounded by two single quotes('').

''This text will be italicized''

Underlined text is surrounded by two underscores (__).

__This text will be underlined__

Text may be monopspaced too, it is done by surrounding the text with ` symbol.

`monospaced text` 

If the beginning of the text, in a paragraph, is decorated, then, please remember to leave a space before starting the paragraph.

 ''This paragraph is'' decorated at the beginning with italics, 
so, a space is left before starting the paragraph.

code blocks

When it is desired to illustrate code or show verbatim text, the text or code is put around a pair of ###.

 ###

#include <beer.h>

void main() {
beer lager;
lager.drink();
return;
}

###

Text inside code blocks cannot be marked up, as all special characters are converted into their corresponding HTML number inside a code block.

All through this document, those grayscaled blocks of text are, indeed, code blocks.

block quote

A block of text is blockquoted when it is surrounded by %%% string.

%%%
The is phrase is fain to be blockquoted by scruf.
%%%

links

The markup for links is very similar to MoinMoin's markup for links:

[[http://en.wikipedia.org/wiki/Special:Random|Wikipedia Random Article]]

As seen above, the link block is surround by [[ & ]]. The first part inside the link block is the link and the second part (which is optional) is a description of the link. The two parts of the link block is separated by a | (pipe) symbol.

The pipe symbol (|) is eliminated from the link block, if the link description is not specified.

The HTML form of the above link block will look like:

<a href="http://en.wikipedia.org/wiki/Special:Random"> Wikipedia Random Article </a>

images

The markup for the image block looks like this:

{{/path/to/the/image.jpg|description of the image}}

As seen above, the image block is enclosed with {{ & }}. The first part of the image block is the path to the location where the image stored. The second part (which is optional) is a textual description of the image. The textual description is what that is shown when the image cannot be displayed in the browser(text-only browsers, for instance).

The two parts of the image block is separated by the | (pipe) symbol. The pipe symbol is eliminated, if the textual description of the image is not specified.

audio

scruf uses HTML5 <audio> tag to embed audio.

The markup for embedding audio:

{{audio:/path/to/the/audio.ogg}}

As seen above, the audio block is enclosed with {{ & }}. Inside the braces, the audio block starts with audio: followed by the path to the audio file.

At present, there is support for only Ogg Vorbis audio.

footer

The author's name and copyright information may be placed inside the footer block. This block, as the name implies, is put at the end of the document.

----------------------------------------------------------------------
written by Audacius Scrooge. It is licensed under CC-BY-SA
----------------------------------------------------------------------

The footer block is enclosed by a pair of seventy hyphens (-).

In Emacs, the whopping seventy hyphens can be generated with a C-u 70 -.

have problems?

If there are/is any issue(s) in understanding the scruffy markup, contact rsiddharth.

source
back
Last Updated on: 17 July, 2014
powered by scruf